From 7c701367c0820691e2a0f8f1cfd1fb3470071704 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 2 Feb 2022 11:23:02 +0100 Subject: [PATCH 001/811] fix: some frameless windows showing a frame on Windows (#32692) --- 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 8b6202b6a8847ddd28768fe09b0e014259a6b8e7 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 05:20:39 -0800 Subject: [PATCH 002/811] Bump v19.0.0-nightly.20220202 --- 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 d8c23d2a23ac7..7972b74ffe8dd 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220201 \ No newline at end of file +19.0.0-nightly.20220202 \ No newline at end of file diff --git a/docs/tutorial/support.md b/docs/tutorial/support.md index e757ec22e21f1..d7a51f57140c4 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 +* 19.x.y * 18.x.y * 17.x.y * 16.x.y -* 15.x.y ### End-of-life diff --git a/package.json b/package.json index 17364c42ece0c..bc9587c97a192 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220201", + "version": "19.0.0-nightly.20220202", "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..cf79321198695 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 19,0,0,20220202 + PRODUCTVERSION 19,0,0,20220202 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", "19.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.0" + VALUE "ProductVersion", "19.0.0" VALUE "SquirrelAwareVersion", "1" END END From 9a5a45e804d83ea06f458d2ff9020aec87ffc17d Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 2 Feb 2022 07:06:36 -0800 Subject: [PATCH 003/811] fix: WCO window hover on window controls on Windows (#32672) * fix: WCO window hover on window controls * Update shell/browser/ui/win/electron_desktop_window_tree_host_win.cc Co-authored-by: Robo Co-authored-by: Robo --- .../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 ed185f324e791da5dea3475aeb8d4fae798d7122 Mon Sep 17 00:00:00 2001 From: Sofia Nguy Date: Wed, 2 Feb 2022 07:07:11 -0800 Subject: [PATCH 004/811] docs: Update E18 release date (#32665) --- 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 c3d11e2ea2d9751a457c72805b7688a38ceac30a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 3 Feb 2022 00:32:53 +0900 Subject: [PATCH 005/811] test: fix failing tests of focus/blur events of WebContents (#32711) --- 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 4c39eb32b0d2be479b9a0856186c6dfeccae6b96 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 2 Feb 2022 23:01:05 +0100 Subject: [PATCH 006/811] refactor: use QuickLookThumbnailing where applicable (#32456) --- BUILD.gn | 2 + .../api/electron_api_native_image_mac.mm | 103 +++++++++++++----- 2 files changed, 79 insertions(+), 26 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 3aa40b4855f8e..7fe689d592bd1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -501,6 +501,8 @@ source_set("electron_lib") { "StoreKit.framework", ] + weak_frameworks = [ "QuickLookThumbnailing.framework" ] + sources += [ "shell/browser/ui/views/autofill_popup_view.cc", "shell/browser/ui/views/autofill_popup_view.h", diff --git a/shell/common/api/electron_api_native_image_mac.mm b/shell/common/api/electron_api_native_image_mac.mm index 68aacfdf28b25..60f3765a3def3 100644 --- a/shell/common/api/electron_api_native_image_mac.mm +++ b/shell/common/api/electron_api_native_image_mac.mm @@ -10,8 +10,10 @@ #import #import +#import #include "base/mac/foundation_util.h" +#include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" #include "gin/arguments.h" #include "shell/common/gin_converters/image_converter.h" @@ -53,32 +55,81 @@ } CGSize cg_size = size.ToCGSize(); - base::ScopedCFTypeRef cfurl = base::mac::FilePathToCFURL(path); - base::ScopedCFTypeRef ql_thumbnail( - QLThumbnailCreate(kCFAllocatorDefault, cfurl, cg_size, NULL)); - __block gin_helper::Promise p = std::move(promise); - // we do not want to blocking the main thread while waiting for quicklook to - // generate the thumbnail - QLThumbnailDispatchAsync( - ql_thumbnail, - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, /*flags*/ 0), ^{ - base::ScopedCFTypeRef cg_thumbnail( - QLThumbnailCopyImage(ql_thumbnail)); - if (cg_thumbnail) { - NSImage* result = - [[[NSImage alloc] initWithCGImage:cg_thumbnail - size:cg_size] autorelease]; - gfx::Image thumbnail(result); - dispatch_async(dispatch_get_main_queue(), ^{ - p.Resolve(thumbnail); - }); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - p.RejectWithErrorMessage("unable to retrieve thumbnail preview " - "image for the given path"); - }); - } - }); + + if (@available(macOS 10.15, *)) { + NSURL* nsurl = base::mac::FilePathToNSURL(path); + + // We need to explicitly check if the user has passed an invalid path + // because QLThumbnailGenerationRequest will generate a stock file icon + // and pass silently if we do not. + if (![[NSFileManager defaultManager] fileExistsAtPath:[nsurl path]]) { + promise.RejectWithErrorMessage( + "unable to retrieve thumbnail preview image for the given path"); + return handle; + } + + NSScreen* screen = [[NSScreen screens] firstObject]; + base::scoped_nsobject request( + [[QLThumbnailGenerationRequest alloc] + initWithFileAtURL:nsurl + size:cg_size + scale:[screen backingScaleFactor] + representationTypes: + QLThumbnailGenerationRequestRepresentationTypeAll]); + __block gin_helper::Promise p = std::move(promise); + [[QLThumbnailGenerator sharedGenerator] + generateBestRepresentationForRequest:request + completionHandler:^( + QLThumbnailRepresentation* thumbnail, + NSError* error) { + if (error || !thumbnail) { + std::string err_msg( + [error.localizedDescription UTF8String]); + dispatch_async(dispatch_get_main_queue(), ^{ + p.RejectWithErrorMessage( + "unable to retrieve thumbnail preview " + "image for the given path: " + + err_msg); + }); + } else { + NSImage* result = [[[NSImage alloc] + initWithCGImage:[thumbnail CGImage] + size:cg_size] autorelease]; + gfx::Image image(result); + dispatch_async(dispatch_get_main_queue(), ^{ + p.Resolve(image); + }); + } + }]; + } else { + base::ScopedCFTypeRef cfurl = base::mac::FilePathToCFURL(path); + base::ScopedCFTypeRef ql_thumbnail( + QLThumbnailCreate(kCFAllocatorDefault, cfurl, cg_size, NULL)); + __block gin_helper::Promise p = std::move(promise); + // Do not block the main thread waiting for quicklook to generate the + // thumbnail. + QLThumbnailDispatchAsync( + ql_thumbnail, + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, /*flags*/ 0), ^{ + base::ScopedCFTypeRef cg_thumbnail( + QLThumbnailCopyImage(ql_thumbnail)); + if (cg_thumbnail) { + NSImage* result = + [[[NSImage alloc] initWithCGImage:cg_thumbnail + size:cg_size] autorelease]; + gfx::Image thumbnail(result); + dispatch_async(dispatch_get_main_queue(), ^{ + p.Resolve(thumbnail); + }); + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + p.RejectWithErrorMessage("unable to retrieve thumbnail preview " + "image for the given path"); + }); + } + }); + } + return handle; } From e0f2511cba757925ade70a3936fde14339a2504e Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 2 Feb 2022 14:14:11 -0800 Subject: [PATCH 007/811] chore: bump NMV for Electron 19 (#32703) --- 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 0eb443c8153e9..a346a9b3d4939 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 = 103 +node_module_version = 106 v8_promise_internal_field_count = 1 v8_typed_array_max_size_in_heap = 0 From 2526031a5f9def6f4d1e6d5713d71463b799d0de Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 05:01:03 -0800 Subject: [PATCH 008/811] Bump v19.0.0-nightly.20220203 --- 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 7972b74ffe8dd..0c2d0c1753ddf 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220202 \ No newline at end of file +19.0.0-nightly.20220203 \ No newline at end of file diff --git a/package.json b/package.json index bc9587c97a192..665b77f7df74d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220202", + "version": "19.0.0-nightly.20220203", "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 cf79321198695..d2e0b381b2a1e 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 19,0,0,20220202 - PRODUCTVERSION 19,0,0,20220202 + FILEVERSION 19,0,0,20220203 + PRODUCTVERSION 19,0,0,20220203 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7442905dd28c72235c8d61aab0e24d1f25eb6ca0 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 3 Feb 2022 16:57:21 -0400 Subject: [PATCH 009/811] build: Support cygwin in script/lib/util.py (#32731) Running a build on Cygwin or MSYS2 otherwise fails. Signed-off-by: Juan Cruz Viotti --- script/lib/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/lib/util.py b/script/lib/util.py index 89b8bbb976c87..9c667fed9e906 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -206,6 +206,7 @@ def get_buildtools_executable(name): 'linux': 'linux64', 'linux2': 'linux64', 'win32': 'win', + 'cygwin': 'win', }[sys.platform] path = os.path.join(buildtools, chromium_platform, name) if sys.platform == 'win32': From fb3f5e490e7aeda7a0f0939633afa70f57ca496d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 3 Feb 2022 22:56:50 +0100 Subject: [PATCH 010/811] test: improve webContents.savePage() specs (#32727) --- 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 d46431b564d9618ca1f057aa8f44f085a0c8550a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 05:01:08 -0800 Subject: [PATCH 011/811] Bump v19.0.0-nightly.20220204 --- 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 0c2d0c1753ddf..0f0ec291aff57 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220203 \ No newline at end of file +19.0.0-nightly.20220204 \ No newline at end of file diff --git a/package.json b/package.json index 665b77f7df74d..0c20da5971860 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220203", + "version": "19.0.0-nightly.20220204", "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 d2e0b381b2a1e..eca4ff5dbbde7 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 19,0,0,20220203 - PRODUCTVERSION 19,0,0,20220203 + FILEVERSION 19,0,0,20220204 + PRODUCTVERSION 19,0,0,20220204 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 81fcd732c2080ca857bc7cb5d5b8c701ab382a90 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 7 Feb 2022 09:51:59 +0100 Subject: [PATCH 012/811] fix: savePage throw on relative paths (#32728) --- 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 ac44742ac59c1..c5500d0acb8f9 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 c181cb4f29b44..5f3657001ab8c 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3431,6 +3431,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 bf3650eb1fef2cede8cf94eec0b2227d53f80b35 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 05:02:35 -0800 Subject: [PATCH 013/811] Bump v19.0.0-nightly.20220207 --- 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 0f0ec291aff57..05033af68c543 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220204 \ No newline at end of file +19.0.0-nightly.20220207 \ No newline at end of file diff --git a/package.json b/package.json index 0c20da5971860..1c1029c547c0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220204", + "version": "19.0.0-nightly.20220207", "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 eca4ff5dbbde7..6ea789da446a2 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 19,0,0,20220204 - PRODUCTVERSION 19,0,0,20220204 + FILEVERSION 19,0,0,20220207 + PRODUCTVERSION 19,0,0,20220207 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ce86e81aa622f4bd60b18cce1a6cd727ade6bcb0 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 8 Feb 2022 03:59:28 -0800 Subject: [PATCH 014/811] docs: clarify meaning of cssOrigin (#32753) --- 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 c5500d0acb8f9..d4a1233c5976a 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 c09ce25ab6d2315f8dffb5e5c8e10543d695a2f0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 05:01:02 -0800 Subject: [PATCH 015/811] Bump v19.0.0-nightly.20220208 --- 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 05033af68c543..315dbb4575e8a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220207 \ No newline at end of file +19.0.0-nightly.20220208 \ No newline at end of file diff --git a/package.json b/package.json index 1c1029c547c0f..fa466252ba9ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220207", + "version": "19.0.0-nightly.20220208", "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 6ea789da446a2..f1b41dd372997 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 19,0,0,20220207 - PRODUCTVERSION 19,0,0,20220207 + FILEVERSION 19,0,0,20220208 + PRODUCTVERSION 19,0,0,20220208 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 58af7d2a9ab1f3ce7f94b6141a534cb336aa2684 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 8 Feb 2022 16:15:30 +0100 Subject: [PATCH 016/811] fix: failure to print on macOS (#32767) --- 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 e119da8ce22eeefc60bdae9cbb040cde8c5f25af Mon Sep 17 00:00:00 2001 From: marekharanczyk <48673767+marekharanczyk@users.noreply.github.com> Date: Tue, 8 Feb 2022 17:33:21 +0100 Subject: [PATCH 017/811] Make ElectronBrowser mojo interface frame associated. (#32734) --- 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 841d223b3b04ce247eacaa2fc01a6588ae9b01ae Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Tue, 8 Feb 2022 23:33:33 +0530 Subject: [PATCH 018/811] build: rebuild the `dist_zip`s when the deps get modified (#32713) * 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 --- BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 7fe689d592bd1..bd4402cf8ac7d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1403,11 +1403,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" ] } @@ -1425,6 +1427,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" ] } @@ -1443,6 +1446,7 @@ group("electron_mksnapshot") { dist_zip("electron_mksnapshot_zip") { data_deps = mksnapshot_deps + deps = data_deps outputs = [ "$root_build_dir/mksnapshot.zip" ] } @@ -1453,6 +1457,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" ] @@ -1466,6 +1471,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", @@ -1481,6 +1487,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 ac1d426c518d57ead45f8634513e7da1c78273e0 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 9 Feb 2022 10:40:50 +0100 Subject: [PATCH 019/811] fix: pointer lock escape handling (#32369) --- .../browser/api/electron_api_web_contents.cc | 40 +++++++++++++++---- shell/browser/api/electron_api_web_contents.h | 11 +++-- .../browser/web_contents_permission_helper.cc | 20 ++++------ .../browser/web_contents_permission_helper.h | 6 ++- 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index c3c0f8a9d47ed..a02d458dee929 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1244,6 +1244,9 @@ bool WebContents::PlatformHandleKeyboardEvent( content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) { + if (exclusive_access_manager_->HandleUserKeyEvent(event)) + return content::KeyboardEventProcessingResult::HANDLED; + if (event.GetType() == blink::WebInputEvent::Type::kRawKeyDown || event.GetType() == blink::WebInputEvent::Type::kKeyUp) { bool prevent_default = Emit("before-input-event", event); @@ -1392,6 +1395,35 @@ void WebContents::FindReply(content::WebContents* web_contents, Emit("found-in-page", result.GetHandle()); } +void WebContents::RequestExclusivePointerAccess( + content::WebContents* web_contents, + bool user_gesture, + bool last_unlocked_by_target, + bool allowed) { + if (allowed) { + exclusive_access_manager_->mouse_lock_controller()->RequestToLockMouse( + web_contents, user_gesture, last_unlocked_by_target); + } else { + web_contents->GotResponseToLockMouseRequest( + blink::mojom::PointerLockResult::kPermissionDenied); + } +} + +void WebContents::RequestToLockMouse(content::WebContents* web_contents, + bool user_gesture, + bool last_unlocked_by_target) { + auto* permission_helper = + WebContentsPermissionHelper::FromWebContents(web_contents); + permission_helper->RequestPointerLockPermission( + user_gesture, last_unlocked_by_target, + base::BindOnce(&WebContents::RequestExclusivePointerAccess, + base::Unretained(this))); +} + +void WebContents::LostMouseLock() { + exclusive_access_manager_->mouse_lock_controller()->LostMouseLock(); +} + void WebContents::RequestKeyboardLock(content::WebContents* web_contents, bool esc_key_locked) { exclusive_access_manager_->keyboard_lock_controller()->RequestKeyboardLock( @@ -1424,14 +1456,6 @@ void WebContents::RequestMediaAccessPermission( permission_helper->RequestMediaAccessPermission(request, std::move(callback)); } -void WebContents::RequestToLockMouse(content::WebContents* web_contents, - bool user_gesture, - bool last_unlocked_by_target) { - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - permission_helper->RequestPointerLockPermission(user_gesture); -} - content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager( content::WebContents* source) { if (!dialog_manager_) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 48cb59a2867d2..93c7862ebce88 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -556,6 +556,14 @@ class WebContents : public ExclusiveAccessContext, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) override; + void RequestExclusivePointerAccess(content::WebContents* web_contents, + bool user_gesture, + bool last_unlocked_by_target, + bool allowed); + void RequestToLockMouse(content::WebContents* web_contents, + bool user_gesture, + bool last_unlocked_by_target) override; + void LostMouseLock() override; void RequestKeyboardLock(content::WebContents* web_contents, bool esc_key_locked) override; void CancelKeyboardLockRequest(content::WebContents* web_contents) override; @@ -566,9 +574,6 @@ class WebContents : public ExclusiveAccessContext, content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) override; - void RequestToLockMouse(content::WebContents* web_contents, - bool user_gesture, - bool last_unlocked_by_target) override; content::JavaScriptDialogManager* GetJavaScriptDialogManager( content::WebContents* source) override; void OnAudioStateChanged(bool audible) override; diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 44129dd295834..2fd8cb0a6c699 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -43,17 +43,6 @@ void MediaAccessAllowed(const content::MediaStreamRequest& request, controller.Deny(blink::mojom::MediaStreamRequestResult::PERMISSION_DENIED); } -void OnPointerLockResponse(content::WebContents* web_contents, bool allowed) { - if (web_contents) { - if (allowed) - web_contents->GotResponseToLockMouseRequest( - blink::mojom::PointerLockResult::kSuccess); - else - web_contents->GotResponseToLockMouseRequest( - blink::mojom::PointerLockResult::kPermissionDenied); - } -} - void OnPermissionResponse(base::OnceCallback callback, blink::mojom::PermissionStatus status) { if (status == blink::mojom::PermissionStatus::GRANTED) @@ -157,10 +146,15 @@ void WebContentsPermissionHelper::RequestWebNotificationPermission( } void WebContentsPermissionHelper::RequestPointerLockPermission( - bool user_gesture) { + bool user_gesture, + bool last_unlocked_by_target, + base::OnceCallback + callback) { RequestPermission( static_cast(PermissionType::POINTER_LOCK), - base::BindOnce(&OnPointerLockResponse, web_contents_), user_gesture); + base::BindOnce(std::move(callback), web_contents_, user_gesture, + last_unlocked_by_target), + user_gesture); } void WebContentsPermissionHelper::RequestOpenExternalPermission( diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 6f320b7a6a9b7..639dcd8a8829a 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -36,9 +36,13 @@ class WebContentsPermissionHelper void RequestFullscreenPermission(base::OnceCallback callback); void RequestMediaAccessPermission(const content::MediaStreamRequest& request, content::MediaResponseCallback callback); + void RequestPointerLockPermission( + bool user_gesture, + bool last_unlocked_by_target, + base::OnceCallback + callback); void RequestWebNotificationPermission( base::OnceCallback callback); - void RequestPointerLockPermission(bool user_gesture); void RequestOpenExternalPermission(base::OnceCallback callback, bool user_gesture, const GURL& url); From baaa7787affd03b01050f5309df9959d4c406cfa Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 05:01:45 -0800 Subject: [PATCH 020/811] Bump v19.0.0-nightly.20220209 --- 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 315dbb4575e8a..0b4738720b15b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220208 \ No newline at end of file +19.0.0-nightly.20220209 \ No newline at end of file diff --git a/package.json b/package.json index fa466252ba9ce..3fbd34c144201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220208", + "version": "19.0.0-nightly.20220209", "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 f1b41dd372997..3dff29f890f46 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 19,0,0,20220208 - PRODUCTVERSION 19,0,0,20220208 + FILEVERSION 19,0,0,20220209 + PRODUCTVERSION 19,0,0,20220209 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 254dbd7400797a0c65b6c3711b1008b9bfb541f5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Feb 2022 23:20:51 +0900 Subject: [PATCH 021/811] test: disable the test that makes spec runner hang on exit (#32834) --- 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 e9a43be9beb91a4cb7af04242fe9e27955aa675c Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Wed, 9 Feb 2022 08:00:05 -0800 Subject: [PATCH 022/811] docs: add IPC doc (#32059) * docs: add IPC doc * fix: use "string" primitive * use 'string' ipcrenderer * use "number" primitive * Update docs/tutorial/ipc.md Co-authored-by: Jeremy Rose * Update docs/tutorial/ipc.md Co-authored-by: Jeremy Rose * add code sample Co-authored-by: Jeremy Rose --- docs/api/ipc-main.md | 66 +- docs/api/ipc-renderer.md | 25 +- .../fiddles/communication/two-processes/.keep | 0 .../asynchronous-messages/index.html | 27 - .../asynchronous-messages/main.js | 29 - .../asynchronous-messages/renderer.js | 12 - .../synchronous-messages/index.html | 27 - .../synchronous-messages/main.js | 29 - .../synchronous-messages/renderer.js | 9 - docs/fiddles/ipc/pattern-1/index.html | 14 + docs/fiddles/ipc/pattern-1/main.js | 30 + docs/fiddles/ipc/pattern-1/preload.js | 5 + docs/fiddles/ipc/pattern-1/renderer.js | 6 + docs/fiddles/ipc/pattern-2/index.html | 14 + docs/fiddles/ipc/pattern-2/main.js | 32 + docs/fiddles/ipc/pattern-2/preload.js | 5 + docs/fiddles/ipc/pattern-2/renderer.js | 7 + docs/fiddles/ipc/pattern-3/index.html | 13 + docs/fiddles/ipc/pattern-3/main.js | 48 ++ docs/fiddles/ipc/pattern-3/preload.js | 5 + docs/fiddles/ipc/pattern-3/renderer.js | 8 + docs/tutorial/ipc.md | 571 ++++++++++++++++++ 22 files changed, 798 insertions(+), 184 deletions(-) delete mode 100644 docs/fiddles/communication/two-processes/.keep delete mode 100644 docs/fiddles/communication/two-processes/asynchronous-messages/index.html delete mode 100644 docs/fiddles/communication/two-processes/asynchronous-messages/main.js delete mode 100644 docs/fiddles/communication/two-processes/asynchronous-messages/renderer.js delete mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/index.html delete mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/main.js delete mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/renderer.js create mode 100644 docs/fiddles/ipc/pattern-1/index.html create mode 100644 docs/fiddles/ipc/pattern-1/main.js create mode 100644 docs/fiddles/ipc/pattern-1/preload.js create mode 100644 docs/fiddles/ipc/pattern-1/renderer.js create mode 100644 docs/fiddles/ipc/pattern-2/index.html create mode 100644 docs/fiddles/ipc/pattern-2/main.js create mode 100644 docs/fiddles/ipc/pattern-2/preload.js create mode 100644 docs/fiddles/ipc/pattern-2/renderer.js create mode 100644 docs/fiddles/ipc/pattern-3/index.html create mode 100644 docs/fiddles/ipc/pattern-3/main.js create mode 100644 docs/fiddles/ipc/pattern-3/preload.js create mode 100644 docs/fiddles/ipc/pattern-3/renderer.js create mode 100644 docs/tutorial/ipc.md diff --git a/docs/api/ipc-main.md b/docs/api/ipc-main.md index f55e848c16398..e7c9800a25b50 100644 --- a/docs/api/ipc-main.md +++ b/docs/api/ipc-main.md @@ -1,3 +1,10 @@ +--- +title: "ipcMain" +description: "Communicate asynchronously from the main process to renderer processes." +slug: ipc-main +hide_title: false +--- + # ipcMain > Communicate asynchronously from the main process to renderer processes. @@ -9,7 +16,9 @@ process, it handles asynchronous and synchronous messages sent from a renderer process (web page). Messages sent from a renderer will be emitted to this module. -## Sending Messages +For usage examples, check out the [IPC tutorial]. + +## Sending messages It is also possible to send messages from the main process to the renderer process, see [webContents.send][web-contents-send] for more information. @@ -21,36 +30,6 @@ process, see [webContents.send][web-contents-send] for more information. coming from frames that aren't the main frame (e.g. iframes) whereas `event.sender.send(...)` will always send to the main frame. -An example of sending and handling messages between the render and main -processes: - -```javascript -// In main process. -const { ipcMain } = require('electron') -ipcMain.on('asynchronous-message', (event, arg) => { - console.log(arg) // prints "ping" - event.reply('asynchronous-reply', 'pong') -}) - -ipcMain.on('synchronous-message', (event, arg) => { - console.log(arg) // prints "ping" - event.returnValue = 'pong' -}) -``` - -```javascript -// In renderer process (web page). -// NB. Electron APIs are only accessible from preload, unless contextIsolation is disabled. -// See https://www.electronjs.org/docs/tutorial/process-model#preload-scripts for more details. -const { ipcRenderer } = require('electron') -console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) // prints "pong" - -ipcRenderer.on('asynchronous-reply', (event, arg) => { - console.log(arg) // prints "pong" -}) -ipcRenderer.send('asynchronous-message', 'ping') -``` - ## Methods The `ipcMain` module has the following method to listen for events: @@ -59,7 +38,7 @@ The `ipcMain` module has the following method to listen for events: * `channel` string * `listener` Function - * `event` IpcMainEvent + * `event` [IpcMainEvent][ipc-main-event] * `...args` any[] Listens to `channel`, when a new message arrives `listener` would be called with @@ -69,7 +48,7 @@ Listens to `channel`, when a new message arrives `listener` would be called with * `channel` string * `listener` Function - * `event` IpcMainEvent + * `event` [IpcMainEvent][ipc-main-event] * `...args` any[] Adds a one time `listener` function for the event. This `listener` is invoked @@ -93,8 +72,8 @@ Removes listeners of the specified `channel`. ### `ipcMain.handle(channel, listener)` * `channel` string -* `listener` Function | any> - * `event` IpcMainInvokeEvent +* `listener` Function { const result = await somePromise(...args) return result }) +``` -// Renderer process +```js title='Renderer Process' async () => { const result = await ipcRenderer.invoke('my-invokable-ipc', arg1, arg2) // ... @@ -130,7 +109,7 @@ provided to the renderer process. Please refer to ### `ipcMain.handleOnce(channel, listener)` * `channel` string -* `listener` Function | any> +* `listener` Function Communicate asynchronously from a renderer process to the main process. @@ -9,7 +16,7 @@ methods so you can send synchronous and asynchronous messages from the render process (web page) to the main process. You can also receive replies from the main process. -See [ipcMain](ipc-main.md) for code examples. +See [IPC tutorial](../tutorial/ipc.md) for code examples. ## Methods @@ -70,7 +77,7 @@ throw an exception. > them. Attempting to send such objects over IPC will result in an error. The main process handles it by listening for `channel` with the -[`ipcMain`](ipc-main.md) module. +[`ipcMain`](./ipc-main.md) module. If you need to transfer a [`MessagePort`][] to the main process, use [`ipcRenderer.postMessage`](#ipcrendererpostmessagechannel-message-transfer). @@ -98,7 +105,7 @@ throw an exception. > them. Attempting to send such objects over IPC will result in an error. The main process should listen for `channel` with -[`ipcMain.handle()`](ipc-main.md#ipcmainhandlechannel-listener). +[`ipcMain.handle()`](./ipc-main.md#ipcmainhandlechannel-listener). For example: @@ -124,11 +131,11 @@ If you do not need a response to the message, consider using [`ipcRenderer.send` * `channel` string * `...args` any[] -Returns `any` - The value sent back by the [`ipcMain`](ipc-main.md) handler. +Returns `any` - The value sent back by the [`ipcMain`](./ipc-main.md) handler. Send a message to the main process via `channel` and expect a result synchronously. Arguments will be serialized with the [Structured Clone -Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be +Algorithm][SCA], just like [`window.postMessage`], so prototype chains will not be included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an exception. @@ -140,13 +147,13 @@ throw an exception. > Electron's IPC to the main process, as the main process would have no way to decode > them. Attempting to send such objects over IPC will result in an error. -The main process handles it by listening for `channel` with [`ipcMain`](ipc-main.md) module, +The main process handles it by listening for `channel` with [`ipcMain`](./ipc-main.md) module, and replies by setting `event.returnValue`. > :warning: **WARNING**: Sending a synchronous message will block the whole > renderer process until the reply is received, so use this method only as a > last resort. It's much better to use the asynchronous version, -> [`invoke()`](ipc-renderer.md#ipcrendererinvokechannel-args). +> [`invoke()`](./ipc-renderer.md#ipcrendererinvokechannel-args). ### `ipcRenderer.postMessage(channel, message, [transfer])` @@ -158,7 +165,7 @@ Send a message to the main process, optionally transferring ownership of zero or more [`MessagePort`][] objects. The transferred `MessagePort` objects will be available in the main process as -[`MessagePortMain`](message-port-main.md) objects by accessing the `ports` +[`MessagePortMain`](./message-port-main.md) objects by accessing the `ports` property of the emitted event. For example: @@ -197,7 +204,7 @@ the host page instead of the main process. ## Event object The documentation for the `event` object passed to the `callback` can be found -in the [`ipc-renderer-event`](structures/ipc-renderer-event.md) structure docs. +in the [`ipc-renderer-event`](./structures/ipc-renderer-event.md) structure docs. [event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter [SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm diff --git a/docs/fiddles/communication/two-processes/.keep b/docs/fiddles/communication/two-processes/.keep deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/docs/fiddles/communication/two-processes/asynchronous-messages/index.html b/docs/fiddles/communication/two-processes/asynchronous-messages/index.html deleted file mode 100644 index 43d23a29087f2..0000000000000 --- a/docs/fiddles/communication/two-processes/asynchronous-messages/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -
-
-

Asynchronous messages

- Supports: Win, macOS, Linux | Process: Both -
-
- - -
-

Using ipc to send messages between processes asynchronously is the preferred method since it will return when finished without blocking other operations in the same process.

- -

This example sends a "ping" from this process (renderer) to the main process. The main process then replies with "pong".

-
-
-
- - - diff --git a/docs/fiddles/communication/two-processes/asynchronous-messages/main.js b/docs/fiddles/communication/two-processes/asynchronous-messages/main.js deleted file mode 100644 index 942f7022f8590..0000000000000 --- a/docs/fiddles/communication/two-processes/asynchronous-messages/main.js +++ /dev/null @@ -1,29 +0,0 @@ -const { app, BrowserWindow, ipcMain } = require('electron') - -let mainWindow = null - -function createWindow () { - const windowOptions = { - width: 600, - height: 400, - title: 'Asynchronous messages', - webPreferences: { - nodeIntegration: true - } - } - - mainWindow = new BrowserWindow(windowOptions) - mainWindow.loadFile('index.html') - - mainWindow.on('closed', () => { - mainWindow = null - }) -} - -app.whenReady().then(() => { - createWindow() -}) - -ipcMain.on('asynchronous-message', (event, arg) => { - event.sender.send('asynchronous-reply', 'pong') -}) diff --git a/docs/fiddles/communication/two-processes/asynchronous-messages/renderer.js b/docs/fiddles/communication/two-processes/asynchronous-messages/renderer.js deleted file mode 100644 index 40ed596201ad2..0000000000000 --- a/docs/fiddles/communication/two-processes/asynchronous-messages/renderer.js +++ /dev/null @@ -1,12 +0,0 @@ -const { ipcRenderer } = require('electron') - -const asyncMsgBtn = document.getElementById('async-msg') - -asyncMsgBtn.addEventListener('click', () => { - ipcRenderer.send('asynchronous-message', 'ping') -}) - -ipcRenderer.on('asynchronous-reply', (event, arg) => { - const message = `Asynchronous message reply: ${arg}` - document.getElementById('async-reply').innerHTML = message -}) diff --git a/docs/fiddles/communication/two-processes/synchronous-messages/index.html b/docs/fiddles/communication/two-processes/synchronous-messages/index.html deleted file mode 100644 index 055fcf3473ce1..0000000000000 --- a/docs/fiddles/communication/two-processes/synchronous-messages/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -
-
-

Synchronous messages

- Supports: Win, macOS, Linux | Process: Both -
-
- - -
-

You can use the ipc module to send synchronous messages between processes as well, but note that the synchronous nature of this method means that it will block other operations while completing its task.

- -

This example sends a synchronous message, "ping", from this process (renderer) to the main process. The main process then replies with "pong".

-
-
-
- - - \ No newline at end of file diff --git a/docs/fiddles/communication/two-processes/synchronous-messages/main.js b/docs/fiddles/communication/two-processes/synchronous-messages/main.js deleted file mode 100644 index 1adb7c02c9f11..0000000000000 --- a/docs/fiddles/communication/two-processes/synchronous-messages/main.js +++ /dev/null @@ -1,29 +0,0 @@ -const { app, BrowserWindow, ipcMain } = require('electron') - -let mainWindow = null - -function createWindow () { - const windowOptions = { - width: 600, - height: 400, - title: 'Synchronous Messages', - webPreferences: { - nodeIntegration: true - } - } - - mainWindow = new BrowserWindow(windowOptions) - mainWindow.loadFile('index.html') - - mainWindow.on('closed', () => { - mainWindow = null - }) -} - -app.whenReady().then(() => { - createWindow() -}) - -ipcMain.on('synchronous-message', (event, arg) => { - event.returnValue = 'pong' -}) \ No newline at end of file diff --git a/docs/fiddles/communication/two-processes/synchronous-messages/renderer.js b/docs/fiddles/communication/two-processes/synchronous-messages/renderer.js deleted file mode 100644 index 4769b6f97f714..0000000000000 --- a/docs/fiddles/communication/two-processes/synchronous-messages/renderer.js +++ /dev/null @@ -1,9 +0,0 @@ -const { ipcRenderer } = require('electron') - -const syncMsgBtn = document.getElementById('sync-msg') - -syncMsgBtn.addEventListener('click', () => { - const reply = ipcRenderer.sendSync('synchronous-message', 'ping') - const message = `Synchronous message reply: ${reply}` - document.getElementById('sync-reply').innerHTML = message -}) \ No newline at end of file diff --git a/docs/fiddles/ipc/pattern-1/index.html b/docs/fiddles/ipc/pattern-1/index.html new file mode 100644 index 0000000000000..28c1e42cd8b17 --- /dev/null +++ b/docs/fiddles/ipc/pattern-1/index.html @@ -0,0 +1,14 @@ + + + + + + + Hello World! + + + Title: + + + + diff --git a/docs/fiddles/ipc/pattern-1/main.js b/docs/fiddles/ipc/pattern-1/main.js new file mode 100644 index 0000000000000..2e9e97edb81b0 --- /dev/null +++ b/docs/fiddles/ipc/pattern-1/main.js @@ -0,0 +1,30 @@ +const {app, BrowserWindow, ipcMain} = require('electron') +const path = require('path') + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + + ipcMain.on('set-title', (event, title) => { + const webContents = event.sender + const win = BrowserWindow.fromWebContents(webContents) + win.setTitle(title) + }) + + mainWindow.loadFile('index.html') +} + +app.whenReady().then(() => { + createWindow() + + app.on('activate', function () { + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) +}) + +app.on('window-all-closed', function () { + if (process.platform !== 'darwin') app.quit() +}) diff --git a/docs/fiddles/ipc/pattern-1/preload.js b/docs/fiddles/ipc/pattern-1/preload.js new file mode 100644 index 0000000000000..822f4ed51622b --- /dev/null +++ b/docs/fiddles/ipc/pattern-1/preload.js @@ -0,0 +1,5 @@ +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + setTitle: (title) => ipcRenderer.send('set-title', title) +}) diff --git a/docs/fiddles/ipc/pattern-1/renderer.js b/docs/fiddles/ipc/pattern-1/renderer.js new file mode 100644 index 0000000000000..c44f59a8df08c --- /dev/null +++ b/docs/fiddles/ipc/pattern-1/renderer.js @@ -0,0 +1,6 @@ +const setButton = document.getElementById('btn') +const titleInput = document.getElementById('title') +setButton.addEventListener('click', () => { + const title = titleInput.value + window.electronAPI.setTitle(title) +}); diff --git a/docs/fiddles/ipc/pattern-2/index.html b/docs/fiddles/ipc/pattern-2/index.html new file mode 100644 index 0000000000000..06e928c8ef13d --- /dev/null +++ b/docs/fiddles/ipc/pattern-2/index.html @@ -0,0 +1,14 @@ + + + + + + + Dialog + + + + File path: + + + diff --git a/docs/fiddles/ipc/pattern-2/main.js b/docs/fiddles/ipc/pattern-2/main.js new file mode 100644 index 0000000000000..6f53c4adcce62 --- /dev/null +++ b/docs/fiddles/ipc/pattern-2/main.js @@ -0,0 +1,32 @@ +const {app, BrowserWindow, ipcMain} = require('electron') +const path = require('path') + +async function handleFileOpen() { + const { canceled, filePaths } = await dialog.showOpenDialog() + if (canceled) { + return + } else { + return filePaths[0] + } +} + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + mainWindow.loadFile('index.html') +} + +app.whenReady().then(() => { + ipcMain.handle('dialog:openFile', handleFileOpen) + createWindow() + app.on('activate', function () { + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) +}) + +app.on('window-all-closed', function () { + if (process.platform !== 'darwin') app.quit() +}) diff --git a/docs/fiddles/ipc/pattern-2/preload.js b/docs/fiddles/ipc/pattern-2/preload.js new file mode 100644 index 0000000000000..cb78f84230f8b --- /dev/null +++ b/docs/fiddles/ipc/pattern-2/preload.js @@ -0,0 +1,5 @@ +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI',{ + openFile: () => ipcRenderer.invoke('dialog:openFile') +}) diff --git a/docs/fiddles/ipc/pattern-2/renderer.js b/docs/fiddles/ipc/pattern-2/renderer.js new file mode 100644 index 0000000000000..47712eefe7df1 --- /dev/null +++ b/docs/fiddles/ipc/pattern-2/renderer.js @@ -0,0 +1,7 @@ +const btn = document.getElementById('btn') +const filePathElement = document.getElementById('filePath') + +btn.addEventListener('click', async () => { + const filePath = await window.electronAPI.openFile() + filePathElement.innerText = filePath +}) diff --git a/docs/fiddles/ipc/pattern-3/index.html b/docs/fiddles/ipc/pattern-3/index.html new file mode 100644 index 0000000000000..18d2598986271 --- /dev/null +++ b/docs/fiddles/ipc/pattern-3/index.html @@ -0,0 +1,13 @@ + + + + + + + Menu Counter + + + Current value: 0 + + + diff --git a/docs/fiddles/ipc/pattern-3/main.js b/docs/fiddles/ipc/pattern-3/main.js new file mode 100644 index 0000000000000..13d7a1ab60cfb --- /dev/null +++ b/docs/fiddles/ipc/pattern-3/main.js @@ -0,0 +1,48 @@ +const {app, BrowserWindow, Menu} = require('electron') +const path = require('path') + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + + const menu = Menu.buildFromTemplate([ + { + label: app.name, + submenu: [ + { + click: () => mainWindow.webContents.send('update-counter', 1), + label: 'Increment', + }, + { + click: () => mainWindow.webContents.send('update-counter', -1), + label: 'Decrement', + } + ] + } + + ]) + + Menu.setApplicationMenu(menu) + mainWindow.loadFile('index.html') + + // Open the DevTools. + mainWindow.webContents.openDevTools() +} + +app.whenReady().then(() => { + ipcMain.on('counter-value', (_event, value) => { + console.log(value) // will print value to Node console + }) + createWindow() + + app.on('activate', function () { + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) +}) + +app.on('window-all-closed', function () { + if (process.platform !== 'darwin') app.quit() +}) diff --git a/docs/fiddles/ipc/pattern-3/preload.js b/docs/fiddles/ipc/pattern-3/preload.js new file mode 100644 index 0000000000000..ad4dd27f1f9b2 --- /dev/null +++ b/docs/fiddles/ipc/pattern-3/preload.js @@ -0,0 +1,5 @@ +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + handleCounter: (callback) => ipcRenderer.on('update-counter', callback) +}) diff --git a/docs/fiddles/ipc/pattern-3/renderer.js b/docs/fiddles/ipc/pattern-3/renderer.js new file mode 100644 index 0000000000000..3b184add08ba2 --- /dev/null +++ b/docs/fiddles/ipc/pattern-3/renderer.js @@ -0,0 +1,8 @@ +const counter = document.getElementById('counter') + +window.electronAPI.handleCounter((event, value) => { + const oldValue = Number(counter.innerText) + const newValue = oldValue + value + counter.innerText = newValue + event.reply('counter-value', newValue) +}) diff --git a/docs/tutorial/ipc.md b/docs/tutorial/ipc.md new file mode 100644 index 0000000000000..0189e0db7e806 --- /dev/null +++ b/docs/tutorial/ipc.md @@ -0,0 +1,571 @@ +--- +title: Inter-Process Communication +description: Use the ipcMain and ipcRenderer modules to communicate between Electron processes +slug: ipc +hide_title: false +--- + +# Inter-Process Communication + +Inter-process communication (IPC) is a key part of building feature-rich desktop applications +in Electron. Because the main and renderer processes have different responsibilities in +Electron's process model, IPC is the only way to perform many common tasks, such as calling a +native API from your UI or triggering changes in your web contents from native menus. + +## IPC channels + +In Electron, processes communicate by passing messages through developer-defined "channels" +with the [`ipcMain`] and [`ipcRenderer`] modules. These channels are +**arbitrary** (you can name them anything you want) and **bidirectional** (you can use the +same channel name for both modules). + +In this guide, we'll be going over some fundamental IPC patterns with concrete examples that +you can use as a reference for your app code. + +## Understanding context-isolated processes + +Before proceeding to implementation details, you should be familiar with the idea of using a +[preload script] to import Node.js and Electron modules in a context-isolated renderer process. + +* For a full overview of Electron's process model, you can read the [process model docs]. +* For a primer into exposing APIs from your preload script using the `contextBridge` module, check +out the [context isolation tutorial]. + +## Pattern 1: Renderer to main (one-way) + +To fire a one-way IPC message from a renderer process to the main process, you can use the +[`ipcRenderer.send`] API to send a message that is then received by the [`ipcMain.on`] API. + +You usually use this pattern to call a main process API from your web contents. We'll demonstrate +this pattern by creating a simple app that can programmatically change its window title. + +For this demo, you'll need to add code to your main process, your renderer process, and a preload +script. The full code is below, but we'll be explaining each file individually in the following +sections. + +```fiddle docs/fiddles/ipc/pattern-1 +``` + +### 1. Listen for events with `ipcMain.on` + +In the main process, set an IPC listener on the `set-title` channel with the `ipcMain.on` API: + +```javascript {6-10,22} title='main.js (Main Process)' +const {app, BrowserWindow, ipcMain} = require('electron') +const path = require('path') + +//... + +function handleSetTitle (event, title) { + const webContents = event.sender + const win = BrowserWindow.fromWebContents(webContents) + win.setTitle(title) +} + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + mainWindow.loadFile('index.html') +} + +app.whenReady().then(() => { + ipcMain.on('set-title', handleSetTitle) + createWindow() +} +//... +``` + +The above `handleSetTitle` callback has two parameters: an [IpcMainEvent] structure and a +`title` string. Whenever a message comes through the `set-title` channel, this function will +find the BrowserWindow instance attached to the message sender and use the `win.setTitle` +API on it. + +:::info +Make sure you're loading the `index.html` and `preload.js` entry points for the following steps! +::: + +### 2. Expose `ipcRenderer.send` via preload + +To send messages to the listener created above, you can use the `ipcRenderer.send` API. +By default, the renderer process has no Node.js or Electron module access. As an app developer, +you need to choose which APIs to expose from your preload script using the `contextBridge` API. + +In your preload script, add the following code, which will expose a global `window.electronAPI` +variable to your renderer process. + +```javascript title='preload.js (Preload Script)' +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + setTitle: (title) => ipcRenderer.send('set-title', title) +}) +``` + +At this point, you'll be able to use the `window.electronAPI.setTitle()` function in the renderer +process. + +:::caution Security warning +We don't directly expose the whole `ipcRenderer.send` API for [security reasons]. Make sure to +limit the renderer's access to Electron APIs as much as possible. +::: + +### 3. Build the renderer process UI + +In our BrowserWindow's loaded HTML file, add a basic user interface consisting of a text input +and a button: + +```html {11-12} title='index.html' + + + + + + + Hello World! + + + Title: + + + + +``` + +To make these elements interactive, we'll be adding a few lines of code in the imported +`renderer.js` file that leverages the `window.electronAPI` functionality exposed from the preload +script: + +```javascript title='renderer.js (Renderer Process)' +const setButton = document.getElementById('btn') +const titleInput = document.getElementById('title') +setButton.addEventListener('click', () => { + const title = titleInput.value + window.electronAPI.setTitle(title) +}); +``` + +At this point, your demo should be fully functional. Try using the input field and see what happens +to your BrowserWindow title! + +## Pattern 2: Renderer to main (two-way) + +A common application for two-way IPC is calling a main process module from your renderer process +code and waiting for a result. This can be done by using [`ipcRenderer.invoke`] paired with +[`ipcMain.handle`]. + +In the following example, we'll be opening a native file dialog from the renderer process and +returning the selected file's path. + +For this demo, you'll need to add code to your main process, your renderer process, and a preload +script. The full code is below, but we'll be explaining each file individually in the following +sections. + +```fiddle docs/fiddles/ipc/pattern-2 +``` + +### 1. Listen for events with `ipcMain.handle` + +In the main process, we'll be creating a `handleFileOpen()` function that calls +`dialog.showOpenDialog` and returns the value of the file path selected by the user. This function +is used as a callback whenever an `ipcRender.invoke` message is sent through the `dialog:openFile` +channel from the renderer process. The return value is then returned as a Promise to the original +`invoke` call. + +:::caution A word on error handling +Errors thrown through `handle` in the main process are not transparent as they +are serialized and only the `message` property from the original error is +provided to the renderer process. Please refer to +[#24427](https://github.com/electron/electron/issues/24427) for details. +::: + +```javascript {6-13,25} title='main.js (Main Process)' +const { BrowserWindow, dialog, ipcMain } = require('electron') +const path = require('path') + +//... + +async function handleFileOpen() { + const { canceled, filePaths } = await dialog.showOpenDialog() + if (canceled) { + return + } else { + return filePaths[0] + } +} + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + mainWindow.loadFile('index.html') +} + +app.whenReady(() => { + ipcMain.handle('dialog:openFile', handleFileOpen) + createWindow() +}) +//... +``` + +:::tip on channel names +The `dialog:` prefix on the IPC channel name has no effect on the code. It only serves +as a namespace that helps with code readability. +::: + +:::info +Make sure you're loading the `index.html` and `preload.js` entry points for the following steps! +::: + +### 2. Expose `ipcRenderer.invoke` via preload + +In the preload script, we expose a one-line `openFile` function that calls and returns the value of +`ipcRenderer.invoke('dialog:openFile')`. We'll be using this API in the next step to call the +native dialog from our renderer's user interface. + +```javascript title='preload.js (Preload Script)' +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + openFile: () => ipcRenderer.invoke('dialog:openFile') +}) +``` + +:::caution Security warning +We don't directly expose the whole `ipcRenderer.invoke` API for [security reasons]. Make sure to +limit the renderer's access to Electron APIs as much as possible. +::: + +### 3. Build the renderer process UI + +Finally, let's build the HTML file that we load into our BrowserWindow. + +```html {10-11} title='index.html' + + + + + + + Dialog + + + + File path: + + + +``` + +The UI consists of a single `#btn` button element that will be used to trigger our preload API, and +a `#filePath` element that will be used to display the path of the selected file. Making these +pieces work will take a few lines of code in the renderer process script: + +```javascript title='renderer.js (Renderer Process)' +const btn = document.getElementById('btn') +const filePathElement = document.getElementById('filePath') + +btn.addEventListener('click', async () => { + const filePath = await window.electronAPI.openFile() + filePathElement.innerText = filePath +}) +``` + +In the above snippet, we listen for clicks on the `#btn` button, and call our +`window.electronAPI.openFile()` API to activate the native Open File dialog. We then display the +selected file path in the `#filePath` element. + +### Note: legacy approaches + +The `ipcRenderer.invoke` API was added in Electron 7 as a developer-friendly way to tackle two-way +IPC from the renderer process. However, there exist a couple alternative approaches to this IPC +pattern. + +:::warning Avoid legacy approaches if possible +We recommend using `ipcRenderer.invoke` whenever possible. The following two-way renderer-to-main +patterns are documented for historical purposes. +::: + +:::info +For the following examples, we're calling `ipcRenderer` directly from the preload script to keep +the code samples small. +::: + +#### Using `ipcRenderer.send` + +The `ipcRenderer.send` API that we used for single-way communication can also be leveraged to +perform two-way communication. This was the recommended way for asynchronous two-way communication +via IPC prior to Electron 7. + +```javascript title='preload.js (Preload Script)' +// You can also put expose this code to the renderer +// process with the `contextBridge` API +const { ipcRenderer } = require('electron') + +ipcRenderer.on('asynchronous-reply', (_event, arg) => { + console.log(arg) // prints "pong" in the DevTools console +}) +ipcRenderer.send('asynchronous-message', 'ping') +``` + +```javascript title='main.js (Main Process)' +ipcMain.on('asynchronous-message', (event, arg) => { + console.log(arg) // prints "ping" in the Node console + // works like `send`, but returning a message back + // to the renderer that sent the original message + event.reply('asynchronous-reply', 'pong') +}) +``` + +There are a couple downsides to this approach: + +* You need to set up a second `ipcRenderer.on` listener to handle the response in the renderer +process. With `invoke`, you get the response value returned as a Promise to the original API call. +* There's no obvious way to pair the `asynchronous-reply` message to the original +`asynchronous-message` one. If you have very frequent messages going back and forth through these +channels, you would need to add additional app code to track each call and response individually. + +#### Using `ipcRenderer.sendSync` + +The `ipcRenderer.sendSync` API sends a message to the main process and waits _synchronously_ for a +response. + +```javascript title='main.js (Main Process)' +const { ipcMain } = require('electron') +ipcMain.on('synchronous-message', (event, arg) => { + console.log(arg) // prints "ping" in the Node console + event.returnValue = 'pong' +}) +``` + +```javascript title='preload.js (Preload Script)' +// You can also put expose this code to the renderer +// process with the `contextBridge` API +const { ipcRenderer } = require('electron') + +const result = ipcRenderer.sendSync('synchronous-message', 'ping') +console.log(result) // prints "pong" in the DevTools console +``` + +The structure of this code is very similar to the `invoke` model, but we recommend +**avoiding this API** for performance reasons. Its synchronous nature means that it'll block the +renderer process until a reply is received. + +## Pattern 3: Main to renderer + +When sending a message from the main process to a renderer process, you need to specify which +renderer is receiving the message. Messages need to be sent to a renderer process +via its [`WebContents`] instance. This WebContents instance contains a [`send`][webcontents-send] method +that can be used in the same way as `ipcRenderer.send`. + +To demonstrate this pattern, we'll be building a number counter controlled by the native operating +system menu. + +For this demo, you'll need to add code to your main process, your renderer process, and a preload +script. The full code is below, but we'll be explaining each file individually in the following +sections. + +```fiddle docs/fiddles/ipc/pattern-3 +``` + +### 1. Send messages with the `webContents` module + +For this demo, we'll need to first build a custom menu in the main process using Electron's `Menu` +module that uses the `webContents.send` API to send an IPC message from the main process to the +target renderer. + +```javascript {11-26} title='main.js (Main Process)' +const {app, BrowserWindow, Menu} = require('electron') +const path = require('path') + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + + const menu = Menu.buildFromTemplate([ + { + label: app.name, + submenu: [ + { + click: () => mainWindow.webContents.send('update-counter', 1), + label: 'Increment', + }, + { + click: () => mainWindow.webContents.send('update-counter', -1), + label: 'Decrement', + } + ] + } + ]) + Menu.setApplicationMenu(menu) + + mainWindow.loadFile('index.html') +} +//... + +``` + +For the purposes of the tutorial, it's important to note that the `click` handler +sends a message (either `1` or `-1`) to the renderer process through the `counter` channel. + +```javascript +click: () => mainWindow.webContents.send('update-counter', -1) +``` + +:::info +Make sure you're loading the `index.html` and `preload.js` entry points for the following steps! +::: + +### 2. Expose `ipcRenderer.on` via preload + +Like in the previous renderer-to-main example, we use the `contextBridge` and `ipcRenderer` +modules in the preload script to expose IPC functionality to the renderer process: + +```javascript title='preload.js (Preload Script)' +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + onUpdateCounter: (callback) => ipcRenderer.on('update-counter', callback) +}) +``` + +After loading the preload script, your renderer process should have access to the +`window.electronAPI.onUpdateCounter()` listener function. + +:::caution Security warning +We don't directly expose the whole `ipcRenderer.on` API for [security reasons]. Make sure to +limit the renderer's access to Electron APIs as much as possible. +::: + +:::info +In the case of this minimal example, you can call `ipcRenderer.on` directly in the preload script +rather than exposing it over the context bridge. + +```javascript title='preload.js (Preload Script)' +const { ipcRenderer } = require('electron') + +window.addEventListener('DOMContentLoaded', () => { + const counter = document.getElementById('counter') + ipcRenderer.on('update-counter', (_event, value) => { + const oldValue = Number(counter.innerText) + const newValue = oldValue + value + counter.innerText = newValue + }) +}) +``` + +However, this approach has limited flexibility compared to exposing your preload APIs +over the context bridge, since your listener can't directly interact with your renderer code. +::: + +### 3. Build the renderer process UI + +To tie it all together, we'll create an interface in the loaded HTML file that contains a +`#counter` element that we'll use to display the values: + +```html {10} title='index.html' + + + + + + + Menu Counter + + + Current value: 0 + + + +``` + +Finally, to make the values update in the HTML document, we'll add a few lines of DOM manipulation +so that the value of the `#counter` element is updated whenever we fire an `update-counter` event. + +```javascript title='renderer.js (Renderer Process)' +const counter = document.getElementById('counter') + +window.electronAPI.onUpdateCounter((_event, value) => { + const oldValue = Number(counter.innerText) + const newValue = oldValue + value + counter.innerText = newValue +}) +``` + +In the above code, we're passing in a callback to the `window.electronAPI.onUpdateCounter` function +exposed from our preload script. The second `value` parameter corresponds to the `1` or `-1` we +were passing in from the `webContents.send` call from the native menu. + +### Optional: returning a reply + +There's no equivalent for `ipcRenderer.invoke` for main-to-renderer IPC. Instead, you can +send a reply back to the main process from within the `ipcRenderer.on` callback. + +We can demonstrate this with slight modifications to the code from the previous example. In the +renderer process, use the `event` parameter to send a reply back to the main process through the +`counter-value` channel. + +```javascript title='renderer.js (Renderer Process)' +const counter = document.getElementById('counter') + +window.electronAPI.onUpdateCounter((event, value) => { + const oldValue = Number(counter.innerText) + const newValue = oldValue + value + counter.innerText = newValue + event.reply('counter-value', newValue) +}) +``` + +In the main process, listen for `counter-value` events and handle them appropriately. + +```javascript title='main.js (Main Process)' +//... +ipcMain.on('counter-value', (_event, value) => { + console.log(value) // will print value to Node console +}) +//... +``` + +## Pattern 4: Renderer to renderer + +There's no direct way to send messages between renderer processes in Electron using the `ipcMain` +and `ipcRenderer` modules. To achieve this, you have two options: + +* Use the main process as a message broker between renderers. This would involve sending a message +from one renderer to the main process, which would forward the message to the other renderer. +* Pass a [MessagePort] from the main process to both renderers. This will allow direct communication +between renderers after the initial setup. + +## Object serialization + +Electron's IPC implementation uses the HTML standard +[Structured Clone Algorithm][sca] to serialize objects passed between processes, meaning that +only certain types of objects can be passed through IPC channels. + +In particular, DOM objects (e.g. `Element`, `Location` and `DOMMatrix`), Node.js objects +backed by C++ classes (e.g. `process.env`, some members of `Stream`), and Electron objects +backed by C++ classes (e.g. `WebContents`, `BrowserWindow` and `WebFrame`) are not serializable +with Structured Clone. + +[context isolation tutorial]: context-isolation.md +[security reasons]: ./context-isolation.md#security-considerations +[`ipcMain`]: ../api/ipc-main.md +[`ipcMain.handle`]: ../api/ipc-main.md#ipcmainhandlechannel-listener +[`ipcMain.on`]: ../api/ipc-main.md +[IpcMainEvent]: ../api/structures/ipc-main-event.md +[`ipcRenderer`]: ../api/ipc-renderer.md +[`ipcRenderer.invoke`]: ../api/ipc-renderer.md#ipcrendererinvokechannel-args +[`ipcRenderer.send`]: ../api/ipc-renderer.md +[MessagePort]: ./message-ports.md +[preload script]: process-model.md#preload-scripts +[process model docs]: process-model.md +[sca]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm +[`WebContents`]: ../api/web-contents.md +[webcontents-send]: ../api/web-contents.md#contentssendchannel-args From 28ada6ea8bd2abeca8812e6d284c1f5f3974286b Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 18:58:52 -0800 Subject: [PATCH 023/811] 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 --- BUILD.gn | 4 +- DEPS | 2 +- appveyor.yml | 5 +- chromium_src/BUILD.gn | 10 +- filenames.gni | 4 - patches/boringssl/expose_ripemd160.patch | 2 +- patches/chromium/.patches | 3 - patches/chromium/accelerator.patch | 8 +- ...client_precreatemessageloop_callback.patch | 2 +- .../add_didinstallconditionalfeatures.patch | 28 +- ...pedcliboardwriter_writeunsaferawdata.patch | 12 +- ..._scheduler_throttling_per_renderview.patch | 18 +- ..._windows_to_have_different_web_prefs.patch | 14 +- ...leges_in_unsandboxed_child_processes.patch | 2 +- patches/chromium/blink_file_path.patch | 2 +- patches/chromium/blink_local_frame.patch | 8 +- patches/chromium/boringssl_build_gn.patch | 4 +- ..._node_processes_as_browser_processes.patch | 4 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 22 +- patches/chromium/can_create_window.patch | 40 +- ..._v8_initialization_isolate_callbacks.patch | 2 +- ...screationoverridden_with_full_params.patch | 40 +- ...esources_not_chrome_for_spellchecker.patch | 14 +- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/command-ismediakey.patch | 2 +- ...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 | 4 +- patches/chromium/disable-redraw-lock.patch | 6 +- .../disable_color_correct_rendering.patch | 50 +- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 10 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 20 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- ...ingcontext_calls_to_newpage_pagedone.patch | 511 ------------------ .../chromium/enable_reset_aspect_ratio.patch | 8 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 18 +- .../extend_apply_webpreferences.patch | 10 +- ...ransfer_to_requestsingleinstancelock.patch | 10 +- ...dd_set_theme_source_to_allow_apps_to.patch | 14 +- ..._registry_to_multibuffer_data_source.patch | 4 +- ...g_the_base_spellchecker_download_url.patch | 4 +- ...to_add_observers_on_created_hunspell.patch | 4 +- ...screen_rendering_with_viz_compositor.patch | 50 +- ..._raw_response_headers_from_urlloader.patch | 10 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- ...ete_SerialPortManager_on_main_thread.patch | 2 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- ...media_key_usage_with_globalshortcuts.patch | 2 +- ...rmissions_checks_in_exclusive_access.patch | 4 +- ...out_profile_refs_in_accessibility_ui.patch | 14 +- ..._properly_honor_printing_page_ranges.patch | 4 +- ...fix_use_electron_generated_resources.patch | 2 +- patches/chromium/frame_host_manager.patch | 6 +- .../gin_enable_disable_v8_platform.patch | 10 +- ...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 | 4 +- patches/chromium/isolate_holder.patch | 2 +- .../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 | 30 +- ...emote_certificate_verification_logic.patch | 26 +- .../chromium/notification_provenance.patch | 6 +- patches/chromium/pepper_plugin_support.patch | 28 +- patches/chromium/picture-in-picture.patch | 34 +- patches/chromium/printing.patch | 117 ++-- patches/chromium/process_singleton.patch | 37 +- patches/chromium/proxy_config_monitor.patch | 2 +- ...put_back_deleted_colors_for_autofill.patch | 15 +- ...r_changes_to_the_webcontentsobserver.patch | 12 +- ...store_base_adaptcallbackforrepeating.patch | 2 +- ...f_incognito_apis_in_the_spellchecker.patch | 4 +- .../render_widget_host_view_base.patch | 4 +- .../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 | 12 +- 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 | 12 +- ...feat_add_hook_to_notify_script_ready.patch | 18 +- patches/config.json | 4 + patches/nan/.patches | 1 + ...use_new_constructor_for_scriptorigin.patch | 42 ++ patches/node/.patches | 1 + 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 +- 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/browser/api/electron_api_app.cc | 79 +-- 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 +- .../browser/api/electron_api_power_monitor.cc | 8 +- .../browser/api/electron_api_power_monitor.h | 10 +- shell/browser/api/electron_api_screen.cc | 6 +- .../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 | 10 +- shell/browser/api/electron_api_url_loader.h | 10 +- .../browser/api/electron_api_web_contents.cc | 66 +-- shell/browser/api/electron_api_web_contents.h | 4 +- .../api/electron_api_web_contents_view.cc | 6 +- 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 | 2 +- shell/browser/browser_observer.h | 2 +- shell/browser/browser_process_impl.cc | 2 +- shell/browser/browser_process_impl.h | 2 +- shell/browser/electron_browser_client.cc | 166 +++--- shell/browser/electron_browser_client.h | 22 +- 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 | 8 +- shell/browser/extensions/api/i18n/i18n_api.cc | 24 - shell/browser/extensions/api/i18n/i18n_api.h | 20 - .../extensions/electron_extension_system.cc | 3 +- .../extensions/electron_extension_system.h | 3 +- ...lectron_extensions_browser_api_provider.cc | 2 +- shell/browser/feature_list.cc | 8 +- shell/browser/file_select_helper.cc | 8 +- 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 | 8 +- 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 | 6 +- shell/browser/net/network_context_service.cc | 4 +- 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 | 53 +- 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_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/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 | 8 +- .../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 | 2 +- .../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 | 10 +- 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/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_bindings.cc | 12 +- shell/common/application_info.h | 6 +- shell/common/asar/archive.cc | 18 +- 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/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 +- .../api/electron_api_context_bridge.cc | 9 +- shell/renderer/electron_api_service_impl.cc | 3 +- .../electron_sandboxed_renderer_client.cc | 4 +- shell/renderer/renderer_client_base.cc | 6 +- .../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/extensions-spec.ts | 2 +- spec/webview-spec.js | 5 +- 279 files changed, 1682 insertions(+), 2237 deletions(-) delete mode 100644 patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch delete mode 100644 patches/chromium/make_include_of_stack_trace_h_unconditional.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_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/BUILD.gn b/BUILD.gn index bd4402cf8ac7d..ec9e8b6a72b9f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -472,8 +472,8 @@ source_set("electron_lib") { if (is_linux) { deps += [ - "//build/config/linux/gtk:gtkprint", "//components/crash/content/browser", + "//ui/gtk:gtk_config", ] } @@ -551,7 +551,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" ] diff --git a/DEPS b/DEPS index 858f9f05f58f6..db991a8702c70 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '99.0.4767.0', + '100.0.4855.0', 'node_version': 'v16.13.2', 'nan_version': diff --git a/appveyor.yml b/appveyor.yml index 64b906aa0c010..f6be0fbd3596b 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,7 @@ 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 test suite & node script/yarn test -- --trace-uncaught --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" @@ -231,3 +232,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 electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log ) diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index c30edae4ac665..d577b448ccc2e 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -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", ] } } @@ -261,6 +255,8 @@ static_library("chrome") { "//chrome/browser/ui/views/overlay/constants.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", @@ -299,6 +295,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/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 68e2c048aa919..14c0fac52460a 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -92,7 +92,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,8 +108,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 -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/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..0ae9ae781b29c 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b706073213fa0846e 100644 +index 0c1e511e187c480006365fbbde6caa54b0f0eada..1904abcf314007d68c4941a4f2bdb83cace586ab 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -237,6 +237,10 @@ int GpuMain(MainFunctionParams parameters) { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 8f8194bfc1c3b..ff441bdb349eb 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 fea269ba08af3296e2e304bb94610508ecd01b02..59e48882aba9b0431ddaa0b48f896866833f3376 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, +@@ -4453,6 +4453,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 4e5d10d32272d5617c7475f58b57ea73d3cf0a65..6ac30bdb5cbc81274e26fd74f3332f0e5c3fb1dc 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 507efab2cc79422cc58b1459de8e84a9b7992195..0948dd92c89db566317df7b352d9f5967a3ae86b 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 { +@@ -598,6 +598,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 cf6f792bb68df3a15a74a61921f50f790817b3ca..8a922b95064909d750b041e3e36ab6ebf0375284 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 { +@@ -309,6 +309,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 ba2d1beff9d4fe7b0eca90a274b8bd95a76446c1..3056ae4d9b6d1604b14f2626122a78a9f916d265 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 2d9517cb12b4debe28694f54bcaa0ad0af62a44a..09c9486bbbf789e9367fdbb3655f431f5a1ae199 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,7 +123,7 @@ 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 094de359d6831e656f0666732fb1c80f8f316fa7..65d2a6a279b2b4009b19494af54e194e8c9b626a 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 { diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index 70d6a9524d22f..f0f446b5350df 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 6405d91a2226e3b58fff4a4e73d2fc1c08f0954b..e12f0c4ec90e0e4f366bad292750676c0b446f2c 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..b5923cea9b37a 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 5cf4fd6559dd7183ed74e44001d7e53ca9b055b1..ca6a293882fe2af1e2bf58b8353e1c5c9de827d1 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) { +@@ -646,6 +646,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -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, @@ -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 297ed65293723e8d539c65475d335947c840fec2..304dcdaa65ee1d9bed86f7c0e5956dd3a2a65585 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 { +@@ -3679,6 +3679,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( +@@ -3690,7 +3697,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ 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 25f9a9fc617d75dfd26af582574ebcad3a16a8ef..7d8473a7915fd3312c3a4f582b3f1d87580e6e75 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, +@@ -419,6 +419,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -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, +@@ -855,6 +856,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..9438dc2e0b9c7 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 b9a65b0aa8771602f6659f5ffe79b6cdfd04f6e4..f1aab825f8aabc023f6405e6f4b5c843374d43a0 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 a8d4f1905dc3f48dbbde440e4ec50fe95744e365..4ec23ebc2b09b00c849eb762fa371a8cf2925869 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 @@ @@ -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 dc84e6f516492b72cf513c9786f17b472961dddb..72eb72cde86f0ef9c94123a104e8f30d12952391 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 @@ @@ -176,7 +176,7 @@ index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c return r.cookie_enabled; } diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom -index 1f0ca7565e7df7bb535bb8c779929f6202273471..69c5932f498d2849847ddcc3605f45df3acc596d 100644 +index 067bb3bf74874f3106f4b68c3c3f13039439c526..8cd0710557eacb77f2bfd5a43074c983f956122c 100644 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom @@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom"; diff --git a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch index 8abcd5608600d..617c5e656d99e 100644 --- a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch +++ b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch @@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes This allows unsandboxed renderers to launch setuid processes on Linux. diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index bbc1d4d057291cc4a3c65287309a22897179a47e..6318b1f2251670d5dd975fde695ee2438c456a0f 100644 +index f60ad777ab7698a4518d3b1b61ade29e7c618a3a..c7781bdb49f8a92aa9ee1d8dd1af03fa9cf2dfe3 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc @@ -53,6 +53,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( diff --git a/patches/chromium/blink_file_path.patch b/patches/chromium/blink_file_path.patch index 3bae083f52892..319e320a9131b 100644 --- a/patches/chromium/blink_file_path.patch +++ b/patches/chromium/blink_file_path.patch @@ -7,7 +7,7 @@ This is used by editors to obtain the filesystem path from a dragged file. See documentation at https://electronjs.org/docs/api/file-object diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h -index d70a95cc9b28674dd4ac925e9f1aca481e60c34b..fa9d21a20e77867a7d596e0df4ec143edb871f27 100644 +index e23ab93fdc031a022ae15d069017ebc2e6923e78..7e6d45d33fcc147d0b5b78cc2b254e1deb3cbf02 100644 --- a/third_party/blink/renderer/core/fileapi/file.h +++ b/third_party/blink/renderer/core/fileapi/file.h @@ -191,6 +191,9 @@ class CORE_EXPORT File final : public Blob { diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 242f1e1274c1f..e6c093112d492 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 1b022bf6b37982e6321120951de5d8dcc10ecf6a..5cd7cf680244383e466106801103871b3bba8796 100644 +index 88bb66bd03b880f4e1e946a0fd1a31f512226db4..a100709c7b3bd0bcd5c9307e00f343aaf4c27620 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) { @@ -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 d02022a64426a47a568d438bd3d17ca63a3ac28f..f9817a21e00a66845138d321dd829ea1df39acb7 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) { +@@ -531,10 +531,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) { +@@ -580,6 +576,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..f4b23bcd39496 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 e31d092151a68028e09bb73ddb896cf8df77355d..aee73fe9b9e0a6b061504db46bb91b7a4baf6a7a 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..848904efccaaf 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 f6f346bbc56d4a1f8693330b010fd4b3c2d28628..981eaef314d8ff0301e8d008927d02fc8a12ae54 100644 +index 5404ededf7722ae9d04e44d3413471b9d85085c0..a36554ff22e29df499ee9ce9b0d4c40835af48dd 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 176d5bc5a649f..f072110be0958 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 71152d08a9e9ce2e112fd7a6c3134a547af5d978..fd11a574ed7b38d556bbdaed2fd649d55d6530f7 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 5f0b1af64911966f9b24a2b5ef063e4473b81a8f..c186819512e21276e382edba2eca2c153da7403d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4528,7 +4528,7 @@ static_library("browser") { +@@ -4517,7 +4517,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 89afb235bc478f19511579ca4c6b018505b372cd..1b5b9e33f5ad2b31617edd8a6ee65e73b31d3d20 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5531,7 +5531,6 @@ test("unit_tests") { +@@ -5564,7 +5564,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") { +@@ -5587,6 +5586,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") { +@@ -6270,7 +6273,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") { +@@ -6312,6 +6314,11 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index e359d3ec35437..ebac034d783f8 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 9930040d9e6802d851c7216b314791bae5534bd7..365b6eb2efc2f09725a9a53b79e83a50bded1c75 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( +@@ -6640,6 +6640,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 d89e1c2369d7218d62fd759c3877b1d502a8276e..f3e21a7cacb9d192bf3b6cf4d2bfc8d372cd8307 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( +@@ -3867,6 +3867,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb3906542 new_contents_impl->GetController().SetSessionStorageNamespace( partition_id, session_storage_namespace); -@@ -3906,12 +3914,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3909,12 +3917,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 7c700a49d9a144fc1dd8c795d95c085e13aa470a..153c94d7d0fd4a11a15c74f7bbae065d7a0249a1 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -570,6 +570,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -573,6 +573,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,7 +81,7 @@ 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 3aaacce3a8dc42f90bb4564987950a3be92e113e..17ce3078c995f581325b9dcffe6b1589b05f48bc 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -169,6 +169,7 @@ class NetworkService; @@ -92,7 +92,7 @@ index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09 } // namespace network namespace sandbox { -@@ -940,6 +941,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -944,6 +945,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ 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 aefe7344a605e5edded2b4c345c50ff22b6d8e34..5647a94ace369de0c7e0096c885865b7b5b04c61 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -27,6 +27,17 @@ namespace content { @@ -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 58e977220a5d98c68a20cbf22ad7ce3da39a38a1..5092190243d3eb95a4180cb44937e3d25c4a3ad9 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 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 { +@@ -343,6 +344,13 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionId& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -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 7809d32d777a2c7249b77e68468bc19625716662..7eec2fea69298d92e694471862b4427b69e9687f 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 f565d0615c8cdb182d28d0add11fca6ebb49098b..8ac72d8d2efe413561e4e53722d4d0d15833cfdf 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 953433b5cc0ca7633b5866d5ae0f9c3a5e6a6e3c..30a43c943e6ccdd9dbf809186d7d13d4d6f6f12e 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,7 +220,7 @@ 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 fa6b705d267ac00fe86705d1f9d8e66730ba4ee4..9d541381c349132c6d4b44a5bee298252c2b8858 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, diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch index aecb5a5114f97..0e4566eed9f0d 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,7 +9,7 @@ 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 feae0aea593ef1945c1063b7d487892530f7ceed..beb0a9e85a0f5e102466952c220aafac2d6ebb39 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, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index ae811011c4ef2..5fddd44da4723 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 a7a64effed043a75371e5dde0837ce7fbfa631ad..8f190e6d33497f52b536aef82505025b74602337 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1762,12 +1762,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1760,12 +1760,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,7 +127,7 @@ 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 1cda4516162907a047b67edbc2d020e36cceb8f0..2d222d43c0c55d976eceb189a2d955793a6824ce 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -810,8 +810,7 @@ class Browser : public TabStripModelObserver, @@ -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 2e91c4f052501e4067cf8fee21f2f3c2674f1c1a..74e6928041145fd6f37ec4ce7acc6be0649b944d 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( +@@ -3815,8 +3815,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,7 +260,7 @@ 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 5647a94ace369de0c7e0096c885865b7b5b04c61..bf3e958a5f883c2408846f4954e58a30c76bee26 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -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 5092190243d3eb95a4180cb44937e3d25c4a3ad9..23a11de7c25b81e72c81db20caaa799191b70e45 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 { +@@ -322,8 +322,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 b1c4872e8139e4e6c7c38f94e6e1619ef1730bce..314a418c8d0ff43f115744a0229511dd409b48d6 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( @@ -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 2a8095bb93264360d2cdb0a54ff3330671905852..8a2745c318f865564368d5d3d90af61b5c20fb00 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 1b388778aac1420769de8c411489e026abbc75a4..b21d262c7014097e35ee83289fab400ab9d3bdc5 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 c0fc74673903a0c54164bddb5be0c96f3f7b73a4..2466675e80708aa0ba27e0431cbfb2a277abde32 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -401,8 +401,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -403,8 +403,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 ea50835c2f8631851659db6abb3ba779a5fcb6e0..14207edb850689c126b2d09eff8d8feb1246ebb7 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, +@@ -292,8 +292,7 @@ class FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,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..bf56fbe1b7aee1a41a18d1cd98641034ba97a903 100644 +index 4cb2c255877182406158258c0fb3e88e50f612c7..0f314be5d9d88b60b925a1e25db30408f0b26dff 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 { 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..15ec447216524 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 f338d61091545f4319b6d5318d10eed5c9b02af3..5f0b1af64911966f9b24a2b5ef063e4473b81a8f 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7016,6 +7016,7 @@ static_library("browser") { +@@ -7038,6 +7038,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 491315f1fd94332a1895c2286618cb0e8ed1544b..303d29d577a87ea07005fb87f562eef79b36cd8f 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..bc53b898840d5 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 27474164dafdff0f79820e748c776b6a4372387c..ed21a9c1854a443947a1b3965c5fc2910b9d3fb6 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) { +@@ -206,12 +208,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..0e8697f5c67d6 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -87,7 +87,7 @@ 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 3cad85ec824d81ef43796a5c7e4f013dcfd5bf0a..d352b23f4a42b10e77a61de71069083f20f99136 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() { 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..335184a63282a 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 8a68c53e35dafce5fced1ad2c7ff5dad83ffbf3c..ee615d3eb03232b34f5acbb58490c7de9ad08cfd 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( +@@ -495,8 +495,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..a900bf03618c0 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..d3a722f60c67d6177c3ca0bfc1329b87acf0b622 100644 +index 91da584747d5afc3f07e51ae77b002d91c4ff7ac..bbf37f733a6e1831017f171edf162ab8aac3f0a4 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 @@ @@ -97,7 +97,7 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 @@ -95,8 +95,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr frame, } - #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}; diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index cc5ba533a25f2..8d5fab8db9350 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 302915bac66a484f495c97e2602406a50b058014..7b46b19458ab03037fd02ac9a7f21a7b321843f1 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() { +@@ -979,6 +984,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..49d1fef1cdd0c 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 c13c06406ec4abd012082c5bfef02f2692a9bba1..0e82b376f740fcd51a608e4f99fcd7a016eefe5f 100644 +index 2c6e923952c7d8c1e411e3dedb149712a0e64025..0034d9998133920a2cd074b1f5562b58976d6d49 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1893,6 +1893,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1891,6 +1891,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( gfx::ContentColorUsage content_color_usage) const { @@ -48,7 +48,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 +60,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 +69,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 +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 e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b30436703aab 100644 +index 963154eeda506350b71e3243ef172061efc8d4fb..daaea93f536759b67b4fffbca7c26479ceb04fcd 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -87,6 +87,9 @@ @@ -163,7 +163,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 +186,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 +197,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 +210,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 +222,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 926ea905b775c0706fd1b882f37b88b646b8b154..691eb2c5f7a26ea2b213b6378ab600b6b047531d 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 +241,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 30a0c9216a206042a9769bdeda015eaf00e3cc49..e94e895aa31ab98e28137e793a8f298ed3146f5a 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 @@ +@@ -193,6 +193,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 e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3288,6 +3289,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3281,6 +3282,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 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 +280,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 +293,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 2f4fbbdd8059b2915b4848f95db925f1dbb1fb08..3fc675e4e56b3e658d70475800a938a7ce283567 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 @@ @@ -315,7 +315,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 +358,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 +371,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..3f08e39d4e1bb 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 2c5f09db5e86855c33a79fb8c9f0a6ed770634e6..1c59ce6de1ce68b24e0372826cc67a891b4c2384 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..02ee885d5cbd6 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 7436238cd110ef8c414e8be3d8ff07511b6223f4..4b0b2b0dc0900627aee38de021ec10cbdc9b3cb4 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 785cf70788ddb65712c45bc32281141e8a623b13..831a85653eb89b79ccc638400be6cfe10369b14b 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 +@@ -874,6 +874,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 20d613c480ce54f99e04dd49fe27af10056beee4..4a421fc2c244cf56d329ff66d0e9e17b0f0a5987 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() { +@@ -595,7 +595,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..f58b76cc978b2 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 5aee160aec0160f37d61005ec3b71accb58b2eaa..bc73591dd8b66c304fa42b3349bbbf6f82ed13ad 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -29,6 +29,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 02a40a1560a1e..0adfe2ccb420e 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 59e48882aba9b0431ddaa0b48f896866833f3376..d4360bc18858d77aa079dbbafc563d2fa03f29e8 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 { +@@ -2392,7 +2392,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/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index f3b9883faf7ec..42e510ac79568 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 d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b46f4ec31 100644 +index 7323cb11296e9383db68753d9fc43203b5632e19..95349fc9016eda37668edcd742336364346d89f6 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) { +@@ -529,7 +529,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { } void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) { @@ -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 7b46b19458ab03037fd02ac9a7f21a7b321843f1..40a81cb293469cb5ec1bd5ab5195fd8e1b0812dc 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) { +@@ -929,8 +929,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..a0ae92e9a1788 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 b3008accd63bd6694a44761c4d00a0927fad90ad..d61c2e0031b0aa22c5c5822e8433ef4b4366afed 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1325,6 +1325,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1356,6 +1356,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 486a151f6923fd0069ce5aaaffe6559cb60a88ec..589ee590edea4a6fb995fb73be36d035336f6e3a 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -278,6 +278,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; + 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 89c00d7ab1510ebdbce49876fcd5f94c5096b3c9..41da1b6fac783be22ab2f3abc25aaa7687049048 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1044,6 +1044,9 @@ interface NetworkContext { +@@ -1049,6 +1049,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ 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 309a96ff77d06f9456fd3faec02b869c8a55c7f7..998b5b04bc98cfd048fe929bf3b99bbfcdbbfb9a 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 { @@ -87,4 +87,4 @@ index b766ae3aa91ffd6ce5ab7ae3835ff7fa58d02a0e..5719eec40aff5cd079110fc52c46d279 + 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..e11b55274afd2 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 304dcdaa65ee1d9bed86f7c0e5956dd3a2a65585..17ff3cdf79ec48f444640bc18df47f81aa4eba28 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) +@@ -1797,6 +1798,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..251704d5cd8cc 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,18 +85,18 @@ 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e455dfd03 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -147,7 +147,7 @@ const char kACKToken[] = "ACK"; 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..9bf184662af7e 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 ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3b7bb69ca 100644 +index 93879cdb8d8001458f6283625232515bd214847d..1a729eb08de5d9f0b2fdbaad1eec95b7234a2f71 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -153,6 +153,8 @@ absl::optional NativeTheme::GetColorProviderColor( +@@ -152,6 +152,8 @@ absl::optional NativeTheme::GetColorProviderColor( } bool NativeTheme::ShouldUseDarkColors() const { @@ -26,10 +26,10 @@ index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c9540c387a9d 100644 +index 8ddda2eae1ce7578c8987e632b21dd0b6c20c554..cca14f9cf49e667a0f2def788097b4eabb4761f9 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -406,6 +406,22 @@ class NATIVE_THEME_EXPORT NativeTheme { SkColor GetUnprocessedSystemColor(ColorId color_id, ColorScheme color_scheme) const; @@ -52,7 +52,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 { +@@ -591,6 +607,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; @@ -61,10 +61,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 5f809b71c635abd3679ee593850e521a14cb62f5..b5ba2d7cd65742ceabaaad96a8ec0db8d661ad32 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 { +@@ -681,6 +681,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..c63f9b05541ce 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,7 +7,7 @@ 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 f841d5847fd107f551e4823ae0690e2e17225ba9..475590da5273c218353c9721b35a9b50be248a47 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() { @@ -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..a0987afbf7cf9 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 826714570d1ee1bfc10043597cd6cd00543318d1..d3223035f33db5f39fd4d6b6e8d99da57bb0e7cb 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 5362650a4f9bfa038f38f3490c50a7ddbd8d0e0e..106d98decdbb2cbb768388017dae5b4c4f00d777 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( +@@ -48,7 +48,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(); @@ -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 383aff3755d4b086759099de8b81808de8d4bf0e..ecba52d0e92d6f8989b1b2c2e851645940dcc2af 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -81,6 +81,7 @@ class DisplayPrivate; @@ -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..c7a6f0aae7741 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -81,7 +81,7 @@ 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 80f26b62b25bd6aa46886e3112b2ffd2698693fe..e72cab84db36eec86309160d4f7416ee431f5e34 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 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f7ef307c7 100644 +index 59a89d471326069e183cdcc42af862fe19d7448e..39cd96d5e5785879bd3d82fb4c71fdf80c48e5ee 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -532,6 +532,7 @@ URLLoader::URLLoader( +@@ -541,6 +541,7 @@ URLLoader::URLLoader( peer_closed_handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), @@ -114,7 +114,7 @@ index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -690,7 +691,7 @@ URLLoader::URLLoader( +@@ -699,7 +700,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ 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) { +@@ -1349,6 +1350,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()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 33e1bd005b790..2d62e04b8fe76 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 40a81cb293469cb5ec1bd5ab5195fd8e1b0812dc..4be0e5b0ef187d68f054672bc3d1dc328057c58b 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, +@@ -3574,6 +3574,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..f1f422de76bd9 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 4d45dfa892fec8857dabdd70e3c09c46b784ef44..d9b72b9298494df57e2ad53738a213226a7c45e4 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 { +@@ -959,25 +959,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 { +@@ -1104,30 +1091,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { if (!fileName.toLowerCase().endsWith('.pdf')) { fileName = fileName + '.pdf'; } 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..614da08c32ba8 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ 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 d2a50feea97add9d9c309e8066305caf9105c547..e6fe6ebd7f86df1e5193305a827ac938b822a1ab 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, @@ -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 ac9bce453ff812679d8c77d661729ea681977061..7cef50818b3587e033f5cfeea324df17547dfa6e 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..fa0cd24e666d4 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 d352b23f4a42b10e77a61de71069083f20f99136..36e9109a2eeb14983aa80905d09499ff68daeaf9 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( 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..0b4c2c4aff7fe 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 7a8ca6523bfd1ce237da9dce7fce03a6acb8b75e..c485572aa06e4b750468b8e23816fbcbf0515757 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( @@ -65,13 +65,13 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 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()); @@ -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..c3d77fe580024 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 be63f30c49416be34766f75553ccb229687651a9..25f27103e7757b4b2ded2ea534e38f10a13ae33c 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( +@@ -3029,6 +3029,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ 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 17ce3078c995f581325b9dcffe6b1589b05f48bc..986643109673cb62379ed822845f3c3050ab14aa 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 a4fac7bbe5800..af18bf7aa9a6a 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 0cd4077a0b534f089318e1ebffb9eb25214c3a42..f1ea1dfd740f4b9cf5f7cb7fd6bd445fb06e0100 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -115,9 +115,10 @@ IsolateHolder::~IsolateHolder() { +@@ -117,9 +117,10 @@ IsolateHolder::~IsolateHolder() { void IsolateHolder::Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table, @@ -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 1447b3828da1e50bd00f4a4975a2b4ce76a2c6ac..abdc2d491cd317d38cb4e7608681ea97bb5b8aab 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..f735f131ced7f 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 1f84d9e87539d5d2d480f293732259d110a2d019..6d6111d61d52eed8950b98698393ef5811cf950f 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -903,6 +903,11 @@ +@@ -917,6 +917,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index c2802a41c4839..3fe0c64a017ec 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 54a3e170f5131ee03892410a0c883d4da4dd885a..1653e392630913dab5db84a7aafff0dfe36d1f71 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..5bc432556d651 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 93bebfd9d25f4617bbbba559f62d9d75fe98d3eb..d0970adddd97f98d94d4d904d2cbcaa846a3ec5d 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -282,6 +282,8 @@ def main(): +@@ -298,6 +298,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 71d3f81551c19..6169c420417da 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,7 +15,7 @@ for us to register the isolate in between Isolate::Allocate and Isolate::Initialize. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 2bed8f7ce21ab052c0c319775875b9cf008b2636..9aa4536d5c8fb38ac58e41c107b946cf9ba5d738 100644 +index f1ea1dfd740f4b9cf5f7cb7fd6bd445fb06e0100..85a01a45bdd721e8f776a0d8f820452299614279 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -57,7 +57,8 @@ IsolateHolder::IsolateHolder( diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 05624bfa5e7b0..4bdf572786992 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 5a365936031e60fea77a5015414958756dc64ee7..104c1a5848ef0fa8b75b32a1243c52193d8a2d91 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) { +@@ -245,11 +245,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..b931eda611b74 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 bf4cbe990cb4db54f3836551ce2a5739ccdd8a65..6b1157bdc900beaea47f458d4ac62982cba72978 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -378,8 +378,12 @@ RunContentProcess(ContentMainParams params, +@@ -379,8 +379,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..390a3957727c5 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 11fa4bb6714518b98321d5e10919de3e01403efd..c9232593c08be04cb62fe7163a240cbed4f6e464 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) { +@@ -328,8 +322,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) { +@@ -400,9 +393,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..653dc841ac895 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 1db44af73aba9f14aba348f83bf0f808412429b0..e89f05c94a55824aef573fc5cbc6fc29e57c6585 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) { +@@ -560,10 +560,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 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed770634e6 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, +@@ -1499,8 +1501,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, +@@ -1544,9 +1548,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, +@@ -2039,12 +2045,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 cf452160a6504379136712fdda8e7d68ed22b94c..2c0a36f1cd4fd25eddb70ac03f6c45832531e350 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 03c2f1a992984995b5805dad12cc855775e223d9..14fb49999bc7be5c538b80c99651dab12bc6d2f6 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 946de814ec91afe047697c07c73edad6ffc42a78..9d5d58991bd1f16803ba470766416d4f8e409944 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, +@@ -1271,6 +1279,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, +@@ -1278,14 +1287,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..a45b0eb6bd148 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -139,7 +139,7 @@ index 3f7dce0281f7b5a540d7b9377ef14a8a6aa9a2fa..11d8419791f3e45d5242081422d452d4 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 5e1b1f542e98f9257938f909a2d92e3117e298af..4b9825694c8b8d6bbe671ebeef8eb57baf8b05a1 100644 +index b19e09806e1e1863dd07bb9cf70628e951cd68a9..289e869b5efea09af5172f0b1c5cbd80eddd78cd 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -174,6 +174,12 @@ source_set("audio") { @@ -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..053a68b0b3d18 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1f9b6e47e 100644 +index 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a0927fad90ad 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -119,6 +119,11 @@ +@@ -123,6 +123,11 @@ #include "services/network/web_transport.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -22,7 +22,7 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -433,6 +438,79 @@ bool GetFullDataFilePath( +@@ -437,6 +442,79 @@ bool GetFullDataFilePath( } // namespace @@ -102,7 +102,7 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -659,6 +737,13 @@ void NetworkContext::SetClient( +@@ -674,6 +752,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( +@@ -2173,6 +2258,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 f69a86f90a6a9055cfc7d4a613e82c0260582688..486a151f6923fd0069ce5aaaffe6559cb60a88ec 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -103,6 +103,7 @@ class DomainReliabilityMonitor; +@@ -101,6 +101,7 @@ class DomainReliabilityMonitor; 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 +@@ -216,6 +217,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 +@@ -769,6 +772,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 d7c10e5a55bf0db67c113e0f46094de3c3b3d158..89c00d7ab1510ebdbce49876fcd5f94c5096b3c9 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 { +@@ -792,6 +803,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..196c6f8d617db 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 b95a062670467c93d01828962a9a592e3193811c..064b5642425290f1d9ab82f75b22fd43973ebf5b 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( +@@ -2124,7 +2124,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..3c5ac87ef3497 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 @@ @@ -48,7 +48,7 @@ index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" 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,9 +59,9 @@ 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 6636961b18c71de0477407e6bebc64b091144afd..674cd9100f6ce4e8811e04b459da9f98fb07af3d 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 @@ @@ -90,7 +90,7 @@ index d63256af63e93c7aab4ce348b9d27953d5346c6c..0f708806aa0e4555c288da38e0f9ecd4 #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" @@ -99,13 +99,13 @@ index d63256af63e93c7aab4ce348b9d27953d5346c6c..0f708806aa0e4555c288da38e0f9ecd4 overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); --#if defined(OS_WIN) +-#if BUILDFLAG(IS_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 2a1dcf30751d1c22831e4c2eed43e90ea539b535..113bce8bff4984f673c09d4cad5b98c7ce40a311 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 +118,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 +131,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 +144,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 +155,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 +168,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 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index cc7c628d48689..6b72c3846a61b 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..735da67a83b10c56d747e2a2b512f7b7d1aae142 100644 +index fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f57c192940 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -88,6 +88,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -28,7 +28,7 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 } +#endif - #endif // defined(OS_WIN) + #endif // BUILDFLAG(IS_WIN) @@ -355,8 +357,10 @@ void PrintJob::StartPdfToEmfConversion( @@ -55,7 +55,7 @@ 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 f922dc5c61ec85e6102a8e92b1b7096382dec6f0..477db7fa8517df9d4b09467ea569af3fe4c4f78c 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h @@ -257,6 +257,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { @@ -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 fc26fd8f32e4c1edd3ca41baf0e9cdd482b25c03..aeaa88bee6b4ce499c361e1b2e93bf5fb0fd31ea 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 f8e48861a2964da636afd767c0034d782ee52d6e..174d51d3b6d9f0131be36cf80199b27875d23960 100644 +--- a/chrome/browser/printing/print_job_worker_oop.cc ++++ b/chrome/browser/printing/print_job_worker_oop.cc +@@ -209,7 +209,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 c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2e220f675 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -29,10 +29,10 @@ @@ -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()`. +@@ -355,7 +368,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( +@@ -499,7 +514,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( +@@ -507,16 +523,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -256,7 +269,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } void PrintViewManagerBase::NavigationStopped() { -@@ -622,12 +641,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -630,12 +649,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( +@@ -653,18 +673,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( +@@ -674,6 +696,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, +@@ -699,7 +722,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) { +@@ -722,7 +745,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) { +@@ -737,6 +759,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( +@@ -747,8 +774,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() { +@@ -816,6 +845,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -353,7 +366,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -869,7 +903,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -877,7 +911,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() { +@@ -952,6 +989,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() { +@@ -1001,7 +1045,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,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 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19544cfe12 100644 +index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625c9209ba9 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -39,6 +39,7 @@ @@ -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) { +@@ -1253,7 +1254,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( +@@ -1284,7 +1286,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() { +@@ -1299,7 +1301,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() { +@@ -1330,7 +1332,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) { +@@ -1377,6 +1380,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) { +@@ -1914,7 +1919,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) { +@@ -1929,7 +1935,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, +@@ -1937,7 +1945,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, +@@ -1956,8 +1964,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() { +@@ -2205,36 +2220,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( +@@ -2378,7 +2408,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) { +@@ -2623,18 +2653,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..4fa2ecbd96c66 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 c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d0b85b8f9 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" @@ -100,13 +99,13 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 #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)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) @@ -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, @@ -154,7 +153,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 + // 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() { 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 index 6ce6432d17aba..5a88aa521ea7e 100644 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ b/patches/chromium/put_back_deleted_colors_for_autofill.patch @@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index a8d95abb69da8d42aed26d3b215cc05d79ba676b..74fc4d9bb7f183765b05e94b7133599ccf714042 100644 +index e798a3156ffbea9e8bddc33e3e1373df949b385d..571767dcb702e876835e767e4a4a8588b0639a96 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc @@ -32,6 +32,7 @@ absl::optional GetHighContrastColor( @@ -44,7 +44,7 @@ index a8d95abb69da8d42aed26d3b215cc05d79ba676b..74fc4d9bb7f183765b05e94b7133599c case NativeTheme::kColorId_FocusedBorderColor: return gfx::kGoogleBlue500; -@@ -136,6 +148,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, +@@ -114,6 +126,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, case NativeTheme::kColorId_WindowBackground: return SK_ColorWHITE; @@ -64,10 +64,10 @@ index a8d95abb69da8d42aed26d3b215cc05d79ba676b..74fc4d9bb7f183765b05e94b7133599c // 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 +index e53194c75dce367b11ae1835427ee5529cdbcf13..4381a93e6c70ae4ca0556844f0303000987fbef5 100644 --- a/ui/native_theme/native_theme_color_id.h +++ b/ui/native_theme/native_theme_color_id.h -@@ -10,6 +10,7 @@ +@@ -10,12 +10,18 @@ #define NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS \ OP(kColorId_DefaultIconColor), \ OP(kColorId_FocusedBorderColor), \ @@ -75,8 +75,7 @@ index a1b39a03776c287bc2b1f9a0a6ce11d0d9efde79..9132ff83b672b51c5f2f7ed95da877be OP(kColorId_FocusedMenuItemBackgroundColor), \ OP(kColorId_MenuBackgroundColor), \ OP(kColorId_MenuIconColor), \ -@@ -20,6 +21,11 @@ - OP(kColorId_OverlayScrollbarThumbStroke), \ + OP(kColorId_MenuSeparatorColor), \ OP(kColorId_ProminentButtonColor), \ OP(kColorId_TextOnProminentButtonColor), \ + /* Results Tables, such as the omnibox */ \ @@ -88,10 +87,10 @@ index a1b39a03776c287bc2b1f9a0a6ce11d0d9efde79..9132ff83b672b51c5f2f7ed95da877be 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 +index e30e7a26e5c2d8a109c837e683d4f108537043f3..5f809b71c635abd3679ee593850e521a14cb62f5 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( +@@ -627,10 +627,23 @@ absl::optional NativeThemeWin::GetPlatformHighContrastColor( case kColorId_ThrobberWaitingColor: return system_colors_[SystemThemeColor::kGrayText]; 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..1d450b2a20b49 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 b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a5537de716fe 100644 +index 4b0b2b0dc0900627aee38de021ec10cbdc9b3cb4..12c15f92d9c4db4e100b7183a654ec199f64b25b 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) { @@ -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 f3e21a7cacb9d192bf3b6cf4d2bfc8d372cd8307..2e91c4f052501e4067cf8fee21f2f3c2674f1c1a 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() { +@@ -4418,6 +4418,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,7 +59,7 @@ 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 822e00b20a272480a3df4c67be7b6ff93375fd15..d2a50feea97add9d9c309e8066305caf9105c547 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, @@ -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 469b98f8405d24b9a13e559a56b9f239bbebd17f..82f61584e1786546cfcb469edfdfe8821c67b67c 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 { +@@ -533,6 +534,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..f20ba81bc3111 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,7 +6,7 @@ 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 1eb2b692c59d33b109085e594badb7fe8284dda5..1b36c21890541ab056ba7a5c403e14a75ce39be3 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( @@ -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 0c21c3b6e2a4b76d9cb27d7857778dfcb273616e..849bc53f18c30338462acc89e59ab7a7045faa75 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..5d09097b66026 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 67a430b99e98e21383d3851e0c54fa3d9affbdcd..71152d08a9e9ce2e112fd7a6c3134a547af5d978 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1543,7 +1543,7 @@ if (is_chrome_branded && !is_android) { +@@ -1586,7 +1586,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) { +@@ -1614,6 +1614,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..a714e9ca7e5d7 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 03f9fac83207248d6c99326b6a5c17b3555e7725..e211b83624c4cc691e29dc6c47a2a74f8a41f4b4 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1303,7 +1303,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1304,7 +1304,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..d18ff7c274509 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ 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 064b5642425290f1d9ab82f75b22fd43973ebf5b..30a0c9216a206042a9769bdeda015eaf00e3cc49 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() { @@ -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..6502a2a7c5d37 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 46a78cf2658ab261c40f7c42135a2e89d0d152d1..7bd8da917e554e3c0523711e33fd196dd6e9805b 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..1d4dc49b73551 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 74e6928041145fd6f37ec4ce7acc6be0649b944d..3eaf29f3ab74de6159bba1578ba0810bd9467922 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()); +@@ -2983,6 +2983,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) { +@@ -2993,6 +3000,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 1b21d5241ea671e4ead260f170e6a0512efea89a..ac9bce453ff812679d8c77d661729ea681977061 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..cf119b4d99398 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 1aa844b66d149be252f4757ed656cc6bccb2ac8b..b03507679029ccb3beb3a8984b1449afead539c6 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( +@@ -881,10 +881,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..9ce1e6240c9ed 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 365b6eb2efc2f09725a9a53b79e83a50bded1c75..0d456ac4b4e832bc64bc1adb8952ce13f084564d 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( +@@ -6035,6 +6035,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..cf2a22e34d0a1 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 3c5b962a3ca5baffe525898d7f417f5fd3687a0b..3c85714b68adda07615cf13740a7257561ecc6f9 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 { +@@ -363,6 +363,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 b4e37bbdd3a80c8d6255d4b536bedbff1d4202a0..e793b0c25f2900d949a7473c3f29c620ffd80408 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -925,6 +925,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -924,6 +924,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,7 +43,7 @@ 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 2191ab72dcaccf50ddbc700ded63f66b95de856d..b4f6e7a468661c272a4cef338e1c171f7247191f 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 { @@ -55,7 +55,7 @@ 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 6acdee7c9eb8e5368401ba804f9a359e5c7b2b70..c72c142a8b4591b12ff2b3a10a143658c6dcfff3 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 { 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..e0a940cc8e788 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 3c85714b68adda07615cf13740a7257561ecc6f9..6cc354acc6f8d253827a799f86fb9d4aba92aa1b 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 { +@@ -363,6 +363,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 e793b0c25f2900d949a7473c3f29c620ffd80408..5b25349e735aa5b32745428d5b19b5cf2454dfc1 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -937,6 +937,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,7 +52,7 @@ 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 b4f6e7a468661c272a4cef338e1c171f7247191f..c70667d616ac3a64fba7c5d2ba315d2c40cc5463 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 { @@ -65,7 +65,7 @@ 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 c72c142a8b4591b12ff2b3a10a143658c6dcfff3..03d0a3e596f3d0e5582d4a34aa51a3e5e97210d6 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 { @@ -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 e9a2297ba10f2..b9764a0be7684 100644 --- a/patches/config.json +++ b/patches/config.json @@ -9,6 +9,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/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 1343e5cda9701..7824d1d885c8f 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -27,3 +27,4 @@ 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 +fix_serdes_test.patch 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..e70c8c148c892 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 ce150e6a007bb87c7ce956cc4f918b13c829585b..b4e04dce1ec52cd787c3a6de9abe09aae55ecc09 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,7 +575,7 @@ config("internal_config") { +@@ -579,7 +579,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) { +@@ -5688,7 +5688,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) { +@@ -5726,6 +5726,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index a708140339fbe..f6f43c064a0ea 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 0e3370e84503dcdece061dd073b337f774b2d2da..7b8eb622c50a081c8fc3a365f1f4c7e017084e06 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9141,7 +9141,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9068,7 +9068,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 aefbbd9b31e0db74c33858842ff4856eb9962706..7d348738a40d6e27b55b18aea7e8fea553834fd7 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6132,9 +6132,9 @@ void Heap::TearDown() { +@@ -6111,9 +6111,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..afd95ed8484b8 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 24e073885a1e6d2d203e55fd57b92e9943aff385..f1bb6cad8c608a6371e5ed4eb88ce0c47acb66bd 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,6 +575,10 @@ config("internal_config") { +@@ -579,6 +579,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..441102542267d 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 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f425c120fa8 100644 +index 499d5a9d1cf9e321212bda7c94c15ed1ded7aa30..19e89e906f4cc480bc8a03b9ca7ee9e8f1f907fa 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -886,7 +886,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -897,7 +897,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 04d14f07aefcc..b9d9606081e56 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 b4e04dce1ec52cd787c3a6de9abe09aae55ecc09..24e073885a1e6d2d203e55fd57b92e9943aff385 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5672,7 +5672,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5700,7 +5700,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 @@ -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 b1777c5ad16bd9f270e4558682c99fe7d593bf73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 14:56:38 +0900 Subject: [PATCH 038/811] build(deps): bump pathval from 1.1.0 to 1.1.1 in /spec (#32859) Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/chaijs/pathval/releases) - [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md) - [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: pathval dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- spec/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/yarn.lock b/spec/yarn.lock index 79ba3ebb64ecd..8fedf76dab98e 100644 --- a/spec/yarn.lock +++ b/spec/yarn.lock @@ -723,9 +723,9 @@ path-is-absolute@^1.0.0: integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== pause-stream@^0.0.11: version "0.0.11" From 34129b83a471cbe2aa4de153c1af084a1cd8be83 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 17 Feb 2022 06:56:53 +0100 Subject: [PATCH 039/811] chore: error catching in node_bindings (#32858) --- shell/common/node_bindings.cc | 37 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index b29e4bcccd19f..99b017dc425fe 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -462,8 +462,7 @@ node::Environment* NodeBindings::CreateEnvironment( args.insert(args.begin() + 1, init_script); - isolate_data_ = - node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform); + isolate_data_ = node::CreateIsolateData(isolate, uv_loop_, platform); node::Environment* env; uint64_t flags = node::EnvironmentFlags::kDefaultFlags | @@ -476,25 +475,25 @@ node::Environment* NodeBindings::CreateEnvironment( // not to register its handler (overriding blinks) in non-browser processes. flags |= node::EnvironmentFlags::kNoRegisterESMLoader | node::EnvironmentFlags::kNoInitializeInspector; - v8::TryCatch try_catch(context->GetIsolate()); - env = node::CreateEnvironment( - isolate_data_, context, args, exec_args, - static_cast(flags)); - DCHECK(env); - - // This will only be caught when something has gone terrible wrong as all - // electron scripts are wrapped in a try {} catch {} by webpack - if (try_catch.HasCaught()) { - LOG(ERROR) << "Failed to initialize node environment in process: " - << process_type; - } - } else { - env = node::CreateEnvironment( - isolate_data_, context, args, exec_args, - static_cast(flags)); - DCHECK(env); } + v8::TryCatch try_catch(isolate); + env = node::CreateEnvironment( + isolate_data_, context, args, exec_args, + static_cast(flags)); + + if (try_catch.HasCaught()) { + std::string err_msg = + "Failed to initialize node environment in process: " + process_type; + v8::Local message = try_catch.Message(); + std::string msg; + if (!message.IsEmpty() && gin::ConvertFromV8(isolate, message->Get(), &msg)) + err_msg += " , with error: " + msg; + LOG(ERROR) << err_msg; + } + + DCHECK(env); + // Clean up the global _noBrowserGlobals that we unironically injected into // the global scope if (browser_env_ != BrowserEnvironment::kBrowser) { From fe43296f7fd11171ebd73c0e6d248b9c6da5279d Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 17 Feb 2022 06:58:21 +0100 Subject: [PATCH 040/811] chore: backport EPROTOTYPE fixes from libuv (#32856) 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 --- 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 7824d1d885c8f..55ddb7c5a2285 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -28,3 +28,6 @@ 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 fix_serdes_test.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 84cf685e761b2dd22f064e0dbf33b290bbec5fc0 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 17 Feb 2022 06:59:13 +0100 Subject: [PATCH 041/811] fix: webContents.openDevTools({mode}) not working (#32829) --- 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 b9764a0be7684..1f10e013b33b3 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 e08ced59790089b84cd7efa81a983155faa82c5f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 17 Feb 2022 21:05:01 +0900 Subject: [PATCH 042/811] chore: update patch to fix CI (#32950) --- .../fix_expose_globals_to_allow_patching_devtools_dock.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/*", From 36e730da9367b6e75e9fed882b9e8d652226919d Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 17 Feb 2022 13:57:23 -0800 Subject: [PATCH 043/811] build: use gen2 macOS resources for tests (#32935) --- .circleci/build_config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 17129a46072e6..fdb8161043356 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -54,7 +54,7 @@ executors: description: "macOS executor size" default: large type: enum - enum: ["medium", "large"] + enum: ["macos.x86.medium.gen2", "large"] macos: xcode: "12.4.0" resource_class: << parameters.size >> @@ -1909,7 +1909,7 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - size: medium + size: macos.x86.medium.gen2 environment: <<: *env-machine-mac <<: *env-testing-build @@ -1990,7 +1990,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - size: medium + size: macos.x86.medium.gen2 environment: <<: *env-machine-mac <<: *env-mas @@ -2226,7 +2226,7 @@ jobs: osx-testing-x64-tests: executor: name: macos - size: medium + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-stack-dumping @@ -2244,7 +2244,7 @@ jobs: mas-testing-x64-tests: executor: name: macos - size: medium + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-stack-dumping From b1463d2da138dcbc20d87cf31b9807d697690592 Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Fri, 18 Feb 2022 06:02:22 +0100 Subject: [PATCH 044/811] fix: stale renderer process on quit (#32888) --- 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 9a15edbdfddbe..82713b7d15288 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -458,7 +458,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 101e17d6f32350d9b98fbea5e6d1884d6d2b84e4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 09:08:21 -0800 Subject: [PATCH 045/811] Revert "Bump v19.0.0-nightly.20220216" This reverts commit c75ec2e689869354c96c811ae9d4bf7daecac2c8. --- 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 3683f47661db4..0b4738720b15b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220216 \ No newline at end of file +19.0.0-nightly.20220209 \ No newline at end of file diff --git a/package.json b/package.json index 44c49732320cc..3fbd34c144201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220216", + "version": "19.0.0-nightly.20220209", "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 f1d69b7566baa..3dff29f890f46 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 19,0,0,20220216 - PRODUCTVERSION 19,0,0,20220216 + FILEVERSION 19,0,0,20220209 + PRODUCTVERSION 19,0,0,20220209 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9168f65321cdc56b6f0a0555ba59470bc3214958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:18:58 +0900 Subject: [PATCH 046/811] build(deps): bump pathval from 1.1.0 to 1.1.1 (#32861) Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/chaijs/pathval/releases) - [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md) - [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: pathval dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5059edbeab68e..79eac186fb2ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5497,9 +5497,9 @@ path-type@^4.0.0: integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== pbkdf2@^3.0.3: version "3.0.17" From 683ff2ea02dd1e343b03f0c55cf8c30dbb8fa720 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:19:53 +0900 Subject: [PATCH 047/811] build(deps): bump ajv from 6.10.2 to 6.12.6 in /spec (#32863) Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6) --- updated-dependencies: - dependency-name: ajv dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- spec/yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/spec/yarn.lock b/spec/yarn.lock index 8fedf76dab98e..fc6bccebb7505 100644 --- a/spec/yarn.lock +++ b/spec/yarn.lock @@ -20,11 +20,11 @@ nan "^2.12.1" ajv@^6.5.5: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== + 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 "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" @@ -355,15 +355,15 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== file-uri-to-path@1.0.0: version "1.0.0" @@ -962,9 +962,9 @@ type-detect@^4.0.0, type-detect@^4.0.5: integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" From faa392af28110a91b4cd018675331524d8e69048 Mon Sep 17 00:00:00 2001 From: Kev Date: Mon, 21 Feb 2022 02:23:17 +0100 Subject: [PATCH 048/811] docs: fix broken link to GNOME notifications spec (#32934) --- 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 9d72c8b0ad2ee41541b01ce6594012b40d869f0b Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Sun, 20 Feb 2022 17:27:58 -0800 Subject: [PATCH 049/811] chore: add @electron/wg-security to patches/ CODEOWNERS (#32963) --- .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 bdad6335c4e18aecbb3c4f3176fc100e542f0477 Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 21 Feb 2022 16:43:27 +0900 Subject: [PATCH 050/811] fix: command string for windows protocol handler (#32953) --- 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 069cde09fbae94e18bb1e31ed6235c0761c08315 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Feb 2022 01:23:55 -0800 Subject: [PATCH 051/811] fix: don't restore maximized BrowserWindow when calling showInactive (#32870) --- 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 14c0fac52460a..22dc480ecc3b5 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -111,3 +111,4 @@ fix_aspect_ratio_with_max_size.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.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 5f3657001ab8c..70d57977af6a0 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 1e8da899a372c40eab6743fbff5ce846736d8927 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Feb 2022 01:27:45 -0800 Subject: [PATCH 052/811] chore: fix typos (#32985) --- lib/browser/api/net.ts | 2 +- shell/browser/api/electron_api_power_monitor_win.cc | 2 +- shell/browser/api/electron_api_url_loader.cc | 2 +- shell/browser/auto_updater_mac.mm | 2 +- shell/browser/browser_mac.mm | 4 ++-- shell/browser/native_window_mac.mm | 8 ++++---- shell/browser/native_window_views_win.cc | 2 +- shell/browser/ui/message_box_win.cc | 2 +- .../ui/win/electron_desktop_window_tree_host_win.cc | 2 +- shell/common/gin_helper/function_template.h | 2 +- shell/common/platform_util_linux.cc | 2 +- shell/renderer/electron_render_frame_observer.cc | 4 ++-- shell/renderer/electron_renderer_client.cc | 4 ++-- spec-main/index.js | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/browser/api/net.ts b/lib/browser/api/net.ts index 454505ede04f2..80351c0cdbaae 100644 --- a/lib/browser/api/net.ts +++ b/lib/browser/api/net.ts @@ -198,7 +198,7 @@ class ChunkedBodyStream extends Writable { this._downstream = pipe; if (this._pendingChunk) { const doneWriting = (maybeError: Error | void) => { - // If the underlying request has been aborted, we honeslty don't care about the error + // If the underlying request has been aborted, we honestly don't care about the error // all work should cease as soon as we abort anyway, this error is probably a // "mojo pipe disconnected" error (code=9) if (this._clientRequest._aborted) return; diff --git a/shell/browser/api/electron_api_power_monitor_win.cc b/shell/browser/api/electron_api_power_monitor_win.cc index bf1468cd97038..90f2cf97dfe26 100644 --- a/shell/browser/api/electron_api_power_monitor_win.cc +++ b/shell/browser/api/electron_api_power_monitor_win.cc @@ -42,7 +42,7 @@ void PowerMonitor::InitPlatformSpecificMonitors() { // Tel windows we want to be notified with session events WTSRegisterSessionNotification(window_, NOTIFY_FOR_THIS_SESSION); - // For Windows 8 and later, a new "connected standy" mode has been added and + // For Windows 8 and later, a new "connected standby" mode has been added and // we must explicitly register for its notifications. auto RegisterSuspendResumeNotification = reinterpret_cast( diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 212a2b6c16f8e..97baf11d65624 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -490,7 +490,7 @@ gin::Handle SimpleURLLoaderWrapper::Create( int options = 0; if (!credentials_specified && !use_session_cookies) { // This is the default case, as well as the case when credentials is not - // specified and useSessionCoookies is false. credentials_mode will be + // specified and useSessionCookies is false. credentials_mode will be // kInclude, but cookies will be blocked. request->credentials_mode = network::mojom::CredentialsMode::kInclude; options |= network::mojom::kURLLoadOptionBlockAllCookies; diff --git a/shell/browser/auto_updater_mac.mm b/shell/browser/auto_updater_mac.mm index 3dbf49e2da8a9..c9e4542ffdfba 100644 --- a/shell/browser/auto_updater_mac.mm +++ b/shell/browser/auto_updater_mac.mm @@ -24,7 +24,7 @@ namespace { -// The gloal SQRLUpdater object. +// The global SQRLUpdater object. SQRLUpdater* g_updater = nil; } // namespace diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 357c6723e44ff..cdd3ba7711b4b 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -394,10 +394,10 @@ void RemoveFromLoginItems() { void Browser::DockHide() { // Transforming application state from UIElement to Foreground is an - // asyncronous operation, and unfortunately there is currently no way to know + // asynchronous operation, and unfortunately there is currently no way to know // when it is finished. // So if we call DockHide => DockShow => DockHide => DockShow in a very short - // time, we would triger a bug of macOS that, there would be multiple dock + // time, we would trigger a bug of macOS that, there would be multiple dock // icons of the app left in system. // To work around this, we make sure DockHide does nothing if it is called // immediately after DockShow. After some experiments, 1 second seems to be diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index bf78f78a2631a..3220741ec356c 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -51,7 +51,7 @@ // This view would inform Chromium to resize the hosted views::View. // -// The overrided methods should behave the same with BridgedContentView. +// The overridden methods should behave the same with BridgedContentView. @interface ElectronAdaptedContentView : NSView { @private views::NativeWidgetMacNSWindowHost* bridge_host_; @@ -373,7 +373,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { if (traffic_light_position_) { [buttons_proxy_ setMargin:*traffic_light_position_]; } else if (title_bar_style_ == TitleBarStyle::kHiddenInset) { - // For macOS >= 11, while this value does not match offical macOS apps + // For macOS >= 11, while this value does not match official macOS apps // like Safari or Notes, it matches titleBarStyle's old implementation // before Electron <= 12. [buttons_proxy_ setMargin:gfx::Point(12, 11)]; @@ -381,7 +381,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { if (title_bar_style_ == TitleBarStyle::kCustomButtonsOnHover) { [buttons_proxy_ setShowOnHover:YES]; } else { - // customButtonsOnHover does not show buttons initialiy. + // customButtonsOnHover does not show buttons initially. InternalSetWindowButtonVisibility(true); } } @@ -562,7 +562,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } } - // Deattach the window from the parent before. + // Detach the window from the parent before. if (parent()) InternalSetParentWindow(parent(), false); diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 0b4706f1cc198..ab336f2e29866 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -473,7 +473,7 @@ LRESULT CALLBACK NativeWindowViews::SubclassProc(HWND hwnd, // windows can occur due to rapidly entering and leaving forwarding mode. // By consuming and ignoring the message, we're essentially telling // Chromium that we have not left the window despite somebody else getting - // the messages. As to why this is catched for the legacy window and not + // the messages. As to why this is caught for the legacy window and not // the actual browser window is simply that the legacy window somehow // makes use of these events; posting to the main window didn't work. if (window->forwarding_mouse_messages_) { diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index 724228e010189..ab494bd6d59ab 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -48,7 +48,7 @@ std::map>& GetDialogsMap() { return *dialogs; } -// Speical HWND used by the dialogs map. +// Special HWND used by the dialogs map. // // - ID is used but window has not been created yet. const HWND kHwndReserve = reinterpret_cast(-1); 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 16e71fac12b39..3600e273ea73b 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 @@ -87,7 +87,7 @@ bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets( // Indenting the client area can fix this behavior. if (IsMaximized() && !native_window_view_->has_frame()) { // The insets would be eventually passed to WM_NCCALCSIZE, which takes - // the metrics under the DPI of _main_ monitor instead of current moniotr. + // the metrics under the DPI of _main_ monitor instead of current monitor. // // Please make sure you tested maximized frameless window under multiple // monitors with different DPIs before changing this code. diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index 025c917fbc34f..b5d8293213066 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -208,7 +208,7 @@ class Invoker, ArgTypes...> // GCC thinks that create_flags is going unused, even though the // expansion above clearly makes use of it. Per jyasskin@, casting // to void is the commonly accepted way to convince the compiler - // that you're actually using a parameter/varible. + // that you're actually using a parameter/variable. (void)create_flags; } diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index 0d86d7cf1c28a..9d58f8fc959f4 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -119,7 +119,7 @@ class ShowItemHelper { bool owned = false; if (!reader.PopBool(&owned)) { - LOG(ERROR) << "Failed to read " << kMethodNameHasOwner << " resposne"; + LOG(ERROR) << "Failed to read " << kMethodNameHasOwner << " response"; } else if (owned) { is_running = true; } diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index ba1a122868c64..4c763315f3539 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -82,7 +82,7 @@ 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 + // be copied from its parent, and Chromium will initialize 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 @@ -92,7 +92,7 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures( // 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. + // actual page has started to load. auto* web_frame = static_cast(render_frame_->GetWebFrame()); if (web_frame->Opener() && web_frame->IsOnInitialEmptyDocument()) { diff --git a/shell/renderer/electron_renderer_client.cc b/shell/renderer/electron_renderer_client.cc index c507bdcffccbb..f24c8073935fe 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -50,7 +50,7 @@ void ElectronRendererClient::RenderFrameCreated( void ElectronRendererClient::RunScriptsAtDocumentStart( content::RenderFrame* render_frame) { RendererClientBase::RunScriptsAtDocumentStart(render_frame); - // Inform the document start pharse. + // Inform the document start phase. v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); node::Environment* env = GetEnvironment(render_frame); if (env) @@ -61,7 +61,7 @@ void ElectronRendererClient::RunScriptsAtDocumentStart( void ElectronRendererClient::RunScriptsAtDocumentEnd( content::RenderFrame* render_frame) { RendererClientBase::RunScriptsAtDocumentEnd(render_frame); - // Inform the document end pharse. + // Inform the document end phase. v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); node::Environment* env = GetEnvironment(render_frame); if (env) diff --git a/spec-main/index.js b/spec-main/index.js index 6579025ee7579..db24801e9d286 100644 --- a/spec-main/index.js +++ b/spec-main/index.js @@ -27,7 +27,7 @@ const { app, protocol } = require('electron'); v8.setFlagsFromString('--expose_gc'); app.commandLine.appendSwitch('js-flags', '--expose_gc'); -// Prevent the spec runner quiting when the first window closes +// Prevent the spec runner quitting when the first window closes app.on('window-all-closed', () => null); // Use fake device for Media Stream to replace actual camera and microphone. From 83a4ac184117c9b60732ba893be0d1212d9231d0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 05:04:50 -0800 Subject: [PATCH 053/811] Bump v19.0.0-nightly.20220221 --- 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 0b4738720b15b..6cd3cb0ed811a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220209 \ No newline at end of file +19.0.0-nightly.20220221 \ No newline at end of file diff --git a/package.json b/package.json index 3fbd34c144201..f6c49ed8e200c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220209", + "version": "19.0.0-nightly.20220221", "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 3dff29f890f46..ca7e437884d88 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 19,0,0,20220209 - PRODUCTVERSION 19,0,0,20220209 + FILEVERSION 19,0,0,20220221 + PRODUCTVERSION 19,0,0,20220221 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 484a70f9b8fdaa5a946eeea4805a614156ec33f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 14:27:56 -0800 Subject: [PATCH 054/811] build(deps): bump ajv from 6.11.0 to 6.12.6 in /spec-main (#32864) Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.11.0 to 6.12.6. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.11.0...v6.12.6) --- updated-dependencies: - dependency-name: ajv dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- spec-main/yarn.lock | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/spec-main/yarn.lock b/spec-main/yarn.lock index 6d02b0452d444..f4034d4e9be31 100644 --- a/spec-main/yarn.lock +++ b/spec-main/yarn.lock @@ -67,17 +67,7 @@ ajv-keywords@^3.1.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" - integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== - 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" - -ajv@^6.12.3: +ajv@^6.1.0, 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== @@ -364,9 +354,9 @@ extsprintf@^1.2.0: 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" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -943,9 +933,9 @@ uniq@^1.0.0: 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" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" From fa7461685dfec20208b21b91accad641ec8c577d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 14:28:34 -0800 Subject: [PATCH 055/811] build(deps): bump ajv from 6.10.1 to 6.12.6 (#32865) Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.1 to 6.12.6. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.1...v6.12.6) --- updated-dependencies: - dependency-name: ajv dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 61 ++++++++++++------------------------------------------- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/yarn.lock b/yarn.lock index 79eac186fb2ff..b03a8b7cbf371 100644 --- a/yarn.lock +++ b/yarn.lock @@ -870,40 +870,10 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0: - version "6.10.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.1.tgz#ebf8d3af22552df9dd049bfbe50cc2390e823593" - integrity sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.10.0: - version "6.12.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706" - integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== - 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" - -ajv@^6.10.2: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.2: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" - integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2: + 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" @@ -2841,15 +2811,10 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - 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" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.1.1: version "3.2.4" @@ -2864,9 +2829,9 @@ fast-glob@^3.1.1: picomatch "^2.2.1" fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" @@ -7714,9 +7679,9 @@ upath@^1.1.1: integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" From e9b9835feb32189164de0a8bd67c85de5cee1895 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 22 Feb 2022 08:24:11 +0100 Subject: [PATCH 056/811] chore: fix out-of-date chromium patch (#33030) --- ...estore_maximized_windows_when_calling_showinactive.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 index 17f355134d0f0..4c2bbea2e5906 100644 --- 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 @@ -7,10 +7,10 @@ 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 +index 4be0e5b0ef187d68f054672bc3d1dc328057c58b..264a9109e42c23e9be6bf7269b3cfee2634b61e4 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, +@@ -665,9 +665,16 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, SetWindowPlacement(hwnd(), &placement); native_show_state = SW_SHOWMAXIMIZED; } else { @@ -28,7 +28,7 @@ index 067861bb743ee2f3c1916794d45efb7dd591b230..6507557bf5a47492343602607e0dbb7d break; case ui::SHOW_STATE_MAXIMIZED: native_show_state = SW_SHOWMAXIMIZED; -@@ -677,9 +684,9 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, +@@ -678,9 +685,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)) { From bcf060fab67fe1912d03ad253de98b3091b2a61b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 10:52:23 -0800 Subject: [PATCH 057/811] Revert "Bump v19.0.0-nightly.20220221" This reverts commit 83a4ac184117c9b60732ba893be0d1212d9231d0. --- 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 6cd3cb0ed811a..0b4738720b15b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220221 \ No newline at end of file +19.0.0-nightly.20220209 \ No newline at end of file diff --git a/package.json b/package.json index f6c49ed8e200c..3fbd34c144201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220221", + "version": "19.0.0-nightly.20220209", "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 ca7e437884d88..3dff29f890f46 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 19,0,0,20220221 - PRODUCTVERSION 19,0,0,20220221 + FILEVERSION 19,0,0,20220209 + PRODUCTVERSION 19,0,0,20220209 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 41b2945ced7f93568fb3771ab6989d490214ab91 Mon Sep 17 00:00:00 2001 From: t57ser Date: Wed, 23 Feb 2022 08:59:50 +0100 Subject: [PATCH 058/811] feat: add ability to configure if window should close when opener closes (#31314) * feat: Added ability to configure if window should close when opener closes * fix: check if embedder is destroyed * fix: correctly take over closeWithOpener property * chore: Added documentation * Update docs/api/window-open.md Co-authored-by: John Kleinschmidt * chore: refactor Co-authored-by: Jeremy Rose * chore: changed property name from `closeWithOpener` to `outlivesOpener` * dummy change to kick lint * undo above Co-authored-by: John Kleinschmidt Co-authored-by: Jeremy Rose --- docs/api/window-open.md | 5 ++++ lib/browser/api/web-contents.ts | 45 ++++++++++++++++++++--------- lib/browser/guest-window-manager.ts | 22 +++++++++----- typings/internal-electron.d.ts | 2 +- 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/docs/api/window-open.md b/docs/api/window-open.md index a2cb76a2a569e..1925a5d1e7e5d 100644 --- a/docs/api/window-open.md +++ b/docs/api/window-open.md @@ -73,6 +73,11 @@ creating the window. Note that this is more powerful than passing options through the feature string, as the renderer has more limited privileges in deciding security preferences than the main process. +In addition to passing in `action` and `overrideBrowserWindowOptions`, +`outlivesOpener` can be passed like: `{ action: 'allow', outlivesOpener: true, +overrideBrowserWindowOptions: { ... } }`. If set to `true`, the newly created +window will not close when the opener window closes. The default value is `false`. + ### Native `Window` example ```javascript diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 5705cec695a07..4e2cd4acbda74 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -492,41 +492,51 @@ WebContents.prototype.loadURL = function (url, options) { return p; }; -WebContents.prototype.setWindowOpenHandler = function (handler: (details: Electron.HandlerDetails) => ({action: 'allow'} | {action: 'deny', overrideBrowserWindowOptions?: BrowserWindowConstructorOptions})) { +WebContents.prototype.setWindowOpenHandler = function (handler: (details: Electron.HandlerDetails) => ({action: 'deny'} | {action: 'allow', overrideBrowserWindowOptions?: BrowserWindowConstructorOptions, outlivesOpener?: boolean})) { this._windowOpenHandler = handler; }; -WebContents.prototype._callWindowOpenHandler = function (event: Electron.Event, details: Electron.HandlerDetails): BrowserWindowConstructorOptions | null { +WebContents.prototype._callWindowOpenHandler = function (event: Electron.Event, details: Electron.HandlerDetails): {browserWindowConstructorOptions: BrowserWindowConstructorOptions | null, outlivesOpener: boolean} { + const defaultResponse = { + browserWindowConstructorOptions: null, + outlivesOpener: false + }; if (!this._windowOpenHandler) { - return null; + return defaultResponse; } const response = this._windowOpenHandler(details); if (typeof response !== 'object') { event.preventDefault(); console.error(`The window open handler response must be an object, but was instead of type '${typeof response}'.`); - return null; + return defaultResponse; } if (response === null) { event.preventDefault(); console.error('The window open handler response must be an object, but was instead null.'); - return null; + return defaultResponse; } if (response.action === 'deny') { event.preventDefault(); - return null; + return defaultResponse; } else if (response.action === 'allow') { if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) { - return response.overrideBrowserWindowOptions; + return { + browserWindowConstructorOptions: response.overrideBrowserWindowOptions, + outlivesOpener: typeof response.outlivesOpener === 'boolean' ? response.outlivesOpener : false + }; } else { - return {}; + return { + browserWindowConstructorOptions: {}, + outlivesOpener: typeof response.outlivesOpener === 'boolean' ? response.outlivesOpener : false + }; } } else { event.preventDefault(); console.error('The window open handler response must be an object with an \'action\' property of \'allow\' or \'deny\'.'); - return null; + return defaultResponse; } }; @@ -651,7 +661,8 @@ WebContents.prototype._init = function () { postBody, disposition }; - const options = this._callWindowOpenHandler(event, details); + const result = this._callWindowOpenHandler(event, details); + const options = result.browserWindowConstructorOptions; if (!event.defaultPrevented) { openGuestWindow({ event, @@ -660,12 +671,14 @@ WebContents.prototype._init = function () { referrer, postData, overrideBrowserWindowOptions: options || {}, - windowOpenArgs: details + windowOpenArgs: details, + outlivesOpener: result.outlivesOpener }); } }); let windowOpenOverriddenOptions: BrowserWindowConstructorOptions | null = null; + let windowOpenOutlivesOpenerOption: boolean = false; this.on('-will-add-new-contents' as any, (event: ElectronInternal.Event, url: string, frameName: string, rawFeatures: string, disposition: Electron.HandlerDetails['disposition'], referrer: Electron.Referrer, postData: PostData) => { const postBody = postData ? { data: postData, @@ -679,7 +692,9 @@ WebContents.prototype._init = function () { referrer, postBody }; - windowOpenOverriddenOptions = this._callWindowOpenHandler(event, details); + const result = this._callWindowOpenHandler(event, details); + windowOpenOutlivesOpenerOption = result.outlivesOpener; + windowOpenOverriddenOptions = result.browserWindowConstructorOptions; if (!event.defaultPrevented) { const secureOverrideWebPreferences = windowOpenOverriddenOptions ? { // Allow setting of backgroundColor as a webPreference even though @@ -710,7 +725,10 @@ WebContents.prototype._init = function () { _userGesture: boolean, _left: number, _top: number, _width: number, _height: number, url: string, frameName: string, referrer: Electron.Referrer, rawFeatures: string, postData: PostData) => { const overriddenOptions = windowOpenOverriddenOptions || undefined; + const outlivesOpener = windowOpenOutlivesOpenerOption; windowOpenOverriddenOptions = null; + // false is the default + windowOpenOutlivesOpenerOption = false; if ((disposition !== 'foreground-tab' && disposition !== 'new-window' && disposition !== 'background-tab')) { @@ -730,7 +748,8 @@ WebContents.prototype._init = function () { url, frameName, features: rawFeatures - } + }, + outlivesOpener }); }); } diff --git a/lib/browser/guest-window-manager.ts b/lib/browser/guest-window-manager.ts index 9815865f72499..baa446ab91dae 100644 --- a/lib/browser/guest-window-manager.ts +++ b/lib/browser/guest-window-manager.ts @@ -29,7 +29,7 @@ const getGuestWindowByFrameName = (name: string) => frameNamesToWindow.get(name) * user to preventDefault() on the passed event (which ends up calling * DestroyWebContents). */ -export function openGuestWindow ({ event, embedder, guest, referrer, disposition, postData, overrideBrowserWindowOptions, windowOpenArgs }: { +export function openGuestWindow ({ event, embedder, guest, referrer, disposition, postData, overrideBrowserWindowOptions, windowOpenArgs, outlivesOpener }: { event: { sender: WebContents, defaultPrevented: boolean }, embedder: WebContents, guest?: WebContents, @@ -38,6 +38,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition postData?: PostData, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions, windowOpenArgs: WindowOpenArgs, + outlivesOpener: boolean, }): BrowserWindow | undefined { const { url, frameName, features } = windowOpenArgs; const { options: browserWindowOptions } = makeBrowserWindowOptions({ @@ -77,7 +78,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition ...browserWindowOptions }); - handleWindowLifecycleEvents({ embedder, frameName, guest: window }); + handleWindowLifecycleEvents({ embedder, frameName, guest: window, outlivesOpener }); embedder.emit('did-create-window', window, { url, frameName, options: browserWindowOptions, disposition, referrer, postData }); @@ -90,10 +91,11 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition * too is the guest destroyed; this is Electron convention and isn't based in * browser behavior. */ -const handleWindowLifecycleEvents = function ({ embedder, guest, frameName }: { +const handleWindowLifecycleEvents = function ({ embedder, guest, frameName, outlivesOpener }: { embedder: WebContents, guest: BrowserWindow, - frameName: string + frameName: string, + outlivesOpener: boolean }) { const closedByEmbedder = function () { guest.removeListener('closed', closedByUser); @@ -101,9 +103,14 @@ const handleWindowLifecycleEvents = function ({ embedder, guest, frameName }: { }; const closedByUser = function () { - embedder.removeListener('current-render-view-deleted' as any, closedByEmbedder); + // Embedder might have been closed + if (!embedder.isDestroyed() && !outlivesOpener) { + embedder.removeListener('current-render-view-deleted' as any, closedByEmbedder); + } }; - embedder.once('current-render-view-deleted' as any, closedByEmbedder); + if (!outlivesOpener) { + embedder.once('current-render-view-deleted' as any, closedByEmbedder); + } guest.once('closed', closedByUser); if (frameName) { @@ -163,7 +170,8 @@ function emitDeprecatedNewWindowEvent ({ event, embedder, guest, windowOpenArgs, handleWindowLifecycleEvents({ embedder: event.sender, guest: newGuest, - frameName + frameName, + outlivesOpener: false }); } return true; diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 666775c16a257..a0d645440652f 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -63,7 +63,7 @@ declare namespace Electron { equal(other: WebContents): boolean; browserWindowOptions: BrowserWindowConstructorOptions; _windowOpenHandler: ((details: Electron.HandlerDetails) => any) | null; - _callWindowOpenHandler(event: any, details: Electron.HandlerDetails): Electron.BrowserWindowConstructorOptions | null; + _callWindowOpenHandler(event: any, details: Electron.HandlerDetails): {browserWindowConstructorOptions: Electron.BrowserWindowConstructorOptions | null, outlivesOpener: boolean}; _setNextChildWebPreferences(prefs: Partial & Pick): void; _send(internal: boolean, channel: string, args: any): boolean; _sendToFrameInternal(frameId: number | [number, number], channel: string, ...args: any[]): boolean; From 08e26175fdc8b7fb033e55c408181f2c0fa2940e Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 23 Feb 2022 11:33:42 +0100 Subject: [PATCH 059/811] fix: broken OSR transparent option (#32885) --- 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 85d2e7207efc0..3873591e1dda3 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -767,8 +767,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 5b2d3910c1749f5faaeaec15d1051a2582c32596 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 05:00:59 -0800 Subject: [PATCH 060/811] Bump v19.0.0-nightly.20220223 --- 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 0b4738720b15b..b51128a4c6e21 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220209 \ No newline at end of file +19.0.0-nightly.20220223 \ No newline at end of file diff --git a/package.json b/package.json index 3fbd34c144201..0a29b50a9164e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220209", + "version": "19.0.0-nightly.20220223", "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 3dff29f890f46..2ef24596652a7 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 19,0,0,20220209 - PRODUCTVERSION 19,0,0,20220209 + FILEVERSION 19,0,0,20220223 + PRODUCTVERSION 19,0,0,20220223 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 268cd31e38f4d8b0ba81de27c73b7b1424ec9157 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 23 Feb 2022 16:27:54 +0100 Subject: [PATCH 061/811] fix: DCHECK when calling app.exit() (#33035) --- shell/browser/window_list.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/window_list.cc b/shell/browser/window_list.cc index 45f166cb0bd86..a2555e5a111e7 100644 --- a/shell/browser/window_list.cc +++ b/shell/browser/window_list.cc @@ -109,7 +109,7 @@ void WindowList::DestroyAllWindows() { ConvertToWeakPtrVector(GetInstance()->windows_); for (const auto& window : weak_windows) { - if (window) + if (window && !window->IsClosed()) window->CloseImmediately(); } } From da54cfcb3ea82b1844fe5f3c530cc2ab888ecaa4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 10:12:10 -0800 Subject: [PATCH 062/811] Revert "Bump v19.0.0-nightly.20220223" This reverts commit 5b2d3910c1749f5faaeaec15d1051a2582c32596. --- 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 b51128a4c6e21..0b4738720b15b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220223 \ No newline at end of file +19.0.0-nightly.20220209 \ No newline at end of file diff --git a/package.json b/package.json index 0a29b50a9164e..3fbd34c144201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220223", + "version": "19.0.0-nightly.20220209", "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 2ef24596652a7..3dff29f890f46 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 19,0,0,20220223 - PRODUCTVERSION 19,0,0,20220223 + FILEVERSION 19,0,0,20220209 + PRODUCTVERSION 19,0,0,20220209 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 8cf345660c35d88bfad0b9fff25f3974482df2f2 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:01:41 -0800 Subject: [PATCH 063/811] Bump v19.0.0-nightly.20220224 --- 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 0b4738720b15b..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220209 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index 3fbd34c144201..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220209", + "version": "19.0.0-nightly.20220224", "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 3dff29f890f46..d08e9317043cd 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 19,0,0,20220209 - PRODUCTVERSION 19,0,0,20220209 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c5a2af7811e35acf67651725d1099b15de0c6ee4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 24 Feb 2022 20:03:59 +0100 Subject: [PATCH 064/811] fix: tray garbage collection (#33040) --- 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 f80d753ddf57c..312fec8b09ddf 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 067cc8ae2b04ba40918a5f0c38f356c6e9cdfc7e Mon Sep 17 00:00:00 2001 From: Ruslan <62350279+2BC-Wasabi@users.noreply.github.com> Date: Thu, 24 Feb 2022 22:59:29 +0200 Subject: [PATCH 065/811] Update main.js (#33039) --- docs/fiddles/ipc/pattern-2/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fiddles/ipc/pattern-2/main.js b/docs/fiddles/ipc/pattern-2/main.js index 6f53c4adcce62..743c7c4d2d312 100644 --- a/docs/fiddles/ipc/pattern-2/main.js +++ b/docs/fiddles/ipc/pattern-2/main.js @@ -1,4 +1,4 @@ -const {app, BrowserWindow, ipcMain} = require('electron') +const {app, BrowserWindow, ipcMain,dialog} = require('electron') const path = require('path') async function handleFileOpen() { From d5539ce83425db395d254fd770bee35c4d31b25d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 05:01:49 -0800 Subject: [PATCH 066/811] Bump v19.0.0-nightly.20220225 --- 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 a6a5f8ce0ccfc..68779bb0052c7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220225 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..d1ee8d687ba0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220225", "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 d08e9317043cd..a61ef9fe72780 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220225 + PRODUCTVERSION 19,0,0,20220225 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c1a667c931355fdb21b85ddfce9d9b32096dacd3 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 07:09:17 -0800 Subject: [PATCH 067/811] Revert "Bump v19.0.0-nightly.20220225" This reverts commit d5539ce83425db395d254fd770bee35c4d31b25d. --- 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 68779bb0052c7..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220225 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index d1ee8d687ba0c..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220225", + "version": "19.0.0-nightly.20220224", "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 a61ef9fe72780..d08e9317043cd 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 19,0,0,20220225 - PRODUCTVERSION 19,0,0,20220225 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3da598015bccb8f9ab6833d1163c2fe2b0f2b058 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:17:35 -0500 Subject: [PATCH 068/811] 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 --- .circleci/build_config.yml | 99 +++++---- BUILD.gn | 3 +- DEPS | 2 +- appveyor.yml | 7 +- azure-pipelines-woa.yml | 69 +++---- chromium_src/BUILD.gn | 9 +- electron_paks.gni | 4 +- patches/chromium/.patches | 3 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 22 +- ...pedcliboardwriter_writeunsaferawdata.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 22 +- ..._windows_to_have_different_web_prefs.patch | 16 +- patches/chromium/blink_file_path.patch | 4 +- patches/chromium/blink_local_frame.patch | 10 +- patches/chromium/boringssl_build_gn.patch | 2 +- .../build_add_electron_tracing_category.patch | 4 +- ..._depend_on_packed_resource_integrity.patch | 16 +- .../build_libc_as_static_library.patch | 6 +- patches/chromium/can_create_window.patch | 42 ++-- ..._v8_initialization_isolate_callbacks.patch | 4 +- ...screationoverridden_with_full_params.patch | 42 ++-- ...esources_not_chrome_for_spellchecker.patch | 6 +- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/command-ismediakey.patch | 4 +- patches/chromium/dcheck.patch | 4 +- patches/chromium/desktop_media_list.patch | 12 +- patches/chromium/disable-redraw-lock.patch | 4 +- .../disable_color_correct_rendering.patch | 29 ++- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 10 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 6 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- patches/chromium/dump_syms.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 8 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- .../extend_apply_webpreferences.patch | 4 +- ...ransfer_to_requestsingleinstancelock.patch | 68 ++++--- ...dd_set_theme_source_to_allow_apps_to.patch | 21 +- ...to_add_observers_on_created_hunspell.patch | 6 +- ...screen_rendering_with_viz_compositor.patch | 14 +- ..._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 ---- ...ntcapturercount_in_web_contents_impl.patch | 6 +- ...media_key_usage_with_globalshortcuts.patch | 4 +- ...out_profile_refs_in_accessibility_ui.patch | 8 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 10 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...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 | 4 +- patches/chromium/mas-cfisobjc.patch | 6 +- .../mas_disable_remote_accessibility.patch | 22 +- patches/chromium/mas_no_private_api.patch | 4 +- ...emote_certificate_verification_logic.patch | 24 +-- .../chromium/notification_provenance.patch | 4 +- patches/chromium/picture-in-picture.patch | 189 +++++++++++++++--- ...utofill_colors_to_the_color_pipeline.patch | 97 +++++++++ patches/chromium/printing.patch | 94 ++++----- patches/chromium/process_singleton.patch | 39 ++-- ...put_back_deleted_colors_for_autofill.patch | 116 ----------- ...r_changes_to_the_webcontentsobserver.patch | 16 +- .../render_widget_host_view_base.patch | 6 +- patches/chromium/resource_file_conflict.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/ui_gtk_public_header.patch | 2 +- patches/chromium/web_contents.patch | 8 +- 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 | 16 +- patches/node/.patches | 1 + ...fix_failing_node_js_test_on_outdated.patch | 35 ++++ 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 | 6 +- patches/v8/expose_mksnapshot.patch | 4 +- ...eleted_cstors_in_cppheapcreateparams.patch | 2 +- 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/uv_task_runner.cc | 1 + shell/app/uv_task_runner.h | 3 +- shell/browser/api/electron_api_app.cc | 35 ++-- shell/browser/api/electron_api_net.cc | 1 + shell/browser/api/electron_api_session.cc | 8 +- shell/browser/api/electron_api_url_loader.cc | 1 + .../browser/api/electron_api_web_contents.cc | 22 +- shell/browser/api/electron_api_web_contents.h | 6 +- shell/browser/api/frame_subscriber.cc | 2 + shell/browser/api/frame_subscriber.h | 1 + shell/browser/browser_linux.cc | 2 +- shell/browser/browser_process_impl.cc | 9 +- shell/browser/browser_process_impl.h | 3 +- shell/browser/electron_browser_client.cc | 38 +++- shell/browser/electron_browser_client.h | 8 +- shell/browser/electron_browser_context.cc | 2 +- .../cryptotoken_private_api.cc | 2 +- .../electron_extension_host_delegate.cc | 4 +- .../electron_extension_host_delegate.h | 4 +- .../electron_extension_message_filter.cc | 8 +- .../electron_extensions_browser_client.cc | 4 +- shell/browser/file_select_helper.cc | 6 +- shell/browser/javascript_environment.cc | 2 + .../net/electron_url_loader_factory.cc | 2 +- shell/browser/net/network_context_service.cc | 1 + .../net/system_network_context_manager.cc | 18 +- shell/browser/osr/osr_video_consumer.cc | 2 + shell/browser/osr/osr_video_consumer.h | 1 + shell/browser/ui/autofill_popup.cc | 9 +- shell/browser/ui/autofill_popup.h | 4 +- shell/browser/ui/inspectable_web_contents.cc | 2 +- shell/browser/ui/views/autofill_popup_view.cc | 16 +- shell/browser/ui/views/menu_bar.cc | 19 +- shell/browser/web_contents_zoom_controller.h | 1 + shell/common/api/electron_api_v8_util.cc | 1 + shell/common/asar/archive.cc | 2 +- shell/common/gin_converters/net_converter.cc | 2 +- shell/common/v8_value_converter.cc | 10 +- shell/renderer/electron_autofill_agent.cc | 25 ++- shell/renderer/renderer_client_base.cc | 6 +- shell/renderer/renderer_client_base.h | 4 +- spec-main/api-web-frame-main-spec.ts | 5 +- spec-main/chromium-spec.ts | 6 +- spec-main/extensions-spec.ts | 4 +- spec-main/webview-spec.ts | 3 +- 135 files changed, 1038 insertions(+), 852 deletions(-) delete mode 100644 patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.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 create mode 100644 patches/node/fix_failing_node_js_test_on_outdated.patch diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index fdb8161043356..6e6dd01cb720a 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: ["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 @@ -350,9 +356,6 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac if [ "`uname`" == "Darwin" ]; then sudo mkdir -p $TMPDIR/del-target - # Remount the root volume as writable, don't ask questions plz - sudo mount -uw / - tmpify() { if [ -d "$1" ]; then sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) @@ -394,24 +397,24 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac tmpify /usr/local/Homebrew sudo rm -rf $TMPDIR/del-target - 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/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 /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 @@ -419,7 +422,7 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac # 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 + # strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr fi background: true @@ -460,10 +463,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 @@ -1892,7 +1903,9 @@ jobs: checkout: true osx-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1909,14 +1922,16 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - size: macos.x86.medium.gen2 + 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 @@ -1935,7 +1950,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 @@ -1955,7 +1972,9 @@ jobs: checkout: false osx-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1972,7 +1991,9 @@ jobs: attach: true mas-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-mas @@ -1990,7 +2011,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - size: macos.x86.medium.gen2 + xcode: "13.2.1" environment: <<: *env-machine-mac <<: *env-mas @@ -1998,7 +2019,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 @@ -2017,7 +2040,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 @@ -2037,7 +2062,9 @@ jobs: checkout: false mas-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -2224,9 +2251,7 @@ jobs: <<: *steps-tests osx-testing-x64-tests: - executor: - name: macos - size: macos.x86.medium.gen2 + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping @@ -2242,9 +2267,7 @@ jobs: <<: *steps-tests mas-testing-x64-tests: - executor: - name: macos - size: macos.x86.medium.gen2 + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping diff --git a/BUILD.gn b/BUILD.gn index ec9e8b6a72b9f..60af73d56c7bb 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", @@ -1188,7 +1189,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 db991a8702c70..790da2014c4de 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '100.0.4855.0', + '100.0.4894.0', 'node_version': 'v16.13.2', 'nan_version': diff --git a/appveyor.yml b/appveyor.yml index f6be0fbd3596b..fab35e3bc66d2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -210,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=file --log-file=%cd%\electron.log --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" @@ -218,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: >- @@ -233,4 +236,4 @@ deploy_script: 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 electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log ) + - 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 d577b448ccc2e..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", @@ -253,6 +253,8 @@ 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", @@ -271,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", ] } 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/patches/chromium/.patches b/patches/chromium/.patches index 22dc480ecc3b5..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 @@ -111,4 +110,4 @@ fix_aspect_ratio_with_max_size.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch -fix_don_t_restore_maximized_windows_when_calling_showinactive.patch +port_autofill_colors_to_the_color_pipeline.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 0ae9ae781b29c..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 0c1e511e187c480006365fbbde6caa54b0f0eada..1904abcf314007d68c4941a4f2bdb83cace586ab 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 0c1e511e187c480006365fbbde6caa54b0f0eada..1904abcf314007d68c4941a4f2bdb83c // 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 ff441bdb349eb..b76baf2e4e6ba 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index a92e09dc651a5f1a9bbae2572fad32233afcd46c..f99b652dda817b62615d2b3f00b4ae4b int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index fea269ba08af3296e2e304bb94610508ecd01b02..59e48882aba9b0431ddaa0b48f896866833f3376 100644 +index 4473c5e812a4a598f3e2f2bb06f78def5791af24..44c0ec9815aafd61182fd18a9d125e185d7196bc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4453,6 +4453,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4455,6 +4455,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index fea269ba08af3296e2e304bb94610508ecd01b02..59e48882aba9b0431ddaa0b48f896866 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 4e5d10d32272d5617c7475f58b57ea73d3cf0a65..6ac30bdb5cbc81274e26fd74f3332f0e5c3fb1dc 100644 +index 21b90bbb8fe8ddc03eb20538be423a5396d18eb3..f9c735038f733d990783dd66ffe8c74f824c78f2 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -597,6 +597,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,10 +53,10 @@ index 4e5d10d32272d5617c7475f58b57ea73d3cf0a65..6ac30bdb5cbc81274e26fd74f3332f0e 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 507efab2cc79422cc58b1459de8e84a9b7992195..0948dd92c89db566317df7b352d9f5967a3ae86b 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 -@@ -598,6 +598,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -599,6 +599,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index aa4b510137d60e6fb924f4f1a6554fe06c19ad75..816b6260020a6cbb6880b0eed197743c 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 cf6f792bb68df3a15a74a61921f50f790817b3ca..8a922b95064909d750b041e3e36ab6ebf0375284 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 -@@ -309,6 +309,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 cf6f792bb68df3a15a74a61921f50f790817b3ca..8a922b95064909d750b041e3e36ab6eb 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 ba2d1beff9d4fe7b0eca90a274b8bd95a76446c1..3056ae4d9b6d1604b14f2626122a78a9f916d265 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 ba2d1beff9d4fe7b0eca90a274b8bd95a76446c1..3056ae4d9b6d1604b14f2626122a78a9 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 2d9517cb12b4debe28694f54bcaa0ad0af62a44a..09c9486bbbf789e9367fdbb3655f431f5a1ae199 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 2d9517cb12b4debe28694f54bcaa0ad0af62a44a..09c9486bbbf789e9367fdbb3655f431f 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 094de359d6831e656f0666732fb1c80f8f316fa7..65d2a6a279b2b4009b19494af54e194e8c9b626a 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 f0f446b5350df..01c36b3c68ded 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,7 +8,7 @@ was removed as part of the Raw Clipboard API scrubbing. https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc -index 6405d91a2226e3b58fff4a4e73d2fc1c08f0954b..e12f0c4ec90e0e4f366bad292750676c0b446f2c 100644 +index 3009acd40eee36bc3d4dd8642f0ce5e6476da973..1d52ce84184a3ca94e4e0f04d331bf56d75e07d0 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc @@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( 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 b5923cea9b37a..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 5cf4fd6559dd7183ed74e44001d7e53ca9b055b1..ca6a293882fe2af1e2bf58b8353e1c5c9de827d1 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 -@@ -646,6 +646,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -647,6 +647,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index 5cf4fd6559dd7183ed74e44001d7e53ca9b055b1..ca6a293882fe2af1e2bf58b8353e1c5c 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; @@ -61,7 +61,7 @@ index 4e8d36420d6edc1725a840e1b9f123041d21abe4..dd198cb7bf02e509833c6b4c7d8e5d65 // 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 297ed65293723e8d539c65475d335947c840fec2..304dcdaa65ee1d9bed86f7c0e5956dd3a2a65585 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 -@@ -3679,6 +3679,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3659,6 +3659,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 297ed65293723e8d539c65475d335947c840fec2..304dcdaa65ee1d9bed86f7c0e5956dd3 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3690,7 +3697,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3670,7 +3677,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index 297ed65293723e8d539c65475d335947c840fec2..304dcdaa65ee1d9bed86f7c0e5956dd3 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 25f9a9fc617d75dfd26af582574ebcad3a16a8ef..7d8473a7915fd3312c3a4f582b3f1d87580e6e75 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 -@@ -419,6 +419,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -420,6 +420,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index 25f9a9fc617d75dfd26af582574ebcad3a16a8ef..7d8473a7915fd3312c3a4f582b3f1d87 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -855,6 +856,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 9438dc2e0b9c7..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 @@ -33,7 +33,7 @@ index 30e237f886b41bdf528b2a0e81054d15fb323f1f..43f7920cf6ff12d8a48ddef5440814a4 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 b9a65b0aa8771602f6659f5ffe79b6cdfd04f6e4..f1aab825f8aabc023f6405e6f4b5c843374d43a0 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( -@@ -154,6 +158,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index b9a65b0aa8771602f6659f5ffe79b6cdfd04f6e4..f1aab825f8aabc023f6405e6f4b5c843 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 a8d4f1905dc3f48dbbde440e4ec50fe95744e365..4ec23ebc2b09b00c849eb762fa371a8cf2925869 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 a8d4f1905dc3f48dbbde440e4ec50fe95744e365..4ec23ebc2b09b00c849eb762fa371a8c #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 a8d4f1905dc3f48dbbde440e4ec50fe95744e365..4ec23ebc2b09b00c849eb762fa371a8c // 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 dc84e6f516492b72cf513c9786f17b472961dddb..72eb72cde86f0ef9c94123a104e8f30d12952391 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 dc84e6f516492b72cf513c9786f17b472961dddb..72eb72cde86f0ef9c94123a104e8f30d #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 88bb66bd03b880f4e1e946a0fd1a31f512226db4..a100709c7b3bd0bcd5c9307e00f343aa // 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 d02022a64426a47a568d438bd3d17ca63a3ac28f..f9817a21e00a66845138d321dd829ea1df39acb7 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 -@@ -531,10 +531,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -538,10 +538,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index d02022a64426a47a568d438bd3d17ca63a3ac28f..f9817a21e00a66845138d321dd829ea1 if (!Client()) return false; -@@ -580,6 +576,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 f4b23bcd39496..05fde5454844e 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index e31d092151a68028e09bb73ddb896cf8df77355d..aee73fe9b9e0a6b061504db46bb91b7a4baf6a7a 100644 +index f222ae94a5a10ced84e41ef84560af46a910577f..c18d26de9a63befca3c77fe5ecd93975a016797f 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -44,6 +44,20 @@ config("no_asm_config") { diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 848904efccaaf..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 5404ededf7722ae9d04e44d3413471b9d85085c0..a36554ff22e29df499ee9ce9b0d4c40835af48dd 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 f072110be0958..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,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 71152d08a9e9ce2e112fd7a6c3134a547af5d978..fd11a574ed7b38d556bbdaed2fd649d55d6530f7 100644 +index 7caaf66cad9d5b9f787cea0d49c32c26801571c2..f45691888b74643189b956928fdc796bfc5bcee3 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 71152d08a9e9ce2e112fd7a6c3134a547af5d978..fd11a574ed7b38d556bbdaed2fd649d5 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 5f0b1af64911966f9b24a2b5ef063e4473b81a8f..c186819512e21276e382edba2eca2c153da7403d 100644 +index 6a40a73520a951d7c6fd06cbd07329a40ff41544..9ca837d995160d57c7efb51c54cf27283b11b20e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4517,7 +4517,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. @@ -46,10 +46,10 @@ index 5f0b1af64911966f9b24a2b5ef063e4473b81a8f..c186819512e21276e382edba2eca2c15 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 89afb235bc478f19511579ca4c6b018505b372cd..1b5b9e33f5ad2b31617edd8a6ee65e73b31d3d20 100644 +index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c2400ade8 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5564,7 +5564,6 @@ test("unit_tests") { +@@ -5719,7 +5719,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 89afb235bc478f19511579ca4c6b018505b372cd..1b5b9e33f5ad2b31617edd8a6ee65e73 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5587,6 +5586,10 @@ test("unit_tests") { +@@ -5742,6 +5741,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 89afb235bc478f19511579ca4c6b018505b372cd..1b5b9e33f5ad2b31617edd8a6ee65e73 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6270,7 +6273,6 @@ test("unit_tests") { +@@ -6428,7 +6431,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 89afb235bc478f19511579ca4c6b018505b372cd..1b5b9e33f5ad2b31617edd8a6ee65e73 "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6312,6 +6314,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 ebac034d783f8..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 9930040d9e6802d851c7216b314791bae5534bd7..365b6eb2efc2f09725a9a53b79e83a50bded1c75 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 -@@ -6640,6 +6640,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 9930040d9e6802d851c7216b314791bae5534bd7..365b6eb2efc2f09725a9a53b79e83a50 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d89e1c2369d7218d62fd759c3877b1d502a8276e..f3e21a7cacb9d192bf3b6cf4d2bfc8d372cd8307 100644 +index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd625e9e51 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3867,6 +3867,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3925,6 +3925,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -37,9 +37,9 @@ index d89e1c2369d7218d62fd759c3877b1d502a8276e..f3e21a7cacb9d192bf3b6cf4d2bfc8d3 + } + new_contents_impl->GetController().SetSessionStorageNamespace( - partition_id, session_storage_namespace); + partition_config, session_storage_namespace); -@@ -3909,12 +3917,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3967,12 +3975,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -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 7c700a49d9a144fc1dd8c795d95c085e13aa470a..153c94d7d0fd4a11a15c74f7bbae065d7a0249a1 100644 +index 85ed8b5e84813c10f97c5785d906a87455f8f67e..a11d5ba888c1489870875c859ec9eb79c67f94b7 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -573,6 +573,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 7c700a49d9a144fc1dd8c795d95c085e13aa470a..153c94d7d0fd4a11a15c74f7bbae065d 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 3aaacce3a8dc42f90bb4564987950a3be92e113e..17ce3078c995f581325b9dcffe6b1589b05f48bc 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 3aaacce3a8dc42f90bb4564987950a3be92e113e..17ce3078c995f581325b9dcffe6b1589 } // namespace network namespace sandbox { -@@ -944,6 +945,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 3aaacce3a8dc42f90bb4564987950a3be92e113e..17ce3078c995f581325b9dcffe6b1589 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 aefe7344a605e5edded2b4c345c50ff22b6d8e34..5647a94ace369de0c7e0096c885865b7b5b04c61 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 aefe7344a605e5edded2b4c345c50ff22b6d8e34..5647a94ace369de0c7e0096c885865b7 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 58e977220a5d98c68a20cbf22ad7ce3da39a38a1..5092190243d3eb95a4180cb44937e3d25c4a3ad9 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 58e977220a5d98c68a20cbf22ad7ce3da39a38a1..5092190243d3eb95a4180cb44937e3d2 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/media_stream_request.h" -@@ -343,6 +344,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,7 +150,7 @@ index 58e977220a5d98c68a20cbf22ad7ce3da39a38a1..5092190243d3eb95a4180cb44937e3d2 // 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 7809d32d777a2c7249b77e68468bc19625716662..7eec2fea69298d92e694471862b4427b69e9687f 100644 +index 83517883144a77a0c775ce2d146b4e85ef79ea97..aa65517a568aa0b324b2c8cca8f60bb532ba085a 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -32,6 +32,7 @@ @@ -173,7 +173,7 @@ index 7809d32d777a2c7249b77e68468bc19625716662..7eec2fea69298d92e694471862b4427b /*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 f565d0615c8cdb182d28d0add11fca6ebb49098b..8ac72d8d2efe413561e4e53722d4d0d15833cfdf 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 @@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -186,7 +186,7 @@ index f565d0615c8cdb182d28d0add11fca6ebb49098b..8ac72d8d2efe413561e4e53722d4d0d1 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 953433b5cc0ca7633b5866d5ae0f9c3a5e6a6e3c..30a43c943e6ccdd9dbf809186d7d13d4d6f6f12e 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 fa6b705d267ac00fe86705d1f9d8e66730ba4ee4..9d541381c349132c6d4b44a5bee298252c2b8858 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 0e4566eed9f0d..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 feae0aea593ef1945c1063b7d487892530f7ceed..beb0a9e85a0f5e102466952c220aafac2d6ebb39 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 5fddd44da4723..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 a7a64effed043a75371e5dde0837ce7fbfa631ad..8f190e6d33497f52b536aef82505025b74602337 100644 +index 04e327d970b872f0a9c505a0b99c6273900930f9..5993b3cb0cbe76cd266dee074effd736efa8fc50 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1760,12 +1760,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 a7a64effed043a75371e5dde0837ce7fbfa631ad..8f190e6d33497f52b536aef82505025b WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 1cda4516162907a047b67edbc2d020e36cceb8f0..2d222d43c0c55d976eceb189a2d955793a6824ce 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 { @@ -246,10 +246,10 @@ 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 2e91c4f052501e4067cf8fee21f2f3c2674f1c1a..74e6928041145fd6f37ec4ce7acc6be0649b944d 100644 +index 5c63a024827359ccf697d0b7fc8fa2092eb107b7..3da88b5831717c979373c064b4c1520c28d4fd98 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3815,8 +3815,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 2e91c4f052501e4067cf8fee21f2f3c2674f1c1a..74e6928041145fd6f37ec4ce7acc6be0 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 5647a94ace369de0c7e0096c885865b7b5b04c61..bf3e958a5f883c2408846f4954e58a30c76bee26 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 5647a94ace369de0c7e0096c885865b7b5b04c61..bf3e958a5f883c2408846f4954e58a30 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 5092190243d3eb95a4180cb44937e3d25c4a3ad9..23a11de7c25b81e72c81db20caaa799191b70e45 100644 +index 3330876f623e5b2cb600b1ce1fd10b3375568613..a9f48c6577afef8876cd8304ff5a66405b7d8343 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -322,8 +322,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -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 5092190243d3eb95a4180cb44937e3d25c4a3ad9..23a11de7c25b81e72c81db20caaa7991 // 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 b1c4872e8139e4e6c7c38f94e6e1619ef1730bce..314a418c8d0ff43f115744a0229511dd409b48d6 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 b1c4872e8139e4e6c7c38f94e6e1619ef1730bce..314a418c8d0ff43f115744a0229511dd // 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 2a8095bb93264360d2cdb0a54ff3330671905852..8a2745c318f865564368d5d3d90af61b5c20fb00 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 2a8095bb93264360d2cdb0a54ff3330671905852..8a2745c318f865564368d5d3d90af61b } 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 1b388778aac1420769de8c411489e026abbc75a4..b21d262c7014097e35ee83289fab400ab9d3bdc5 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 1b388778aac1420769de8c411489e026abbc75a4..b21d262c7014097e35ee83289fab400a 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 c0fc74673903a0c54164bddb5be0c96f3f7b73a4..2466675e80708aa0ba27e0431cbfb2a277abde32 100644 +index 424c5f89440dccc29f3431e034d0a4fd4f647a00..8d40d0bd30fc28e841eedb3f34be3c033db62449 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -403,8 +403,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 c0fc74673903a0c54164bddb5be0c96f3f7b73a4..2466675e80708aa0ba27e0431cbfb2a2 // 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 ea50835c2f8631851659db6abb3ba779a5fcb6e0..14207edb850689c126b2d09eff8d8feb1246ebb7 100644 +index f2054bca778784c223beb02de150cfeb31c52907..53bf6bc205e9c631597bfbda46f4a0b5b4bb72ed 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -292,8 +292,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 ea50835c2f8631851659db6abb3ba779a5fcb6e0..14207edb850689c126b2d09eff8d8feb 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 4cb2c255877182406158258c0fb3e88e50f612c7..0f314be5d9d88b60b925a1e25db30408f0b26dff 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 15ec447216524..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 f338d61091545f4319b6d5318d10eed5c9b02af3..5f0b1af64911966f9b24a2b5ef063e4473b81a8f 100644 +index ec55c3f97988a7de06a738e61e389ba07712ad4e..6a40a73520a951d7c6fd06cbd07329a40ff41544 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7038,6 +7038,7 @@ static_library("browser") { +@@ -7088,6 +7088,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", @@ -44,7 +44,7 @@ index fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0 ] } diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc -index 491315f1fd94332a1895c2286618cb0e8ed1544b..303d29d577a87ea07005fb87f562eef79b36cd8f 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 bc53b898840d5..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 27474164dafdff0f79820e748c776b6a4372387c..ed21a9c1854a443947a1b3965c5fc2910b9d3fb6 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 27474164dafdff0f79820e748c776b6a4372387c..ed21a9c1854a443947a1b3965c5fc291 #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" -@@ -206,12 +208,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 0e8697f5c67d6..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 3cad85ec824d81ef43796a5c7e4f013dcfd5bf0a..d352b23f4a42b10e77a61de71069083f20f99136 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/dcheck.patch b/patches/chromium/dcheck.patch index 335184a63282a..5374f0423050e 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 8a68c53e35dafce5fced1ad2c7ff5dad83ffbf3c..ee615d3eb03232b34f5acbb58490c7de9ad08cfd 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 -@@ -495,8 +495,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( +@@ -511,8 +511,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index a900bf03618c0..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 91da584747d5afc3f07e51ae77b002d91c4ff7ac..bbf37f733a6e1831017f171edf162ab8aac3f0a4 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,8 +94,8 @@ index 91da584747d5afc3f07e51ae77b002d91c4ff7ac..bbf37f733a6e1831017f171edf162ab8 #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 BUILDFLAG(IS_MAC) +// Refs https://github.com/electron/electron/pull/30507 @@ -105,7 +105,7 @@ index 91da584747d5afc3f07e51ae77b002d91c4ff7ac..bbf37f733a6e1831017f171edf162ab8 #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 91da584747d5afc3f07e51ae77b002d91c4ff7ac..bbf37f733a6e1831017f171edf162ab8 } 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 8d5fab8db9350..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 302915bac66a484f495c97e2602406a50b058014..7b46b19458ab03037fd02ac9a7f21a7b321843f1 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 302915bac66a484f495c97e2602406a50b058014..7b46b19458ab03037fd02ac9a7f21a7b (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -979,6 +984,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -986,6 +991,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 49d1fef1cdd0c..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 2c6e923952c7d8c1e411e3dedb149712a0e64025..0034d9998133920a2cd074b1f5562b58976d6d49 100644 +index 61ab59e0d97a392ae18c1d7ad7dd606b5cd1c567..2a899818ebb67ba4fc06ccbcff3ee03f6b83c0e6 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1891,6 +1891,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 { @@ -81,7 +80,7 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 963154eeda506350b71e3243ef172061efc8d4fb..daaea93f536759b67b4fffbca7c26479ceb04fcd 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 @@ @@ -229,7 +228,7 @@ index 963154eeda506350b71e3243ef172061efc8d4fb..daaea93f536759b67b4fffbca7c26479 + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 926ea905b775c0706fd1b882f37b88b646b8b154..691eb2c5f7a26ea2b213b6378ab600b6b047531d 100644 +index f5d73922086b5b27907fd393d4d4204a574c3b25..5b09f5ef5f04b519ed4148498c82d003c9fd6c91 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -241,10 +240,10 @@ index 926ea905b775c0706fd1b882f37b88b646b8b154..691eb2c5f7a26ea2b213b6378ab600b6 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 30a0c9216a206042a9769bdeda015eaf00e3cc49..e94e895aa31ab98e28137e793a8f298ed3146f5a 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 -@@ -193,6 +193,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 30a0c9216a206042a9769bdeda015eaf00e3cc49..e94e895aa31ab98e28137e793a8f298e #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3281,6 +3282,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[] = { @@ -293,7 +292,7 @@ index 6260d73068636f4a8d4c73c161a4ffe165b267d0..2686ef0dfb7d8b667647d11fece5aa8e } 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 2f4fbbdd8059b2915b4848f95db925f1dbb1fb08..3fc675e4e56b3e658d70475800a938a7ce283567 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 2f4fbbdd8059b2915b4848f95db925f1dbb1fb08..3fc675e4e56b3e658d70475800a938a7 #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); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 3f08e39d4e1bb..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 2c5f09db5e86855c33a79fb8c9f0a6ed770634e6..1c59ce6de1ce68b24e0372826cc67a891b4c2384 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 02ee885d5cbd6..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 7436238cd110ef8c414e8be3d8ff07511b6223f4..4b0b2b0dc0900627aee38de021ec10cbdc9b3cb4 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 7436238cd110ef8c414e8be3d8ff07511b6223f4..4b0b2b0dc0900627aee38de021ec10cb 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 785cf70788ddb65712c45bc32281141e8a623b13..831a85653eb89b79ccc638400be6cfe10369b14b 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 -@@ -874,6 +874,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 785cf70788ddb65712c45bc32281141e8a623b13..831a85653eb89b79ccc638400be6cfe1 // |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 20d613c480ce54f99e04dd49fe27af10056beee4..4a421fc2c244cf56d329ff66d0e9e17b0f0a5987 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 -@@ -595,7 +595,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -619,7 +619,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); 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 f58b76cc978b2..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 @@ -49,7 +49,7 @@ index 4bfe2501309e832dc9962d5f4642c6b7c782f83d..c45f1207be984fae9aee2cc5b9a7c405 #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 5aee160aec0160f37d61005ec3b71accb58b2eaa..bc73591dd8b66c304fa42b3349bbbf6f82ed13ad 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 5aee160aec0160f37d61005ec3b71accb58b2eaa..bc73591dd8b66c304fa42b3349bbbf6f 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 0adfe2ccb420e..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 59e48882aba9b0431ddaa0b48f896866833f3376..d4360bc18858d77aa079dbbafc563d2fa03f29e8 100644 +index 44c0ec9815aafd61182fd18a9d125e185d7196bc..a77c39adfc687d43004341d4ca9e6fa676c814f5 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2392,7 +2392,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/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 42e510ac79568..a124b5b3d2ae1 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 7323cb11296e9383db68753d9fc43203b5632e19..95349fc9016eda37668edcd742336364346d89f6 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 -@@ -529,7 +529,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 7323cb11296e9383db68753d9fc43203b5632e19..95349fc9016eda37668edcd742336364 aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 7b46b19458ab03037fd02ac9a7f21a7b321843f1..40a81cb293469cb5ec1bd5ab5195fd8e1b0812dc 100644 +index 8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c..9ca11a19e66e34585b4b11e89cc3b789a4389b5e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -929,8 +929,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/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index a0ae92e9a1788..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 b3008accd63bd6694a44761c4d00a0927fad90ad..d61c2e0031b0aa22c5c5822e8433ef4b4366afed 100644 +index ca62a13420aa9c114c00054bbe1215f96285a4e9..01be46b1eaed2aadfd24eac9d102da99521b175c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1356,6 +1356,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1331,6 +1331,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index b3008accd63bd6694a44761c4d00a0927fad90ad..d61c2e0031b0aa22c5c5822e8433ef4b // 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 486a151f6923fd0069ce5aaaffe6559cb60a88ec..589ee590edea4a6fb995fb73be36d035336f6e3a 100644 +index e412608e7720004462c48698c8ec39602b2b900e..46c00e0da6beb0c2e689475fc4b9927085414e1a 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -277,6 +277,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; @@ -63,10 +63,10 @@ index 486a151f6923fd0069ce5aaaffe6559cb60a88ec..589ee590edea4a6fb995fb73be36d035 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 89c00d7ab1510ebdbce49876fcd5f94c5096b3c9..41da1b6fac783be22ab2f3abc25aaa7687049048 100644 +index fa56cfed3703664232843ad26028096d95dca253..9852498e93939796e7ba6f80efcc7b2d827187ac 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1049,6 +1049,9 @@ interface NetworkContext { +@@ -1067,6 +1067,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 89c00d7ab1510ebdbce49876fcd5f94c5096b3c9..41da1b6fac783be22ab2f3abc25aaa76 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 309a96ff77d06f9456fd3faec02b869c8a55c7f7..998b5b04bc98cfd048fe929bf3b99bbfcdbbfb9a 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 {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index e11b55274afd2..b0c806866f56a 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 304dcdaa65ee1d9bed86f7c0e5956dd3a2a65585..17ff3cdf79ec48f444640bc18df47f81aa4eba28 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 @@ -158,6 +158,7 @@ @@ -23,7 +23,7 @@ index 304dcdaa65ee1d9bed86f7c0e5956dd3a2a65585..17ff3cdf79ec48f444640bc18df47f81 #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" -@@ -1797,6 +1798,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -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); diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 251704d5cd8cc..fd11a39b225c8 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -96,10 +96,10 @@ index 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9eb // 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e455dfd03 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e // 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 81fb8994c53fb16d7c96de008c96127d0b85b8f9..b56577857c54a245ba8554df164a184e 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 9bf184662af7e..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 93879cdb8d8001458f6283625232515bd214847d..1a729eb08de5d9f0b2fdbaad1eec95b7234a2f71 100644 +index 5376b01ad03c346ecc1c5d47ff125103dbc05eb8..a60ce1d4fe6b7132d7adac1a7687c7185d1abee3 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -152,6 +152,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 93879cdb8d8001458f6283625232515bd214847d..1a729eb08de5d9f0b2fdbaad1eec95b7 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 8ddda2eae1ce7578c8987e632b21dd0b6c20c554..cca14f9cf49e667a0f2def788097b4eabb4761f9 100644 +index e46bc2cf64ca554c0e21a4e0851ad092f504e080..0ffe583d56ddc3abec8c848c1cd5dbc3623acb5b 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -406,6 +406,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 8ddda2eae1ce7578c8987e632b21dd0b6c20c554..cca14f9cf49e667a0f2def788097b4ea // 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 -@@ -591,6 +607,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 8ddda2eae1ce7578c8987e632b21dd0b6c20c554..cca14f9cf49e667a0f2def788097b4ea SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 5f809b71c635abd3679ee593850e521a14cb62f5..b5ba2d7cd65742ceabaaad96a8ec0db8d661ad32 100644 +index 6b9fb74004eba57fdff396124214356f4bcf0852..70807b315f805baab2574148520323ce78f624cb 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -681,6 +681,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_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index c63f9b05541ce..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 f841d5847fd107f551e4823ae0690e2e17225ba9..475590da5273c218353c9721b35a9b50be248a47 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 f841d5847fd107f551e4823ae0690e2e17225ba9..475590da5273c218353c9721b35a9b50 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); } 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 a0987afbf7cf9..d2675bfa80b29 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 826714570d1ee1bfc10043597cd6cd00543318d1..d3223035f33db5f39fd4d6b6e8d99da57bb0e7cb 100644 +index eff91b68cf4b72de41b7b2ad09c029b8b5dcf3c6..c736f772e3714c6a80703c41c8a2f0dab36b166d 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,8 @@ viz_component("service") { @@ -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 5362650a4f9bfa038f38f3490c50a7ddbd8d0e0e..106d98decdbb2cbb768388017dae5b4c4f00d777 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 -@@ -48,7 +48,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(), @@ -534,10 +534,10 @@ index 0e3af0f9280abe8560393325b400ad2543ed0556..7fe490e55a4bb8a183d0d241188ea15a 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. @@ -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 383aff3755d4b086759099de8b81808de8d4bf0e..ecba52d0e92d6f8989b1b2c2e851645940dcc2af 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 383aff3755d4b086759099de8b81808de8d4bf0e..ecba52d0e92d6f8989b1b2c2e8516459 // 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_; 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 c7a6f0aae7741..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 80f26b62b25bd6aa46886e3112b2ffd2698693fe..e72cab84db36eec86309160d4f7416ee431f5e34 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 80f26b62b25bd6aa46886e3112b2ffd2698693fe..e72cab84db36eec86309160d4f7416ee string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 59a89d471326069e183cdcc42af862fe19d7448e..39cd96d5e5785879bd3d82fb4c71fdf80c48e5ee 100644 +index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be59802b8f 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -541,6 +541,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), -@@ -699,7 +700,7 @@ URLLoader::URLLoader( +@@ -636,7 +637,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,10 +123,10 @@ index 59a89d471326069e183cdcc42af862fe19d7448e..39cd96d5e5785879bd3d82fb4c71fdf8 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1349,6 +1350,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 59a89d471326069e183cdcc42af862fe19d7448e..39cd96d5e5785879bd3d82fb4c71fdf8 // 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 2d62e04b8fe76..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 40a81cb293469cb5ec1bd5ab5195fd8e1b0812dc..4be0e5b0ef187d68f054672bc3d1dc328057c58b 100644 +index 9ca11a19e66e34585b4b11e89cc3b789a4389b5e..264a9109e42c23e9be6bf7269b3cfee2634b61e4 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3574,6 +3574,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 f1f422de76bd9..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 4d45dfa892fec8857dabdd70e3c09c46b784ef44..d9b72b9298494df57e2ad53738a213226a7c45e4 100644 +index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b66399eb9 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.js +++ b/chrome/browser/resources/pdf/pdf_viewer.js -@@ -959,25 +959,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -966,25 +966,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -47,7 +47,7 @@ index 4d45dfa892fec8857dabdd70e3c09c46b784ef44..d9b72b9298494df57e2ad53738a21322 } /** -@@ -1104,30 +1091,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 4c2bbea2e5906..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 4be0e5b0ef187d68f054672bc3d1dc328057c58b..264a9109e42c23e9be6bf7269b3cfee2634b61e4 100644 ---- a/ui/views/win/hwnd_message_handler.cc -+++ b/ui/views/win/hwnd_message_handler.cc -@@ -665,9 +665,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; -@@ -678,9 +685,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_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 614da08c32ba8..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 d2a50feea97add9d9c309e8066305caf9105c547..e6fe6ebd7f86df1e5193305a827ac938b822a1ab 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,7 +21,7 @@ index d2a50feea97add9d9c309e8066305caf9105c547..e6fe6ebd7f86df1e5193305a827ac938 // 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 ac9bce453ff812679d8c77d661729ea681977061..7cef50818b3587e033f5cfeea324df17547dfa6e 100644 +index cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd..72bc509b0506fafd026aa858864623886142b5f0 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -673,6 +673,10 @@ class WebContents : public PageNavigator, diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index fa0cd24e666d4..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 d352b23f4a42b10e77a61de71069083f20f99136..36e9109a2eeb14983aa80905d09499ff68daeaf9 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 d352b23f4a42b10e77a61de71069083f20f99136..36e9109a2eeb14983aa80905d09499ff !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_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index 0b4c2c4aff7fe..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 7a8ca6523bfd1ce237da9dce7fce03a6acb8b75e..c485572aa06e4b750468b8e23816fbcbf0515757 100644 +index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a65560d9e 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -20,7 +20,10 @@ @@ -53,12 +53,12 @@ index 7a8ca6523bfd1ce237da9dce7fce03a6acb8b75e..c485572aa06e4b750468b8e23816fbcb 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( @@ -97,7 +97,7 @@ index 7a8ca6523bfd1ce237da9dce7fce03a6acb8b75e..c485572aa06e4b750468b8e23816fbcb 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( diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index c3d77fe580024..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 be63f30c49416be34766f75553ccb229687651a9..25f27103e7757b4b2ded2ea534e38f10a13ae33c 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 -@@ -3029,6 +3029,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3089,6 +3089,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index be63f30c49416be34766f75553ccb229687651a9..25f27103e7757b4b2ded2ea534e38f10 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 17ce3078c995f581325b9dcffe6b1589b05f48bc..986643109673cb62379ed822845f3c3050ab14aa 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 af18bf7aa9a6a..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 0cd4077a0b534f089318e1ebffb9eb25214c3a42..f1ea1dfd740f4b9cf5f7cb7fd6bd445fb06e0100 100644 +index 00190da513499e6275d19bd99b6502db246cd33d..f273749bd026abb287ba33e03208a286e80a57a1 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -117,9 +117,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 0cd4077a0b534f089318e1ebffb9eb25214c3a42..f1ea1dfd740f4b9cf5f7cb7fd6bd445f 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,7 +38,7 @@ 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 1447b3828da1e50bd00f4a4975a2b4ce76a2c6ac..abdc2d491cd317d38cb4e7608681ea97bb5b8aab 100644 +index f411bbde031d18bd3e0322ce154ccfd8eace930d..5db96b7402de70d1b4eba8b12a51fbc89fcb7fb6 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -342,12 +342,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index f735f131ced7f..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 1f84d9e87539d5d2d480f293732259d110a2d019..6d6111d61d52eed8950b98698393ef5811cf950f 100644 +index 77f77f2deb13fc1c02903fc436028cce2d051cf0..25223130a82b22ad46eddf7e133c6085c5c843d3 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -917,6 +917,11 @@ +@@ -952,6 +952,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 3fe0c64a017ec..52f3cc0d8a50e 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index 54a3e170f5131ee03892410a0c883d4da4dd885a..1653e392630913dab5db84a7aafff0dfe36d1f71 100644 +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") 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 5bc432556d651..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 93bebfd9d25f4617bbbba559f62d9d75fe98d3eb..d0970adddd97f98d94d4d904d2cbcaa846a3ec5d 100755 +index ee41efe814da161cafb49229e1f02c8b82749e7c..494bbdeea2725e4b1218ba534fd126203012c100 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -298,6 +298,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 93bebfd9d25f4617bbbba559f62d9d75fe98d3eb..d0970adddd97f98d94d4d904d2cbcaa8 + 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 6169c420417da..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 f1ea1dfd740f4b9cf5f7cb7fd6bd445fb06e0100..85a01a45bdd721e8f776a0d8f820452299614279 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 4bdf572786992..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 5a365936031e60fea77a5015414958756dc64ee7..104c1a5848ef0fa8b75b32a1243c52193d8a2d91 100644 +index 9d22238878e3204dd1d866d2bb085d5311dca36a..e3610815fd942e631a61089ca5eeba07edd7213c 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -245,11 +245,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 b931eda611b74..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,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 bf4cbe990cb4db54f3836551ce2a5739ccdd8a65..6b1157bdc900beaea47f458d4ac62982cba72978 100644 +index 332b7d026e0365a66d5f4f275a90b48d0f2db5aa..3813fe1a3b2e95af5e213201ab3ea08a656e01c3 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -379,8 +379,12 @@ RunContentProcess(ContentMainParams params, +@@ -381,8 +381,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch index 390a3957727c5..88035201b5109 100644 --- a/patches/chromium/mas-cfisobjc.patch +++ b/patches/chromium/mas-cfisobjc.patch @@ -6,7 +6,7 @@ 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 11fa4bb6714518b98321d5e10919de3e01403efd..c9232593c08be04cb62fe7163a240cbed4f6e464 100644 +index bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1606afbc2 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -31,12 +31,6 @@ @@ -22,7 +22,7 @@ index 11fa4bb6714518b98321d5e10919de3e01403efd..c9232593c08be04cb62fe7163a240cbe #endif } // extern "C" -@@ -328,8 +322,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 11fa4bb6714518b98321d5e10919de3e01403efd..c9232593c08be04cb62fe7163a240cbe return ns_val; } -@@ -400,9 +393,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_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 653dc841ac895..21bddfec34c2b 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ 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 1db44af73aba9f14aba348f83bf0f808412429b0..e89f05c94a55824aef573fc5cbc6fc29e57c6585 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 -@@ -560,10 +560,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_); @@ -114,7 +114,7 @@ index 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103 // 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 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed770634e6 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 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1499,8 +1501,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1498,8 +1500,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed return [GetInProcessNSView() window]; } -@@ -1544,9 +1548,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1543,9 +1547,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2039,12 +2045,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2038,12 +2044,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,7 +167,7 @@ index 02db7286cf2e31edce3876b9e970e6754ba8f90c..2c5f09db5e86855c33a79fb8c9f0a6ed /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index cf452160a6504379136712fdda8e7d68ed22b94c..2c0a36f1cd4fd25eddb70ac03f6c45832531e350 100644 +index 37f37c3a8e8a00cf9d4b8959ac2d97fe31629ad8..fa06bafbbaa69a20ce5a3260ca92947cb2bb9228 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -317,6 +317,13 @@ component("base") { @@ -205,7 +205,7 @@ 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 03c2f1a992984995b5805dad12cc855775e223d9..14fb49999bc7be5c538b80c99651dab12bc6d2f6 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 @@ -31,7 +31,9 @@ @@ -233,7 +233,7 @@ index 03c2f1a992984995b5805dad12cc855775e223d9..14fb49999bc7be5c538b80c99651dab1 // 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 946de814ec91afe047697c07c73edad6ffc42a78..9d5d58991bd1f16803ba470766416d4f8e409944 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 @@ -294,14 +294,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -259,7 +259,7 @@ index 946de814ec91afe047697c07c73edad6ffc42a78..9d5d58991bd1f16803ba470766416d4f } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1271,6 +1279,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 946de814ec91afe047697c07c73edad6ffc42a78..9d5d58991bd1f16803ba470766416d4f remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1278,14 +1287,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_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index a45b0eb6bd148..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 b19e09806e1e1863dd07bb9cf70628e951cd68a9..289e869b5efea09af5172f0b1c5cbd80eddd78cd 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", ] 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 053a68b0b3d18..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 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a0927fad90ad 100644 +index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f96285a4e9 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -123,6 +123,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" @@ -22,7 +22,7 @@ index 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a092 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -437,6 +442,79 @@ bool GetFullDataFilePath( +@@ -433,6 +438,79 @@ bool GetFullDataFilePath( } // namespace @@ -102,7 +102,7 @@ index 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a092 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -674,6 +752,13 @@ void NetworkContext::SetClient( +@@ -671,6 +749,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a092 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2173,6 +2258,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) @@ -127,10 +127,10 @@ index 3b2c642dbe29e55b6f9c4ce4a85e9aab332f3136..b3008accd63bd6694a44761c4d00a092 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index f69a86f90a6a9055cfc7d4a613e82c0260582688..486a151f6923fd0069ce5aaaffe6559cb60a88ec 100644 +index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec39602b2b900e 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -101,6 +101,7 @@ class DomainReliabilityMonitor; +@@ -105,6 +105,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -138,7 +138,7 @@ index f69a86f90a6a9055cfc7d4a613e82c0260582688..486a151f6923fd0069ce5aaaffe6559c class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -216,6 +217,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 f69a86f90a6a9055cfc7d4a613e82c0260582688..486a151f6923fd0069ce5aaaffe6559c void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -769,6 +772,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,7 +157,7 @@ index f69a86f90a6a9055cfc7d4a613e82c0260582688..486a151f6923fd0069ce5aaaffe6559c // 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 d7c10e5a55bf0db67c113e0f46094de3c3b3d158..89c00d7ab1510ebdbce49876fcd5f94c5096b3c9 100644 +index 9cd06ee552f8e592dd9efd1e73b10e5998559c04..fa56cfed3703664232843ad26028096d95dca253 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -277,6 +277,17 @@ struct NetworkContextFilePaths { @@ -178,7 +178,7 @@ index d7c10e5a55bf0db67c113e0f46094de3c3b3d158..89c00d7ab1510ebdbce49876fcd5f94c // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -792,6 +803,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 196c6f8d617db..fbb057eaf0f80 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 b95a062670467c93d01828962a9a592e3193811c..064b5642425290f1d9ab82f75b22fd43973ebf5b 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 -@@ -2124,7 +2124,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/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 3c5ac87ef3497..22bc937a11a4c 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -47,6 +47,115 @@ index 0c1fa8676d00240e60ddd037664a409d1c9619dd..64d21f1878c3433324fc61353a10ee21 #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 8e54570ea4c83483eedee4c781f0498ba07bc3dd..b1eb0b2f1a3dfb71e1f5d3917c67e66ac2b27d22 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc @@ -61,32 +170,27 @@ index 8e54570ea4c83483eedee4c781f0498ba07bc3dd..b1eb0b2f1a3dfb71e1f5d3917c67e66a #include "ui/base/l10n/l10n_util.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 6636961b18c71de0477407e6bebc64b091144afd..674cd9100f6ce4e8811e04b459da9f98fb07af3d 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 @@ -95,17 +199,8 @@ index 6636961b18c71de0477407e6bebc64b091144afd..674cd9100f6ce4e8811e04b459da9f98 #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 BUILDFLAG(IS_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 2a1dcf30751d1c22831e4c2eed43e90ea539b535..113bce8bff4984f673c09d4cad5b98c7ce40a311 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 @@ @@ -182,3 +277,49 @@ index d5690233eb85d9f2992ae90461c0d1fd83730d84..d32ee40d1dc7a0004d534540189179b2 #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 6b72c3846a61b..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 fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f57c192940 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,7 +22,7 @@ index fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f5 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; } @@ -30,7 +30,7 @@ index fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f5 #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 fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f5 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 fb0418a0c5337345c67b3692d16871047e0d1b11..a5cceb8c68a05240394479c79f8304f5 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index f922dc5c61ec85e6102a8e92b1b7096382dec6f0..477db7fa8517df9d4b09467ea569af3fe4c4f78c 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 f922dc5c61ec85e6102a8e92b1b7096382dec6f0..477db7fa8517df9d4b09467ea569af3f NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index fc26fd8f32e4c1edd3ca41baf0e9cdd482b25c03..aeaa88bee6b4ce499c361e1b2e93bf5fb0fd31ea 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 @@ @@ -113,10 +113,10 @@ index fc26fd8f32e4c1edd3ca41baf0e9cdd482b25c03..aeaa88bee6b4ce499c361e1b2e93bf5f #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 f8e48861a2964da636afd767c0034d782ee52d6e..174d51d3b6d9f0131be36cf80199b27875d23960 100644 +index 457749cf31578666304c30a5df1b8428629caafe..21c4a76411ee06775fb5bbb2d5a2ac17911d1c2a 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -209,7 +209,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -225,7 +225,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -126,7 +126,7 @@ index f8e48861a2964da636afd767c0034d782ee52d6e..174d51d3b6d9f0131be36cf80199b278 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2e220f675 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 @@ @@ -150,8 +150,8 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 #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; @@ -159,7 +159,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 // 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); @@ -167,7 +167,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 } #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(); @@ -178,7 +178,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 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(); @@ -186,7 +186,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 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(); @@ -197,7 +197,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 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_); @@ -212,7 +212,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -332,7 +342,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -303,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -224,7 +224,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -355,7 +368,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -326,7 +339,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // go in `ReleasePrintJob()`. SetPrintingRFH(rfh); @@ -235,7 +235,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -499,7 +514,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -470,7 +485,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -245,7 +245,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (!content::RenderProcessHost::FromID(process_id)) { -@@ -507,16 +523,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -478,16 +494,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -269,7 +269,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 } void PrintViewManagerBase::NavigationStopped() { -@@ -630,12 +649,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -601,12 +620,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -284,7 +284,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply, -@@ -653,18 +673,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -624,18 +644,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -306,7 +306,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -674,6 +696,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -645,6 +667,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -314,7 +314,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -699,7 +722,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); @@ -323,7 +323,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 return; } int process_id = render_process_host->GetID(); -@@ -722,7 +745,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) @@ -331,7 +331,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 #endif ReleasePrinterQuery(); -@@ -737,6 +759,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -708,6 +730,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -343,7 +343,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -747,8 +774,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) { @@ -354,7 +354,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 } void PrintViewManagerBase::DidStartLoading() { -@@ -816,6 +845,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -779,6 +808,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -366,7 +366,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -877,7 +911,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -840,7 +874,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -378,7 +378,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 if (!weak_this) return false; -@@ -952,6 +989,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -915,6 +952,13 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -392,7 +392,7 @@ index c759b7a7c9d197f4760a2d86f976a965a44abf9a..2d528020ba6c6411e6fd6d47ea1dd6d2 if (!print_job_) return; -@@ -1001,7 +1045,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -964,7 +1008,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -483,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 eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625c9209ba9 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" @@ -494,7 +494,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 #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" -@@ -1253,7 +1254,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1254,7 +1255,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -504,7 +504,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 if (!weak_this) return; -@@ -1284,7 +1286,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1285,7 +1287,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -513,7 +513,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1299,7 +1301,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1300,7 +1302,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -522,7 +522,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1330,7 +1332,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1331,7 +1333,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -532,7 +532,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1377,6 +1380,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1378,6 +1381,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -541,7 +541,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1914,7 +1919,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, @@ -551,7 +551,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 // Check if |this| is still valid. if (!weak_this) return; -@@ -1929,7 +1935,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, @@ -562,7 +562,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1937,7 +1945,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; @@ -571,7 +571,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1956,8 +1964,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(); @@ -588,7 +588,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 // Check if |this| is still valid. if (!self) return; -@@ -2205,36 +2220,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2206,36 +2221,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -652,7 +652,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2378,7 +2408,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, @@ -661,7 +661,7 @@ index eca58f84556152ef813283332f47b08f721693ac..ca415069a57932b3883d9975da3b0625 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2623,18 +2653,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2625,18 +2655,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 4fa2ecbd96c66..58d5bc201d4af 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..8f94cc300b58e8a94b6ca155aa3cf370 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d0b85b8f9 100644 +index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bdbb751555 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -53,6 +53,7 @@ @@ -94,7 +94,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d #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" @@ -106,7 +106,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d #if defined(TOOLKIT_VIEWS) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -348,6 +352,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -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) { @@ -116,7 +116,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d 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; @@ -124,7 +124,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d } 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)); } @@ -146,7 +146,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d 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_); @@ -157,7 +157,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -956,6 +983,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -947,6 +974,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -178,7 +178,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1055,14 +1096,32 @@ bool ProcessSingleton::Create() { +@@ -1046,14 +1087,32 @@ bool ProcessSingleton::Create() { #endif } @@ -216,7 +216,7 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d // 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); @@ -235,12 +235,12 @@ index c546c80e8d1d8e88a2d32a390eb8dbef32bf4b72..81fb8994c53fb16d7c96de008c96127d 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" @@ -248,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)) != @@ -263,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( @@ -278,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; } @@ -289,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. @@ -303,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/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch deleted file mode 100644 index 5a88aa521ea7e..0000000000000 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ /dev/null @@ -1,116 +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 e798a3156ffbea9e8bddc33e3e1373df949b385d..571767dcb702e876835e767e4a4a8588b0639a96 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; - -@@ -114,6 +126,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 e53194c75dce367b11ae1835427ee5529cdbcf13..4381a93e6c70ae4ca0556844f0303000987fbef5 100644 ---- a/ui/native_theme/native_theme_color_id.h -+++ b/ui/native_theme/native_theme_color_id.h -@@ -10,12 +10,18 @@ - #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), \ - OP(kColorId_MenuSeparatorColor), \ - 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 e30e7a26e5c2d8a109c837e683d4f108537043f3..5f809b71c635abd3679ee593850e521a14cb62f5 100644 ---- a/ui/native_theme/native_theme_win.cc -+++ b/ui/native_theme/native_theme_win.cc -@@ -627,10 +627,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 1d450b2a20b49..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 4b0b2b0dc0900627aee38de021ec10cbdc9b3cb4..12c15f92d9c4db4e100b7183a654ec199f64b25b 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 4b0b2b0dc0900627aee38de021ec10cbdc9b3cb4..12c15f92d9c4db4e100b7183a654ec19 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index f3e21a7cacb9d192bf3b6cf4d2bfc8d372cd8307..2e91c4f052501e4067cf8fee21f2f3c2674f1c1a 100644 +index c8e49eeaca8b31479aa908be9c349ccd625e9e51..5c63a024827359ccf697d0b7fc8fa2092eb107b7 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4418,6 +4418,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4486,6 +4486,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index f3e21a7cacb9d192bf3b6cf4d2bfc8d372cd8307..2e91c4f052501e4067cf8fee21f2f3c2 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 822e00b20a272480a3df4c67be7b6ff93375fd15..d2a50feea97add9d9c309e8066305caf9105c547 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 822e00b20a272480a3df4c67be7b6ff93375fd15..d2a50feea97add9d9c309e8066305caf 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 469b98f8405d24b9a13e559a56b9f239bbebd17f..82f61584e1786546cfcb469edfdfe8821c67b67c 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 469b98f8405d24b9a13e559a56b9f239bbebd17f..82f61584e1786546cfcb469edfdfe882 #include "content/public/browser/allow_service_worker_result.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" -@@ -533,6 +534,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/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index f20ba81bc3111..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 1eb2b692c59d33b109085e594badb7fe8284dda5..1b36c21890541ab056ba7a5c403e14a75ce39be3 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 1eb2b692c59d33b109085e594badb7fe8284dda5..1b36c21890541ab056ba7a5c403e14a7 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 0c21c3b6e2a4b76d9cb27d7857778dfcb273616e..849bc53f18c30338462acc89e59ab7a7045faa75 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/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 5d09097b66026..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 67a430b99e98e21383d3851e0c54fa3d9affbdcd..71152d08a9e9ce2e112fd7a6c3134a547af5d978 100644 +index 04546cad2b3e6355d667fe725b85836f128f0df7..7caaf66cad9d5b9f787cea0d49c32c26801571c2 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1586,7 +1586,7 @@ if (is_chrome_branded && !is_android) { +@@ -1591,7 +1591,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 67a430b99e98e21383d3851e0c54fa3d9affbdcd..71152d08a9e9ce2e112fd7a6c3134a54 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1614,6 +1614,12 @@ if (!is_android) { +@@ -1619,6 +1619,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index a714e9ca7e5d7..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 03f9fac83207248d6c99326b6a5c17b3555e7725..e211b83624c4cc691e29dc6c47a2a74f8a41f4b4 100644 +index 0b42cba8667225c25df2405d99efe119a26c3585..ee8b42500499dc6a1700bc38e5b75976bb408490 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1304,7 +1304,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1344,7 +1344,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 d18ff7c274509..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 064b5642425290f1d9ab82f75b22fd43973ebf5b..30a0c9216a206042a9769bdeda015eaf00e3cc49 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()); diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index 6502a2a7c5d37..f54224072007c 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 46a78cf2658ab261c40f7c42135a2e89d0d152d1..7bd8da917e554e3c0523711e33fd196dd6e9805b 100644 +index 4093df78da0bbb1d8df743942f364cf728ad3414..2f31d99b207ffc3531b5334b5a01239cc1fefb35 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn @@ -69,7 +69,7 @@ generate_stubs("gtk_stubs") { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 1d4dc49b73551..849e94be20ccd 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 74e6928041145fd6f37ec4ce7acc6be0649b944d..3eaf29f3ab74de6159bba1578ba0810bd9467922 100644 +index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c4583215f9cd189 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2983,6 +2983,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -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); @@ -26,7 +26,7 @@ index 74e6928041145fd6f37ec4ce7acc6be0649b944d..3eaf29f3ab74de6159bba1578ba0810b WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2993,6 +3000,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 74e6928041145fd6f37ec4ce7acc6be0649b944d..3eaf29f3ab74de6159bba1578ba0810b CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 1b21d5241ea671e4ead260f170e6a0512efea89a..ac9bce453ff812679d8c77d661729ea681977061 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 cf119b4d99398..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 1aa844b66d149be252f4757ed656cc6bccb2ac8b..b03507679029ccb3beb3a8984b1449afead539c6 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 -@@ -881,10 +881,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 9ce1e6240c9ed..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 365b6eb2efc2f09725a9a53b79e83a50bded1c75..0d456ac4b4e832bc64bc1adb8952ce13f084564d 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 -@@ -6035,6 +6035,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 cf2a22e34d0a1..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 3c5b962a3ca5baffe525898d7f417f5fd3687a0b..3c85714b68adda07615cf13740a7257561ecc6f9 100644 +index 63ead7f8ab838693bade7163ddebd1787cc82344..8512a66eda07202b6c6faea049736fd8f16c93db 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -363,6 +363,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 3c5b962a3ca5baffe525898d7f417f5fd3687a0b..3c85714b68adda07615cf13740a72575 // 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 b4e37bbdd3a80c8d6255d4b536bedbff1d4202a0..e793b0c25f2900d949a7473c3f29c620ffd80408 100644 +index a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca69937f2e79e0 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -924,6 +924,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index b4e37bbdd3a80c8d6255d4b536bedbff1d4202a0..e793b0c25f2900d949a7473c3f29c620 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 2191ab72dcaccf50ddbc700ded63f66b95de856d..b4f6e7a468661c272a4cef338e1c171f7247191f 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 2191ab72dcaccf50ddbc700ded63f66b95de856d..b4f6e7a468661c272a4cef338e1c171f 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 6acdee7c9eb8e5368401ba804f9a359e5c7b2b70..c72c142a8b4591b12ff2b3a10a143658c6dcfff3 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 e0a940cc8e788..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 3c85714b68adda07615cf13740a7257561ecc6f9..6cc354acc6f8d253827a799f86fb9d4aba92aa1b 100644 +index 8512a66eda07202b6c6faea049736fd8f16c93db..afe767350c8878da38ab2b566fa89bcb831f8716 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -363,6 +363,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index 3c85714b68adda07615cf13740a7257561ecc6f9..6cc354acc6f8d253827a799f86fb9d4a // 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 e793b0c25f2900d949a7473c3f29c620ffd80408..5b25349e735aa5b32745428d5b19b5cf2454dfc1 100644 +index 0bd64497495cfd8eee5e7cae3eca69937f2e79e0..9ab68aabff203127dba5a0ccdf16fa62f3ef4c40 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index e793b0c25f2900d949a7473c3f29c620ffd80408..5b25349e735aa5b32745428d5b19b5cf 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 b4f6e7a468661c272a4cef338e1c171f7247191f..c70667d616ac3a64fba7c5d2ba315d2c40cc5463 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 b4f6e7a468661c272a4cef338e1c171f7247191f..c70667d616ac3a64fba7c5d2ba315d2c 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 c72c142a8b4591b12ff2b3a10a143658c6dcfff3..03d0a3e596f3d0e5582d4a34aa51a3e5e97210d6 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) {} diff --git a/patches/node/.patches b/patches/node/.patches index 55ddb7c5a2285..0346bf4bde829 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -31,3 +31,4 @@ fix_serdes_test.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_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/v8/build_gn.patch b/patches/v8/build_gn.patch index e70c8c148c892..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 ce150e6a007bb87c7ce956cc4f918b13c829585b..b4e04dce1ec52cd787c3a6de9abe09aae55ecc09 100644 +index fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa187603a84 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -579,7 +579,7 @@ config("internal_config") { +@@ -598,7 +598,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index ce150e6a007bb87c7ce956cc4f918b13c829585b..b4e04dce1ec52cd787c3a6de9abe09aa defines += [ "BUILDING_V8_SHARED" ] } -@@ -5688,7 +5688,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 ce150e6a007bb87c7ce956cc4f918b13c829585b..b4e04dce1ec52cd787c3a6de9abe09aa deps = [ ":v8_libbase", -@@ -5726,6 +5726,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 f6f43c064a0ea..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 0e3370e84503dcdece061dd073b337f774b2d2da..7b8eb622c50a081c8fc3a365f1f4c7e017084e06 100644 +index e6797c92a52ab7805261ace2156a39fe368bd747..1aed7cad8b7dfff9fc7b1f93040c3eda33693af3 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9068,7 +9068,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9097,7 +9097,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 0e3370e84503dcdece061dd073b337f774b2d2da..7b8eb622c50a081c8fc3a365f1f4c7e0 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index aefbbd9b31e0db74c33858842ff4856eb9962706..7d348738a40d6e27b55b18aea7e8fea553834fd7 100644 +index 8e4ad43c1957f4ed555327588c41d049824c1dc5..54cf3b263ac5654b370897b951aa0be8f8d566e5 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6111,9 +6111,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 afd95ed8484b8..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 24e073885a1e6d2d203e55fd57b92e9943aff385..f1bb6cad8c608a6371e5ed4eb88ce0c47acb66bd 100644 +index c784f859ba874b9a79be3dd9c69d306b8a590660..93158da71e2e7dd1aecc421664d4d21687cb38a6 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -579,6 +579,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 441102542267d..4068e9b55533e 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 499d5a9d1cf9e321212bda7c94c15ed1ded7aa30..19e89e906f4cc480bc8a03b9ca7ee9e8f1f907fa 100644 +index 48f595a24ec7ead3076e1d44afb4f18b7bb810c3..df7cb44387a42fa173ce68ee8464d6abc050986f 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -897,7 +897,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -886,7 +886,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. @@ -19,7 +19,7 @@ index 499d5a9d1cf9e321212bda7c94c15ed1ded7aa30..19e89e906f4cc480bc8a03b9ca7ee9e8 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 b9d9606081e56..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 b4e04dce1ec52cd787c3a6de9abe09aae55ecc09..24e073885a1e6d2d203e55fd57b92e9943aff385 100644 +index dbbe9ae10bebdd71f441fda00c7dbfa187603a84..c784f859ba874b9a79be3dd9c69d306b8a590660 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5700,7 +5700,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/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch b/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch index 1f31407e9b39c..bf4935b108d45 100644 --- a/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch +++ b/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch @@ -6,7 +6,7 @@ Subject: Revert "fix(cppgc): removed deleted cstors in CppHeapCreateParams" This reverts commit a66b09e5510d62ff469e72b1a8ff7f0ead1bf0f6. diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h -index 73f6364a442af4538cd0178435c27fc8eac62fe7..63d52651b997a5331b381f77761a78ebfa56287d 100644 +index 201773f59ddd3ce2ed61fe08cb58786aeed605cc..7761d87fd0a325a53d398bafcdeadd6a87f4f1c2 100644 --- a/include/v8-cppgc.h +++ b/include/v8-cppgc.h @@ -77,6 +77,9 @@ struct WrapperDescriptor final { diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index d4461b066b294..28368dce775d1 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -26,6 +26,7 @@ "parallel/test-crypto-padding-aes256", "parallel/test-crypto-secure-heap", "parallel/test-fs-utimes-y2K38", + "parallel/test-heapsnapshot-near-heap-limit-worker.js", "parallel/test-http2-clean-output", "parallel/test-https-agent-session-reuse", "parallel/test-https-options-boolean-check", @@ -116,6 +117,7 @@ "parallel/test-webcrypto-rsa-pss-params", "parallel/test-webcrypto-sign-verify-node-dsa", "parallel/test-webcrypto-x25519-x448", + "parallel/test-worker-debug", "parallel/test-worker-stdio", "parallel/test-zlib-unused-weak", "report/test-report-fatal-error", diff --git a/script/zip_manifests/dist_zip.mac.arm64.manifest b/script/zip_manifests/dist_zip.mac.arm64.manifest index 62931d9f1bb20..91ed477f54512 100644 --- a/script/zip_manifests/dist_zip.mac.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac.arm64.manifest @@ -21,7 +21,9 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ diff --git a/script/zip_manifests/dist_zip.mac.x64.manifest b/script/zip_manifests/dist_zip.mac.x64.manifest index 2739a55201510..e411bc46d62d3 100644 --- a/script/zip_manifests/dist_zip.mac.x64.manifest +++ b/script/zip_manifests/dist_zip.mac.x64.manifest @@ -21,7 +21,9 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest index e7d34c0fb6bf6..20ca9e4428da2 100644 --- a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest @@ -18,7 +18,9 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.x64.manifest b/script/zip_manifests/dist_zip.mac_mas.x64.manifest index 1775dab8addaa..c3a864ce25578 100644 --- a/script/zip_manifests/dist_zip.mac_mas.x64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.x64.manifest @@ -18,7 +18,9 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ diff --git a/shell/app/uv_task_runner.cc b/shell/app/uv_task_runner.cc index f98ddce8737bd..24bcf863bfa86 100644 --- a/shell/app/uv_task_runner.cc +++ b/shell/app/uv_task_runner.cc @@ -6,6 +6,7 @@ #include "base/location.h" #include "base/stl_util.h" +#include "base/time/time.h" #include "shell/app/uv_task_runner.h" namespace electron { diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index e56d55fdbaaae..825240f250923 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -13,7 +13,8 @@ namespace base { class Location; -} +class TimeDelta; +} // namespace base namespace electron { diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 0cc858e644d93..d2de05d363ff2 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -34,7 +34,7 @@ #include "content/public/common/content_switches.h" #include "crypto/crypto_buildflags.h" #include "media/audio/audio_manager.h" -#include "net/dns/public/dns_over_https_server_config.h" +#include "net/dns/public/dns_over_https_config.h" #include "net/dns/public/util.h" #include "net/ssl/client_cert_identity.h" #include "net/ssl/ssl_cert_request_info.h" @@ -1640,18 +1640,14 @@ void ConfigureHostResolver(v8::Isolate* isolate, } default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get(); } - std::string server_method; - std::vector dns_over_https_servers; + + net::DnsOverHttpsConfig doh_config; if (!default_doh_templates.empty() && secure_dns_mode != net::SecureDnsMode::kOff) { - for (base::StringPiece server_template : - SplitStringPiece(default_doh_templates, " ", base::TRIM_WHITESPACE, - base::SPLIT_WANT_NONEMPTY)) { - if (auto server_config = net::DnsOverHttpsServerConfig::FromString( - std::string(server_template))) { - dns_over_https_servers.push_back(server_config.value()); - } - } + auto maybe_doh_config = + net::DnsOverHttpsConfig::FromString(default_doh_templates); + if (maybe_doh_config.has_value()) + doh_config = maybe_doh_config.value(); } bool enable_built_in_resolver = @@ -1677,17 +1673,20 @@ void ConfigureHostResolver(v8::Isolate* isolate, thrower.ThrowTypeError("secureDnsServers must be an array of strings"); return; } - dns_over_https_servers.clear(); + + // Validate individual server templates prior to batch-assigning to + // doh_config. for (const std::string& server_template : secure_dns_server_strings) { - if (auto server_config = - net::DnsOverHttpsServerConfig::FromString(server_template)) { - dns_over_https_servers.push_back(server_config.value()); - } else { + absl::optional server_config = + net::DnsOverHttpsConfig::FromString(server_template); + if (!server_config.has_value()) { thrower.ThrowTypeError(std::string("not a valid DoH template: ") + server_template); return; } } + doh_config = *net::DnsOverHttpsConfig::FromStrings( + std::move(secure_dns_server_strings)); } if (opts.Has("enableAdditionalDnsQueryTypes") && @@ -1700,8 +1699,8 @@ void ConfigureHostResolver(v8::Isolate* isolate, // Configure the stub resolver. This must be done after the system // NetworkContext is created, but before anything has the chance to use it. content::GetNetworkService()->ConfigureStubHostResolver( - enable_built_in_resolver, secure_dns_mode, - std::move(dns_over_https_servers), additional_dns_query_types_enabled); + enable_built_in_resolver, secure_dns_mode, doh_config, + additional_dns_query_types_enabled); } // static diff --git a/shell/browser/api/electron_api_net.cc b/shell/browser/api/electron_api_net.cc index 6f87534dbad07..564fe440d604a 100644 --- a/shell/browser/api/electron_api_net.cc +++ b/shell/browser/api/electron_api_net.cc @@ -6,6 +6,7 @@ #include "gin/handle.h" #include "net/base/network_change_notifier.h" +#include "net/http/http_util.h" #include "services/network/public/cpp/features.h" #include "shell/browser/api/electron_api_url_loader.h" #include "shell/common/gin_helper/dictionary.h" diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 1322378fb20d7..d0a0d4c408e92 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -261,9 +261,11 @@ void DownloadIdCallback(content::DownloadManager* download_manager, const base::Time& start_time, uint32_t id) { download_manager->CreateDownloadItem( - base::GenerateGUID(), id, path, path, url_chain, GURL(), GURL(), GURL(), - GURL(), absl::nullopt, mime_type, mime_type, start_time, base::Time(), - etag, last_modified, offset, length, std::string(), + base::GenerateGUID(), id, path, path, url_chain, GURL(), + content::StoragePartitionConfig::CreateDefault( + download_manager->GetBrowserContext()), + GURL(), GURL(), absl::nullopt, mime_type, mime_type, start_time, + base::Time(), etag, last_modified, offset, length, std::string(), download::DownloadItem::INTERRUPTED, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false, base::Time(), diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 97baf11d65624..86a7eb0cc3f92 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -17,6 +17,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/system/data_pipe_producer.h" #include "net/base/load_flags.h" +#include "net/http/http_util.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h" diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 3873591e1dda3..0da1f050e7695 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -390,9 +390,10 @@ void OnCapturePageDone(gin_helper::Promise promise, absl::optional GetCursorBlinkInterval() { #if BUILDFLAG(IS_MAC) - base::TimeDelta interval; - if (ui::TextInsertionCaretBlinkPeriod(&interval)) - return interval; + absl::optional system_value( + ui::TextInsertionCaretBlinkPeriodFromDefaults()); + if (system_value) + return *system_value; #elif BUILDFLAG(IS_LINUX) if (auto* linux_ui = views::LinuxUI::instance()) return linux_ui->GetCursorBlinkInterval(); @@ -1086,7 +1087,7 @@ content::WebContents* WebContents::CreateCustomWebContents( const GURL& opener_url, const std::string& frame_name, const GURL& target_url, - const content::StoragePartitionId& partition_id, + const content::StoragePartitionConfig& partition_config, content::SessionStorageNamespace* session_storage_namespace) { return nullptr; } @@ -2773,7 +2774,7 @@ void WebContents::Print(gin::Arguments* args) { continue; } } - if (!page_range_list.GetList().empty()) + if (!page_range_list.GetListDeprecated().empty()) settings.SetPath(printing::kSettingPageRange, std::move(page_range_list)); } @@ -3530,12 +3531,10 @@ bool WebContents::TakeFocus(content::WebContents* source, bool reverse) { } content::PictureInPictureResult WebContents::EnterPictureInPicture( - content::WebContents* web_contents, - const viz::SurfaceId& surface_id, - const gfx::Size& natural_size) { + content::WebContents* web_contents) { #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) - return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture( - web_contents, surface_id, natural_size); + return PictureInPictureWindowManager::GetInstance() + ->EnterVideoPictureInPicture(web_contents); #else return content::PictureInPictureResult::kNotSupported; #endif @@ -3687,7 +3686,8 @@ void WebContents::DevToolsIndexPath( std::unique_ptr parsed_excluded_folders = base::JSONReader::ReadDeprecated(excluded_folders_message); if (parsed_excluded_folders && parsed_excluded_folders->is_list()) { - for (const base::Value& folder_path : parsed_excluded_folders->GetList()) { + for (const base::Value& folder_path : + parsed_excluded_folders->GetListDeprecated()) { if (folder_path.is_string()) excluded_folders.push_back(folder_path.GetString()); } diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 38169890b097a..b034167631fa3 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -500,7 +500,7 @@ class WebContents : public ExclusiveAccessContext, const GURL& opener_url, const std::string& frame_name, const GURL& target_url, - const content::StoragePartitionId& partition_id, + const content::StoragePartitionConfig& partition_config, content::SessionStorageNamespace* session_storage_namespace) override; void WebContentsCreatedWithFullParams( content::WebContents* source_contents, @@ -689,9 +689,7 @@ class WebContents : public ExclusiveAccessContext, bool IsFullscreenForTabOrPending(const content::WebContents* source) override; bool TakeFocus(content::WebContents* source, bool reverse) override; content::PictureInPictureResult EnterPictureInPicture( - content::WebContents* web_contents, - const viz::SurfaceId&, - const gfx::Size& natural_size) override; + content::WebContents* web_contents) override; void ExitPictureInPicture() override; // InspectableWebContentsDelegate: diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 22cbf77a34027..1718525f27abe 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -145,6 +145,8 @@ void FrameSubscriber::OnFrameCaptured( Done(content_rect, bitmap); } +void FrameSubscriber::OnFrameWithEmptyRegionCapture() {} + void FrameSubscriber::OnStopped() {} void FrameSubscriber::OnLog(const std::string& message) {} diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 2ce392b5dea62..0a6a003927622 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -59,6 +59,7 @@ class FrameSubscriber : public content::WebContentsObserver, const gfx::Rect& content_rect, mojo::PendingRemote callbacks) override; + void OnFrameWithEmptyRegionCapture() override; void OnStopped() override; void OnLog(const std::string& message) override; diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index 320ae7861a5ae..f47a46e8dd5c8 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -207,7 +207,7 @@ void Browser::ShowAboutPanel() { if ((val = opts.FindListKey("authors"))) { std::vector cstrs; - for (const auto& authorVal : val->GetList()) { + for (const auto& authorVal : val->GetListDeprecated()) { if (authorVal.is_string()) { cstrs.push_back(authorVal.GetString().c_str()); } diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 7ebb2202ae880..5f0bdc532ab6d 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -255,11 +255,6 @@ BrowserProcessImpl::subresource_filter_ruleset_service() { return nullptr; } -federated_learning::FlocSortingLshClustersService* -BrowserProcessImpl::floc_sorting_lsh_clusters_service() { - return nullptr; -} - component_updater::ComponentUpdateService* BrowserProcessImpl::component_updater() { return nullptr; @@ -294,6 +289,10 @@ SerialPolicyAllowedPorts* BrowserProcessImpl::serial_policy_allowed_ports() { return nullptr; } +HidPolicyAllowedDevices* BrowserProcessImpl::hid_policy_allowed_devices() { + return nullptr; +} + void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { locale_ = locale; } diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index e7087415e6298..3a135cade0cbb 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -82,8 +82,6 @@ class BrowserProcessImpl : public BrowserProcess { safe_browsing::SafeBrowsingService* safe_browsing_service() override; subresource_filter::RulesetService* subresource_filter_ruleset_service() override; - federated_learning::FlocSortingLshClustersService* - floc_sorting_lsh_clusters_service() override; component_updater::ComponentUpdateService* component_updater() override; MediaFileSystemRegistry* media_file_system_registry() override; WebRtcLogUploader* webrtc_log_uploader() override; @@ -93,6 +91,7 @@ class BrowserProcessImpl : public BrowserProcess { override; resource_coordinator::TabManager* GetTabManager() override; SerialPolicyAllowedPorts* serial_policy_allowed_ports() override; + HidPolicyAllowedDevices* hid_policy_allowed_devices() override; void CreateDevToolsProtocolHandler() override {} void CreateDevToolsAutoOpener() override {} void set_background_mode_manager_for_test( diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 3931431cdf528..096dcabb56c4f 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -154,7 +154,7 @@ #include "extensions/browser/extension_protocols.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/extensions_browser_client.h" -#include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" +#include "extensions/browser/guest_view/extensions_guest_view.h" #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h" #include "extensions/browser/info_map.h" #include "extensions/browser/process_manager.h" @@ -189,7 +189,8 @@ #endif #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) && BUILDFLAG(IS_WIN) -#include "chrome/browser/ui/views/overlay/overlay_window_views.h" +#include "chrome/browser/ui/views/overlay/document_overlay_window_views.h" +#include "chrome/browser/ui/views/overlay/video_overlay_window_views.h" #include "shell/browser/browser.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" @@ -422,8 +423,6 @@ void ElectronBrowserClient::RenderProcessWillLaunch( host->AddFilter( new extensions::ExtensionMessageFilter(process_id, browser_context)); - host->AddFilter(new extensions::ExtensionsGuestViewMessageFilter( - process_id, browser_context)); host->AddFilter( new ElectronExtensionMessageFilter(process_id, browser_context)); host->AddFilter( @@ -746,15 +745,33 @@ bool ElectronBrowserClient::CanCreateWindow( } #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) -std::unique_ptr -ElectronBrowserClient::CreateWindowForPictureInPicture( - content::PictureInPictureWindowController* controller) { - auto overlay_window = content::OverlayWindow::Create(controller); +std::unique_ptr +ElectronBrowserClient::CreateWindowForVideoPictureInPicture( + content::VideoPictureInPictureWindowController* controller) { + auto overlay_window = content::VideoOverlayWindow::Create(controller); #if BUILDFLAG(IS_WIN) std::wstring app_user_model_id = Browser::Get()->GetAppUserModelID(); if (!app_user_model_id.empty()) { auto* overlay_window_view = - static_cast(overlay_window.get()); + static_cast(overlay_window.get()); + ui::win::SetAppIdForWindow(app_user_model_id, + overlay_window_view->GetNativeWindow() + ->GetHost() + ->GetAcceleratedWidget()); + } +#endif + return overlay_window; +} + +std::unique_ptr +ElectronBrowserClient::CreateWindowForDocumentPictureInPicture( + content::DocumentPictureInPictureWindowController* controller) { + auto overlay_window = content::DocumentOverlayWindow::Create(controller); +#if BUILDFLAG(IS_WIN) + std::wstring app_user_model_id = Browser::Get()->GetAppUserModelID(); + if (!app_user_model_id.empty()) { + auto* overlay_window_view = + static_cast(overlay_window.get()); ui::win::SetAppIdForWindow(app_user_model_id, overlay_window_view->GetNativeWindow() ->GetHost() @@ -1591,6 +1608,9 @@ void ElectronBrowserClient::ExposeInterfacesToRenderer( #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) associated_registry->AddInterface(base::BindRepeating( &extensions::EventRouter::BindForRenderer, render_process_host->GetID())); + associated_registry->AddInterface( + base::BindRepeating(&extensions::ExtensionsGuestView::CreateForExtensions, + render_process_host->GetID())); #endif } diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 5d5c48155189e..730fc07e687e8 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -153,8 +153,12 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool opener_suppressed, bool* no_javascript_access) override; #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) - std::unique_ptr CreateWindowForPictureInPicture( - content::PictureInPictureWindowController* controller) override; + std::unique_ptr + CreateWindowForVideoPictureInPicture( + content::VideoPictureInPictureWindowController* controller) override; + std::unique_ptr + CreateWindowForDocumentPictureInPicture( + content::DocumentPictureInPictureWindowController* controller) override; #endif void GetAdditionalAllowedSchemesForFileSystem( std::vector* additional_schemes) override; diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 48f5e9c08a6a3..bdd2eb4d19c0c 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -220,7 +220,7 @@ void ElectronBrowserContext::InitPrefs() { auto* current_dictionaries = prefs()->Get(spellcheck::prefs::kSpellCheckDictionaries); // No configured dictionaries, the default will be en-US - if (current_dictionaries->GetList().empty()) { + if (current_dictionaries->GetListDeprecated().empty()) { std::string default_code = spellcheck::GetCorrespondingSpellCheckLanguage( base::i18n::GetConfiguredLocale()); if (!default_code.empty()) { diff --git a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc index 7001a5079c2a7..f30b1bd24a62e 100644 --- a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc +++ b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc @@ -58,7 +58,7 @@ bool ContainsAppIdByHash(const base::ListValue& list, return false; } - for (const auto& i : list.GetList()) { + for (const auto& i : list.GetListDeprecated()) { const std::string& s = i.GetString(); if (s.find('/') == std::string::npos) { // No slashes mean that this is a webauthn RP ID, not a U2F AppID. diff --git a/shell/browser/extensions/electron_extension_host_delegate.cc b/shell/browser/extensions/electron_extension_host_delegate.cc index ada5337f863c7..d4d81e7794787 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.cc +++ b/shell/browser/extensions/electron_extension_host_delegate.cc @@ -71,9 +71,7 @@ bool ElectronExtensionHostDelegate::CheckMediaAccessPermission( content::PictureInPictureResult ElectronExtensionHostDelegate::EnterPictureInPicture( - content::WebContents* web_contents, - const viz::SurfaceId& surface_id, - const gfx::Size& natural_size) { + content::WebContents* web_contents) { NOTREACHED(); return content::PictureInPictureResult(); } diff --git a/shell/browser/extensions/electron_extension_host_delegate.h b/shell/browser/extensions/electron_extension_host_delegate.h index 5c1f8761b6d93..078d1696e2565 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.h +++ b/shell/browser/extensions/electron_extension_host_delegate.h @@ -41,9 +41,7 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate { blink::mojom::MediaStreamType type, const Extension* extension) override; content::PictureInPictureResult EnterPictureInPicture( - content::WebContents* web_contents, - const viz::SurfaceId& surface_id, - const gfx::Size& natural_size) override; + content::WebContents* web_contents) override; void ExitPictureInPicture() override; }; diff --git a/shell/browser/extensions/electron_extension_message_filter.cc b/shell/browser/extensions/electron_extension_message_filter.cc index 4ddd1b4fab504..688c76c024f04 100644 --- a/shell/browser/extensions/electron_extension_message_filter.cc +++ b/shell/browser/extensions/electron_extension_message_filter.cc @@ -21,9 +21,9 @@ #include "content/public/browser/render_process_host.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/extension_system.h" +#include "extensions/browser/l10n_file_util.h" #include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" -#include "extensions/common/file_util.h" #include "extensions/common/manifest_handlers/default_locale_handler.h" #include "extensions/common/manifest_handlers/shared_module_info.h" #include "extensions/common/message_bundle.h" @@ -104,8 +104,8 @@ void ElectronExtensionMessageFilter::OnGetExtMessageBundle( if (default_locale.empty()) { // A little optimization: send the answer here to avoid an extra thread hop. std::unique_ptr dictionary_map( - extensions::file_util::LoadNonLocalizedMessageBundleSubstitutionMap( - extension_id)); + extensions::l10n_file_util:: + LoadNonLocalizedMessageBundleSubstitutionMap(extension_id)); ExtensionHostMsg_GetMessageBundle::WriteReplyParams(reply_msg, *dictionary_map); Send(reply_msg); @@ -147,7 +147,7 @@ void ElectronExtensionMessageFilter::OnGetExtMessageBundleAsync( extension_l10n_util::GzippedMessagesPermission gzip_permission, IPC::Message* reply_msg) { std::unique_ptr dictionary_map( - extensions::file_util::LoadMessageBundleSubstitutionMapFromPaths( + extensions::l10n_file_util::LoadMessageBundleSubstitutionMapFromPaths( extension_paths, main_extension_id, default_locale, gzip_permission)); ExtensionHostMsg_GetMessageBundle::WriteReplyParams(reply_msg, diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index ba0584fffd202..26007fc9069dd 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -310,8 +310,8 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( return; } - auto event = std::make_unique(histogram_value, event_name, - std::move(*args).TakeList()); + auto event = std::make_unique( + histogram_value, event_name, std::move(*args).TakeListDeprecated()); auto& context_map = ElectronBrowserContext::browser_context_map(); for (auto const& entry : context_map) { if (entry.second) { diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index 74466f5dc8678..6980915f6358b 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -21,7 +21,6 @@ #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/platform_util.h" -#include "chrome/browser/ui/browser_dialogs.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_task_traits.h" @@ -165,10 +164,7 @@ void FileSelectHelper::OnListFile( void FileSelectHelper::LaunchConfirmationDialog( const base::FilePath& path, std::vector selected_files) { - ShowFolderUploadConfirmationDialog( - path, - base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this), - std::move(selected_files), web_contents_); + ConvertToFileChooserFileInfoList(std::move(selected_files)); } void FileSelectHelper::OnListDone(int error) { diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 69d0cd25b49e0..0a40c5ca356fd 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -156,6 +156,8 @@ JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop) gin::IsolateHolder::IsolateCreationMode::kNormal, nullptr, nullptr, + nullptr, + nullptr, isolate_), locker_(isolate_) { isolate_->Enter(); diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index 41bdf140b90a4..eb7b97952fcd0 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -122,7 +122,7 @@ network::mojom::URLResponseHeadPtr ToResponseHead( head->headers->AddHeader(iter.first, iter.second.GetString()); } else if (iter.second.is_list()) { // key: [values...] - for (const auto& item : iter.second.GetList()) { + for (const auto& item : iter.second.GetListDeprecated()) { if (item.is_string()) head->headers->AddHeader(iter.first, item.GetString()); } diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index 4bf9b02e0522b..be8f3403dc81a 100644 --- a/shell/browser/net/network_context_service.cc +++ b/shell/browser/net/network_context_service.cc @@ -11,6 +11,7 @@ #include "content/public/browser/network_service_instance.h" #include "content/public/browser/shared_cors_origin_access_list.h" #include "electron/fuses.h" +#include "net/http/http_util.h" #include "net/net_buildflags.h" #include "services/network/network_service.h" #include "services/network/public/cpp/cors/origin_access_list.h" diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index dcfe4e4292cc5..d1f474d59ead7 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -25,7 +25,7 @@ #include "content/public/common/network_service_util.h" #include "electron/fuses.h" #include "mojo/public/cpp/bindings/pending_receiver.h" -#include "net/dns/public/dns_over_https_server_config.h" +#include "net/dns/public/dns_over_https_config.h" #include "net/dns/public/util.h" #include "net/net_buildflags.h" #include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h" @@ -273,18 +273,11 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( } default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get(); } - std::string server_method; - std::vector dns_over_https_servers; + + net::DnsOverHttpsConfig doh_config; if (!default_doh_templates.empty() && default_secure_dns_mode != net::SecureDnsMode::kOff) { - for (base::StringPiece server_template : - SplitStringPiece(default_doh_templates, " ", base::TRIM_WHITESPACE, - base::SPLIT_WANT_NONEMPTY)) { - if (auto server_config = net::DnsOverHttpsServerConfig::FromString( - std::string(server_template))) { - dns_over_https_servers.push_back(server_config.value()); - } - } + doh_config = *net::DnsOverHttpsConfig::FromString(default_doh_templates); } bool additional_dns_query_types_enabled = true; @@ -293,8 +286,7 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( // NetworkContext is created, but before anything has the chance to use it. content::GetNetworkService()->ConfigureStubHostResolver( base::FeatureList::IsEnabled(features::kAsyncDns), - default_secure_dns_mode, std::move(dns_over_https_servers), - additional_dns_query_types_enabled); + default_secure_dns_mode, doh_config, additional_dns_query_types_enabled); std::string app_name = electron::Browser::Get()->GetName(); #if BUILDFLAG(IS_MAC) diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index ec88dd1acae2e..aeb60a7b5b28e 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -121,6 +121,8 @@ void OffScreenVideoConsumer::OnFrameCaptured( callback_.Run(*update_rect, bitmap); } +void OffScreenVideoConsumer::OnFrameWithEmptyRegionCapture() {} + void OffScreenVideoConsumer::OnStopped() {} void OffScreenVideoConsumer::OnLog(const std::string& message) {} diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index 4a6598563c3aa..c6687965441e8 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -43,6 +43,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { const gfx::Rect& content_rect, mojo::PendingRemote callbacks) override; + void OnFrameWithEmptyRegionCapture() override; void OnStopped() override; void OnLog(const std::string& message) override; diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index 7d9f759bb9fd1..dc40be4b03be1 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/shell/browser/ui/autofill_popup.cc @@ -15,6 +15,8 @@ #include "shell/browser/ui/autofill_popup.h" #include "shell/common/api/api.mojom.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/gfx/geometry/point.h" @@ -310,11 +312,10 @@ const gfx::FontList& AutofillPopup::GetLabelFontListForRow(int index) const { return smaller_font_list_; } -ui::NativeTheme::ColorId AutofillPopup::GetBackgroundColorIDForRow( - int index) const { +ui::ColorId AutofillPopup::GetBackgroundColorIDForRow(int index) const { return (view_ && index == view_->GetSelectedLine()) - ? ui::NativeTheme::kColorId_ResultsTableHoveredBackground - : ui::NativeTheme::kColorId_ResultsTableNormalBackground; + ? ui::kColorResultsTableHoveredBackground + : ui::kColorResultsTableNormalBackground; } int AutofillPopup::GetLineCount() { diff --git a/shell/browser/ui/autofill_popup.h b/shell/browser/ui/autofill_popup.h index 56a7b0d28c758..a7e43f9d8f7d9 100644 --- a/shell/browser/ui/autofill_popup.h +++ b/shell/browser/ui/autofill_popup.h @@ -9,8 +9,8 @@ #include "content/public/browser/render_frame_host.h" #include "shell/browser/ui/views/autofill_popup_view.h" +#include "ui/color/color_id.h" #include "ui/gfx/font_list.h" -#include "ui/native_theme/native_theme.h" #include "ui/views/view.h" #include "ui/views/widget/widget.h" @@ -54,7 +54,7 @@ class AutofillPopup : public views::ViewObserver { gfx::Rect GetRowBounds(int i); const gfx::FontList& GetValueFontListForRow(int index) const; const gfx::FontList& GetLabelFontListForRow(int index) const; - ui::NativeTheme::ColorId GetBackgroundColorIDForRow(int index) const; + ui::ColorId GetBackgroundColorIDForRow(int index) const; int GetLineCount(); std::u16string GetValueAt(int i); diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 16d2cda33cf69..b7e939c35d45f 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -1023,7 +1023,7 @@ void InspectableWebContents::HandleMessageFromDevToolsFrontend( int id = message.FindIntKey(kFrontendHostId).value_or(0); std::vector params_list; if (params) - params_list = std::move(*params).TakeList(); + params_list = std::move(*params).TakeListDeprecated(); embedder_message_dispatcher_->Dispatch( base::BindRepeating(&InspectableWebContents::SendMessageAck, weak_factory_.GetWeakPtr(), id), diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index 8cd73243d254b..fbe475d5b7e9d 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -13,6 +13,7 @@ #include "content/public/browser/render_view_host.h" #include "ui/accessibility/ax_enums.mojom.h" #include "ui/base/dragdrop/drag_drop_types.h" +#include "ui/color/color_provider.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/canvas.h" #include "ui/gfx/geometry/point.h" @@ -88,8 +89,7 @@ void AutofillPopupView::Show() { SetBorder(views::CreateSolidBorder( kPopupBorderThickness, - GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_UnfocusedBorderColor))); + GetColorProvider()->GetColor(ui::kColorUnfocusedBorder))); DoUpdateBoundsAndRedrawPopup(); GetWidget()->Show(); @@ -167,7 +167,7 @@ void AutofillPopupView::DrawAutofillEntry(gfx::Canvas* canvas, if (!popup_) return; - canvas->FillRect(entry_rect, GetNativeTheme()->GetSystemColor( + canvas->FillRect(entry_rect, GetColorProvider()->GetColor( popup_->GetBackgroundColorIDForRow(index))); const bool is_rtl = base::i18n::IsRTL(); @@ -185,8 +185,7 @@ void AutofillPopupView::DrawAutofillEntry(gfx::Canvas* canvas, canvas->DrawStringRectWithFlags( popup_->GetValueAt(index), popup_->GetValueFontListForRow(index), - GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_ResultsTableNormalText), + GetColorProvider()->GetColor(ui::kColorResultsTableNormalText), gfx::Rect(value_x_align_left, value_rect.y(), value_width, value_rect.height()), text_align); @@ -201,8 +200,7 @@ void AutofillPopupView::DrawAutofillEntry(gfx::Canvas* canvas, canvas->DrawStringRectWithFlags( popup_->GetLabelAt(index), popup_->GetLabelFontListForRow(index), - GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_ResultsTableDimmedText), + GetColorProvider()->GetColor(ui::kColorResultsTableDimmedText), gfx::Rect(label_x_align_left, entry_rect.y(), label_width, entry_rect.height()), text_align); @@ -252,8 +250,8 @@ void AutofillPopupView::OnPaint(gfx::Canvas* canvas) { } #endif - draw_canvas->DrawColor(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_ResultsTableNormalBackground)); + draw_canvas->DrawColor( + GetColorProvider()->GetColor(ui::kColorResultsTableNormalBackground)); OnPaintBorder(draw_canvas); for (int i = 0; i < popup_->GetLineCount(); ++i) { diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index 829eed6a5dbf1..e56094075b275 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -8,6 +8,7 @@ #include "shell/browser/native_window.h" #include "shell/browser/ui/views/submenu_button.h" +#include "ui/color/color_provider.h" #include "ui/native_theme/common_theme.h" #include "ui/views/background.h" #include "ui/views/layout/box_layout.h" @@ -34,10 +35,13 @@ const char MenuBar::kViewClassName[] = "ElectronMenuBar"; MenuBar::MenuBar(NativeWindow* window, RootView* root_view) : background_color_(kDefaultColor), window_(window), root_view_(root_view) { const ui::NativeTheme* theme = root_view_->GetNativeTheme(); - if (theme) { - RefreshColorCache(theme); - } + RefreshColorCache(theme); UpdateViewColors(); +#if BUILDFLAG(IS_WIN) + SetBackground( + views::CreateThemedSolidBackground(this, ui::kColorMenuBackground)); + background_color_ = GetBackground()->get_color(); +#endif SetFocusBehavior(FocusBehavior::ALWAYS); SetLayoutManager(std::make_unique( views::BoxLayout::Orientation::kHorizontal)); @@ -156,9 +160,7 @@ bool MenuBar::SetPaneFocusAndFocusDefault() { void MenuBar::OnThemeChanged() { views::AccessiblePaneView::OnThemeChanged(); const ui::NativeTheme* theme = root_view_->GetNativeTheme(); - if (theme) { - RefreshColorCache(theme); - } + RefreshColorCache(theme); UpdateViewColors(); } @@ -215,9 +217,6 @@ void MenuBar::RefreshColorCache(const ui::NativeTheme* theme) { gtk::GetFgColor("GtkMenuBar#menubar GtkMenuItem#menuitem GtkLabel"); disabled_color_ = gtk::GetFgColor( "GtkMenuBar#menubar GtkMenuItem#menuitem:disabled GtkLabel"); -#else - background_color_ = - ui::GetAuraColor(ui::NativeTheme::kColorId_MenuBackgroundColor, theme); #endif } } @@ -235,8 +234,10 @@ void MenuBar::RebuildChildren() { } void MenuBar::UpdateViewColors() { +#if BUILDFLAG(IS_LINUX) // set menubar background color SetBackground(views::CreateSolidBackground(background_color_)); +#endif // set child colors if (menu_model_ == nullptr) diff --git a/shell/browser/web_contents_zoom_controller.h b/shell/browser/web_contents_zoom_controller.h index 9e9feddaa1737..2df6f229842bb 100644 --- a/shell/browser/web_contents_zoom_controller.h +++ b/shell/browser/web_contents_zoom_controller.h @@ -5,6 +5,7 @@ #ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ #define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ +#include "base/observer_list.h" #include "base/observer_list_types.h" #include "content/public/browser/host_zoom_map.h" #include "content/public/browser/web_contents_observer.h" diff --git a/shell/common/api/electron_api_v8_util.cc b/shell/common/api/electron_api_v8_util.cc index b4a95d228cf35..8c55a47919b79 100644 --- a/shell/common/api/electron_api_v8_util.cc +++ b/shell/common/api/electron_api_v8_util.cc @@ -5,6 +5,7 @@ #include #include "base/hash/hash.h" +#include "base/run_loop.h" #include "electron/buildflags/buildflags.h" #include "shell/common/api/electron_api_key_weak_map.h" #include "shell/common/gin_converters/content_converter.h" diff --git a/shell/common/asar/archive.cc b/shell/common/asar/archive.cc index 411ba5d61e80c..709950fd65841 100644 --- a/shell/common/asar/archive.cc +++ b/shell/common/asar/archive.cc @@ -138,7 +138,7 @@ bool FillFileInfoWithNode(Archive::FileInfo* info, integrity_payload.hash = *hash; integrity_payload.block_size = static_cast(block_size.value()); - for (auto& value : blocks->GetList()) { + for (auto& value : blocks->GetListDeprecated()) { if (auto* block = value.GetIfString()) { integrity_payload.blocks.push_back(*block); } else { diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 27cee52efb42c..d2b93166b3647 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -317,7 +317,7 @@ bool Converter>::FromV8( if (!ConvertFromV8(isolate, val, list.get())) return false; *out = base::MakeRefCounted(); - for (size_t i = 0; i < list->GetList().size(); ++i) { + for (size_t i = 0; i < list->GetListDeprecated().size(); ++i) { base::DictionaryValue* dict = nullptr; std::string type; if (!list->GetDictionary(i, &dict)) diff --git a/shell/common/v8_value_converter.cc b/shell/common/v8_value_converter.cc index f90d64c5c60a3..00235ec21057d 100644 --- a/shell/common/v8_value_converter.cc +++ b/shell/common/v8_value_converter.cc @@ -204,14 +204,14 @@ v8::Local V8ValueConverter::ToV8ValueImpl( v8::Local V8ValueConverter::ToV8Array( v8::Isolate* isolate, const base::ListValue* val) const { - v8::Local result(v8::Array::New(isolate, val->GetList().size())); + v8::Local result( + v8::Array::New(isolate, val->GetListDeprecated().size())); auto context = isolate->GetCurrentContext(); - for (size_t i = 0; i < val->GetList().size(); ++i) { - const base::Value* child = nullptr; - val->Get(i, &child); + for (size_t i = 0; i < val->GetListDeprecated().size(); ++i) { + const base::Value& child = val->GetListDeprecated()[i]; - v8::Local child_v8 = ToV8ValueImpl(isolate, child); + v8::Local child_v8 = ToV8ValueImpl(isolate, &child); v8::TryCatch try_catch(isolate); result->Set(context, static_cast(i), child_v8).Check(); diff --git a/shell/renderer/electron_autofill_agent.cc b/shell/renderer/electron_autofill_agent.cc index 9d8282079a412..ff3ae3deceb56 100644 --- a/shell/renderer/electron_autofill_agent.cc +++ b/shell/renderer/electron_autofill_agent.cc @@ -136,9 +136,10 @@ void AutofillAgent::ShowSuggestions(const blink::WebFormControlElement& element, const ShowSuggestionsOptions& options) { if (!element.IsEnabled() || element.IsReadOnly()) return; - const blink::WebInputElement* input_element = ToWebInputElement(&element); - if (input_element) { - if (!input_element->IsTextField()) + const blink::WebInputElement input_element = + element.DynamicTo(); + if (!input_element.IsNull()) { + if (!input_element.IsTextField()) return; } @@ -154,9 +155,8 @@ void AutofillAgent::ShowSuggestions(const blink::WebFormControlElement& element, std::vector data_list_values; std::vector data_list_labels; - if (input_element) { - GetDataListSuggestions(*input_element, &data_list_values, - &data_list_labels); + if (!input_element.IsNull()) { + GetDataListSuggestions(input_element, &data_list_values, &data_list_labels); TrimStringVectorForIPC(&data_list_values); TrimStringVectorForIPC(&data_list_labels); } @@ -191,8 +191,10 @@ void AutofillAgent::ShowPopup(const blink::WebFormControlElement& element, void AutofillAgent::AcceptDataListSuggestion(const std::u16string& suggestion) { auto element = render_frame()->GetWebFrame()->GetDocument().FocusedElement(); if (element.IsFormControlElement()) { - ToWebInputElement(&element)->SetAutofillValue( - blink::WebString::FromUTF16(suggestion)); + blink::WebInputElement input_element = + element.DynamicTo(); + if (!input_element.IsNull()) + input_element.SetAutofillValue(blink::WebString::FromUTF16(suggestion)); } } @@ -204,9 +206,10 @@ void AutofillAgent::DoFocusChangeComplete() { if (focused_node_was_last_clicked_ && was_focused_before_now_) { ShowSuggestionsOptions options; options.autofill_on_empty_values = true; - auto* input_element = ToWebInputElement(&element); - if (input_element) - ShowSuggestions(*input_element, options); + blink::WebInputElement input_element = + element.DynamicTo(); + if (!input_element.IsNull()) + ShowSuggestions(input_element, options); } was_focused_before_now_ = true; diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index 2c23069159eb8..98f79468c5445 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -326,10 +326,10 @@ bool RendererClientBase::OverrideCreatePlugin( return true; } -void RendererClientBase::AddSupportedKeySystems( - std::vector>* key_systems) { +void RendererClientBase::GetSupportedKeySystems( + media::GetSupportedKeySystemsCB cb) { #if defined(WIDEVINE_CDM_AVAILABLE) - key_systems_provider_.AddSupportedKeySystems(key_systems); + key_systems_provider_.GetSupportedKeySystems(std::move(cb)); #endif } diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index 56e53ab764cf6..d830c6db5f88f 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -104,9 +104,7 @@ class RendererClientBase : public content::ContentRendererClient bool OverrideCreatePlugin(content::RenderFrame* render_frame, const blink::WebPluginParams& params, blink::WebPlugin** plugin) override; - void AddSupportedKeySystems( - std::vector>* key_systems) - override; + void GetSupportedKeySystems(media::GetSupportedKeySystemsCB cb) override; bool IsKeySystemsUpdateNeeded() override; void DidSetUserAgent(const std::string& user_agent) override; bool IsPluginHandledExternally(content::RenderFrame* render_frame, diff --git a/spec-main/api-web-frame-main-spec.ts b/spec-main/api-web-frame-main-spec.ts index 94f3bd59827e3..49545c4eaf992 100644 --- a/spec-main/api-web-frame-main-spec.ts +++ b/spec-main/api-web-frame-main-spec.ts @@ -6,7 +6,7 @@ import { BrowserWindow, WebFrameMain, webFrameMain, ipcMain } from 'electron/mai import { closeAllWindows } from './window-helpers'; import { emittedOnce, emittedNTimes } from './events-helpers'; import { AddressInfo } from 'net'; -import { waitUntil } from './spec-helpers'; +import { ifit, waitUntil } from './spec-helpers'; describe('webFrameMain module', () => { const fixtures = path.resolve(__dirname, '..', 'spec-main', 'fixtures'); @@ -201,7 +201,8 @@ describe('webFrameMain module', () => { w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); }); - it('throws upon accessing properties when disposed', async () => { + // TODO(jkleinsc) fix this flaky test on linux + ifit(process.platform !== 'linux')('throws upon accessing properties when disposed', async () => { await w.loadFile(path.join(subframesPath, 'frame-with-frame-container.html')); const { mainFrame } = w.webContents; w.destroy(); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index f2df2aa34c94f..80920d99b631c 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -820,7 +820,8 @@ describe('chromium features', () => { expect(typeofProcessGlobal).to.equal('undefined'); }); - it('disables JavaScript when it is disabled on the parent window', async () => { + // TODO(jkleinsc) fix this flaky test on WOA + ifit(process.platform !== 'win32' || process.arch !== 'arm64')('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')); const windowUrl = require('url').format({ @@ -1614,7 +1615,8 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', () expect(width).to.equal(0); }); - it('can fullscreen from in-process iframes', async () => { + // TODO(jkleinsc) fix this flaky test on WOA + ifit(process.platform !== 'win32' || process.arch !== 'arm64')('can fullscreen from in-process iframes', async () => { const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); w.loadFile(path.join(fixturesPath, 'pages', 'fullscreen-ipif.html')); await fullscreenChange; diff --git a/spec-main/extensions-spec.ts b/spec-main/extensions-spec.ts index daef4622d8b84..5c382d53e03b3 100644 --- a/spec-main/extensions-spec.ts +++ b/spec-main/extensions-spec.ts @@ -7,6 +7,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as WebSocket from 'ws'; import { emittedOnce, emittedNTimes, emittedUntil } from './events-helpers'; +import { ifit } from './spec-helpers'; const uuid = require('uuid'); @@ -502,7 +503,8 @@ describe('chrome extensions', () => { }); }; - it('loads a devtools extension', async () => { + // TODO(jkleinsc) fix this flaky test on WOA + ifit(process.platform !== 'win32' || process.arch !== 'arm64')('loads a devtools extension', async () => { const customSession = session.fromPartition(`persist:${uuid.v4()}`); customSession.loadExtension(path.join(fixtures, 'extensions', 'devtools-extension')); const winningMessage = emittedOnce(ipcMain, 'winning'); diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index c6cd59bde06fa..01b93a66e2307 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -436,7 +436,8 @@ describe(' tag', function () { afterEach(closeAllWindows); - it('should make parent frame element fullscreen too', async () => { + // TODO(jkleinsc) fix this test on arm64 macOS. It causes the tests following it to fail/be flaky + ifit(process.platform !== 'darwin' || process.arch !== 'arm64')('should make parent frame element fullscreen too', async () => { const [w, webview] = await loadWebViewWindow(); expect(await w.webContents.executeJavaScript('isIframeFullscreen()')).to.be.false(); From 998c85af131b28c9f7e37b4833e96760a9cd6bf1 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:00:53 -0800 Subject: [PATCH 069/811] Bump v19.0.0-nightly.20220228 --- 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 a6a5f8ce0ccfc..caf0f88d626a1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220228 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..873d16c36ec2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220228", "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 d08e9317043cd..6cad93bff94d6 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220228 + PRODUCTVERSION 19,0,0,20220228 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1e50f7d2b64832aa98e5adcddd9af20d7ed72783 Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Mon, 28 Feb 2022 11:46:52 -0800 Subject: [PATCH 070/811] docs: consolidate info docs (#32964) * docs: consolidate info docs * fill in table * more newlines to admonitions * update china mirror thing --- README.md | 35 ++++--- docs/README.md | 1 - docs/development/issues.md | 2 +- docs/tutorial/electron-timelines.md | 122 +++++++++++++++++++------ docs/tutorial/electron-versioning.md | 11 ++- docs/tutorial/support.md | 131 +-------------------------- 6 files changed, 135 insertions(+), 167 deletions(-) diff --git a/README.md b/README.md index f0af41e5940b3..00bb29edb3c9f 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,17 @@ For more installation options and troubleshooting tips, see [installation](docs/tutorial/installation.md). For info on how to manage Electron versions in your apps, see [Electron versioning](docs/tutorial/electron-versioning.md). +## Platform support + +Each Electron release provides binaries for macOS, Windows, and Linux. + +* macOS (El Capitan and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11. +* Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. +* Linux: The prebuilt binaries of Electron are built on Ubuntu 18.04. They have also been verified to work on: + * Ubuntu 14.04 and newer + * Fedora 24 and newer + * Debian 8 and newer + ## Quick start & Electron Fiddle Use [`Electron Fiddle`](https://github.com/electron/fiddle) @@ -54,12 +65,10 @@ npm start ## Resources for learning Electron -- [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation -- [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments -- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app -- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community -- [electron/simple-samples](https://github.com/electron/simple-samples) - Small applications with ideas for taking them further -- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - An Electron app that teaches you how to use Electron +* [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation +* [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments +* [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app +* [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community ## Programmatic usage @@ -80,11 +89,15 @@ const child = proc.spawn(electron) ### Mirrors -- [China](https://npmmirror.com/mirrors/electron) +* [China](https://npm.taobao.org/mirrors/electron) + +See the [Advanced Installation Instructions](https://www.electronjs.org/docs/latest/tutorial/installation#mirror) to learn how to use a custom mirror. -## Documentation Translations +## Documentation translations -Find documentation translations in [electron/i18n](https://github.com/electron/i18n). +We crowdsource translations for our documentation via [Crowdin](https://crowdin.com/project/electron). +We currently accept translations for Chinese (Simplified), French, German, Japanese, Portuguese, +Russian, and Spanish. ## Contributing @@ -93,10 +106,10 @@ If you are interested in reporting/fixing issues and contributing directly to th ## Community Info on reporting bugs, getting help, finding third-party tools and sample apps, -and more can be found in the [support document](docs/tutorial/support.md#finding-support). +and more can be found on the [Community page](https://www.electronjs.org/community). ## License [MIT](https://github.com/electron/electron/blob/main/LICENSE) -When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos). +When using Electron logos, make sure to follow [OpenJS Foundation Trademark Policy](https://openjsf.org/wp-content/uploads/sites/84/2021/01/OpenJS-Foundation-Trademark-Policy-2021-01-12.docx.pdf). diff --git a/docs/README.md b/docs/README.md index 261c67c5941ce..5e5f763ccdf7d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -64,7 +64,6 @@ an issue: * [Automated Testing](tutorial/automated-testing.md) * [REPL](tutorial/repl.md) * [Distribution](tutorial/application-distribution.md) - * [Supported Platforms](tutorial/support.md#supported-platforms) * [Code Signing](tutorial/code-signing.md) * [Mac App Store](tutorial/mac-app-store-submission-guide.md) * [Windows Store](tutorial/windows-store-guide.md) diff --git a/docs/development/issues.md b/docs/development/issues.md index ec0ad5dc04f36..1eb530111c7a8 100644 --- a/docs/development/issues.md +++ b/docs/development/issues.md @@ -24,7 +24,7 @@ contribute: ## Asking for General Help -["Finding Support"](../tutorial/support.md#finding-support) has a +[The Electron website](https://electronjs.org/community) has a list of resources for getting programming help, reporting security issues, contributing, and more. Please use the issue tracker for bugs only! diff --git a/docs/tutorial/electron-timelines.md b/docs/tutorial/electron-timelines.md index 16418ab398c51..80ac4ca66eeb4 100644 --- a/docs/tutorial/electron-timelines.md +++ b/docs/tutorial/electron-timelines.md @@ -1,30 +1,100 @@ -# Electron Release Timelines +# Electron Releases -Special notes: +Electron frequently releases major versions alongside every other Chromium release. +This document focuses on the release cadence and version support policy. +For a more in-depth guide on our git branches and how Electron uses semantic versions, +check out our [Electron Versioning](./electron-versioning.md) doc. + +## Timeline + +| Electron | Alpha | Beta | Stable | Chrome | Node | Supported | +| ------- | ----- | ------- | ------ | ------ | ---- | ---- | +| 2.0.0 | -- | 2018-Feb-21 | 2018-May-01 | M61 | v8.9 | 🚫 | +| 3.0.0 | -- | 2018-Jun-21 | 2018-Sep-18 | M66 | v10.2 | 🚫 | +| 4.0.0 | -- | 2018-Oct-11 | 2018-Dec-20 | M69 | v10.11 | 🚫 | +| 5.0.0 | -- | 2019-Jan-22 | 2019-Apr-24 | M73 | v12.0 | 🚫 | +| 6.0.0 | -- | 2019-May-01 | 2019-Jul-30 | M76 | v12.4 | 🚫 | +| 7.0.0 | -- | 2019-Aug-01 | 2019-Oct-22 | M78 | v12.8 | 🚫 | +| 8.0.0 | -- | 2019-Oct-24 | 2020-Feb-04 | M80 | v12.13 | 🚫 | +| 9.0.0 | -- | 2020-Feb-06 | 2020-May-19 | M83 | v12.14 | 🚫 | +| 10.0.0 | -- | 2020-May-21 | 2020-Aug-25 | M85 | v12.16 | 🚫 | +| 11.0.0 | -- | 2020-Aug-27 | 2020-Nov-17 | M87 | v12.18 | 🚫 | +| 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | M89 | v14.16 | 🚫 | +| 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | M91 | v14.16 | 🚫 | +| 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 | v16.13 | ✅ | +| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | TBD | ✅ | +| 19.0.0 | 2022-Mar-31 | 2022-Apr-30 | 2022-May-24 | M102 | TBD | ✅ | + +**Notes:** * The `-beta.1` and `stable` dates are our solid release dates. -* We strive for weekly beta releases, however we often release more betas than scheduled. +* We strive for weekly beta releases, but we often release more betas than scheduled. * All dates are our goals but there may be reasons for adjusting the stable deadline, such as security bugs. -* Take a look at the [5.0.0 Timeline blog post](https://electronjs.org/blog/electron-5-0-timeline) for info about publicizing our release dates. -* Since Electron 6.0, we've been targeting every other Chromium version and releasing our stable on the same day as Chrome stable. You can reference Chromium's release schedule [here](https://chromiumdash.appspot.com/schedule). See [Electron's new release cadence blog post](https://www.electronjs.org/blog/12-week-cadence) for more details on our release schedule. -* Starting in Electron 16.0, we will release on an 8-week cadence. See [Electron's new 8-week cadence blog post](https://www.electronjs.org/blog/8-week-cadence) for more details. - -| Electron | Alpha | Beta | Stable | Chrome | Node | -| ------- | ----- | ------- | ------ | ------ | ---- | -| 2.0.0 | -- | 2018-Feb-21 | 2018-May-01 | M61 | v8.9 | -| 3.0.0 | -- | 2018-Jun-21 | 2018-Sep-18 | M66 | v10.2 | -| 4.0.0 | -- | 2018-Oct-11 | 2018-Dec-20 | M69 | v10.11 | -| 5.0.0 | -- | 2019-Jan-22 | 2019-Apr-24 | M73 | v12.0 | -| 6.0.0 | -- | 2019-May-01 | 2019-Jul-30 | M76 | v12.4 | -| 7.0.0 | -- | 2019-Aug-01 | 2019-Oct-22 | M78 | v12.8 | -| 8.0.0 | -- | 2019-Oct-24 | 2020-Feb-04 | M80 | v12.13 | -| 9.0.0 | -- | 2020-Feb-06 | 2020-May-19 | M83 | v12.14 | -| 10.0.0 | -- | 2020-May-21 | 2020-Aug-25 | M85 | v12.16 | -| 11.0.0 | -- | 2020-Aug-27 | 2020-Nov-17 | M87 | v12.18 | -| 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | M89 | v14.16 | -| 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | M91 | v14.16 | -| 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 | v16.13 | -| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | TBD | + +**Historical changes:** + +* Since Electron 5, Electron has been publicizing its release dates ([see blog post](https://electronjs.org/blog/electron-5-0-timeline)). +* Since Electron 6, Electron major versions have been targeting every other Chromium major version. Each Electron stable should happen on the same day as Chrome stable ([see blog post](https://www.electronjs.org/blog/12-week-cadence)). When this was announced +* Since Electron 16, Electron has been releasing major versions on an 8-week cadence in accordance to Chrome's change to a 4-week release cadence ([see blog post](https://www.electronjs.org/blog/8-week-cadence). + +:::info Chrome release dates + +Chromium has the own public release schedule [here](https://chromiumdash.appspot.com/schedule). + +::: + +## Version support policy + +:::info + +Beginning in September 2021 (Electron 15), the Electron team +will temporarily support the latest **four** stable major versions. This +extended support is intended to help Electron developers transition to +the [new 8-week release cadence](https://electronjs.org/blog/8-week-cadence), +and will continue until the release of Electron 19. At that time, +the Electron team will drop support back to the latest three stable major versions. + +::: + +The latest three *stable* major versions are supported by the Electron team. +For example, if the latest release is 6.1.x, then the 5.0.x as well +as the 4.2.x series are supported. We only support the latest minor release +for each stable release series. This means that in the case of a security fix, +6.1.x will receive the fix, but we will not release a new version of 6.0.x. + +The latest stable release unilaterally receives all fixes from `main`, +and the version prior to that receives the vast majority of those fixes +as time and bandwidth warrants. The oldest supported release line will receive +only security fixes directly. + +### Breaking API changes + +When an API is changed or removed in a way that breaks existing functionality, the +previous functionality will be supported for a minimum of two major versions when +possible before being removed. For example, if a function takes three arguments, +and that number is reduced to two in major version 10, the three-argument version would +continue to work until, at minimum, major version 12. Past the minimum two-version +threshold, we will attempt to support backwards compatibility beyond two versions +until the maintainers feel the maintenance burden is too high to continue doing so. + +### End-of-life + +When a release branch reaches the end of its support cycle, the series +will be deprecated in NPM and a final end-of-support release will be +made. This release will add a warning to inform that an unsupported +version of Electron is in use. + +These steps are to help app developers learn when a branch they're +using becomes unsupported, but without being excessively intrusive +to end users. + +If an application has exceptional circumstances and needs to stay +on an unsupported series of Electron, developers can silence the +end-of-support warning by omitting the final release from the app's +`package.json` `devDependencies`. For example, since the 1-6-x series +ended with an end-of-support 1.6.18 release, developers could choose +to stay in the 1-6-x series without warnings with `devDependency` of +`"electron": 1.6.0 - 1.6.17`. diff --git a/docs/tutorial/electron-versioning.md b/docs/tutorial/electron-versioning.md index f450feeb1968d..7e473bffd3940 100644 --- a/docs/tutorial/electron-versioning.md +++ b/docs/tutorial/electron-versioning.md @@ -48,7 +48,7 @@ Stabilization branches are branches that run parallel to `main`, taking in only Since Electron 8, stabilization branches are always **major** version lines, and named against the following template `$MAJOR-x-y` e.g. `8-x-y`. Prior to that we used **minor** version lines and named them as `$MAJOR-$MINOR-x` e.g. `2-0-x`. -We allow for multiple stabilization branches to exist simultaneously, one for each supported version. For more details on which versions are supported, see our [Electron Release Timelines](./electron-timelines.md) doc. +We allow for multiple stabilization branches to exist simultaneously, one for each supported version. For more details on which versions are supported, see our [Electron Releases](./electron-timelines.md) doc. ![Multiple Stability Branches](../images/versioning-sketch-2.png) @@ -107,6 +107,15 @@ A few examples of how various SemVer ranges will pick up new releases: ![Semvers and Releases](../images/versioning-sketch-7.png) +### Backport request process + +All supported release lines will accept external pull requests to backport +fixes previously merged to `main`, though this may be on a case-by-case +basis for some older supported lines. All contested decisions around release +line backports will be resolved by the +[Releases Working Group](https://github.com/electron/governance/tree/main/wg-releases) +as an agenda item at their weekly meeting the week the backport PR is raised. + ## Feature flags Feature flags are a common practice in Chromium, and are well-established in the web-development ecosystem. In the context of Electron, a feature flag or **soft branch** must have the following properties: diff --git a/docs/tutorial/support.md b/docs/tutorial/support.md index d7a51f57140c4..fa48f555e5040 100644 --- a/docs/tutorial/support.md +++ b/docs/tutorial/support.md @@ -1,128 +1,5 @@ -# Electron Support +# This doc has moved! -## Finding Support - -If you have a security concern, -please see the [security document](https://github.com/electron/electron/tree/main/SECURITY.md). - -If you're looking for programming help, -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 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 - * And more! -* [`electron`](https://discuss.atom.io/c/electron) category on the Atom forums -* `#electron` channel on [Atom's Slack](https://discuss.atom.io/t/join-us-on-slack/16638?source_topic_id=25406) -* [`electron-ru`](https://telegram.me/electron_ru) *(Russian)* -* [`electron-br`](https://electron-br.slack.com) *(Brazilian Portuguese)* -* [`electron-kr`](https://electron-kr.github.io/electron-kr) *(Korean)* -* [`electron-jp`](https://electron-jp.slack.com) *(Japanese)* -* [`electron-tr`](https://electron-tr.herokuapp.com) *(Turkish)* -* [`electron-id`](https://electron-id.slack.com) *(Indonesia)* -* [`electron-pl`](https://electronpl.github.io) *(Poland)* - -If you'd like to contribute to Electron, -see the [contributing document](https://github.com/electron/electron/blob/main/CONTRIBUTING.md). - -If you've found a bug in a [supported version](#supported-versions) of Electron, -please report it with the [issue tracker](../development/issues.md). - -[awesome-electron](https://github.com/sindresorhus/awesome-electron) -is a community-maintained list of useful example apps, -tools and resources. - -## Supported Versions - -_**Note:** Beginning in September 2021 with Electron 15, the Electron team -will temporarily support the latest **four** stable major versions. This -extended support is intended to help Electron developers transition to -the [new eight week release cadence](https://electronjs.org/blog/8-week-cadence), and will continue until May 2022, with -the release of Electron 19. At that time, the Electron team will drop support -back to the latest three stable major versions._ - -The latest three *stable* major versions are supported by the Electron team. -For example, if the latest release is 6.1.x, then the 5.0.x as well -as the 4.2.x series are supported. We only support the latest minor release -for each stable release series. This means that in the case of a security fix -6.1.x will receive the fix, but we will not release a new version of 6.0.x. - -The latest stable release unilaterally receives all fixes from `main`, -and the version prior to that receives the vast majority of those fixes -as time and bandwidth warrants. The oldest supported release line will receive -only security fixes directly. - -All supported release lines will accept external pull requests to backport -fixes previously merged to `main`, though this may be on a case-by-case -basis for some older supported lines. All contested decisions around release -line backports will be resolved by the [Releases Working Group](https://github.com/electron/governance/tree/main/wg-releases) as an agenda item at their weekly meeting the week the backport PR is raised. - -When an API is changed or removed in a way that breaks existing functionality, the -previous functionality will be supported for a minimum of two major versions when -possible before being removed. For example, if a function takes three arguments, -and that number is reduced to two in major version 10, the three-argument version would -continue to work until, at minimum, major version 12. Past the minimum two-version -threshold, we will attempt to support backwards compatibility beyond two versions -until the maintainers feel the maintenance burden is too high to continue doing so. - -### Currently supported versions - -* 19.x.y -* 18.x.y -* 17.x.y -* 16.x.y - -### End-of-life - -When a release branch reaches the end of its support cycle, the series -will be deprecated in NPM and a final end-of-support release will be -made. This release will add a warning to inform that an unsupported -version of Electron is in use. - -These steps are to help app developers learn when a branch they're -using becomes unsupported, but without being excessively intrusive -to end users. - -If an application has exceptional circumstances and needs to stay -on an unsupported series of Electron, developers can silence the -end-of-support warning by omitting the final release from the app's -`package.json` `devDependencies`. For example, since the 1-6-x series -ended with an end-of-support 1.6.18 release, developers could choose -to stay in the 1-6-x series without warnings with `devDependency` of -`"electron": 1.6.0 - 1.6.17`. - -## Supported Platforms - -Following platforms are supported by Electron: - -### macOS - -Only 64bit binaries are provided for macOS, and the minimum macOS version -supported is macOS 10.11 (El Capitan). - -Native support for Apple Silicon (`arm64`) devices was added in Electron 11.0.0. - -### Windows - -Windows 7 and later are supported, older operating systems are not supported -(and do not work). - -Both `ia32` (`x86`) and `x64` (`amd64`) binaries are provided for Windows. -[Native support for Windows on Arm (`arm64`) devices was added in Electron 6.0.8.](windows-arm.md). -Running apps packaged with previous versions is possible using the ia32 binary. - -### Linux - -The prebuilt binaries of Electron are built on Ubuntu 18.04. - -Whether the prebuilt binary can run on a distribution depends on whether the -distribution includes the libraries that Electron is linked to on the building -platform, so only Ubuntu 18.04 is guaranteed to work, but following platforms -are also verified to be able to run the prebuilt binaries of Electron: - -* Ubuntu 14.04 and newer -* Fedora 24 and newer -* Debian 8 and newer +* For information on supported releases, see the [Electron Releases](./electron-timelines.md) doc. +* For community support on Electron, see the [Community page](https://www.electronjs.org/community). +* For platform support info, see the [README](https://github.com/electron/electron/blob/main/README.md). From 283fa2b79d44cd18b9d4865edaf65a3e107207ce Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 28 Feb 2022 23:59:27 +0100 Subject: [PATCH 071/811] fix: macOS tray icon alternate images (#33026) --- shell/browser/ui/tray_icon_cocoa.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shell/browser/ui/tray_icon_cocoa.mm b/shell/browser/ui/tray_icon_cocoa.mm index 382ed5df7c97f..0a37e4fea727e 100644 --- a/shell/browser/ui/tray_icon_cocoa.mm +++ b/shell/browser/ui/tray_icon_cocoa.mm @@ -93,6 +93,15 @@ - (void)setImage:(NSImage*)image { - (void)setAlternateImage:(NSImage*)image { [[statusItem_ button] setAlternateImage:image]; + + // We need to change the button type here because the default button type for + // NSStatusItem, NSStatusBarButton, does not display alternate content when + // clicked. NSButtonTypeMomentaryChange displays its alternate content when + // clicked and returns to its normal content when the user releases it, which + // is the behavior users would expect when clicking a button with an alternate + // image set. + [[statusItem_ button] setButtonType:NSButtonTypeMomentaryChange]; + [self updateDimensions]; } - (void)setIgnoreDoubleClickEvents:(BOOL)ignore { From 7cb62bfc22c5919d76b9800432d3c776a0266f72 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Tue, 1 Mar 2022 14:14:11 -0800 Subject: [PATCH 072/811] test: BrowserWindow backgroundColor and transparency (#31017) * test: BrowserWindow backgroundColor * test: allow similar colors * test: disable linux capturing * refactor: split screen capture from reading pixel color --- spec-main/api-browser-window-spec.ts | 65 ++++++++++++++ .../fixtures/pages/half-background-color.html | 20 +++++ spec-main/screen-helpers.ts | 87 +++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 spec-main/fixtures/pages/half-background-color.html create mode 100644 spec-main/screen-helpers.ts diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 70d57977af6a0..8c9c45e60282b 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -12,6 +12,7 @@ import { app, BrowserWindow, BrowserView, dialog, ipcMain, OnBeforeSendHeadersLi import { emittedOnce, emittedUntil, emittedNTimes } from './events-helpers'; import { ifit, ifdescribe, defer, delay } from './spec-helpers'; import { closeWindow, closeAllWindows } from './window-helpers'; +import { areColorsSimilar, captureScreen, CHROMA_COLOR_HEX, getPixelColor } from './screen-helpers'; const features = process._linkedBinding('electron_common_features'); const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures'); @@ -4872,5 +4873,69 @@ describe('BrowserWindow module', () => { w.setBounds(newBounds); expect(w.getBounds()).to.deep.equal(newBounds); }); + + // Linux doesn't return any capture sources. + ifit(process.platform !== 'linux')('should not display a visible background', async () => { + const display = screen.getPrimaryDisplay(); + + const backgroundWindow = new BrowserWindow({ + ...display.bounds, + frame: false, + backgroundColor: CHROMA_COLOR_HEX, + hasShadow: false + }); + + await backgroundWindow.loadURL('about:blank'); + + const foregroundWindow = new BrowserWindow({ + ...display.bounds, + show: true, + transparent: true, + frame: false, + hasShadow: false + }); + + foregroundWindow.loadFile(path.join(__dirname, 'fixtures', 'pages', 'half-background-color.html')); + await emittedOnce(foregroundWindow, 'ready-to-show'); + + const screenCapture = await captureScreen(); + const leftHalfColor = getPixelColor(screenCapture, { + x: display.size.width / 4, + y: display.size.height / 2 + }); + const rightHalfColor = getPixelColor(screenCapture, { + x: display.size.width - (display.size.width / 4), + y: display.size.height / 2 + }); + + expect(areColorsSimilar(leftHalfColor, CHROMA_COLOR_HEX)).to.be.true(); + expect(areColorsSimilar(rightHalfColor, '#ff0000')).to.be.true(); + }); + }); + + describe('"backgroundColor" option', () => { + afterEach(closeAllWindows); + + // Linux doesn't return any capture sources. + ifit(process.platform !== 'linux')('should display the set color', async () => { + const display = screen.getPrimaryDisplay(); + + const w = new BrowserWindow({ + ...display.bounds, + show: true, + backgroundColor: CHROMA_COLOR_HEX + }); + + w.loadURL('about:blank'); + await emittedOnce(w, 'ready-to-show'); + + const screenCapture = await captureScreen(); + const centerColor = getPixelColor(screenCapture, { + x: display.size.width / 2, + y: display.size.height / 2 + }); + + expect(areColorsSimilar(centerColor, CHROMA_COLOR_HEX)).to.be.true(); + }); }); }); diff --git a/spec-main/fixtures/pages/half-background-color.html b/spec-main/fixtures/pages/half-background-color.html new file mode 100644 index 0000000000000..07e5ccdcadf90 --- /dev/null +++ b/spec-main/fixtures/pages/half-background-color.html @@ -0,0 +1,20 @@ + + + + + + + + +
+ + diff --git a/spec-main/screen-helpers.ts b/spec-main/screen-helpers.ts new file mode 100644 index 0000000000000..26fbcb8ea2b08 --- /dev/null +++ b/spec-main/screen-helpers.ts @@ -0,0 +1,87 @@ +import * as path from 'path'; +import * as fs from 'fs'; +import { screen, desktopCapturer, NativeImage } from 'electron'; + +const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures'); + +/** Chroma key green. */ +export const CHROMA_COLOR_HEX = '#00b140'; + +/** + * Capture the screen at the given point. + * + * NOTE: Not yet supported on Linux in CI due to empty sources list. + */ +export const captureScreen = async (point: Electron.Point = { x: 0, y: 0 }): Promise => { + const display = screen.getDisplayNearestPoint(point); + const sources = await desktopCapturer.getSources({ types: ['screen'], thumbnailSize: display.size }); + // Toggle to save screen captures for debugging. + const DEBUG_CAPTURE = false; + if (DEBUG_CAPTURE) { + for (const source of sources) { + await fs.promises.writeFile(path.join(fixtures, `screenshot_${source.display_id}.png`), source.thumbnail.toPNG()); + } + } + const screenCapture = sources.find(source => source.display_id === `${display.id}`); + // Fails when HDR is enabled on Windows. + // https://bugs.chromium.org/p/chromium/issues/detail?id=1247730 + if (!screenCapture) { + const displayIds = sources.map(source => source.display_id); + throw new Error(`Unable to find screen capture for display '${display.id}'\n\tAvailable displays: ${displayIds.join(', ')}`); + } + return screenCapture.thumbnail; +}; + +const formatHexByte = (val: number): string => { + const str = val.toString(16); + return str.length === 2 ? str : `0${str}`; +}; + +/** + * Get the hex color at the given pixel coordinate in an image. + */ +export const getPixelColor = (image: Electron.NativeImage, point: Electron.Point): string => { + const pixel = image.crop({ ...point, width: 1, height: 1 }); + // TODO(samuelmaddock): NativeImage.toBitmap() should return the raw pixel + // color, but it sometimes differs. Why is that? + const [b, g, r] = pixel.toBitmap(); + return `#${formatHexByte(r)}${formatHexByte(g)}${formatHexByte(b)}`; +}; + +const hexToRgba = (hexColor: string) => { + const match = hexColor.match(/^#([0-9a-fA-F]{6,8})$/); + if (!match) return; + + const colorStr = match[1]; + return [ + parseInt(colorStr.substring(0, 2), 16), + parseInt(colorStr.substring(2, 4), 16), + parseInt(colorStr.substring(4, 6), 16), + parseInt(colorStr.substring(6, 8), 16) || 0xFF + ]; +}; + +/** Calculate euclidian distance between colors. */ +const colorDistance = (hexColorA: string, hexColorB: string) => { + const colorA = hexToRgba(hexColorA); + const colorB = hexToRgba(hexColorB); + if (!colorA || !colorB) return -1; + return Math.sqrt( + Math.pow(colorB[0] - colorA[0], 2) + + Math.pow(colorB[1] - colorA[1], 2) + + Math.pow(colorB[2] - colorA[2], 2) + ); +}; + +/** + * Determine if colors are similar based on distance. This can be useful when + * comparing colors which may differ based on lossy compression. + */ +export const areColorsSimilar = ( + hexColorA: string, + hexColorB: string, + distanceThreshold = 90 +): boolean => { + const distance = colorDistance(hexColorA, hexColorB); + return distance <= distanceThreshold; +}; From 306147ddf5e529e0455caa51101a7e6870f23196 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 1 Mar 2022 14:16:37 -0800 Subject: [PATCH 073/811] fix: disable partition alloc on mac (#33114) --- patches/chromium/.patches | 1 + ...build_disable_partition_alloc_on_mac.patch | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 patches/chromium/build_disable_partition_alloc_on_mac.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 174a219c8b744..65d9285761986 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -111,3 +111,4 @@ fix_dont_delete_SerialPortManager_on_main_thread.patch 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 diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch new file mode 100644 index 0000000000000..944a1f80f3927 --- /dev/null +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 1 Mar 2022 12:07:25 -0800 +Subject: build: disable partition alloc on mac + +Enabling partition alloc caused a crash when spawning +a child process. This patch disables partition alloc for mac, +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 +--- a/base/allocator/allocator.gni ++++ b/base/allocator/allocator.gni +@@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug) + + # - NaCl: No plans to support it. + # - iOS: not done yet. +-_is_partition_alloc_platform = !is_nacl && !is_ios ++_is_partition_alloc_platform = !is_nacl && !is_ios && !is_mac + + # Under Windows Debug the allocator shim is not compatible with CRT. + # NaCl in particular does seem to link some binaries statically From ebd80a06022c6208c350ea9c70047caa422012ee Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 1 Mar 2022 14:20:07 -0800 Subject: [PATCH 074/811] fix: max window size defaults to 0 (#33025) --- shell/browser/native_window.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 74ef7d1bf9e5e..6e42c30304943 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -161,16 +161,25 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) { // On Linux and Window we may already have maximum size defined. extensions::SizeConstraints size_constraints( use_content_size ? GetContentSizeConstraints() : GetSizeConstraints()); + int min_width = size_constraints.GetMinimumSize().width(); int min_height = size_constraints.GetMinimumSize().height(); options.Get(options::kMinWidth, &min_width); options.Get(options::kMinHeight, &min_height); size_constraints.set_minimum_size(gfx::Size(min_width, min_height)); - int max_width = size_constraints.GetMaximumSize().width(); - int max_height = size_constraints.GetMaximumSize().height(); - options.Get(options::kMaxWidth, &max_width); - options.Get(options::kMaxHeight, &max_height); - size_constraints.set_maximum_size(gfx::Size(max_width, max_height)); + + gfx::Size max_size = size_constraints.GetMaximumSize(); + int max_width = max_size.width() > 0 ? max_size.width() : INT_MAX; + int max_height = max_size.height() > 0 ? max_size.height() : INT_MAX; + bool have_max_width = options.Get(options::kMaxWidth, &max_width); + bool have_max_height = options.Get(options::kMaxHeight, &max_height); + + // By default the window has a default maximum size that prevents it + // from being resized larger than the screen, so we should only set this + // if th user has passed in values. + if (have_max_height || have_max_width || !max_size.IsEmpty()) + size_constraints.set_maximum_size(gfx::Size(max_width, max_height)); + if (use_content_size) { SetContentSizeConstraints(size_constraints); } else { From 318c91b78cf59f6bc5594b83724feb12159c2405 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 16:48:02 -0800 Subject: [PATCH 075/811] Revert "Bump v19.0.0-nightly.20220228" This reverts commit 998c85af131b28c9f7e37b4833e96760a9cd6bf1. --- 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 caf0f88d626a1..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220228 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index 873d16c36ec2b..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220228", + "version": "19.0.0-nightly.20220224", "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 6cad93bff94d6..d08e9317043cd 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 19,0,0,20220228 - PRODUCTVERSION 19,0,0,20220228 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d9bf02d9b64c56009703e754513486f1c84a74df Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 05:01:04 -0800 Subject: [PATCH 076/811] Bump v19.0.0-nightly.20220302 --- 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 a6a5f8ce0ccfc..df13fb751cdbc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220302 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..6aa18a88567d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220302", "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 d08e9317043cd..c72320eb30844 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220302 + PRODUCTVERSION 19,0,0,20220302 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c040305db4f94f12495a95ddbb1636e0c67a1937 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 08:56:25 -0800 Subject: [PATCH 077/811] Revert "Bump v19.0.0-nightly.20220302" This reverts commit d9bf02d9b64c56009703e754513486f1c84a74df. --- 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 df13fb751cdbc..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220302 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index 6aa18a88567d1..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220302", + "version": "19.0.0-nightly.20220224", "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 c72320eb30844..d08e9317043cd 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 19,0,0,20220302 - PRODUCTVERSION 19,0,0,20220302 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f71a6db3fff711b27b4b4120343e2a568ca42cc1 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 2 Mar 2022 16:57:26 -0800 Subject: [PATCH 078/811] ci: disable use-thin-lto on Mac only (#33115) * build: remove use_thin_lto = false * ci: enabling if things get really bad (all darwin) * build: lol don't enable that * build: add patch to disable thin lto for mac --- build/args/all.gn | 3 --- patches/chromium/.patches | 1 + .../build_disable_thin_lto_on_mac.patch | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 patches/chromium/build_disable_thin_lto_on_mac.patch diff --git a/build/args/all.gn b/build/args/all.gn index 332a3660fd292..a346a9b3d4939 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -35,9 +35,6 @@ enable_pseudolocales = false is_cfi = false -# This consumes a bit too much disk space on macOS -use_thin_lto = false - # Make application name configurable at runtime for cookie crypto allow_runtime_configurable_key_storage = true diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 65d9285761986..995bb12ffa7c7 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -112,3 +112,4 @@ 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 diff --git a/patches/chromium/build_disable_thin_lto_on_mac.patch b/patches/chromium/build_disable_thin_lto_on_mac.patch new file mode 100644 index 0000000000000..f5ffa86766c1a --- /dev/null +++ b/patches/chromium/build_disable_thin_lto_on_mac.patch @@ -0,0 +1,22 @@ +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 89725f31bf014dfc076d7df1083c8875d7914a70 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 05:02:08 -0800 Subject: [PATCH 079/811] Bump v19.0.0-nightly.20220303 --- 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 a6a5f8ce0ccfc..3ad593042d37d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220303 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..3206ab236ea60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220303", "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 d08e9317043cd..fd2efd8528395 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220303 + PRODUCTVERSION 19,0,0,20220303 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 62366aeb95f0ec352abd4fdf320d8fc4e65d7bf7 Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Thu, 3 Mar 2022 09:56:00 -0800 Subject: [PATCH 080/811] docs: remove platform notices from tutorial titles (#32937) * docs: remove platform notices from tutorial titles * Update docs/tutorial/launch-app-from-url-in-another-app.md Co-authored-by: Mark Lee Co-authored-by: Mark Lee --- docs/tutorial/in-app-purchases.md | 9 ++++++++- .../launch-app-from-url-in-another-app.md | 6 +++--- docs/tutorial/linux-desktop-actions.md | 11 +++++++++-- docs/tutorial/macos-dock.md | 15 ++++++++------- docs/tutorial/progress-bar.md | 9 ++++++++- docs/tutorial/recent-documents.md | 9 ++++++++- docs/tutorial/represented-file.md | 9 ++++++++- docs/tutorial/windows-taskbar.md | 9 ++++++++- 8 files changed, 60 insertions(+), 17 deletions(-) diff --git a/docs/tutorial/in-app-purchases.md b/docs/tutorial/in-app-purchases.md index d4a27c854f6c5..ced192ba296cc 100644 --- a/docs/tutorial/in-app-purchases.md +++ b/docs/tutorial/in-app-purchases.md @@ -1,4 +1,11 @@ -# In-App Purchases (macOS) +--- +title: In-App Purchases +description: Add in-app purchases to your Mac App Store (MAS) application +slug: in-app-purchases +hide_title: true +--- + +# In-App Purchases ## Preparing diff --git a/docs/tutorial/launch-app-from-url-in-another-app.md b/docs/tutorial/launch-app-from-url-in-another-app.md index d02b28075d514..d99c1f9503342 100644 --- a/docs/tutorial/launch-app-from-url-in-another-app.md +++ b/docs/tutorial/launch-app-from-url-in-another-app.md @@ -1,11 +1,11 @@ --- -title: Launching Your Electron App From a URL In Another App -description: This guide will take you through the process of setting your electron app as the default handler for a specific protocol. +title: Deep Links +description: Set your Electron app as the default handler for a specific protocol. slug: launch-app-from-url-in-another-app hide_title: true --- -# Launching Your Electron App From A URL In Another App +# Deep Links ## Overview diff --git a/docs/tutorial/linux-desktop-actions.md b/docs/tutorial/linux-desktop-actions.md index 5fa3c5abedaba..7f09d0a4e5255 100644 --- a/docs/tutorial/linux-desktop-actions.md +++ b/docs/tutorial/linux-desktop-actions.md @@ -1,4 +1,11 @@ -# Desktop Launcher Actions (Linux) +--- +title: Desktop Launcher Actions +description: Add actions to the system launcher on Linux environments. +slug: linux-desktop-actions +hide_title: true +--- + +# Desktop Launcher Actions ## Overview @@ -42,4 +49,4 @@ parameters. You can find them in your application in the global variable [unity-launcher]: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles#Adding_shortcuts_to_a_launcher [audacious-launcher]: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles?action=AttachFile&do=get&target=shortcuts.png -[spec]: https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s11.html +[spec]: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html diff --git a/docs/tutorial/macos-dock.md b/docs/tutorial/macos-dock.md index 0a080e763d01f..38cfcb48e6240 100644 --- a/docs/tutorial/macos-dock.md +++ b/docs/tutorial/macos-dock.md @@ -1,4 +1,11 @@ -# Dock (macOS) +--- +title: Dock +description: Configure your application's Dock presence on macOS. +slug: macos-dock +hide_title: true +--- + +# Dock Electron has APIs to configure the app's icon in the macOS Dock. A macOS-only API exists to create a custom dock menu, but Electron also uses the app dock @@ -16,12 +23,6 @@ To set your custom dock menu, you need to use the [`app.dock.setMenu`](../api/dock.md#docksetmenumenu-macos) API, which is only available on macOS. -## Example - -Starting with a working application from the - [Quick Start Guide](quick-start.md), update the `main.js` file with the - following lines: - ```javascript fiddle='docs/fiddles/features/macos-dock-menu' const { app, BrowserWindow, Menu } = require('electron') diff --git a/docs/tutorial/progress-bar.md b/docs/tutorial/progress-bar.md index 58bdab8e8def7..9df75ab96e8b5 100644 --- a/docs/tutorial/progress-bar.md +++ b/docs/tutorial/progress-bar.md @@ -1,4 +1,11 @@ -# Taskbar Progress Bar (Windows & macOS) +--- +title: Progress Bars +description: Provide progress information to users outside of a BrowserWindow. +slug: progress-bar +hide_title: true +--- + +# Progress Bars ## Overview diff --git a/docs/tutorial/recent-documents.md b/docs/tutorial/recent-documents.md index 8923b177806bb..f1ca0c3251cb8 100644 --- a/docs/tutorial/recent-documents.md +++ b/docs/tutorial/recent-documents.md @@ -1,4 +1,11 @@ -# Recent Documents (Windows & macOS) +--- +title: Recent Documents +description: Provide a list of recent documents via Windows JumpList or macOS Dock +slug: recent-documents +hide_title: true +--- + +# Recent Documents ## Overview diff --git a/docs/tutorial/represented-file.md b/docs/tutorial/represented-file.md index 7d703a37b4ff3..a4d94d20154b1 100644 --- a/docs/tutorial/represented-file.md +++ b/docs/tutorial/represented-file.md @@ -1,4 +1,11 @@ -# Representing Files in a BrowserWindow (macOS) +--- +title: Representing Files in a BrowserWindow +description: Set a represented file in the macOS title bar. +slug: represented-file +hide_title: true +--- + +# Representing Files in a BrowserWindow ## Overview diff --git a/docs/tutorial/windows-taskbar.md b/docs/tutorial/windows-taskbar.md index 1d88846a13a18..444c712b3607b 100644 --- a/docs/tutorial/windows-taskbar.md +++ b/docs/tutorial/windows-taskbar.md @@ -1,4 +1,11 @@ -# Taskbar Customization (Windows) +--- +title: Taskbar Customization +description: Customize the look and feel of your app's Windows taskbar presence. +slug: windows-taskbar +hide_title: true +--- + +# Taskbar Customization ## Overview From 41c81ed066116e8649548a90661c9c8f830b288c Mon Sep 17 00:00:00 2001 From: Alvin Philips Date: Fri, 4 Mar 2022 05:05:51 +0530 Subject: [PATCH 081/811] docs: Updated list numbering (#32991) * docs: Updated list numbering The steps to package and distribute an application using electron had incorrect numbering * Indented text within ordered list sections * Removed single space * Fixed indentation --- docs/tutorial/quick-start.md | 86 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index 91c3317d336d6..d7252ac16bfdc 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 - -✔ 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. - -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 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 + + We have ATTEMPTED to convert your app to be in a format that electron-forge understands. + + Thanks for using "electron-forge"!!! + ``` + +2. 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 + ``` From 3663f8e0ae8f4f4a7a4825f5cde48ad96791f27b Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 3 Mar 2022 16:57:21 -0800 Subject: [PATCH 082/811] ci: use larger machine for docs only check (#33141) --- .circleci/build_config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 6e6dd01cb720a..0175d1fd97e90 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -1552,11 +1552,9 @@ commands: jobs: # Layer 0: Docs. Standalone. ts-compile-doc-change: - executor: - name: linux-docker - size: medium + executor: linux-docker environment: - <<: *env-linux-medium + <<: *env-linux-2xlarge <<: *env-testing-build GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' <<: *steps-electron-ts-compile-for-doc-change From 7beffb51fc984a68018ba454434871b939d7ea65 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Sat, 5 Mar 2022 15:55:12 -0800 Subject: [PATCH 083/811] Revert "Bump v19.0.0-nightly.20220303" This reverts commit 89725f31bf014dfc076d7df1083c8875d7914a70. --- 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 3ad593042d37d..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220303 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index 3206ab236ea60..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220303", + "version": "19.0.0-nightly.20220224", "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 fd2efd8528395..d08e9317043cd 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 19,0,0,20220303 - PRODUCTVERSION 19,0,0,20220303 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b43f7702c8acf15051b9745efd72bcfdb897fcd2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 05:01:43 -0800 Subject: [PATCH 084/811] Bump v19.0.0-nightly.20220307 --- 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 a6a5f8ce0ccfc..2a242a4934c89 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220307 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..b7620087e0bad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220307", "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 d08e9317043cd..edb1d40954d8e 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220307 + PRODUCTVERSION 19,0,0,20220307 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f45aaea537411c124b8f8a782d335633d08b2137 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 7 Mar 2022 06:18:58 -0800 Subject: [PATCH 085/811] test: disable newly added tests on WOA (#33143) * tests: disable newly added tests on WOA * test: also disable test on arm64 macOS --- spec-main/api-browser-window-spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 8c9c45e60282b..1e9405e0aa3c8 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4874,8 +4874,8 @@ describe('BrowserWindow module', () => { expect(w.getBounds()).to.deep.equal(newBounds); }); - // Linux doesn't return any capture sources. - ifit(process.platform !== 'linux')('should not display a visible background', async () => { + // Linux and arm64 platforms (WOA and macOS) do not return any capture sources + ifit(process.platform !== 'linux' && process.arch !== 'arm64')('should not display a visible background', async () => { const display = screen.getPrimaryDisplay(); const backgroundWindow = new BrowserWindow({ @@ -4916,8 +4916,8 @@ describe('BrowserWindow module', () => { describe('"backgroundColor" option', () => { afterEach(closeAllWindows); - // Linux doesn't return any capture sources. - ifit(process.platform !== 'linux')('should display the set color', async () => { + // Linux/WOA doesn't return any capture sources. + ifit(process.platform !== 'linux' && (process.platform !== 'win32' || process.arch !== 'arm64'))('should display the set color', async () => { const display = screen.getPrimaryDisplay(); const w = new BrowserWindow({ From 94a85cb191a4a4a3e3c91de35e88322b1d72deab Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 09:23:13 -0800 Subject: [PATCH 086/811] Revert "Bump v19.0.0-nightly.20220307" This reverts commit b43f7702c8acf15051b9745efd72bcfdb897fcd2. --- 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 2a242a4934c89..a6a5f8ce0ccfc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220307 \ No newline at end of file +19.0.0-nightly.20220224 \ No newline at end of file diff --git a/package.json b/package.json index b7620087e0bad..7a4f69d852f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220307", + "version": "19.0.0-nightly.20220224", "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 edb1d40954d8e..d08e9317043cd 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 19,0,0,20220307 - PRODUCTVERSION 19,0,0,20220307 + FILEVERSION 19,0,0,20220224 + PRODUCTVERSION 19,0,0,20220224 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a1c01ded9c988c082ec51bc76a33b547216e39e3 Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Mon, 7 Mar 2022 11:49:50 -0800 Subject: [PATCH 087/811] fix: really strip crashpad handler binary (#33126) --- 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 67eed8ddb10f0..9ef44a43fe3d9 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -15,7 +15,7 @@ LINUX_BINARIES = [ 'chrome-sandbox', - 'crashpad_handler', + 'chrome_crashpad_handler', 'electron', 'libEGL.so', 'libGLESv2.so', From 0ff1727ec09003fced33dad2e2e3145bd8ece79e Mon Sep 17 00:00:00 2001 From: Chuion <71601036+chuion@users.noreply.github.com> Date: Tue, 8 Mar 2022 06:04:58 +0800 Subject: [PATCH 088/811] docs: fix missing dependencies in ipc patterns (#33082) --- docs/fiddles/ipc/pattern-2/main.js | 2 +- docs/fiddles/ipc/pattern-3/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fiddles/ipc/pattern-2/main.js b/docs/fiddles/ipc/pattern-2/main.js index 743c7c4d2d312..5492a7d159297 100644 --- a/docs/fiddles/ipc/pattern-2/main.js +++ b/docs/fiddles/ipc/pattern-2/main.js @@ -1,4 +1,4 @@ -const {app, BrowserWindow, ipcMain,dialog} = require('electron') +const {app, BrowserWindow, ipcMain, dialog} = require('electron') const path = require('path') async function handleFileOpen() { diff --git a/docs/fiddles/ipc/pattern-3/main.js b/docs/fiddles/ipc/pattern-3/main.js index 13d7a1ab60cfb..357aa64e0fb43 100644 --- a/docs/fiddles/ipc/pattern-3/main.js +++ b/docs/fiddles/ipc/pattern-3/main.js @@ -1,4 +1,4 @@ -const {app, BrowserWindow, Menu} = require('electron') +const {app, BrowserWindow, Menu, ipcMain} = require('electron') const path = require('path') function createWindow () { From 12aa991df2acd9e62f5c17325e5e81fa6dfffd74 Mon Sep 17 00:00:00 2001 From: Makonede <61922615+Makonede@users.noreply.github.com> Date: Mon, 7 Mar 2022 14:17:12 -0800 Subject: [PATCH 089/811] Fix a typo (#33042) --- 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 140eaaa2284a0..bc407ede48021 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -64,7 +64,7 @@ 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. +to set `backgroundColor` to make the app feel more native. ## Parent and child windows From 3d9b9b97cfcfe34411e359d504e9b8a772622d56 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 7 Mar 2022 15:47:58 -0800 Subject: [PATCH 090/811] build: put v8_context_snapshot_generator.dSYM in its own zip file (#33183) --- script/release/release.js | 4 ++++ script/release/uploaders/upload.py | 7 ++++++- script/zip-symbols.py | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/script/release/release.js b/script/release/release.js index e10311e4faa8d..3527f39ce2bd3 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -107,9 +107,11 @@ function assetsForVersion (version, validatingRelease) { `chromedriver-${version}-win32-x64.zip`, `chromedriver-${version}-win32-arm64.zip`, `electron-${version}-darwin-x64-dsym.zip`, + `electron-${version}-darwin-x64-dsym-snapshot.zip`, `electron-${version}-darwin-x64-symbols.zip`, `electron-${version}-darwin-x64.zip`, `electron-${version}-darwin-arm64-dsym.zip`, + `electron-${version}-darwin-arm64-dsym-snapshot.zip`, `electron-${version}-darwin-arm64-symbols.zip`, `electron-${version}-darwin-arm64.zip`, `electron-${version}-linux-arm64-symbols.zip`, @@ -122,9 +124,11 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-linux-x64-symbols.zip`, `electron-${version}-linux-x64.zip`, `electron-${version}-mas-x64-dsym.zip`, + `electron-${version}-mas-x64-dsym-snapshot.zip`, `electron-${version}-mas-x64-symbols.zip`, `electron-${version}-mas-x64.zip`, `electron-${version}-mas-arm64-dsym.zip`, + `electron-${version}-mas-arm64-dsym-snapshot.zip`, `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, `electron-${version}-win32-ia32-pdb.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index b021f91dadf9d..8b86a1d4884ea 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -33,6 +33,8 @@ DIST_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION) SYMBOLS_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols') DSYM_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'dsym') +DSYM_SNAPSHOT_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, + 'dsym-snapshot') PDB_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'pdb') DEBUG_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'debug') TOOLCHAIN_PROFILE_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, @@ -88,6 +90,10 @@ def main(): dsym_zip = os.path.join(OUT_DIR, DSYM_NAME) shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip) upload_electron(release, dsym_zip, args) + + dsym_snaphot_zip = os.path.join(OUT_DIR, DSYM_SNAPSHOT_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip) + upload_electron(release, dsym_snaphot_zip, args) elif PLATFORM == 'win32': pdb_zip = os.path.join(OUT_DIR, PDB_NAME) shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) @@ -154,7 +160,6 @@ def main(): 'toolchain_profile.json') upload_electron(release, toolchain_profile_zip, args) - def parse_args(): parser = argparse.ArgumentParser(description='upload distribution file') parser.add_argument('-v', '--version', help='Specify the version', diff --git a/script/zip-symbols.py b/script/zip-symbols.py index 99ce7f6b52baa..23521e823053f 100755 --- a/script/zip-symbols.py +++ b/script/zip-symbols.py @@ -33,9 +33,17 @@ def main(): dsym_name = 'dsym.zip' with scoped_cwd(args.build_dir): dsyms = glob.glob('*.dSYM') + snapshot_dsyms = ['v8_context_snapshot_generator.dSYM'] + for dsym in snapshot_dsyms: + if (dsym in dsyms): + dsyms.remove(dsym) dsym_zip_file = os.path.join(args.build_dir, dsym_name) print('Making dsym zip: ' + dsym_zip_file) make_zip(dsym_zip_file, licenses, dsyms) + dsym_snapshot_name = 'dsym-snapshot.zip' + dsym_snapshot_zip_file = os.path.join(args.build_dir, dsym_snapshot_name) + print('Making dsym snapshot zip: ' + dsym_snapshot_zip_file) + make_zip(dsym_snapshot_zip_file, licenses, snapshot_dsyms) if len(dsyms) > 0 and 'DELETE_DSYMS_AFTER_ZIP' in os.environ: execute(['rm', '-rf'] + dsyms) elif PLATFORM == 'win32': From aa8119515f87d87716345cf454da5113e700ab69 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Mon, 7 Mar 2022 16:52:40 -0800 Subject: [PATCH 091/811] fix: gracefully fail if app.configureHostResolver is called before ready (#33062) --- shell/browser/api/electron_api_app.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index d2de05d363ff2..bcc96086557f8 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1630,6 +1630,11 @@ v8::Local App::GetDockAPI(v8::Isolate* isolate) { void ConfigureHostResolver(v8::Isolate* isolate, const gin_helper::Dictionary& opts) { gin_helper::ErrorThrower thrower(isolate); + if (!Browser::Get()->is_ready()) { + thrower.ThrowError( + "configureHostResolver cannot be called before the app is ready"); + return; + } net::SecureDnsMode secure_dns_mode = net::SecureDnsMode::kOff; std::string default_doh_templates; if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) { From a5a4818b67174e91860b36aa717ee63d6058fb64 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 7 Mar 2022 18:40:28 -0800 Subject: [PATCH 092/811] chore: add ignore revs file for GH blame UI (#33171) --- .git-blame-ignore-revs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000000..198363a8ae8fb --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,5 @@ +# Atom --> Electron rename +d9321f4df751fa32813fab1b6387bbd61bd681d0 +34c4c8d5088fa183f56baea28809de6f2a427e02 +# Enable JS Semicolons +5d657dece4102e5e5304d42e8004b6ad64c0fcda From a20216de7a1fe71057862aa429484e5f8af35537 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 05:01:16 -0800 Subject: [PATCH 093/811] Bump v19.0.0-nightly.20220308 --- 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 a6a5f8ce0ccfc..49ae2ccc9e679 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220224 \ No newline at end of file +19.0.0-nightly.20220308 \ No newline at end of file diff --git a/package.json b/package.json index 7a4f69d852f58..7012c583db14e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220224", + "version": "19.0.0-nightly.20220308", "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 d08e9317043cd..8d84f50990408 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 19,0,0,20220224 - PRODUCTVERSION 19,0,0,20220224 + FILEVERSION 19,0,0,20220308 + PRODUCTVERSION 19,0,0,20220308 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3bc3896ee75df30883be05e064d6cbd7d74dd609 Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Tue, 8 Mar 2022 11:15:05 -0800 Subject: [PATCH 094/811] docs: fix documented return value for getFocusedWebContents (#33170) --- 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 d4a1233c5976a..64af596682384 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -35,7 +35,7 @@ for all windows, webviews, opened devtools, and devtools extension background pa ### `webContents.getFocusedWebContents()` -Returns `WebContents` - The web contents that is focused in this application, otherwise +Returns `WebContents` | null - The web contents that is focused in this application, otherwise returns `null`. ### `webContents.fromId(id)` From b96f15bfc262edd88d5df8c3684484c894d08ce5 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 8 Mar 2022 20:38:15 +0100 Subject: [PATCH 095/811] fix: patches to use BUILDFLAG(IS_WIN) / BUILDFLAG(IS_MAC) checks (#33160) --- ...ransfer_to_requestsingleinstancelock.patch | 6 +++--- ...screen_rendering_with_viz_compositor.patch | 20 ++++++++++--------- ...media_key_usage_with_globalshortcuts.patch | 6 +++--- patches/chromium/process_singleton.patch | 10 +++++----- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index fd11a39b225c8..a609f4e83a6de 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 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9ebf13adab4 100644 +index 5a64220aaf1309832dc0ad543e353de67fe0a779..a568dd10d1ef8679d66f4cdc6a471c251cbcd4eb 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -18,6 +18,7 @@ @@ -49,7 +49,7 @@ index 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9eb + const std::vector additional_data, + const NotificationAckCallback& ack_callback)>; - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) ProcessSingleton(const std::string& program_name, const base::FilePath& user_data_dir, + const base::span additional_data, @@ -96,7 +96,7 @@ index 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9eb // 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 47e60bfd8239d4a2e292b835c49132bdbb751555..9861a884a15e79b36833e6df58897141acdc6718 100644 +index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65ddbfc332 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -148,7 +148,7 @@ const char kACKToken[] = "ACK"; 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 d2675bfa80b29..231ad6fe4f48e 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -226,10 +226,10 @@ index a480befb5d8db36e7e281d5033aeef0bea83d220..4e54acc897d08c87bccc3b44f68634e2 diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc new file mode 100644 -index 0000000000000000000000000000000000000000..4efea02f80f8b6818291321a7c63f0f4815a5b98 +index 0000000000000000000000000000000000000000..88aba74877a6490e08e357266b1ce8461b5b6dff --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.cc -@@ -0,0 +1,157 @@ +@@ -0,0 +1,158 @@ +// 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. @@ -239,6 +239,7 @@ index 0000000000000000000000000000000000000000..4efea02f80f8b6818291321a7c63f0f4 +#include "base/memory/unsafe_shared_memory_region.h" +#include "base/threading/thread_checker.h" +#include "base/trace_event/trace_event.h" ++#include "build/build_config.h" +#include "components/viz/common/resources/resource_sizes.h" +#include "components/viz/service/display_embedder/output_device_backing.h" +#include "mojo/public/cpp/system/platform_handle.h" @@ -247,7 +248,7 @@ index 0000000000000000000000000000000000000000..4efea02f80f8b6818291321a7c63f0f4 +#include "third_party/skia/include/core/SkCanvas.h" +#include "ui/gfx/skia_util.h" + -+#if defined(OS_WIN) ++#if BUILDFLAG(IS_WIN) +#include "skia/ext/skia_utils_win.h" +#include "ui/gfx/gdi_util.h" +#include "ui/gfx/win/hwnd_util.h" @@ -389,10 +390,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..fbc517e164d9bf33256c1ecbe86e31744375097e +index 0000000000000000000000000000000000000000..a80258d6165e45a3c3d2b551158ff7d2a5778a7c --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.h -@@ -0,0 +1,92 @@ +@@ -0,0 +1,93 @@ +// 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. @@ -400,20 +401,21 @@ index 0000000000000000000000000000000000000000..fbc517e164d9bf33256c1ecbe86e3174 +#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ +#define COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ + -+#if defined(OS_WIN) -+#include -+#endif -+ +#include + +#include "base/memory/shared_memory_mapping.h" +#include "base/threading/thread_checker.h" ++#include "build/build_config.h" +#include "components/viz/host/host_display_client.h" +#include "components/viz/service/display/software_output_device.h" +#include "components/viz/service/viz_service_export.h" +#include "services/viz/privileged/mojom/compositing/display_private.mojom.h" +#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" + ++#if BUILDFLAG(IS_WIN) ++#include ++#endif ++ +namespace viz { + +// Shared base class for SoftwareOutputDevice implementations. diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 2986f58de269f..7460a09ea3beb 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 ac923f436cbdd6ded0629da4e4c659d94258e55b..7e603dd5bad2a60b1bd7d9df569a10e838d797bc 100644 +index ac923f436cbdd6ded0629da4e4c659d94258e55b..43f9531075bcef87de8e60f24071f49fe4cd0891 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( @@ -68,9 +68,9 @@ index ac923f436cbdd6ded0629da4e4c659d94258e55b..7e603dd5bad2a60b1bd7d9df569a10e8 // Tell the underlying MediaKeysListener to listen for the key. - if (should_start_watching && media_keys_listener_ && + if ( -+#if defined(OS_MAC) ++#if BUILDFLAG(IS_MAC) + !media_key_handling_enabled_ && -+#endif // defined(OS_MAC) ++#endif // BUILDFLAG(IS_MAC) + should_start_watching && + media_keys_listener_ && !media_keys_listener_->StartWatchingMediaKey(key_code)) { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 58d5bc201d4af..565c00742ba81 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -24,14 +24,14 @@ 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 16bb3aa15a5378e8319f75f4b6b72b39177828f4..8f94cc300b58e8a94b6ca155aa3cf370bcb948d8 100644 +index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de67fe0a779 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -102,12 +102,19 @@ class ProcessSingleton { base::RepeatingCallback; -+#if defined(OS_WIN) ++#if BUILDFLAG(IS_WIN) + ProcessSingleton(const std::string& program_name, + const base::FilePath& user_data_dir, + bool is_sandboxed, @@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..8f94cc300b58e8a94b6ca155aa3cf370 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bdbb751555 100644 +index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -53,6 +53,7 @@ @@ -129,7 +129,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bd } +bool IsAppSandboxed() { -+#if defined(OS_MAC) ++#if BUILDFLAG(IS_MAC) + // NB: There is no sane API for this, we have to just guess by + // reading tea leaves + base::FilePath home_dir; @@ -140,7 +140,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bd + return home_dir.value().find("Library/Containers") != std::string::npos; +#else + return false; -+#endif // defined(OS_MAC) ++#endif // BUILDFLAG(IS_MAC) +} + bool ConnectSocket(ScopedSocket* socket, From 076bc58b2a15ff18ab07d67e23864aa7b4a4a9eb Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 8 Mar 2022 11:40:25 -0800 Subject: [PATCH 096/811] fix: crash when showin item in folder on DevTools (#33024) --- shell/browser/ui/inspectable_web_contents.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index b7e939c35d45f..150b2fcba242c 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -175,6 +175,10 @@ GURL GetDevToolsURL(bool can_dock) { return GURL(url_string); } +void OnOpenItemComplete(const base::FilePath& path, const std::string& result) { + platform_util::ShowItemInFolder(path); +} + constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250); constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10); @@ -737,9 +741,8 @@ void InspectableWebContents::ShowItemInFolder( return; base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path); - - // Pass empty callback here; we can ignore errors - platform_util::OpenPath(path, platform_util::OpenCallback()); + platform_util::OpenPath(path.DirName(), + base::BindOnce(&OnOpenItemComplete, path)); } void InspectableWebContents::SaveToFile(const std::string& url, From e41c3e960dd3a53c1f423c746b7079abb4359841 Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 8 Mar 2022 14:06:20 -0700 Subject: [PATCH 097/811] fix: non-client mouse events on WCO-enabled windows (#32871) --- patches/chromium/.patches | 1 + ...king_and_message_bubbling_on_windows.patch | 61 +++++++++++++++++++ .../electron_desktop_window_tree_host_win.cc | 17 ------ .../electron_desktop_window_tree_host_win.h | 1 - 4 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 995bb12ffa7c7..545165e4e06ad 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -113,3 +113,4 @@ 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 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 new file mode 100644 index 0000000000000..86a3c0fbc97be --- /dev/null +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: clavin +Date: Fri, 11 Feb 2022 15:05:42 -0700 +Subject: fix: non-client mouse tracking and message bubbling on windows + +It is not known why, but for some reason calling |DefWindowProc| on the parent +window handle causes a WM_NCMOUSELEAVE (non-client mouse exit) message to be +sent to the parent window, even though |TrackMouseEvent| is never called on it. + +This patch also adds some boilerplate for properly tracking non-client mouse +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 +--- 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, + WPARAM w_param, + LPARAM l_param, + BOOL& handled) { +- if (message == WM_MOUSEMOVE) { ++ if (message == WM_MOUSEMOVE || message == WM_NCMOUSEMOVE) { + if (!mouse_tracking_enabled_) { + mouse_tracking_enabled_ = true; + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof(tme); +- tme.dwFlags = TME_LEAVE; ++ tme.dwFlags = message == WM_NCMOUSEMOVE ? TME_NONCLIENT | TME_LEAVE : TME_LEAVE; + 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. + if (!handled && + (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) { +- ret = ::DefWindowProc(GetParent(), message, w_param, l_param); ++ ret = ::DefWindowProc(hwnd(), message, w_param, l_param); + handled = TRUE; + } + } +diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.h b/content/browser/renderer_host/legacy_render_widget_host_win.h +index 79dffd981f4d461f30bd3796cfba1457eda3a89d..ae378ce95f90989fd0e74c38b57f5f7dc0a1ee29 100644 +--- a/content/browser/renderer_host/legacy_render_widget_host_win.h ++++ b/content/browser/renderer_host/legacy_render_widget_host_win.h +@@ -105,6 +105,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND + MESSAGE_HANDLER_EX(WM_NCHITTEST, OnNCHitTest) + MESSAGE_RANGE_HANDLER(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, + OnMouseRange) ++ MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnMouseLeave) + MESSAGE_HANDLER_EX(WM_NCCALCSIZE, OnNCCalcSize) + MESSAGE_HANDLER_EX(WM_SIZE, OnSize) + MESSAGE_HANDLER_EX(WM_DESTROY, OnDestroy) 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 3600e273ea73b..2e4e5bc9502e4 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,21 +99,4 @@ 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 8c7be1175a193..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 @@ -36,7 +36,6 @@ 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 27527fe5ca790dc7061c6e816cc8b6ff72fe56d0 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 8 Mar 2022 15:39:53 -0800 Subject: [PATCH 098/811] feat: warn that preloads will be sandboxed by default in v20 (#32868) --- docs/breaking-changes.md | 19 +++++++++++++++++++ lib/browser/api/web-contents.ts | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index e603146d0372e..6d561f87bd75e 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -12,6 +12,25 @@ This document uses the following convention to categorize breaking changes: * **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release. * **Removed:** An API or feature was removed, and is no longer supported by Electron. +## Planned Breaking API Changes (20.0) + +### Default Changed: renderers without `nodeIntegration: true` are sandboxed by default + +Previously, renderers that specified a preload script defaulted to being +unsandboxed. This meant that by default, preload scripts had access to Node.js. +In Electron 20, this default has changed. Beginning in Electron 20, renderers +will be sandboxed by default, unless `nodeIntegration: true` or `sandbox: false` +is specified. + +If your preload scripts do not depend on Node, no action is needed. If your +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. + +## Planned Breaking API Changes (19.0) + +*None (yet)* + ## Planned Breaking API Changes (18.0) ### Removed: `nativeWindowOpen` diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 4e2cd4acbda74..cafe85cae4364 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -1,4 +1,4 @@ -import { app, ipcMain, session, webFrameMain } from 'electron/main'; +import { app, ipcMain, session, webFrameMain, deprecate } from 'electron/main'; import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main'; import * as url from 'url'; @@ -570,6 +570,10 @@ const loggingEnabled = () => { // Add JavaScript wrappers for WebContents class. WebContents.prototype._init = function () { + const prefs = this.getLastWebPreferences() || {}; + if (!prefs.nodeIntegration && (prefs.preload != null || prefs.preloadURL != null) && prefs.sandbox == null) { + deprecate.log('The default sandbox option for windows without nodeIntegration is changing. Presently, by default, when a window has a preload script, it defaults to being unsandboxed. In Electron 20, this default will be changing, and all windows that have nodeIntegration: false (which is the default) will be sandboxed by default. If your preload script doesn\'t use Node, no action is needed. If your preload script does use Node, either refactor it to move Node usage to the main process, or specify sandbox: false in your WebPreferences.'); + } // Read off the ID at construction time, so that it's accessible even after // the underlying C++ WebContents is destroyed. const id = this.id; From 373a9053199f8881cdec7d44b8f3524d68ae8223 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 8 Mar 2022 17:17:43 -0800 Subject: [PATCH 099/811] fix: settings not persisting across devtools loads (#33120) * fix: settings not persisting across devtools loads * chore: remove redundant RegisterPreference impl --- shell/browser/ui/inspectable_web_contents.cc | 119 +------------------ shell/browser/ui/inspectable_web_contents.h | 5 +- 2 files changed, 5 insertions(+), 119 deletions(-) diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 150b2fcba242c..4779ee6c77f1e 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -86,13 +86,6 @@ const char kChromeUIDevToolsRemoteFrontendPath[] = "serve_file"; const char kDevToolsBoundsPref[] = "electron.devtools.bounds"; const char kDevToolsZoomPref[] = "electron.devtools.zoom"; const char kDevToolsPreferences[] = "electron.devtools.preferences"; -const char kDevToolsSyncPreferences[] = "electron.devtools.sync_preferences"; -const char kDevToolsSyncedPreferencesSyncEnabled[] = - "electron.devtools.synced_preferences_sync_enabled"; -const char kDevToolsSyncedPreferencesSyncDisabled[] = - "electron.devtools.synced_preferences_sync_disabled"; -const char kSyncDevToolsPreferencesFrontendName[] = "electron.sync_preferences"; -const bool kSyncDevToolsPreferencesDefault = false; const char kFrontendHostId[] = "id"; const char kFrontendHostMethod[] = "method"; @@ -346,10 +339,6 @@ void InspectableWebContents::RegisterPrefs(PrefRegistrySimple* registry) { RectToDictionary(gfx::Rect(0, 0, 800, 600))); registry->RegisterDoublePref(kDevToolsZoomPref, 0.); registry->RegisterDictionaryPref(kDevToolsPreferences); - registry->RegisterDictionaryPref(kDevToolsSyncedPreferencesSyncEnabled); - registry->RegisterDictionaryPref(kDevToolsSyncedPreferencesSyncDisabled); - registry->RegisterBooleanPref(kDevToolsSyncPreferences, - kSyncDevToolsPreferencesDefault); } InspectableWebContents::InspectableWebContents( @@ -867,85 +856,19 @@ void InspectableWebContents::SendJsonRequest(DispatchCallback callback, std::move(callback).Run(nullptr); } -void InspectableWebContents::RegisterPreference( - const std::string& name, - const RegisterOptions& options) { - // kSyncDevToolsPreferenceFrontendName is not stored in any of the relevant - // dictionaries. Skip registration. - if (name == kSyncDevToolsPreferencesFrontendName) - return; - - if (options.sync_mode == RegisterOptions::SyncMode::kSync) { - synced_setting_names_.insert(name); - } - - // Setting might have had a different sync status in the past. Move the - // setting to the correct dictionary. - const char* dictionary_to_remove_from = - options.sync_mode == RegisterOptions::SyncMode::kSync - ? kDevToolsPreferences - : GetDictionaryNameForSyncedPrefs(); - const std::string* settings_value = - pref_service_->GetDictionary(dictionary_to_remove_from) - ->FindStringKey(name); - if (!settings_value) { - return; - } - - const char* dictionary_to_insert_into = - GetDictionaryNameForSettingsName(name); - // Settings already moved to the synced dictionary on a different device have - // precedence. - const std::string* already_synced_value = - pref_service_->GetDictionary(dictionary_to_insert_into) - ->FindStringKey(name); - if (dictionary_to_insert_into == kDevToolsPreferences || - !already_synced_value) { - DictionaryPrefUpdate insert_update(pref_service_, - dictionary_to_insert_into); - insert_update.Get()->SetKey(name, base::Value(*settings_value)); - } - - DictionaryPrefUpdate remove_update(pref_service_, dictionary_to_remove_from); - remove_update.Get()->RemoveKey(name); -} - void InspectableWebContents::GetPreferences(DispatchCallback callback) { - base::Value settings(base::Value::Type::DICTIONARY); - settings.SetBoolKey(kSyncDevToolsPreferencesFrontendName, - pref_service_->GetBoolean(kDevToolsSyncPreferences)); - settings.MergeDictionary(pref_service_->GetDictionary(kDevToolsPreferences)); - settings.MergeDictionary( - pref_service_->GetDictionary(GetDictionaryNameForSyncedPrefs())); - - std::move(callback).Run(&settings); + const base::Value* prefs = pref_service_->GetDictionary(kDevToolsPreferences); + std::move(callback).Run(prefs); } void InspectableWebContents::GetPreference(DispatchCallback callback, const std::string& name) { - // Handle kSyncDevToolsPreferencesFrontendName - if (name == kSyncDevToolsPreferencesFrontendName) { - base::Value pref = - base::Value(pref_service_->GetBoolean(kDevToolsSyncPreferences)); - std::move(callback).Run(&pref); - return; - } - - // Check dev tools prefs if (auto* pref = pref_service_->GetDictionary(kDevToolsPreferences)->FindKey(name)) { std::move(callback).Run(pref); return; } - // Check synced prefs - if (auto* pref = - pref_service_->GetDictionary(GetDictionaryNameForSyncedPrefs()) - ->FindKey(name)) { - std::move(callback).Run(pref); - return; - } - // Pref wasn't found, return an empty value base::Value no_pref; std::move(callback).Run(&no_pref); @@ -953,41 +876,21 @@ void InspectableWebContents::GetPreference(DispatchCallback callback, void InspectableWebContents::SetPreference(const std::string& name, const std::string& value) { - if (name == kSyncDevToolsPreferencesFrontendName) { - pref_service_->SetBoolean(kDevToolsSyncPreferences, value == "true"); - return; - } - DictionaryPrefUpdate update(pref_service_, - GetDictionaryNameForSettingsName(name)); + DictionaryPrefUpdate update(pref_service_, kDevToolsPreferences); update.Get()->SetKey(name, base::Value(value)); } void InspectableWebContents::RemovePreference(const std::string& name) { - if (name == kSyncDevToolsPreferencesFrontendName) { - pref_service_->SetBoolean(kDevToolsSyncPreferences, - kSyncDevToolsPreferencesDefault); - return; - } - DictionaryPrefUpdate update(pref_service_, - GetDictionaryNameForSettingsName(name)); + DictionaryPrefUpdate update(pref_service_, kDevToolsPreferences); update.Get()->RemoveKey(name); } void InspectableWebContents::ClearPreferences() { - pref_service_->SetBoolean(kDevToolsSyncPreferences, - kSyncDevToolsPreferencesDefault); DictionaryPrefUpdate unsynced_update(pref_service_, kDevToolsPreferences); unsynced_update.Get()->DictClear(); - DictionaryPrefUpdate sync_enabled_update( - pref_service_, kDevToolsSyncedPreferencesSyncEnabled); - sync_enabled_update.Get()->DictClear(); - DictionaryPrefUpdate sync_disabled_update( - pref_service_, kDevToolsSyncedPreferencesSyncDisabled); - sync_disabled_update.Get()->DictClear(); } 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); @@ -1172,18 +1075,4 @@ void InspectableWebContents::SendMessageAck(int request_id, CallClientFunction("DevToolsAPI.embedderMessageAck", &id_value, arg, nullptr); } -const char* InspectableWebContents::GetDictionaryNameForSettingsName( - const std::string& name) const { - return synced_setting_names_.contains(name) - ? kDevToolsSyncedPreferencesSyncEnabled - : kDevToolsPreferences; -} - -const char* InspectableWebContents::GetDictionaryNameForSyncedPrefs() const { - const bool isDevToolsSyncEnabled = - pref_service_->GetBoolean(kDevToolsSyncPreferences); - return isDevToolsSyncEnabled ? kDevToolsSyncedPreferencesSyncEnabled - : kDevToolsSyncedPreferencesSyncDisabled; -} - } // namespace electron diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index ba50d83b8aef4..bfc6cbae896d5 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -140,7 +140,7 @@ class InspectableWebContents const std::string& browser_id, const std::string& url) override; void RegisterPreference(const std::string& name, - const RegisterOptions& options) override; + const RegisterOptions& options) override {} void GetPreferences(DispatchCallback callback) override; void GetPreference(DispatchCallback callback, const std::string& name) override; @@ -198,9 +198,6 @@ class InspectableWebContents void SendMessageAck(int request_id, const base::Value* arg1); - const char* GetDictionaryNameForSettingsName(const std::string& name) const; - const char* GetDictionaryNameForSyncedPrefs() const; - #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) void AddDevToolsExtensionsToClient(); #endif From 865a29ed17d498335790c2c6998578e1e76c5513 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 9 Mar 2022 05:00:38 -0800 Subject: [PATCH 100/811] Bump v19.0.0-nightly.20220309 --- 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 49ae2ccc9e679..22d94b6c5b151 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220308 \ No newline at end of file +19.0.0-nightly.20220309 \ No newline at end of file diff --git a/package.json b/package.json index 7012c583db14e..1e1905a55217f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220308", + "version": "19.0.0-nightly.20220309", "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 8d84f50990408..771f39264ebaf 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 19,0,0,20220308 - PRODUCTVERSION 19,0,0,20220308 + FILEVERSION 19,0,0,20220309 + PRODUCTVERSION 19,0,0,20220309 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ebfcf89a0b554804fc8707215752a1130dc10182 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 9 Mar 2022 07:15:50 -0800 Subject: [PATCH 101/811] fix: propagate unsafely-treat-insecure-origin-as-secure to renderer children (#33189) * fix: propagate unsafely-treat-insecure-origin-as-secure to renderer children * fix build --- shell/browser/electron_browser_client.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 096dcabb56c4f..04e31a63b754d 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -21,6 +21,7 @@ #include "base/no_destructor.h" #include "base/path_service.h" #include "base/stl_util.h" +#include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -63,6 +64,8 @@ #include "printing/buildflags/buildflags.h" #include "services/device/public/cpp/geolocation/location_provider.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/cpp/is_potentially_trustworthy.h" +#include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/resource_request_body.h" #include "services/network/public/cpp/self_deleting_url_loader_factory.h" #include "shell/app/electron_crash_reporter_client.h" @@ -361,6 +364,21 @@ int GetCrashSignalFD(const base::CommandLine& command_line) { } #endif // BUILDFLAG(IS_LINUX) +void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) { + // |allowlist| combines pref/policy + cmdline switch in the browser process. + // For renderer and utility (e.g. NetworkService) processes the switch is the + // only available source, so below the combined (pref/policy + cmdline) + // allowlist of secure origins is injected into |cmdline| for these other + // processes. + std::vector allowlist = + network::SecureOriginAllowlist::GetInstance().GetCurrentAllowlist(); + if (!allowlist.empty()) { + cmdline->AppendSwitchASCII( + network::switches::kUnsafelyTreatInsecureOriginAsSecure, + base::JoinString(allowlist, ",")); + } +} + } // namespace // static @@ -602,6 +620,10 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches( command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), kCommonSwitchNames, base::size(kCommonSwitchNames)); + if (process_type == ::switches::kUtilityProcess || + content::RenderProcessHost::FromID(process_id)) { + MaybeAppendSecureOriginsAllowlistSwitch(command_line); + } } if (process_type == ::switches::kRendererProcess) { From 86e746c36b20c54c8e77d3d65bc9470b247b232c Mon Sep 17 00:00:00 2001 From: Harry Hopkinson <63599884+Harry-Hopkinson@users.noreply.github.com> Date: Wed, 9 Mar 2022 21:28:54 +0000 Subject: [PATCH 102/811] Formatted C++ Files According to the clang-format file. (#33158) --- spec-main/fixtures/native-addon/uv-dlopen/foo.cpp | 3 +-- spec-main/fixtures/native-addon/uv-dlopen/main.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/spec-main/fixtures/native-addon/uv-dlopen/foo.cpp b/spec-main/fixtures/native-addon/uv-dlopen/foo.cpp index 00beb974c1a72..7e2438f5006d2 100644 --- a/spec-main/fixtures/native-addon/uv-dlopen/foo.cpp +++ b/spec-main/fixtures/native-addon/uv-dlopen/foo.cpp @@ -1,2 +1 @@ -extern "C" -void foo() { } \ No newline at end of file +extern "C" void foo() {} \ No newline at end of file diff --git a/spec-main/fixtures/native-addon/uv-dlopen/main.cpp b/spec-main/fixtures/native-addon/uv-dlopen/main.cpp index 4d34850a6254c..5edef8a0ea627 100644 --- a/spec-main/fixtures/native-addon/uv-dlopen/main.cpp +++ b/spec-main/fixtures/native-addon/uv-dlopen/main.cpp @@ -8,22 +8,26 @@ napi_value TestLoadLibrary(napi_env env, napi_callback_info info) { napi_value argv; napi_status status; status = napi_get_cb_info(env, info, &argc, &argv, NULL, NULL); - if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0); + if (status != napi_ok) + napi_fatal_error(NULL, 0, NULL, 0); char lib_path[256]; status = napi_get_value_string_utf8(env, argv, lib_path, 256, NULL); - if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0); + if (status != napi_ok) + napi_fatal_error(NULL, 0, NULL, 0); uv_lib_t lib; auto uv_status = uv_dlopen(lib_path, &lib); if (uv_status == 0) { napi_value result; status = napi_get_boolean(env, true, &result); - if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0); + if (status != napi_ok) + napi_fatal_error(NULL, 0, NULL, 0); return result; } else { status = napi_throw_error(env, NULL, uv_dlerror(&lib)); - if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0); + if (status != napi_ok) + napi_fatal_error(NULL, 0, NULL, 0); } } From e589e9b259ecad5a2f2f47f0b8d40618d1c54601 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 9 Mar 2022 14:30:42 -0800 Subject: [PATCH 103/811] fix: fire show event when BrowserWindow shown via maximize() (#32979) --- 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 ab336f2e29866..01d88048af794 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 1e9405e0aa3c8..1ed8734711f33 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3526,6 +3526,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 b888d9cd17d41a7b7a2e2bf61429fc1f5d3c94e4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 10 Mar 2022 05:01:04 -0800 Subject: [PATCH 104/811] Bump v19.0.0-nightly.20220310 --- 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 22d94b6c5b151..89c7c89ddc4e6 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220309 \ No newline at end of file +19.0.0-nightly.20220310 \ No newline at end of file diff --git a/package.json b/package.json index 1e1905a55217f..c77e759c18349 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220309", + "version": "19.0.0-nightly.20220310", "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 771f39264ebaf..383de0f2e49e2 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 19,0,0,20220309 - PRODUCTVERSION 19,0,0,20220309 + FILEVERSION 19,0,0,20220310 + PRODUCTVERSION 19,0,0,20220310 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From dc63b8e7f478ad87bcde0406508c1fbbcf4b872c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 05:01:42 -0800 Subject: [PATCH 105/811] Bump v19.0.0-nightly.20220311 --- 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 89c7c89ddc4e6..ade03cdbecc4b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220310 \ No newline at end of file +19.0.0-nightly.20220311 \ No newline at end of file diff --git a/package.json b/package.json index c77e759c18349..728b3d3653861 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220310", + "version": "19.0.0-nightly.20220311", "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 383de0f2e49e2..696f4f46d9069 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 19,0,0,20220310 - PRODUCTVERSION 19,0,0,20220310 + FILEVERSION 19,0,0,20220311 + PRODUCTVERSION 19,0,0,20220311 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From bbb79880f7016c156c8fad3c08b59caa0eedd8a7 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Fri, 11 Mar 2022 22:49:51 +0530 Subject: [PATCH 106/811] chore: cherry-pick 2ed58f4 from chromium (#33109) Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658 Fixes: https://github.com/electron/electron/issues/33049 Signed-off-by: Darshan Sen Co-authored-by: Charles Kerr --- patches/chromium/.patches | 1 + ...e_incorrect_width_height_adjustments.patch | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 patches/chromium/remove_incorrect_width_height_adjustments.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 545165e4e06ad..c470189487c06 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -114,3 +114,4 @@ 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/remove_incorrect_width_height_adjustments.patch b/patches/chromium/remove_incorrect_width_height_adjustments.patch new file mode 100644 index 0000000000000..4fce52ba6e282 --- /dev/null +++ b/patches/chromium/remove_incorrect_width_height_adjustments.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Bruce Dawson +Date: Mon, 28 Feb 2022 19:07:41 +0000 +Subject: Remove incorrect width/height adjustments + +In late 2016 a change which fixed some problems around window sizing +when attaching or detaching additional displays was landed, which fixed +some genuine bugs. Unfortunately it included a subtraction of 1 from the +width and height of the Chrome window. I couldn't find any discussion of +this size adjustment and I think that it was just a misunderstanding of +how window rectangles work (inclusive versus exclusive extents). + +This size adjustment causes non-maximized Chrome windows to shrink every +time a monitor is added or removed. The problematic commit was found +by the bug-filer through a bisect of more than four years of Chrome +history - I'm just landing the fix that they suggested. + +Bug: 1300415 +Change-Id: Ief124f584a91aa9cc3f10704b0cc1e83356dea5b +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3492658 +Reviewed-by: Allen Bauer +Commit-Queue: Bruce Dawson +Cr-Commit-Position: refs/heads/main@{#975872} + +diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc +index 264a9109e42c23e9be6bf7269b3cfee2634b61e4..86f06d2a2c9588a2210a9f78f47e73f1b7c5e329 100644 +--- a/ui/views/win/hwnd_message_handler.cc ++++ b/ui/views/win/hwnd_message_handler.cc +@@ -2834,8 +2834,8 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) { + // (Win+Shift+Arrows). See crbug.com/656001. + window_rect.left = window_pos->x; + window_rect.top = window_pos->y; +- window_rect.right = window_pos->x + window_pos->cx - 1; +- window_rect.bottom = window_pos->y + window_pos->cy - 1; ++ window_rect.right = window_pos->x + window_pos->cx; ++ window_rect.bottom = window_pos->y + window_pos->cy; + } + + HMONITOR monitor; From cdc27a3793958de4a2c06e7fce16244b6f0cb354 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Fri, 11 Mar 2022 11:35:48 -0800 Subject: [PATCH 107/811] fix: prevent UAF crash in setCertificateVerifyProc (#33204) --- ...xpose_setuseragent_on_networkcontext.patch | 4 +- ...emote_certificate_verification_logic.patch | 80 +++++++++++-------- 2 files changed, 48 insertions(+), 36 deletions(-) diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 429dd72387ef7..b30988fba7e9c 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 ca62a13420aa9c114c00054bbe1215f96285a4e9..01be46b1eaed2aadfd24eac9d102da99521b175c 100644 +index 20373c0e86852446569c401c4a993512cb388fc7..9b6dbdad1a17148303ddecaada17a57d4ea22bb2 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1331,6 +1331,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1343,6 +1343,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } 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 d4aaf27702eea..d524259dd9428 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..ca62a13420aa9c114c00054bbe1215f96285a4e9 100644 +index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512cb388fc7 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -126,6 +126,11 @@ @@ -22,12 +22,38 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f9 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -433,6 +438,79 @@ bool GetFullDataFilePath( +@@ -433,6 +438,91 @@ bool GetFullDataFilePath( } // namespace +class RemoteCertVerifier : public net::CertVerifier { + public: ++ class Request : public net::CertVerifier::Request { ++ public: ++ Request() {} ++ ~Request() override = default; ++ void OnRemoteResponse( ++ const RequestParams& params, ++ net::CertVerifyResult* verify_result, ++ int error_from_upstream, ++ net::CompletionOnceCallback callback, ++ int error_from_client, ++ const net::CertVerifyResult& verify_result_from_client) { ++ if (error_from_client == net::ERR_ABORTED) { ++ // use the default ++ std::move(callback).Run(error_from_upstream); ++ } else { ++ // use the override ++ verify_result->Reset(); ++ verify_result->verified_cert = verify_result_from_client.verified_cert; ++ std::move(callback).Run(error_from_client); ++ } ++ } ++ base::WeakPtr GetWeakPtr() { return weak_factory_.GetWeakPtr(); } ++ private: ++ base::WeakPtrFactory weak_factory_{this}; ++ }; ++ + RemoteCertVerifier(std::unique_ptr upstream): upstream_(std::move(upstream)) { + } + ~RemoteCertVerifier() override = default; @@ -44,20 +70,14 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f9 + int Verify(const RequestParams& params, + net::CertVerifyResult* verify_result, + net::CompletionOnceCallback callback, -+ std::unique_ptr* out_req, ++ std::unique_ptr* out_req, + const net::NetLogWithSource& net_log) override { + out_req->reset(); + + net::CompletionOnceCallback callback2 = base::BindOnce( + &RemoteCertVerifier::OnRequestFinished, base::Unretained(this), -+ params, std::move(callback), verify_result); -+ int result = upstream_->Verify(params, verify_result, -+ std::move(callback2), out_req, net_log); -+ if (result != net::ERR_IO_PENDING) { -+ // Synchronous completion -+ } -+ -+ return result; ++ params, std::move(callback), verify_result, out_req); ++ return upstream_->Verify(params, verify_result, std::move(callback2), out_req, net_log); + } + + @@ -65,35 +85,27 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f9 + upstream_->SetConfig(config); + } + -+ void OnRequestFinished(const RequestParams& params, net::CompletionOnceCallback callback, net::CertVerifyResult* verify_result, int error) { ++ void OnRequestFinished(const RequestParams& params, ++ net::CompletionOnceCallback callback, ++ net::CertVerifyResult* verify_result, ++ std::unique_ptr* out_req, ++ int error) { + if (client_.is_bound()) { ++ // We take a weak pointer to the request because deletion of the request ++ // is what signals cancellation. Thus if the request is cancelled, the ++ // callback won't be called, thus avoiding UAF, because |verify_result| ++ // is freed when the request is cancelled. ++ *out_req = std::make_unique(); ++ base::WeakPtr weak_req = static_cast(out_req->get())->GetWeakPtr(); + client_->Verify(error, *verify_result, params.certificate(), + params.hostname(), params.flags(), params.ocsp_response(), -+ base::BindOnce(&RemoteCertVerifier::OnRemoteResponse, -+ base::Unretained(this), params, verify_result, error, -+ std::move(callback))); ++ base::BindOnce(&Request::OnRemoteResponse, ++ weak_req, params, verify_result, error, std::move(callback))); + } else { + std::move(callback).Run(error); + } + } + -+ void OnRemoteResponse( -+ const RequestParams& params, -+ net::CertVerifyResult* verify_result, -+ int error, -+ net::CompletionOnceCallback callback, -+ int error2, -+ const net::CertVerifyResult& verify_result2) { -+ if (error2 == net::ERR_ABORTED) { -+ // use the default -+ std::move(callback).Run(error); -+ } else { -+ // use the override -+ verify_result->Reset(); -+ verify_result->verified_cert = verify_result2.verified_cert; -+ std::move(callback).Run(error2); -+ } -+ } + private: + std::unique_ptr upstream_; + mojo::Remote client_; @@ -102,7 +114,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f9 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -671,6 +749,13 @@ void NetworkContext::SetClient( +@@ -671,6 +761,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +128,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f9 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2226,6 +2311,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2226,6 +2323,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) From f37295325668e50c80fbc00b406f0b4660cc93cd Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Sat, 12 Mar 2022 15:28:10 -0800 Subject: [PATCH 108/811] fix: cppgc/node collisions in renderer process (#33252) * fix: cppgc/node collisions in renderer process * Update be_compatible_with_cppgc.patch --- patches/node/.patches | 1 + patches/node/be_compatible_with_cppgc.patch | 97 +++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 patches/node/be_compatible_with_cppgc.patch diff --git a/patches/node/.patches b/patches/node/.patches index 0346bf4bde829..7a36ac8cbf7a6 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -32,3 +32,4 @@ 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_failing_node_js_test_on_outdated.patch +be_compatible_with_cppgc.patch diff --git a/patches/node/be_compatible_with_cppgc.patch b/patches/node/be_compatible_with_cppgc.patch new file mode 100644 index 0000000000000..3bbc3ce0bde16 --- /dev/null +++ b/patches/node/be_compatible_with_cppgc.patch @@ -0,0 +1,97 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 11 Mar 2022 11:17:29 -0800 +Subject: be compatible with cppgc + +This fixes a crash that happens sporadically when Node is used in the same V8 +Isolate as Blink. For example: + +# +# Fatal error in ../../v8/src/objects/js-objects-inl.h, line 306 +# Debug check failed: static_cast(index) < static_cast(GetEmbedderFieldCount()) (1 vs. 1). +# +# +# +#FailureMessage Object: 0x7ffee46fd1c0 +0 Electron Framework 0x00000001181c78d9 base::debug::CollectStackTrace(void**, unsigned long) + 9 +1 Electron Framework 0x00000001180ea633 base::debug::StackTrace::StackTrace() + 19 +2 Electron Framework 0x000000011a04decd gin::(anonymous namespace)::PrintStackTrace() + 45 +3 Electron Framework 0x0000000119a9b416 V8_Fatal(char const*, int, char const*, ...) + 326 +4 Electron Framework 0x0000000119a9aeb5 v8::base::(anonymous namespace)::DefaultDcheckHandler(char const*, int, char const*) + 21 +5 Electron Framework 0x000000011530763f v8::internal::JSObject::GetEmbedderFieldOffset(int) + 207 +6 Electron Framework 0x00000001155f68e6 v8::internal::LocalEmbedderHeapTracer::EmbedderWriteBarrier(v8::internal::Heap*, v8::internal::JSObject) + 150 +7 Electron Framework 0x00000001152cd34f v8::Object::SetAlignedPointerInInternalField(int, void*) + 639 +8 Electron Framework 0x000000011d18df35 node::BaseObject::BaseObject(node::Environment*, v8::Local) + 101 +9 Electron Framework 0x000000011d347b6e node::crypto::DiffieHellman::DiffieHellman(node::Environment*, v8::Local) + 14 +10 Electron Framework 0x000000011d348413 node::crypto::DiffieHellman::New(v8::FunctionCallbackInfo const&) + 147 +[...] + +This crash happens because this V8 isolate has cppgc enabled. When cppgc is +enabled, V8 assumes that the first embedder field is a "type" pointer, the +first 16 bits of which are the embedder ID. Node did not adhere to this +requirement. Sometimes--mostly, even--this worked _by accident_. If the first +field in the BaseObject was a pointer to a bit of memory that happened to +contain the two-byte little-endian value 0x0001, however, V8 would take that to +mean that the object was a Blink object[1], and attempt to read the pointer in +the second embedder slot, which would result in a CHECK. + +This change adds an "embedder id" pointer as the first embedder field in all +Node-managed objects. This ensures that cppgc will always skip over Node +objects. + +This patch should be upstreamed to Node. + +[1]: https://source.chromium.org/chromium/chromium/src/+/main:gin/public/gin_embedders.h;l=20;drc=5a758a97032f0b656c3c36a3497560762495501a + +See also: https://source.chromium.org/chromium/chromium/src/+/main:v8/include/v8-cppgc.h;l=70-76;drc=5a758a97032f0b656c3c36a3497560762495501a + +diff --git a/src/base_object-inl.h b/src/base_object-inl.h +index bb1e8d4b46bce3bf08f730ac5d43f7113d17ae39..6da0669943fc6465ffc47a1c8c3dadfea6beb1c9 100644 +--- a/src/base_object-inl.h ++++ b/src/base_object-inl.h +@@ -32,10 +32,21 @@ + + namespace node { + ++namespace { ++// This just has to be different from the Chromium ones: ++// https://source.chromium.org/chromium/chromium/src/+/main:gin/public/gin_embedders.h;l=18-23;drc=5a758a97032f0b656c3c36a3497560762495501a ++// Otherwise, when Node is loaded in an isolate which uses cppgc, cppgc will ++// misinterpret the data stored in the embedder fields and try to garbage ++// collect them. ++static uint16_t kNodeEmbedderId = 0x90de; ++} ++ + BaseObject::BaseObject(Environment* env, v8::Local object) + : persistent_handle_(env->isolate(), object), env_(env) { + CHECK_EQ(false, object.IsEmpty()); +- CHECK_GT(object->InternalFieldCount(), 0); ++ CHECK_GT(object->InternalFieldCount(), BaseObject::kSlot); ++ object->SetAlignedPointerInInternalField(BaseObject::kWrapperType, ++ &kNodeEmbedderId); + object->SetAlignedPointerInInternalField( + BaseObject::kSlot, + static_cast(this)); +@@ -151,7 +162,8 @@ bool BaseObject::IsWeakOrDetached() const { + void BaseObject::LazilyInitializedJSTemplateConstructor( + const v8::FunctionCallbackInfo& args) { + DCHECK(args.IsConstructCall()); +- DCHECK_GT(args.This()->InternalFieldCount(), 0); ++ DCHECK_GT(args.This()->InternalFieldCount(), BaseObject::kSlot); ++ args.This()->SetAlignedPointerInInternalField(BaseObject::kWrapperType, &kNodeEmbedderId); + args.This()->SetAlignedPointerInInternalField(BaseObject::kSlot, nullptr); + } + +diff --git a/src/base_object.h b/src/base_object.h +index d46a0f216009c63f45c440fc352b54d1ac4a08d8..81913c0d7762bf499ee19aaa3b63b986ca370bb4 100644 +--- a/src/base_object.h ++++ b/src/base_object.h +@@ -40,7 +40,7 @@ class TransferData; + + class BaseObject : public MemoryRetainer { + public: +- enum InternalFields { kSlot, kInternalFieldCount }; ++ enum InternalFields { kWrapperType, kSlot, kInternalFieldCount }; + + // Associates this object with `object`. It uses the 0th internal field for + // that, and in particular aborts if there is no such field. From 039c061d07821b2d77781320a0bdf60d2e1b938a Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 14 Mar 2022 10:19:15 +0100 Subject: [PATCH 109/811] fix: add missing [[maybe_unused]] to IsEnvSet (#33224) --- shell/app/electron_main_mac.cc | 2 +- shell/app/electron_main_win.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/app/electron_main_mac.cc b/shell/app/electron_main_mac.cc index 6180a4d80bb22..c0f9576fff7fe 100644 --- a/shell/app/electron_main_mac.cc +++ b/shell/app/electron_main_mac.cc @@ -20,7 +20,7 @@ namespace { -bool IsEnvSet(const char* name) { +[[maybe_unused]] bool IsEnvSet(const char* name) { char* indicator = getenv(name); return indicator && indicator[0] != '\0'; } diff --git a/shell/app/electron_main_win.cc b/shell/app/electron_main_win.cc index 38f654e5f047f..2be51c27b2478 100644 --- a/shell/app/electron_main_win.cc +++ b/shell/app/electron_main_win.cc @@ -44,7 +44,7 @@ namespace { const char kUserDataDir[] = "user-data-dir"; const char kProcessType[] = "type"; -bool IsEnvSet(const char* name) { +[[maybe_unused]] bool IsEnvSet(const char* name) { size_t required_size; getenv_s(&required_size, nullptr, 0, name); return required_size != 0; From 4bdb50eeee95bd1853123e974b369c5fd1303843 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 06:02:37 -0700 Subject: [PATCH 110/811] Bump v19.0.0-nightly.20220314 --- 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 ade03cdbecc4b..bc4cd4e3cdf14 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220311 \ No newline at end of file +19.0.0-nightly.20220314 \ No newline at end of file diff --git a/package.json b/package.json index 728b3d3653861..3e50d9ef1202f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220311", + "version": "19.0.0-nightly.20220314", "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 696f4f46d9069..1bd4cadec9b11 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 19,0,0,20220311 - PRODUCTVERSION 19,0,0,20220311 + FILEVERSION 19,0,0,20220314 + PRODUCTVERSION 19,0,0,20220314 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 75339dccb39381c4692b53d5e3a0655ff0f9ec43 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 06:01:15 -0700 Subject: [PATCH 111/811] Bump v19.0.0-nightly.20220315 --- 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 bc4cd4e3cdf14..16a9535edbe36 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220314 \ No newline at end of file +19.0.0-nightly.20220315 \ No newline at end of file diff --git a/package.json b/package.json index 3e50d9ef1202f..5097dcc2d0927 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220314", + "version": "19.0.0-nightly.20220315", "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 1bd4cadec9b11..d4ee0781fa344 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 19,0,0,20220314 - PRODUCTVERSION 19,0,0,20220314 + FILEVERSION 19,0,0,20220315 + PRODUCTVERSION 19,0,0,20220315 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 73828910152cb67c849635ccf513dbe107b63ca3 Mon Sep 17 00:00:00 2001 From: Aryan Shridhar <53977614+aryanshridhar@users.noreply.github.com> Date: Tue, 15 Mar 2022 22:41:40 +0530 Subject: [PATCH 112/811] docs: reword sentence for better understanding (#33265) --- docs/tutorial/process-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/process-model.md b/docs/tutorial/process-model.md index 6b7737ec50b84..bfbb941486f55 100644 --- a/docs/tutorial/process-model.md +++ b/docs/tutorial/process-model.md @@ -40,7 +40,7 @@ to `require` modules and use all of Node.js APIs. ### Window management -The main process' primary purpose is to create and manage application windows with the +The primary purpose of the main process is to create and manage application windows with the [`BrowserWindow`][browser-window] module. Each instance of the `BrowserWindow` class creates an application window that loads From c8a3a00017d5eaca4e017a22d63acaebeb1e24d4 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 15 Mar 2022 10:45:56 -0700 Subject: [PATCH 113/811] fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence (#33063) * 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 --- .../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 37a904c299c4d7bde4b2b5007a52043bca383868 Mon Sep 17 00:00:00 2001 From: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com> Date: Tue, 15 Mar 2022 17:48:25 +0000 Subject: [PATCH 114/811] docs: specify default for BrowserWindow's center option (#33264) --- 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 bc407ede48021..768d27284104e 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -146,7 +146,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `useContentSize` boolean (optional) - The `width` and `height` would be used as web page's size, which means the actual window's size will include window frame's size and be slightly larger. Default is `false`. - * `center` boolean (optional) - Show window in the center of the screen. + * `center` boolean (optional) - Show window in the center of the screen. Default is `false`. * `minWidth` Integer (optional) - Window's minimum width. Default is `0`. * `minHeight` Integer (optional) - Window's minimum height. Default is `0`. * `maxWidth` Integer (optional) - Window's maximum width. Default is no limit. From 2657383ea7c21c3229cba7924d9b3ef5904453b7 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 15 Mar 2022 21:34:53 +0100 Subject: [PATCH 115/811] feat: allow setting code cache directory (#31154) * 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: 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 fc7f38c7ce3e78f84d931d353de3329695887577 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 16 Mar 2022 03:51:56 -0700 Subject: [PATCH 116/811] docs: remove "marked" from process.getBlinkMemoryInfo() (#33263) --- docs/api/process.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/api/process.md b/docs/api/process.md index 194619e01c0ab..4573899912997 100644 --- a/docs/api/process.md +++ b/docs/api/process.md @@ -178,7 +178,6 @@ Returns an object with V8 heap statistics. Note that all statistics are reported Returns `Object`: * `allocated` Integer - Size of all allocated objects in Kilobytes. -* `marked` Integer - Size of all marked objects in Kilobytes. * `total` Integer - Total allocated space in Kilobytes. Returns an object with Blink memory information. From a5382b7780e8966e144b026cda23ab9677ccc429 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 06:02:33 -0700 Subject: [PATCH 117/811] Bump v19.0.0-nightly.20220316 --- 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 16a9535edbe36..a3fb7e2f9cea8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220315 \ No newline at end of file +19.0.0-nightly.20220316 \ No newline at end of file diff --git a/package.json b/package.json index 5097dcc2d0927..b2b2ab389a8c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220315", + "version": "19.0.0-nightly.20220316", "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 d4ee0781fa344..d462bc89974f0 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 19,0,0,20220315 - PRODUCTVERSION 19,0,0,20220315 + FILEVERSION 19,0,0,20220316 + PRODUCTVERSION 19,0,0,20220316 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 02fe2455216578815d6300ba2a44d462a840142d Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 16 Mar 2022 07:56:20 -0700 Subject: [PATCH 118/811] docs: webFrame.insertCSS should mention options arg (#33274) --- docs/api/web-frame.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index 9384fe2c98613..b59d98c54cb60 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -110,9 +110,11 @@ webFrame.setSpellCheckProvider('en-US', { }) ``` -### `webFrame.insertCSS(css)` +#### `webFrame.insertCSS(css[, options])` -* `css` string - CSS source code. +* `css` string +* `options` Object (optional) + * `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 `string` - A key for the inserted CSS that can later be used to remove the CSS via `webFrame.removeInsertedCSS(key)`. From b27401172033e7c8fac38d3b2d784fe8f9a481b2 Mon Sep 17 00:00:00 2001 From: Abhay Gupta <51379307+akgupta0777@users.noreply.github.com> Date: Wed, 16 Mar 2022 08:01:29 -0700 Subject: [PATCH 119/811] fix: fiddle ipc code pattern 3 (#33262) --- docs/fiddles/ipc/pattern-3/renderer.js | 2 +- docs/tutorial/ipc.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/fiddles/ipc/pattern-3/renderer.js b/docs/fiddles/ipc/pattern-3/renderer.js index 3b184add08ba2..04fd4bca890a3 100644 --- a/docs/fiddles/ipc/pattern-3/renderer.js +++ b/docs/fiddles/ipc/pattern-3/renderer.js @@ -4,5 +4,5 @@ window.electronAPI.handleCounter((event, value) => { const oldValue = Number(counter.innerText) const newValue = oldValue + value counter.innerText = newValue - event.reply('counter-value', newValue) + event.sender.send('counter-value', newValue) }) diff --git a/docs/tutorial/ipc.md b/docs/tutorial/ipc.md index 0189e0db7e806..5d3fc2ffec29b 100644 --- a/docs/tutorial/ipc.md +++ b/docs/tutorial/ipc.md @@ -379,7 +379,7 @@ module that uses the `webContents.send` API to send an IPC message from the main target renderer. ```javascript {11-26} title='main.js (Main Process)' -const {app, BrowserWindow, Menu} = require('electron') +const {app, BrowserWindow, Menu, ipcMain} = require('electron') const path = require('path') function createWindow () { @@ -519,7 +519,7 @@ window.electronAPI.onUpdateCounter((event, value) => { const oldValue = Number(counter.innerText) const newValue = oldValue + value counter.innerText = newValue - event.reply('counter-value', newValue) + event.sender.send('counter-value', newValue) }) ``` From cf3ee7be56dad64858a243581eac0644d4653488 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 16 Mar 2022 10:40:47 -0700 Subject: [PATCH 120/811] build: drop pywin32 usage (#26186) * build: drop pywin32 usage * chore: ignore extra output on AppVeyor --- 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 652680e8012983b1d8b9118b48297df4c1d9a939 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 16 Mar 2022 10:54:30 -0700 Subject: [PATCH 121/811] fix: ensure external memory adjustments are balanced (#33266) --- shell/common/api/electron_api_native_image.cc | 17 +++++++++++------ shell/common/api/electron_api_native_image.h | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 3543a13585509..0dbda357a755c 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -109,7 +109,7 @@ base::win::ScopedHICON ReadICOFromPath(int size, const base::FilePath& path) { NativeImage::NativeImage(v8::Isolate* isolate, const gfx::Image& image) : image_(image), isolate_(isolate) { - AdjustAmountOfExternalAllocatedMemory(true); + UpdateExternalAllocatedMemoryUsage(); } #if BUILDFLAG(IS_WIN) @@ -120,22 +120,27 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path) electron::util::ReadImageSkiaFromICO(&image_skia, GetHICON(256)); image_ = gfx::Image(image_skia); - AdjustAmountOfExternalAllocatedMemory(true); + UpdateExternalAllocatedMemoryUsage(); } #endif NativeImage::~NativeImage() { - AdjustAmountOfExternalAllocatedMemory(false); + isolate_->AdjustAmountOfExternalAllocatedMemory(-memory_usage_); } -void NativeImage::AdjustAmountOfExternalAllocatedMemory(bool add) { +void NativeImage::UpdateExternalAllocatedMemoryUsage() { + int32_t new_memory_usage = 0; + if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) { auto* const image_skia = image_.ToImageSkia(); if (!image_skia->isNull()) { - int64_t size = image_skia->bitmap()->computeByteSize(); - isolate_->AdjustAmountOfExternalAllocatedMemory(add ? size : -size); + new_memory_usage = image_skia->bitmap()->computeByteSize(); } } + + isolate_->AdjustAmountOfExternalAllocatedMemory(new_memory_usage - + memory_usage_); + memory_usage_ = new_memory_usage; } // static diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index a322631f9cfe2..7be02ad27b7af 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -121,7 +121,7 @@ class NativeImage : public gin::Wrappable { float GetAspectRatio(const absl::optional scale_factor); void AddRepresentation(const gin_helper::Dictionary& options); - void AdjustAmountOfExternalAllocatedMemory(bool add); + void UpdateExternalAllocatedMemoryUsage(); // Mark the image as template image. void SetTemplateImage(bool setAsTemplate); @@ -136,6 +136,7 @@ class NativeImage : public gin::Wrappable { gfx::Image image_; v8::Isolate* isolate_; + int32_t memory_usage_ = 0; }; } // namespace api From b2c5623a13c91a561704b46480b6c3a7a51f2db7 Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 17 Mar 2022 02:54:45 +0900 Subject: [PATCH 122/811] fix: crash when destroying node env with pending promises (#33280) * fix: crash when destroying node env with pending promises * chore: add spec --- shell/renderer/electron_renderer_client.cc | 19 ++++++++----- shell/renderer/web_worker_observer.cc | 9 ++++-- .../fs-promises-renderer-crash/index.html | 17 +++++++++++ .../fs-promises-renderer-crash/index.js | 28 +++++++++++++++++++ 4 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.html create mode 100644 spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.js diff --git a/shell/renderer/electron_renderer_client.cc b/shell/renderer/electron_renderer_client.cc index f24c8073935fe..2c80080172c1f 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -151,17 +151,22 @@ void ElectronRendererClient::WillReleaseScriptContext( if (env == node_bindings_->uv_env()) node_bindings_->set_uv_env(nullptr); - // Destroy the node environment. We only do this if node support has been - // enabled for sub-frames to avoid a change-of-behavior / introduce crashes - // for existing users. - // 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()); + // Destroying the node environment will also run the uv loop, + // Node.js expects `kExplicit` microtasks policy and will run microtasks + // checkpoints after every call into JavaScript. Since we use a different + // policy in the renderer - switch to `kExplicit` and then drop back to the + // previous policy value. + v8::Isolate* isolate = context->GetIsolate(); + auto old_policy = isolate->GetMicrotasksPolicy(); + DCHECK_EQ(v8::MicrotasksScope::GetCurrentDepth(isolate), 0); + isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit); + node::FreeEnvironment(env); if (env == node_bindings_->uv_env()) node::FreeIsolateData(node_bindings_->isolate_data()); + isolate->SetMicrotasksPolicy(old_policy); + // ElectronBindings is tracking node environments. electron_bindings_->EnvironmentDestroyed(env); } diff --git a/shell/renderer/web_worker_observer.cc b/shell/renderer/web_worker_observer.cc index 287be9ead13f0..ca929bf9e4bb9 100644 --- a/shell/renderer/web_worker_observer.cc +++ b/shell/renderer/web_worker_observer.cc @@ -37,8 +37,13 @@ WebWorkerObserver::WebWorkerObserver() WebWorkerObserver::~WebWorkerObserver() { lazy_tls.Pointer()->Set(nullptr); - gin_helper::MicrotasksScope microtasks_scope( - node_bindings_->uv_env()->isolate()); + // Destroying the node environment will also run the uv loop, + // Node.js expects `kExplicit` microtasks policy and will run microtasks + // checkpoints after every call into JavaScript. Since we use a different + // policy in the renderer - switch to `kExplicit` + v8::Isolate* isolate = node_bindings_->uv_env()->isolate(); + DCHECK_EQ(v8::MicrotasksScope::GetCurrentDepth(isolate), 0); + isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit); node::FreeEnvironment(node_bindings_->uv_env()); node::FreeIsolateData(node_bindings_->isolate_data()); } diff --git a/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.html b/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.html new file mode 100644 index 0000000000000..9721dac6ed821 --- /dev/null +++ b/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.html @@ -0,0 +1,17 @@ + + + + + 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 e9044860766affd5ded7baa3b44da6d4b9fe89e0 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 16 Mar 2022 16:23:14 -0700 Subject: [PATCH 123/811] fix: BrowserWindow.fromWebContents should work in browser-window-created (#33257) --- shell/common/gin_helper/trackable_object.h | 2 +- spec-main/api-browser-window-spec.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/shell/common/gin_helper/trackable_object.h b/shell/common/gin_helper/trackable_object.h index 309e412e8a6f6..7f5b45c75fbcb 100644 --- a/shell/common/gin_helper/trackable_object.h +++ b/shell/common/gin_helper/trackable_object.h @@ -117,11 +117,11 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter { ~TrackableObject() override { RemoveFromWeakMap(); } void InitWith(v8::Isolate* isolate, v8::Local wrapper) override { - gin_helper::WrappableBase::InitWith(isolate, wrapper); if (!weak_map_) { weak_map_ = new electron::KeyWeakMap; } weak_map_->Set(isolate, weak_map_id_, wrapper); + gin_helper::WrappableBase::InitWith(isolate, wrapper); } private: diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 1ed8734711f33..89ff468ec5202 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1816,6 +1816,18 @@ describe('BrowserWindow module', () => { expect(BrowserWindow.fromWebContents(webviewContents)!.id).to.equal(w.id); await p; }); + + it('is usable immediately on browser-window-created', async () => { + const w = new BrowserWindow({ show: false }); + w.loadURL('about:blank'); + w.webContents.executeJavaScript('window.open(""); null'); + const [win, winFromWebContents] = await new Promise((resolve) => { + app.once('browser-window-created', (e, win) => { + resolve([win, BrowserWindow.fromWebContents(win.webContents)]); + }); + }); + expect(winFromWebContents).to.equal(win); + }); }); describe('BrowserWindow.openDevTools()', () => { From 4342b7ff555a1707ab18f7a71da01ae27ef29cd1 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 16 Mar 2022 16:23:41 -0700 Subject: [PATCH 124/811] chore: remove awkward semi-documented preloadURL WebPreference (#33228) --- docs/api/web-contents.md | 3 --- docs/api/webview-tag.md | 3 --- docs/tutorial/security.md | 1 - lib/browser/guest-view-manager.ts | 3 ++- shell/browser/api/electron_api_net.cc | 13 +++++++++++++ shell/browser/web_contents_preferences.cc | 9 --------- shell/common/options_switches.cc | 3 --- shell/common/options_switches.h | 1 - spec/static/main.js | 1 - typings/internal-ambient.d.ts | 1 + typings/internal-electron.d.ts | 1 - 11 files changed, 16 insertions(+), 23 deletions(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 64af596682384..35ce46b590cc9 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -820,9 +820,6 @@ This event can be used to configure `webPreferences` for the `webContents` of a `` before it's loaded, and provides the ability to set settings that can't be set via `` attributes. -**Note:** The specified `preload` script option will appear as `preloadURL` -(not `preload`) in the `webPreferences` object emitted with this event. - #### Event: 'did-attach-webview' Returns: diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index fd90e8b5d5660..c2eab361cfd94 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -158,9 +158,6 @@ When the guest page doesn't have node integration this script will still have access to all Node APIs, but global objects injected by Node will be deleted after this script has finished executing. -**Note:** This option will appear as `preloadURL` (not `preload`) in -the `webPreferences` specified to the `will-attach-webview` event. - ### `httpreferrer` ```html diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index 688dda5a68961..d267a61a47d00 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -562,7 +562,6 @@ 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 delete webPreferences.preload - delete webPreferences.preloadURL // Disable Node.js integration webPreferences.nodeIntegration = false diff --git a/lib/browser/guest-view-manager.ts b/lib/browser/guest-view-manager.ts index c973586e807d5..c9c4585de28e4 100644 --- a/lib/browser/guest-view-manager.ts +++ b/lib/browser/guest-view-manager.ts @@ -15,6 +15,7 @@ interface GuestInstance { const webViewManager = process._linkedBinding('electron_browser_web_view_manager'); const eventBinding = process._linkedBinding('electron_browser_event'); +const netBinding = process._linkedBinding('electron_browser_net'); const supportedWebViewEvents = Object.keys(webViewEvents); @@ -49,7 +50,7 @@ function makeWebPreferences (embedder: Electron.WebContents, params: Record #include "gin/handle.h" +#include "net/base/filename_util.h" #include "net/base/network_change_notifier.h" #include "net/http/http_util.h" #include "services/network/public/cpp/features.h" #include "shell/browser/api/electron_api_url_loader.h" +#include "shell/common/gin_converters/file_path_converter.h" +#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_helper/dictionary.h" +#include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" @@ -28,6 +32,14 @@ bool IsValidHeaderValue(std::string header_value) { return net::HttpUtil::IsValidHeaderValue(header_value); } +base::FilePath FileURLToFilePath(v8::Isolate* isolate, const GURL& url) { + base::FilePath path; + if (!net::FileURLToFilePath(url, &path)) + gin_helper::ErrorThrower(isolate).ThrowError( + "Failed to convert URL to file path"); + return path; +} + using electron::api::SimpleURLLoaderWrapper; void Initialize(v8::Local exports, @@ -41,6 +53,7 @@ void Initialize(v8::Local exports, dict.SetMethod("isValidHeaderName", &IsValidHeaderName); dict.SetMethod("isValidHeaderValue", &IsValidHeaderValue); dict.SetMethod("createURLLoader", &SimpleURLLoaderWrapper::Create); + dict.SetMethod("fileURLToFilePath", &FileURLToFilePath); } } // namespace diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index e54772a0bfce2..c7bdcbf362241 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -258,15 +258,6 @@ void WebContentsPreferences::Merge( } else { LOG(ERROR) << "preload script must have absolute path."; } - } else if (web_preferences.Get(options::kPreloadURL, &preload_url_str)) { - // Translate to file path if there is "preload-url" option. - base::FilePath preload; - GURL preload_url(preload_url_str); - if (net::FileURLToFilePath(preload_url, &preload)) { - preload_path_ = preload; - } else { - LOG(ERROR) << "preload url must be file:// protocol."; - } } std::string type; diff --git a/shell/common/options_switches.cc b/shell/common/options_switches.cc index 5ae559c437eb9..94ffb637ff124 100644 --- a/shell/common/options_switches.cc +++ b/shell/common/options_switches.cc @@ -120,9 +120,6 @@ const char kPreloadScript[] = "preload"; const char kPreloadScripts[] = "preloadScripts"; -// Like --preload, but the passed argument is an URL. -const char kPreloadURL[] = "preloadURL"; - // Enable the node integration. const char kNodeIntegration[] = "nodeIntegration"; diff --git a/shell/common/options_switches.h b/shell/common/options_switches.h index cfe8a4a191ccc..d8f4819067911 100644 --- a/shell/common/options_switches.h +++ b/shell/common/options_switches.h @@ -66,7 +66,6 @@ extern const char kOverlayHeight[]; extern const char kZoomFactor[]; extern const char kPreloadScript[]; extern const char kPreloadScripts[]; -extern const char kPreloadURL[]; extern const char kNodeIntegration[]; extern const char kContextIsolation[]; extern const char kExperimentalFeatures[]; diff --git a/spec/static/main.js b/spec/static/main.js index 28ec06f524cc7..675c90fb42a9f 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -155,7 +155,6 @@ ipcMain.on('disable-preload-on-next-will-attach-webview', (event, id) => { event.sender.once('will-attach-webview', (event, webPreferences, params) => { params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'webview-stripped-preload.html')}`; delete webPreferences.preload; - delete webPreferences.preloadURL; }); }); diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 92d707c8edacc..c3b73935a2999 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -222,6 +222,7 @@ declare namespace NodeJS { isOnline(): boolean; isValidHeaderName: (headerName: string) => boolean; isValidHeaderValue: (headerValue: string) => boolean; + fileURLToFilePath: (url: string) => string; Net: any; net: any; createURLLoader(options: CreateURLLoaderOptions): URLLoader; diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index a0d645440652f..49568925fa80b 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -97,7 +97,6 @@ declare namespace Electron { interface WebPreferences { disablePopups?: boolean; - preloadURL?: string; embedder?: Electron.WebContents; type?: 'backgroundPage' | 'window' | 'browserView' | 'remote' | 'webview' | 'offscreen'; } From df8fd1b269ace37e7ad62ffa9ac8895bca463ef6 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 17 Mar 2022 00:13:48 -0700 Subject: [PATCH 125/811] build: fix build by removing usage of removed preloadUrl (#33319) --- 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 cafe85cae4364..a8abf03fa6360 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -571,7 +571,7 @@ const loggingEnabled = () => { // Add JavaScript wrappers for WebContents class. WebContents.prototype._init = function () { const prefs = this.getLastWebPreferences() || {}; - if (!prefs.nodeIntegration && (prefs.preload != null || prefs.preloadURL != null) && prefs.sandbox == null) { + if (!prefs.nodeIntegration && prefs.preload != null && prefs.sandbox == null) { deprecate.log('The default sandbox option for windows without nodeIntegration is changing. Presently, by default, when a window has a preload script, it defaults to being unsandboxed. In Electron 20, this default will be changing, and all windows that have nodeIntegration: false (which is the default) will be sandboxed by default. If your preload script doesn\'t use Node, no action is needed. If your preload script does use Node, either refactor it to move Node usage to the main process, or specify sandbox: false in your WebPreferences.'); } // Read off the ID at construction time, so that it's accessible even after From ce8e248b60b2ae6547eb037a8b22e93a5edeb699 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 17 Mar 2022 01:40:00 -0700 Subject: [PATCH 126/811] docs: remove unused images (#33310) --- docs/images/message-notification-renderer.png | Bin 10471 -> 0 bytes docs/images/online-event-detection.png | Bin 45114 -> 0 bytes docs/images/tutorial-release-schedule.svg | 97 ------------------ 3 files changed, 97 deletions(-) delete mode 100644 docs/images/message-notification-renderer.png delete mode 100644 docs/images/online-event-detection.png delete mode 100644 docs/images/tutorial-release-schedule.svg diff --git a/docs/images/message-notification-renderer.png b/docs/images/message-notification-renderer.png deleted file mode 100644 index 87c8a876a2b4f77c238abfeaa7aa6fc9f6cb9fac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10471 zcmZ{JbyS_d(k^Z-?(W6exNe}hyBF8u?(XgsibHXi4HS2GcXx;44wwGUx!*Z!efQ>% zcTFbqOrA`VHx{lSCyt1KhX4i!hA1f^q67v8PWB;F!NGid%b-MSz`$_S&4q;(B!z`Z z6dY_#&8pRwwaZ8aX5Y!fsI_D7%pqz= z4(0|!n?!^FW`r+4$?Bg69xUj#yT-We6+;X9lqNRmjSZ1!4@Sy^m^QMIhq znIQwH@*oK~NK*nfv+Hu$eV}@JtD)!`oPAONOyd~1teyV)1tg`Z3;~ZQR;YwW`VE4} zaKAJ)$Z<4D?N}Jrm!0!$b?q{mMnXn=ZYsvpeRfcqOD@GWYE_=n)>YrKg5WrJ5FdpN zy5>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W8%|E)J83qs_&Wc^UVBPZT`oWuXEFNvZ20E-fU4!YJwyI>fj5o^Z8eEHxw-{NQl@ zbLjcI9(jum30MKU$+2L6*kU=qu{%tekXWBCOt=N9&M=8_s{Lx=h@E)bKof<$aQm+>^lAKr7p&hvc8 z - - - - - - - master - - - - - 2.0 - - v2.0.0-beta0 - - v2.0.0 - - - - - 2.1 - - v2.1.0-beta0 - - v2.1.0-beta1 - - v2.1.0 - - - - - 3.0 - - v3.0.0-beta0 - - v3.0.0 - - - - - bug fix - - - - - bug fix - - - - - bug fix - - - - - bug fix - - - - - bug fix - - - - - - feature - - - - feature - - - - feature - - - - - chromiumupdate - - - - ~1 week - - - - ~1 week - - - - ~1 week - - - - \ No newline at end of file From 7acb513ba675aee12bdf52cf5ca8c3d162a93ef4 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 17 Mar 2022 05:45:55 -0700 Subject: [PATCH 127/811] docs: update links to Chromium source (#33309) --- docs/api/app.md | 4 ++-- docs/api/client-request.md | 2 +- docs/api/command-line-switches.md | 4 ++-- docs/api/content-tracing.md | 2 +- docs/api/session.md | 2 +- docs/api/structures/protocol-response.md | 2 +- docs/api/structures/trace-config.md | 8 ++++---- docs/api/web-contents.md | 2 +- docs/development/build-instructions-gn.md | 6 +++--- docs/development/build-instructions-windows.md | 2 +- docs/glossary.md | 2 +- docs/tutorial/sandbox.md | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/api/app.md b/docs/api/app.md index 60eb2ee7785c2..b8c4780b22853 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -714,7 +714,7 @@ Overrides the current application's name. ### `app.getLocale()` Returns `string` - The current application locale, fetched using Chromium's `l10n_util` library. -Possible return values are documented [here](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/l10n/l10n_util.cc). +Possible return values are documented [here](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/l10n/l10n_util.cc). To set the locale, you'll want to use a command line switch at app startup, which may be found [here](command-line-switches.md). @@ -1093,7 +1093,7 @@ Activation policy types: Imports the certificate in pkcs12 format into the platform certificate store. `callback` is called with the `result` of import operation, a value of `0` -indicates success while any other value indicates failure according to Chromium [net_error_list](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h). +indicates success while any other value indicates failure according to Chromium [net_error_list](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h). ### `app.configureHostResolver(options)` diff --git a/docs/api/client-request.md b/docs/api/client-request.md index 12f1ce1157e5b..81410a281816f 100644 --- a/docs/api/client-request.md +++ b/docs/api/client-request.md @@ -185,7 +185,7 @@ the first write will throw an error. If the passed value is not a `string`, its Certain headers are restricted from being set by apps. These headers are listed below. More information on restricted headers can be found in -[Chromium's header utils](https://source.chromium.org/chromium/chromium/src/+/master:services/network/public/cpp/header_util.cc;drc=1562cab3f1eda927938f8f4a5a91991fefde66d3;bpv=1;bpt=1;l=22). +[Chromium's header utils](https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/cpp/header_util.cc;drc=1562cab3f1eda927938f8f4a5a91991fefde66d3;bpv=1;bpt=1;l=22). * `Content-Length` * `Host` diff --git a/docs/api/command-line-switches.md b/docs/api/command-line-switches.md index f395379c063fa..d628b0549c1dd 100644 --- a/docs/api/command-line-switches.md +++ b/docs/api/command-line-switches.md @@ -274,8 +274,8 @@ By default inspector websocket url is available in stderr and under /json/list e [ready]: app.md#event-ready [play-silent-audio]: https://github.com/atom/atom/pull/9485/files [debugging-main-process]: ../tutorial/debugging-main-process.md -[logging]: https://source.chromium.org/chromium/chromium/src/+/master:base/logging.h +[logging]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h [node-cli]: https://nodejs.org/api/cli.html [play-silent-audio]: https://github.com/atom/atom/pull/9485/files [ready]: app.md#event-ready -[severities]: https://source.chromium.org/chromium/chromium/src/+/master:base/logging.h?q=logging::LogSeverity&ss=chromium +[severities]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h?q=logging::LogSeverity&ss=chromium diff --git a/docs/api/content-tracing.md b/docs/api/content-tracing.md index 91e3ca43a2560..ec8e3f7979701 100644 --- a/docs/api/content-tracing.md +++ b/docs/api/content-tracing.md @@ -36,7 +36,7 @@ Returns `Promise` - resolves with an array of category groups once all Get a set of category groups. The category groups can change as new code paths are reached. See also the [list of built-in tracing -categories](https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/builtin_categories.h). +categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h). > **NOTE:** Electron adds a non-default tracing category called `"electron"`. > This category can be used to capture Electron-specific tracing events. diff --git a/docs/api/session.md b/docs/api/session.md index 8bb1ad5ab3c5c..5dc29aba9b6d7 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -567,7 +567,7 @@ the original network configuration. * `errorCode` Integer - Error code. * `callback` Function * `verificationResult` Integer - Value can be one of certificate error codes - from [here](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h). + from [here](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h). Apart from the certificate error codes, the following special codes can be used. * `0` - Indicates success and disables Certificate Transparency verification. * `-2` - Indicates failure. diff --git a/docs/api/structures/protocol-response.md b/docs/api/structures/protocol-response.md index a20873ebb3b46..21a863240fabb 100644 --- a/docs/api/structures/protocol-response.md +++ b/docs/api/structures/protocol-response.md @@ -31,4 +31,4 @@ * `uploadData` [ProtocolResponseUploadData](protocol-response-upload-data.md) (optional) - The data used as upload data. This is only used for URL responses when `method` is `"POST"`. -[net-error]: https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h +[net-error]: https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h diff --git a/docs/api/structures/trace-config.md b/docs/api/structures/trace-config.md index d5b3795f228fd..4160b7121ca57 100644 --- a/docs/api/structures/trace-config.md +++ b/docs/api/structures/trace-config.md @@ -8,7 +8,7 @@ * `enable_argument_filter` boolean (optional) - if true, filter event data according to a specific list of events that have been manually vetted to not include any PII. See [the implementation in - Chromium][trace_event_args_whitelist.cc] for specifics. + Chromium][trace_event_args_allowlist.cc] for specifics. * `included_categories` string[] (optional) - a list of tracing categories to include. Can include glob-like patterns using `*` at the end of the category name. See [tracing categories][] for the list of categories. @@ -45,7 +45,7 @@ An example TraceConfig that roughly matches what Chrome DevTools records: } ``` -[tracing categories]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/builtin_categories.h -[memory-infra docs]: https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/memory_infra_startup_tracing.md#the-advanced-way -[trace_event_args_whitelist.cc]: https://chromium.googlesource.com/chromium/src/+/master/services/tracing/public/cpp/trace_event_args_whitelist.cc +[tracing categories]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h +[memory-infra docs]: https://chromium.googlesource.com/chromium/src/+/main/docs/memory-infra/memory_infra_startup_tracing.md#the-advanced-way +[trace_event_args_allowlist.cc]: https://chromium.googlesource.com/chromium/src/+/main/services/tracing/public/cpp/trace_event_args_allowlist.cc [histogram]: https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 35ce46b590cc9..bdfa225332567 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -92,7 +92,7 @@ Returns: * `frameRoutingId` Integer This event is like `did-finish-load` but emitted when the load failed. -The full list of error codes and their meaning is available [here](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h). +The full list of error codes and their meaning is available [here](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h). #### Event: 'did-fail-provisional-load' diff --git a/docs/development/build-instructions-gn.md b/docs/development/build-instructions-gn.md index 70b5c48ed857c..cd955743df3b9 100644 --- a/docs/development/build-instructions-gn.md +++ b/docs/development/build-instructions-gn.md @@ -196,12 +196,12 @@ If you test other combinations and find them to work, please update this documen See the GN reference for allowable values of [`target_os`][target_os values] and [`target_cpu`][target_cpu values]. -[target_os values]: https://gn.googlesource.com/gn/+/master/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values -[target_cpu values]: https://gn.googlesource.com/gn/+/master/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values +[target_os values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values +[target_cpu values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values #### Windows on Arm (experimental) -To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`. +To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`. ```bat set ELECTRON_BUILDING_WOA=1 diff --git a/docs/development/build-instructions-windows.md b/docs/development/build-instructions-windows.md index 49e436197d851..b827a713784b2 100644 --- a/docs/development/build-instructions-windows.md +++ b/docs/development/build-instructions-windows.md @@ -9,7 +9,7 @@ Follow the guidelines below for building **Electron itself** on Windows, for the * Windows 10 / Server 2012 R2 or higher * Visual Studio 2017 15.7.2 or higher - [download VS 2019 Community Edition for free](https://www.visualstudio.com/vs/) - * See [the Chromium build documentation](https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#visual-studio) for more details on which Visual Studio + * See [the Chromium build documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md#visual-studio) for more details on which Visual Studio components are required. * If your Visual Studio is installed in a directory other than the default, you'll need to set a few environment variables to point the toolchains to your installation path. diff --git a/docs/glossary.md b/docs/glossary.md index a4bfa2a96071f..893c598c52b80 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -91,7 +91,7 @@ An IPC system for communicating intra- or inter-process, and that's important because Chrome is keen on being able to split its work into separate processes or not, depending on memory pressures etc. -See https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md +See https://chromium.googlesource.com/chromium/src/+/main/mojo/README.md See also: [IPC](#ipc) diff --git a/docs/tutorial/sandbox.md b/docs/tutorial/sandbox.md index 0eb955c5da75f..db71727efb6cc 100644 --- a/docs/tutorial/sandbox.md +++ b/docs/tutorial/sandbox.md @@ -157,7 +157,7 @@ versions of Electron, we do not make a guarantee that every fix will be backported. Your best chance at staying secure is to be on the latest stable version of Electron. -[sandbox]: https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md +[sandbox]: https://chromium.googlesource.com/chromium/src/+/main/docs/design/sandbox.md [issue-28466]: https://github.com/electron/electron/issues/28466 [browser-window]: ../api/browser-window.md [enable-sandbox]: ../api/app.md#appenablesandbox From ac6ed62ab96a0a0717ce3259f9c02da4dff7285f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 06:01:17 -0700 Subject: [PATCH 128/811] Bump v19.0.0-nightly.20220317 --- 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 a3fb7e2f9cea8..cd9d8360c400f 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220316 \ No newline at end of file +19.0.0-nightly.20220317 \ No newline at end of file diff --git a/package.json b/package.json index b2b2ab389a8c3..678190af931e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220316", + "version": "19.0.0-nightly.20220317", "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 d462bc89974f0..f0020411c7dd5 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 19,0,0,20220316 - PRODUCTVERSION 19,0,0,20220316 + FILEVERSION 19,0,0,20220317 + PRODUCTVERSION 19,0,0,20220317 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f2b06324b8836a4a3acc93c86f77a624c04b855b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 18 Mar 2022 06:01:12 -0700 Subject: [PATCH 129/811] Bump v19.0.0-nightly.20220318 --- 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 cd9d8360c400f..e1b801e28d07d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220317 \ No newline at end of file +19.0.0-nightly.20220318 \ No newline at end of file diff --git a/package.json b/package.json index 678190af931e5..90e4b2ae0145c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220317", + "version": "19.0.0-nightly.20220318", "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 f0020411c7dd5..14ba8ce3ae702 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 19,0,0,20220317 - PRODUCTVERSION 19,0,0,20220317 + FILEVERSION 19,0,0,20220318 + PRODUCTVERSION 19,0,0,20220318 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e07c2b84d76e649478e44a81a445c4076c4e603f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 18 Mar 2022 19:50:05 -0700 Subject: [PATCH 130/811] fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) * 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 --- 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 0da1f050e7695..f6d275e8f4c3b 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1751,7 +1751,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)); } @@ -1759,7 +1759,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); @@ -1785,7 +1785,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)); } @@ -1793,7 +1793,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, @@ -1831,7 +1831,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)); } @@ -3270,7 +3270,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 b034167631fa3..996c90cbbbc39 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 04e31a63b754d..50fff944a3af3 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -77,13 +77,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" @@ -1515,14 +1516,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 4c763315f3539..2c22d1fceb62b 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 08d54d241693441ef672efa87009c0eb01ae86cb Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 18 Mar 2022 21:29:42 -0700 Subject: [PATCH 131/811] fix: intialize FPS file in network service (#33339) --- 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 fdb60240f31b70130cbbf2d40e679f09c5919737 Mon Sep 17 00:00:00 2001 From: BIKI DAS Date: Mon, 21 Mar 2022 06:51:21 +0530 Subject: [PATCH 132/811] fix: removed unused imported Objects (#33304) --- script/lib/util.py | 5 ----- script/release/uploaders/upload.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/script/lib/util.py b/script/lib/util.py index 9c667fed9e906..816fa47a106b8 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -1,18 +1,13 @@ #!/usr/bin/env python from __future__ import print_function -import atexit import contextlib import errno import json import os import shutil -import ssl -import stat import subprocess import sys -import tarfile -import tempfile # Python 3 / 2 compat import try: from urllib.request import urlopen diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 8b86a1d4884ea..2fc6416fc93c1 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -16,7 +16,7 @@ os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) from zipfile import ZipFile -from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \ +from lib.config import PLATFORM, get_target_arch,s3_config, \ get_zip_name, enable_verbose_mode, get_platform_key from lib.util import get_electron_branding, execute, get_electron_version, \ s3put, get_electron_exec, get_out_dir, \ From 45e2f86fe018f3df8aad56e1a674ff2b50cd1c9b Mon Sep 17 00:00:00 2001 From: David Sanders Date: Sun, 20 Mar 2022 19:11:21 -0700 Subject: [PATCH 133/811] chore: fix pylint-2.7 errors (#33233) --- script/add-debug-link.py | 3 +-- script/check-relative-doc-links.py | 2 +- script/copy-debug-symbols.py | 4 +--- script/generate-config-gypi.py | 4 ++-- script/generate-zip-manifest.py | 2 +- script/lib/config.py | 4 ++-- script/lib/git.py | 7 +++---- script/lib/native_tests.py | 8 +++++--- script/lib/util.py | 4 ++-- script/native-tests.py | 8 ++++---- script/release/uploaders/upload.py | 4 +++- script/run-clang-format.py | 2 +- script/zip_manifests/check-zip-manifest.py | 10 ++++------ 13 files changed, 30 insertions(+), 32 deletions(-) diff --git a/script/add-debug-link.py b/script/add-debug-link.py index bf21ab80f5920..201d726d8240e 100755 --- a/script/add-debug-link.py +++ b/script/add-debug-link.py @@ -14,8 +14,7 @@ def add_debug_link_into_binaries(directory, target_cpu, debug_dir): add_debug_link_into_binary(binary_path, target_cpu, debug_dir) def add_debug_link_into_binary(binary_path, target_cpu, debug_dir): - if PLATFORM == 'linux' and (target_cpu == 'x86' or target_cpu == 'arm' or - target_cpu == 'arm64'): + if PLATFORM == 'linux' and target_cpu in ('x86', 'arm', 'arm64'): # Skip because no objcopy binary on the given target. return diff --git a/script/check-relative-doc-links.py b/script/check-relative-doc-links.py index 01a3ebd0e078b..7839d73122d21 100755 --- a/script/check-relative-doc-links.py +++ b/script/check-relative-doc-links.py @@ -23,7 +23,7 @@ def main(): filepaths.append(os.path.join(root, f)) except KeyboardInterrupt: print('Keyboard interruption. Please try again.') - return + return 0 totalBrokenLinks = 0 for path in filepaths: diff --git a/script/copy-debug-symbols.py b/script/copy-debug-symbols.py index c0d77025c779e..159387fadb60e 100755 --- a/script/copy-debug-symbols.py +++ b/script/copy-debug-symbols.py @@ -15,8 +15,7 @@ def copy_debug_from_binaries(directory, out_dir, target_cpu, compress): copy_debug_from_binary(binary_path, out_dir, target_cpu, compress) def copy_debug_from_binary(binary_path, out_dir, target_cpu, compress): - if PLATFORM == 'linux' and (target_cpu == 'x86' or target_cpu == 'arm' or - target_cpu == 'arm64'): + if PLATFORM == 'linux' and target_cpu in ('x86', 'arm', 'arm64'): # Skip because no objcopy binary on the given target. return debug_name = get_debug_name(binary_path) @@ -25,7 +24,6 @@ def copy_debug_from_binary(binary_path, out_dir, target_cpu, compress): cmd.extend(['--compress-debug-sections']) cmd.extend([binary_path, os.path.join(out_dir, debug_name)]) execute(cmd) - return debug_name def get_debug_name(binary_path): return os.path.basename(binary_path) + '.debug' diff --git a/script/generate-config-gypi.py b/script/generate-config-gypi.py index f20360f8133d5..fee183951d87f 100755 --- a/script/generate-config-gypi.py +++ b/script/generate-config-gypi.py @@ -15,7 +15,7 @@ def run_node_configure(target_cpu): configure = os.path.join(NODE_DIR, 'configure.py') args = ['--dest-cpu', target_cpu] # Enabled in Chromium's V8. - if target_cpu == 'arm64' or target_cpu == 'x64': + if target_cpu in ('arm64', 'x64'): args += ['--experimental-enable-pointer-compression'] # Work around "No acceptable ASM compiler found" error on some System, @@ -62,4 +62,4 @@ def main(target_file, target_cpu): f.write(pprint.pformat(config, indent=2)) if __name__ == '__main__': - sys.exit(main(*sys.argv[1:])) + sys.exit(main(sys.argv[1], sys.argv[2])) diff --git a/script/generate-zip-manifest.py b/script/generate-zip-manifest.py index c6cb5792d0e57..c82e239d3d983 100755 --- a/script/generate-zip-manifest.py +++ b/script/generate-zip-manifest.py @@ -11,4 +11,4 @@ def main(zip_path, manifest_out): return 0 if __name__ == '__main__': - sys.exit(main(*sys.argv[1:])) + sys.exit(main(sys.argv[1], sys.argv[2])) diff --git a/script/lib/config.py b/script/lib/config.py index 9ef44a43fe3d9..43f076f735bdf 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -31,8 +31,8 @@ def get_platform_key(): if 'MAS_BUILD' in os.environ: return 'mas' - else: - return PLATFORM + + return PLATFORM def get_target_arch(): diff --git a/script/lib/git.py b/script/lib/git.py index 429b2e4f866ce..3ea4808f8af37 100644 --- a/script/lib/git.py +++ b/script/lib/git.py @@ -233,8 +233,8 @@ def to_utf8(patch): """Python 2/3 compatibility: unicode has been renamed to str in Python3""" if sys.version_info[0] >= 3: return str(patch, "utf-8") - else: - return unicode(patch, "utf-8") + + return unicode(patch, "utf-8") def export_patches(repo, out_dir, patch_range=None, dry_run=False): @@ -268,7 +268,7 @@ def export_patches(repo, out_dir, patch_range=None, dry_run=False): out_dir, len(bad_patches), "\n-- ".join(bad_patches) ) ) - exit(1) + sys.exit(1) else: # Remove old patches so that deleted commits are correctly reflected in the # patch files (as a removed file) @@ -291,4 +291,3 @@ def export_patches(repo, out_dir, patch_range=None, dry_run=False): ) as f: f.write(formatted_patch.encode('utf-8')) pl.write(filename + '\n') - diff --git a/script/lib/native_tests.py b/script/lib/native_tests.py index e84f393848793..04858bf7ed132 100644 --- a/script/lib/native_tests.py +++ b/script/lib/native_tests.py @@ -69,7 +69,8 @@ def get_current(): if platform in ('cygwin', 'win32'): return Platform.WINDOWS - assert False, "unexpected current platform '{}'".format(platform) + raise AssertionError( + "unexpected current platform '{}'".format(platform)) @staticmethod def get_all(): @@ -155,7 +156,7 @@ def __expand_shorthand(value): if isinstance(value, basestring): return {value: None} - assert False, "unexpected shorthand type: {}".format(type(value)) + raise AssertionError("unexpected shorthand type: {}".format(type(value))) @staticmethod def __make_a_list(value): @@ -174,7 +175,8 @@ def __merge_nested_lists(value): # It looks ugly as hell, but it does the job. return [list_item for key in value for list_item in value[key]] - assert False, "unexpected type for list merging: {}".format(type(value)) + raise AssertionError( + "unexpected type for list merging: {}".format(type(value))) def __platform_supports(self, binary_name): return Platform.get_current() in self.tests[binary_name]['platforms'] diff --git a/script/lib/util.py b/script/lib/util.py index 816fa47a106b8..93b364c6a23e0 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -186,9 +186,9 @@ def get_electron_exec(): if sys.platform == 'darwin': return '{0}/Electron.app/Contents/MacOS/Electron'.format(out_dir) - elif sys.platform == 'win32': + if sys.platform == 'win32': return '{0}/electron.exe'.format(out_dir) - elif sys.platform == 'linux': + if sys.platform == 'linux': return '{0}/electron'.format(out_dir) raise Exception( diff --git a/script/native-tests.py b/script/native-tests.py index 4657b9233867a..f6dea2a8d216b 100755 --- a/script/native-tests.py +++ b/script/native-tests.py @@ -97,11 +97,11 @@ def main(): if args.binary is not None: return tests_list.run(args.binary, args.output_dir, args.verbosity, args.disabled_tests_policy) - else: - return tests_list.run_all(args.output_dir, args.verbosity, - args.disabled_tests_policy) - assert False, "unexpected command '{}'".format(args.command) + return tests_list.run_all(args.output_dir, args.verbosity, + args.disabled_tests_policy) + + raise AssertionError("unexpected command '{}'".format(args.command)) if __name__ == '__main__': diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 2fc6416fc93c1..2cec0ff8dabed 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -160,6 +160,8 @@ def main(): 'toolchain_profile.json') upload_electron(release, toolchain_profile_zip, args) + return 0 + def parse_args(): parser = argparse.ArgumentParser(description='upload distribution file') parser.add_argument('-v', '--version', help='Specify the version', @@ -205,7 +207,7 @@ def zero_zip_date_time(fname): try: with open(fname, 'r+b') as f: _zero_zip_date_time(f) - except: + except Exception: raise NonZipFileError(fname) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index f9d276dc14f4b..b7817bb32c612 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -287,7 +287,7 @@ def main(): extensions=args.extensions.split(',')) if not files: - return + return 0 njobs = args.j if njobs == 0: diff --git a/script/zip_manifests/check-zip-manifest.py b/script/zip_manifests/check-zip-manifest.py index 6af55104e0d1a..39a6e94e16989 100755 --- a/script/zip_manifests/check-zip-manifest.py +++ b/script/zip_manifests/check-zip-manifest.py @@ -7,7 +7,7 @@ def main(zip_path, manifest_in): with open(manifest_in, 'r') as manifest, \ zipfile.ZipFile(zip_path, 'r', allowZip64=True) as z: files_in_zip = set(z.namelist()) - files_in_manifest = set([l.strip() for l in manifest.readlines()]) + files_in_manifest = {l.strip() for l in manifest.readlines()} added_files = files_in_zip - files_in_manifest removed_files = files_in_manifest - files_in_zip if added_files: @@ -18,10 +18,8 @@ def main(zip_path, manifest_in): print("Files removed from bundle:") for f in sorted(list(removed_files)): print('-' + f) - if added_files or removed_files: - return 1 - else: - return 0 + + return 1 if added_files or removed_files else 0 if __name__ == '__main__': - sys.exit(main(*sys.argv[1:])) + sys.exit(main(sys.argv[1], sys.argv[2])) From e100402b1335315d707c72b69cd940ad5aee5c15 Mon Sep 17 00:00:00 2001 From: Lalit Date: Mon, 21 Mar 2022 07:43:55 +0530 Subject: [PATCH 134/811] docs: possible change in tutorial/ipc (#33218) The `counter` channel should be `update-counter` channel --- docs/tutorial/ipc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/ipc.md b/docs/tutorial/ipc.md index 5d3fc2ffec29b..c1af5d1f08528 100644 --- a/docs/tutorial/ipc.md +++ b/docs/tutorial/ipc.md @@ -413,7 +413,7 @@ function createWindow () { ``` For the purposes of the tutorial, it's important to note that the `click` handler -sends a message (either `1` or `-1`) to the renderer process through the `counter` channel. +sends a message (either `1` or `-1`) to the renderer process through the `update-counter` channel. ```javascript click: () => mainWindow.webContents.send('update-counter', -1) From 4cc2ed842e6ee6bab9c9b8743593023953da046b Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 21 Mar 2022 16:42:22 +0900 Subject: [PATCH 135/811] fix: iocp integration when process is reused (#33207) --- shell/common/node_bindings.cc | 13 ++---------- 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(+), 17 deletions(-) diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 99b017dc425fe..4e5b1577b1cfa 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -462,7 +462,8 @@ node::Environment* NodeBindings::CreateEnvironment( args.insert(args.begin() + 1, init_script); - isolate_data_ = node::CreateIsolateData(isolate, uv_loop_, platform); + if (!isolate_data_) + isolate_data_ = node::CreateIsolateData(isolate, uv_loop_, platform); node::Environment* env; uint64_t flags = node::EnvironmentFlags::kDefaultFlags | @@ -573,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 2c80080172c1f..08276425938f3 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 755feb4d81e10b79b2c43eaa698b50cf1f726a72 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 21 Mar 2022 10:30:02 +0100 Subject: [PATCH 136/811] feat: add nativeTheme.inForcedColorsMode (#32956) --- 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 4b8b492b628d78e1637016730a926a71a01ff9e7 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:01:28 -0700 Subject: [PATCH 137/811] Bump v19.0.0-nightly.20220321 --- 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 e1b801e28d07d..2a38aac402469 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220318 \ No newline at end of file +19.0.0-nightly.20220321 \ No newline at end of file diff --git a/package.json b/package.json index 90e4b2ae0145c..0e3814d6cfdb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220318", + "version": "19.0.0-nightly.20220321", "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 14ba8ce3ae702..b5ef04aa1cb85 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 19,0,0,20220318 - PRODUCTVERSION 19,0,0,20220318 + FILEVERSION 19,0,0,20220321 + PRODUCTVERSION 19,0,0,20220321 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From db79734bfb12ed922140266451f60c649042f319 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 21 Mar 2022 18:35:54 +0100 Subject: [PATCH 138/811] feat: support more color formats for `backgroundColor` (#31868) --- 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 768d27284104e..5588d78562dbe 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 the 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 f6d275e8f4c3b..58d3f7f016685 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 c7bdcbf362241..44030d1e6bfd0 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 89ff468ec5202..1f6e88b5088dc 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1076,6 +1076,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 1ccf206e77a5e70d80a80afbfccb6654d2e5ea3d Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Mar 2022 10:51:59 -0700 Subject: [PATCH 139/811] docs: add note about supported versions to issue template (#33348) --- .github/ISSUE_TEMPLATE/bug_report.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 706d63103ed76..7ea654e33ecea 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -17,8 +17,11 @@ body: - type: input attributes: label: Electron Version - description: What version of Electron are you using? - placeholder: 12.0.0 + description: | + What version of Electron are you using? + + Note: Please only report issues for [currently supported versions of Electron](https://www.electronjs.org/docs/latest/tutorial/support#currently-supported-versions). + placeholder: 17.0.0 validations: required: true - type: dropdown @@ -53,7 +56,7 @@ body: attributes: label: Last Known Working Electron version description: What is the last version of Electron this worked in, if applicable? - placeholder: 11.0.0 + placeholder: 16.0.0 - type: textarea attributes: label: Expected Behavior From 2205d725f2b01e5cc78e7e38fb597d53285c15ac Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Mar 2022 11:17:25 -0700 Subject: [PATCH 140/811] chore: bump @electron/docs-parser version (#33346) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0e3814d6cfdb4..32b8e545c0fe5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { - "@electron/docs-parser": "^0.12.3", + "@electron/docs-parser": "^0.12.4", "@electron/typescript-definitions": "^8.9.5", "@octokit/auth-app": "^2.10.0", "@octokit/rest": "^18.0.3", diff --git a/yarn.lock b/yarn.lock index b03a8b7cbf371..484a7a5c18a4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,10 +18,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@electron/docs-parser@^0.12.3": - version "0.12.3" - resolved "https://registry.yarnpkg.com/@electron/docs-parser/-/docs-parser-0.12.3.tgz#a984c5ebc60348683b2acdbb0ebb73414b6763fd" - integrity sha512-e7OKn/NNAHMZ4Pw1702MHd2VE3Z5NKdXIIDxg9nWsDBUuSCuOKRCb4i0Ev8Eev0V0nKLaH+NMz6yzovpx0PrHg== +"@electron/docs-parser@^0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@electron/docs-parser/-/docs-parser-0.12.4.tgz#cca403c8c2200181339c3115cdd25f3fbfc7dea3" + integrity sha512-vdkjcvkI7zTd2v1A8qsl5+HY+9AQCrW5Eh60I9rhPtUPoxo2V1pQwogTW6kzc3XZ54crTa7R3KxwkZpSbcGCug== dependencies: "@types/markdown-it" "^10.0.0" chai "^4.2.0" From 59246a4c7c27253848fd6c56bc7c9a137b85f123 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 22 Mar 2022 00:30:05 +0100 Subject: [PATCH 141/811] fix: NOTREACHED when resizing windows frameless bounds (#33029) * fix: NOTREACHED when resizing windows frameless bounds * fix: scope to window_->IsResizable() --- shell/browser/ui/views/win_frame_view.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 9ddea873c704c..7ca295ec5c12d 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -34,6 +34,14 @@ void WinFrameView::Init(NativeWindowViews* window, views::Widget* frame) { window_ = window; frame_ = frame; + // Prevent events from trickling down the views hierarchy here, since + // when a given resizable window is frameless we only want to use + // FramelessView's ResizingBorderHitTest in + // ShouldDescendIntoChildForEventHandling. See + // https://chromium-review.googlesource.com/c/chromium/src/+/3251980. + if (!window_->has_frame() && window_->IsResizable()) + frame_->client_view()->SetCanProcessEventsWithinSubtree(false); + if (window->IsWindowControlsOverlayEnabled()) { caption_button_container_ = AddChildView(std::make_unique(this)); From 108ee7037f09fd623f473af5b3ecd943b5f6014a Mon Sep 17 00:00:00 2001 From: zeeker999 <13848632+zeeker999@users.noreply.github.com> Date: Tue, 22 Mar 2022 07:38:03 +0800 Subject: [PATCH 142/811] fix: IncrementCapturerCount doesn't increase the capturer count (#32973) --- .../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 58d3f7f016685..c5238cead782f 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3127,8 +3127,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 1f6e88b5088dc..d4d4a70799a16 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1453,6 +1453,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')); @@ -1466,6 +1477,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 d79d3fc7d735b8b67a3121800d9c158d6e777af7 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Mon, 21 Mar 2022 16:38:46 -0700 Subject: [PATCH 143/811] test: fix and re-enable Network.getResponseBody test (#33227) --- spec-main/api-debugger-spec.ts | 43 ++++++++++++---------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/spec-main/api-debugger-spec.ts b/spec-main/api-debugger-spec.ts index d75d786b2b8aa..a37f45b67b06f 100644 --- a/spec-main/api-debugger-spec.ts +++ b/spec-main/api-debugger-spec.ts @@ -133,39 +133,26 @@ describe('debugger module', () => { w.webContents.debugger.detach(); }); - // TODO(deepak1556): Fix and enable with upgrade - it.skip('handles valid unicode characters in message', (done) => { - try { - w.webContents.debugger.attach(); - } catch (err) { - done(`unexpected error : ${err}`); - } - - let requestId : number; - w.webContents.debugger.on('message', (event, method, params) => { - if (method === 'Network.responseReceived' && - params.response.url.startsWith('http://127.0.0.1')) { - requestId = params.requestId; - } else if (method === 'Network.loadingFinished' && - params.requestId === requestId) { - w.webContents.debugger.sendCommand('Network.getResponseBody', { - requestId: params.requestId - }).then(data => { - expect(data.body).to.equal('\u0024'); - done(); - }).catch(result => done(result)); - } - }); - + it('handles valid unicode characters in message', async () => { server = http.createServer((req, res) => { res.setHeader('Content-Type', 'text/plain; charset=utf-8'); res.end('\u0024'); }); + await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); - server.listen(0, '127.0.0.1', () => { - w.webContents.debugger.sendCommand('Network.enable'); - w.loadURL(`http://127.0.0.1:${(server.address() as AddressInfo).port}`); - }); + w.loadURL(`http://127.0.0.1:${(server.address() as AddressInfo).port}`); + // If we do this synchronously, it's fast enough to attach and enable + // network capture before the load. If we do it before the loadURL, for + // some reason network capture doesn't get enabled soon enough and we get + // an error when calling `Network.getResponseBody`. + w.webContents.debugger.attach(); + w.webContents.debugger.sendCommand('Network.enable'); + const [,, { requestId }] = await emittedUntil(w.webContents.debugger, 'message', (_event: any, method: string, params: any) => + method === 'Network.responseReceived' && params.response.url.startsWith('http://127.0.0.1')); + await emittedUntil(w.webContents.debugger, 'message', (_event: any, method: string, params: any) => + method === 'Network.loadingFinished' && params.requestId === requestId); + const { body } = await w.webContents.debugger.sendCommand('Network.getResponseBody', { requestId }); + expect(body).to.equal('\u0024'); }); it('does not crash for invalid unicode characters in message', (done) => { From c262eac441a8fb69ee22b1ecb22979b8ce3b7948 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 21 Mar 2022 18:55:53 -0500 Subject: [PATCH 144/811] test: re-enable webview resize events test (#33220) --- spec/webview-spec.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 0b649d1bd77ad..ca2ce8f84ad94 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -1214,9 +1214,7 @@ describe(' tag', function () { const generateSpecs = (description, sandbox) => { describe(description, () => { - // TODO(nornagon): disabled during chromium roll 2019-06-11 due to a - // 'ResizeObserver loop limit exceeded' error on Windows - xit('emits resize events', async () => { + it('emits resize events', async () => { const firstResizeSignal = waitForEvent(webview, 'resize'); const domReadySignal = waitForEvent(webview, 'dom-ready'); From f5112632a395378a1e21757ebaa7ff4a1a13343a Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 22 Mar 2022 07:07:09 +0100 Subject: [PATCH 145/811] fix: pend bounds change when moving BrowserWindows (#33288) * fix: ensure bounds changes apply when moving windows * chore: remove unused queue include --- 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 01d88048af794..12ae336acc2f3 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 0af2b8de73ab33f2ae8ecc285e2e9a247e09aaa7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 22 Mar 2022 01:12:20 -0500 Subject: [PATCH 146/811] docs: mark skipTaskbar as unsupported on Linux (#33226) Fixes #33124. --- docs/api/browser-window.md | 4 ++-- docs/breaking-changes.md | 13 ++++++++++++- shell/browser/native_window_views.cc | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 5588d78562dbe..9f5e2349004b5 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -186,8 +186,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. mode. On macOS, also whether the maximize/zoom button should toggle full screen mode or maximize window. Default is `true`. * `simpleFullscreen` boolean (optional) - Use pre-Lion fullscreen on macOS. Default is `false`. - * `skipTaskbar` boolean (optional) - Whether to show the window in taskbar. Default is - `false`. + * `skipTaskbar` boolean (optional) _macOS_ _Windows_ - Whether to show the window in taskbar. + Default is `false`. * `kiosk` boolean (optional) - Whether the window is in kiosk mode. Default is `false`. * `title` string (optional) - Default window title. Default is `"Electron"`. If the HTML tag `` is defined in the HTML file loaded by `loadURL()`, this property will be ignored. * `icon` ([NativeImage](native-image.md) | string) (optional) - The window icon. On Windows it is diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 6d561f87bd75e..c44fcc257ef52 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -27,9 +27,20 @@ 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 + +See `skipTaskbar` discussion in 19.0 below. This feature is not available on +Wayland. Since most modern Linux desktops are transitioning to Wayland, this +feature will be removed for Linux. + ## Planned Breaking API Changes (19.0) -*None (yet)* +### Unsupported: `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 (18.0) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 4258bce662937..87d9dd1616627 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -291,6 +291,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, #endif #if defined(USE_X11) + // TODO(ckerr): remove in Electron v20.0.0 // Before the window is mapped the SetWMSpecState can not work, so we have // to manually set the _NET_WM_STATE. std::vector<x11::Atom> state_atom_list; From 956406a1934e9f71935103a67f13cbd7b571304d Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 22 Mar 2022 00:19:46 -0700 Subject: [PATCH 147/811] fix: use stricter options in SecStaticCodeCheckValidity (#33368) * fix: use stricter options in SecStaticCodeCheckValidity * Update patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --- 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 <samuel.r.attard@gmail.com> +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<string, string> = {}; - const getOrCreateUpdateZipPath = async (version: string, fixture: string) => { - const key = `${version}-${fixture}`; + const getOrCreateUpdateZipPath = async (version: string, fixture: string, mutateAppPostSign?: { + mutate: (appPath: string) => Promise<void>, + 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<void>, + mutationKey: string, + } }, fn: (appPath: string, zipPath: string) => Promise<void>) => { 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 81318f0acc59f6acbc74f1baa9cbe1e4411f53f8 Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 22 Mar 2022 00:51:04 -0700 Subject: [PATCH 148/811] fix: disable SIGUSR1 when --inspect is disabled (#33188) --- patches/node/.patches | 1 + ...nalhandler_to_environment_to_prevent.patch | 69 +++++++++++++++++++ shell/common/node_bindings.cc | 6 ++ 3 files changed, 76 insertions(+) create mode 100644 patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch diff --git a/patches/node/.patches b/patches/node/.patches index 7a36ac8cbf7a6..7e1c403073d8c 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -33,3 +33,4 @@ darwin_translate_eprototype_to_econnreset_3413.patch darwin_bump_minimum_supported_version_to_10_15_3406.patch fix_failing_node_js_test_on_outdated.patch be_compatible_with_cppgc.patch +feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch diff --git a/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch new file mode 100644 index 0000000000000..c08a9efde794b --- /dev/null +++ b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch @@ -0,0 +1,69 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard <samuel.r.attard@gmail.com> +Date: Mon, 7 Mar 2022 16:36:28 -0800 +Subject: feat: add kNoStartDebugSignalHandler to Environment to prevent + SIGUSR1 handling + +This patch should be upstreamed, it allows embedders to prevent the call to StartDebugSignalHandler which handles SIGUSR1 and starts the inspector agent. Apps that have --inspect disabled also don't want SIGUSR1 to have this affect. + +diff --git a/src/env-inl.h b/src/env-inl.h +index 845e00208af4b12960ed8b3f3926323af7685185..1ebc33324907654d16e9c0e19b2955efbac7cac7 100644 +--- a/src/env-inl.h ++++ b/src/env-inl.h +@@ -896,6 +896,10 @@ inline bool Environment::should_initialize_inspector() const { + return (flags_ & EnvironmentFlags::kNoInitializeInspector) == 0; + } + ++inline bool Environment::should_start_debug_signal_handler() const { ++ return (flags_ & EnvironmentFlags::kNoStartDebugSignalHandler) == 0; ++} ++ + bool Environment::filehandle_close_warning() const { + return emit_filehandle_warning_; + } +diff --git a/src/env.h b/src/env.h +index ab8334bf0e3405fee4d21a4b541bd1164d92ca89..b2537ebd44bc5b37dd97752735f84e87de1f24bf 100644 +--- a/src/env.h ++++ b/src/env.h +@@ -1207,6 +1207,7 @@ class Environment : public MemoryRetainer { + inline bool hide_console_windows() const; + inline bool no_global_search_paths() const; + inline bool should_initialize_inspector() const; ++ inline bool should_start_debug_signal_handler() const; + inline uint64_t thread_id() const; + inline worker::Worker* worker_context() const; + Environment* worker_parent_env() const; +diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc +index c4a3322c6d972fc2052af75b79389c522924d9c5..39ff8df415be1908ba404fba34d9cedda04a88af 100644 +--- a/src/inspector_agent.cc ++++ b/src/inspector_agent.cc +@@ -680,8 +680,10 @@ bool Agent::Start(const std::string& path, + StartIoThreadAsyncCallback)); + uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async)); + start_io_thread_async.data = this; +- // Ignore failure, SIGUSR1 won't work, but that should not block node start. +- StartDebugSignalHandler(); ++ if (parent_env_->should_start_debug_signal_handler()) { ++ // Ignore failure, SIGUSR1 won't work, but that should not block node start. ++ StartDebugSignalHandler(); ++ } + + parent_env_->AddCleanupHook([](void* data) { + Environment* env = static_cast<Environment*>(data); +diff --git a/src/node.h b/src/node.h +index 4201c0d0460b032721ef42a26d79c38a9ee20c24..6873fc89406b046823db9e45234eb7f6b767099d 100644 +--- a/src/node.h ++++ b/src/node.h +@@ -425,7 +425,11 @@ enum Flags : uint64_t { + // Controls whether or not the Environment should call InitializeInspector. + // This control is needed by embedders who may not want to initialize the V8 + // inspector in situations where it already exists. +- kNoInitializeInspector = 1 << 8 ++ kNoInitializeInspector = 1 << 8, ++ // Controls where or not the InspectorAgent for this Environment should ++ // call StartDebugSignalHandler. This control is needed by embedders who may ++ // not want to allow other processes to start the V8 inspector. ++ kNoStartDebugSignalHandler = 1 << 9 + }; + } // namespace EnvironmentFlags + diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 4e5b1577b1cfa..aad85fb2c9c68 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -478,6 +478,12 @@ node::Environment* NodeBindings::CreateEnvironment( node::EnvironmentFlags::kNoInitializeInspector; } + if (!electron::fuses::IsNodeCliInspectEnabled()) { + // If --inspect and friends are disabled we also shouldn't listen for + // SIGUSR1 + flags |= node::EnvironmentFlags::kNoStartDebugSignalHandler; + } + v8::TryCatch try_catch(isolate); env = node::CreateEnvironment( isolate_data_, context, args, exec_args, From 4d8ebcd19ce3e7618b5155cf0855ecbcc937e8ec Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Tue, 22 Mar 2022 01:52:10 -0700 Subject: [PATCH 149/811] chore: change usages of std::vector with const elements (#33373) --- ...ransfer_to_requestsingleinstancelock.patch | 28 +++++++++---------- shell/browser/api/electron_api_app.cc | 6 ++-- shell/browser/api/electron_api_app.h | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index a609f4e83a6de..1f6c211951b05 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 5a64220aaf1309832dc0ad543e353de67fe0a779..a568dd10d1ef8679d66f4cdc6a471c251cbcd4eb 100644 +index 5a64220aaf1309832dc0ad543e353de67fe0a779..5b701b1361707b610ed60c344e441e67ca701362 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -18,6 +18,7 @@ @@ -46,7 +46,7 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..a568dd10d1ef8679d66f4cdc6a471c25 base::RepeatingCallback<bool(const base::CommandLine& command_line, - const base::FilePath& current_directory)>; + const base::FilePath& current_directory, -+ const std::vector<const uint8_t> additional_data, ++ const std::vector<uint8_t> additional_data, + const NotificationAckCallback& ack_callback)>; #if BUILDFLAG(IS_WIN) @@ -96,7 +96,7 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..a568dd10d1ef8679d66f4cdc6a471c25 // 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 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65ddbfc332 100644 +index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a5a1f1424 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -148,7 +148,7 @@ const char kACKToken[] = "ACK"; @@ -112,7 +112,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65 // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector<std::string>& argv, -+ const std::vector<const uint8_t> additional_data, ++ const std::vector<uint8_t> additional_data, SocketReader* reader); private: @@ -133,7 +133,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65 - const std::string& current_dir, const std::vector<std::string>& argv, + const std::string& current_dir, + const std::vector<std::string>& argv, -+ const std::vector<const uint8_t> additional_data, ++ const std::vector<uint8_t> additional_data, SocketReader* reader) { DCHECK(ui_task_runner_->BelongsToCurrentThread()); DCHECK(reader); @@ -195,7 +195,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65 + base::StringToSizeT(tokens[0], &num_args); + std::vector<std::string> command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args); + -+ std::vector<const uint8_t> additional_data; ++ std::vector<uint8_t> additional_data; + if (tokens.size() >= 3 + num_args) { + size_t additional_data_size; + base::StringToSizeT(tokens[1 + num_args], &additional_data_size); @@ -204,7 +204,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65 + std::string(1, kTokenDelimiter)); + const uint8_t* additional_data_bits = + reinterpret_cast<const uint8_t*>(remaining_args.c_str()); -+ additional_data = std::vector<const uint8_t>(additional_data_bits, ++ additional_data = std::vector<uint8_t>(additional_data_bits, + additional_data_bits + additional_data_size); + } + @@ -282,7 +282,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..b23c16fde275fdba559abb1f30e42f65 return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d0c912034 100644 +index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce82ad6abb2 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -21,6 +21,7 @@ @@ -301,7 +301,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d +const DWORD kPipeTimeout = 10000; +const DWORD kMaxMessageLength = 32 * 1024; + -+std::unique_ptr<std::vector<const uint8_t>> g_ack_data; ++std::unique_ptr<std::vector<uint8_t>> g_ack_data; +base::OneShotTimer g_ack_timer; +HANDLE g_write_ack_pipe; +bool g_write_ack_callback_called = false; @@ -314,7 +314,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d base::CommandLine* parsed_command_line, - base::FilePath* current_directory) { + base::FilePath* current_directory, -+ std::vector<const uint8_t>* parsed_additional_data) { ++ std::vector<uint8_t>* parsed_additional_data) { // We should have enough room for the shortest command (min_message_size) // and also be a multiple of wchar_t bytes. The shortest command - // possible is L"START\0\0" (empty current directory and command line). @@ -355,7 +355,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d + msg.substr(fourth_null + 1, fifth_null - fourth_null); + const uint8_t* additional_data_bytes = + reinterpret_cast<const uint8_t*>(additional_data.c_str()); -+ *parsed_additional_data = std::vector<const uint8_t>(additional_data_bytes, ++ *parsed_additional_data = std::vector<uint8_t>(additional_data_bytes, + additional_data_bytes + additional_data_length); + return true; @@ -365,8 +365,8 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d +void StoreAck(const base::span<const uint8_t>* ack_data) { + if (ack_data) { -+ g_ack_data = std::make_unique<std::vector<const uint8_t>>(ack_data->begin(), -+ ack_data->end()); ++ g_ack_data = std::make_unique<std::vector<uint8_t>>(ack_data->begin(), ++ ack_data->end()); + } else { + g_ack_data = nullptr; + } @@ -414,7 +414,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); base::FilePath current_directory; - if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) { -+ std::vector<const uint8_t> additional_data; ++ std::vector<uint8_t> additional_data; + if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, + &additional_data)) { *result = TRUE; diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index bcc96086557f8..353b8c3d67783 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -519,12 +519,12 @@ bool NotificationCallbackWrapper( const base::RepeatingCallback< void(const base::CommandLine& command_line, const base::FilePath& current_directory, - const std::vector<const uint8_t> additional_data, + const std::vector<uint8_t> additional_data, const ProcessSingleton::NotificationAckCallback& ack_callback)>& callback, const base::CommandLine& cmd, const base::FilePath& cwd, - const std::vector<const uint8_t> additional_data, + const std::vector<uint8_t> additional_data, const ProcessSingleton::NotificationAckCallback& ack_callback) { // Make sure the callback is called after app gets ready. if (Browser::Get()->is_ready()) { @@ -1118,7 +1118,7 @@ static void AckCallbackWrapper( void App::OnSecondInstance( const base::CommandLine& cmd, const base::FilePath& cwd, - const std::vector<const uint8_t> additional_data, + const std::vector<uint8_t> additional_data, const ProcessSingleton::NotificationAckCallback& ack_callback) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::Locker locker(isolate); diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index d6bd52ada971f..840c0cb66da34 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -197,7 +197,7 @@ class App : public ElectronBrowserClient::Delegate, void OnSecondInstance( const base::CommandLine& cmd, const base::FilePath& cwd, - const std::vector<const uint8_t> additional_data, + const std::vector<uint8_t> additional_data, const ProcessSingleton::NotificationAckCallback& ack_callback); bool HasSingleInstanceLock() const; bool RequestSingleInstanceLock(gin::Arguments* args); From b7188f07f4ac1193b9b73aedec8a7edb5e917982 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 06:00:54 -0700 Subject: [PATCH 150/811] Bump v19.0.0-nightly.20220322 --- 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 2a38aac402469..7ed2959db92aa 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220321 \ No newline at end of file +19.0.0-nightly.20220322 \ No newline at end of file diff --git a/package.json b/package.json index 32b8e545c0fe5..e385ef6a7ab8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220321", + "version": "19.0.0-nightly.20220322", "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 b5ef04aa1cb85..b311dceaba875 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 19,0,0,20220321 - PRODUCTVERSION 19,0,0,20220321 + FILEVERSION 19,0,0,20220322 + PRODUCTVERSION 19,0,0,20220322 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From feff8b358494fa1d0ed755dae7095f820c354f93 Mon Sep 17 00:00:00 2001 From: Keeley Hammond <vertedinde@electronjs.org> Date: Tue, 22 Mar 2022 08:31:53 -0700 Subject: [PATCH 151/811] ci: enable thin LTO on Mac (#33194) * 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 --- .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 0175d1fd97e90..3d4f5c162644a 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -544,6 +544,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 @@ -780,6 +781,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 <vertedinde@electronjs.org> -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 3aec1c3e3fddaca43412afa60af5bb62282b8e98 Mon Sep 17 00:00:00 2001 From: Black-Hole <158blackhole@gmail.com> Date: Wed, 23 Mar 2022 00:41:21 +0800 Subject: [PATCH 152/811] chore: upgrade @electron/get version to ^1.14.1 (#33259) Co-authored-by: Mark Lee <malept@users.noreply.github.com> --- npm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/package.json b/npm/package.json index 753f3af8b1fd3..a66407d4e4d5c 100644 --- a/npm/package.json +++ b/npm/package.json @@ -8,7 +8,7 @@ "postinstall": "node install.js" }, "dependencies": { - "@electron/get": "^1.13.0", + "@electron/get": "^1.14.1", "@types/node": "^14.6.2", "extract-zip": "^1.0.3" }, From 8ad1470d08435de405b6738ef546d5ca95559fd0 Mon Sep 17 00:00:00 2001 From: Johns Gresham <johnsgresham@gmail.com> Date: Tue, 22 Mar 2022 19:54:08 -0400 Subject: [PATCH 153/811] docs: remove extra $ from npm install command (#33366) --- 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 d7252ac16bfdc..64d82d61dfdb4 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -66,7 +66,7 @@ Your `package.json` file should look something like this: Then, install the `electron` package into your app's `devDependencies`. ```sh npm2yarn -$ npm install --save-dev electron +npm install --save-dev electron ``` > Note: If you're encountering any issues with installing Electron, please From 4633376b28293ed74d88cf292c2539824c3bd795 Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Tue, 22 Mar 2022 17:14:49 -0700 Subject: [PATCH 154/811] test: fix crash on image.crop (#33148) * test: fix crash on image.crop * Trigger CI --- spec-main/screen-helpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec-main/screen-helpers.ts b/spec-main/screen-helpers.ts index 26fbcb8ea2b08..ea9d69e0f17d9 100644 --- a/spec-main/screen-helpers.ts +++ b/spec-main/screen-helpers.ts @@ -41,7 +41,8 @@ const formatHexByte = (val: number): string => { * Get the hex color at the given pixel coordinate in an image. */ export const getPixelColor = (image: Electron.NativeImage, point: Electron.Point): string => { - const pixel = image.crop({ ...point, width: 1, height: 1 }); + // image.crop crashes if point is fractional, so round to prevent that crash + const pixel = image.crop({ x: Math.round(point.x), y: Math.round(point.y), width: 1, height: 1 }); // TODO(samuelmaddock): NativeImage.toBitmap() should return the raw pixel // color, but it sometimes differs. Why is that? const [b, g, r] = pixel.toBitmap(); From 27ddf19f3ce34f0153d29e23f68b6c38b206f296 Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Tue, 22 Mar 2022 17:17:35 -0700 Subject: [PATCH 155/811] chore: use pylint-2.7 (#33232) * chore: use pylint-2.7 * chore: fix pylint errors --- script/lint.js | 2 +- script/release/uploaders/upload.py | 1 + script/run-clang-format.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/script/lint.js b/script/lint.js index 5e7489ee8ddd6..6cfb8143cd081 100755 --- a/script/lint.js +++ b/script/lint.js @@ -103,7 +103,7 @@ const LINTERS = [{ const rcfile = path.join(DEPOT_TOOLS, 'pylintrc'); const args = ['--rcfile=' + rcfile, ...filenames]; const env = Object.assign({ PYTHONPATH: path.join(ELECTRON_ROOT, 'script') }, process.env); - spawnAndCheckExitCode('pylint', args, { env }); + spawnAndCheckExitCode('pylint-2.7', args, { env }); } }, { key: 'javascript', diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 2cec0ff8dabed..88fbcc2423770 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -208,6 +208,7 @@ def zero_zip_date_time(fname): with open(fname, 'r+b') as f: _zero_zip_date_time(f) except Exception: + # pylint: disable=W0707 raise NonZipFileError(fname) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index b7817bb32c612..a8d43e08ba83b 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -78,12 +78,14 @@ def make_diff(diff_file, original, reformatted): class DiffError(Exception): def __init__(self, message, errs=None): + # pylint: disable=R1725 super(DiffError, self).__init__(message) self.errs = errs or [] class UnexpectedError(Exception): def __init__(self, message, exc=None): + # pylint: disable=R1725 super(UnexpectedError, self).__init__(message) self.formatted_traceback = traceback.format_exc() self.exc = exc @@ -96,6 +98,7 @@ def run_clang_format_diff_wrapper(args, file_name): except DiffError: raise except Exception as e: + # pylint: disable=W0707 raise UnexpectedError('{}: {}: {}'.format( file_name, e.__class__.__name__, e), e) @@ -105,6 +108,7 @@ def run_clang_format_diff(args, file_name): with io.open(file_name, 'r', encoding='utf-8') as f: original = f.readlines() except IOError as exc: + # pylint: disable=W0707 raise DiffError(str(exc)) invocation = [args.clang_format_executable, file_name] if args.fix: @@ -117,6 +121,7 @@ def run_clang_format_diff(args, file_name): universal_newlines=True, shell=True) except OSError as exc: + # pylint: disable=W0707 raise DiffError(str(exc)) proc_stdout = proc.stdout proc_stderr = proc.stderr From 06a00b74e817a61f20e2734d50d8eb7bc9b099f6 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <fedor@indutny.com> Date: Tue, 22 Mar 2022 17:37:55 -0700 Subject: [PATCH 156/811] 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 <raisinten@gmail.com> * Update patches/node/worker_thread_add_asar_support.patch Co-authored-by: Darshan Sen <raisinten@gmail.com> * Add a test Co-authored-by: Darshan Sen <raisinten@gmail.com> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --- 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 7e1c403073d8c..85ca6d4b58d7c 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -34,3 +34,4 @@ darwin_bump_minimum_supported_version_to_10_15_3406.patch fix_failing_node_js_test_on_outdated.patch be_compatible_with_cppgc.patch feat_add_knostartdebugsignalhandler_to_environment_to_prevent.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 <indutny@signal.org> +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 <vector> #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<Archive> { +class Archive : public node::ObjectWrap { public: - static gin::Handle<Archive> Create(v8::Isolate* isolate, - const base::FilePath& path) { - auto archive = std::make_unique<asar::Archive>(path); - if (!archive->Init()) - return gin::Handle<Archive>(); - 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<v8::FunctionTemplate> 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<asar::Archive> archive) + explicit Archive(std::unique_ptr<asar::Archive> archive) : archive_(std::move(archive)) {} + static void New(const v8::FunctionCallbackInfo<v8::Value>& 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<asar::Archive>(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<v8::Value> GetFileInfo(v8::Isolate* isolate, - const base::FilePath& path) { + static void GetFileInfo(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(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<Archive> { 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<v8::Value> Stat(v8::Isolate* isolate, const base::FilePath& path) { + static void Stat(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(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<v8::Value> Readdir(v8::Isolate* isolate, - const base::FilePath& path) { + static void Readdir(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder()); + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + std::vector<base::FilePath> 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<v8::Value> Realpath(v8::Isolate* isolate, - const base::FilePath& path) { + static void Realpath(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(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<v8::Value> CopyFileOut(v8::Isolate* isolate, - const base::FilePath& path) { + static void CopyFileOut(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(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<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder()); + + args.GetReturnValue().Set(gin::ConvertToV8( + isolate, wrap->archive_ ? wrap->archive_->GetUnsafeFD() : -1)); } - private: std::unique_ptr<asar::Archive> archive_; }; -// static -gin::WrapperInfo Archive::kWrapperInfo = {gin::kEmbedderNativeGin}; +static void InitAsarSupport(const v8::FunctionCallbackInfo<v8::Value>& args) { + auto* isolate = args.GetIsolate(); + auto require = args[0]; -void InitAsarSupport(v8::Isolate* isolate, v8::Local<v8::Value> require) { // Evaluate asar_bundle.js. std::vector<v8::Local<v8::String>> asar_bundle_params = { node::FIXED_ONE_BYTE_STRING(isolate, "require")}; @@ -142,8 +206,15 @@ void InitAsarSupport(v8::Isolate* isolate, v8::Local<v8::Value> require) { &asar_bundle_params, &asar_bundle_args, nullptr); } -v8::Local<v8::Value> SplitPath(v8::Isolate* isolate, - const base::FilePath& path) { +static void SplitPath(const v8::FunctionCallbackInfo<v8::Value>& 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<v8::Value> SplitPath(v8::Isolate* isolate, } else { dict.Set("isAsar", false); } - return dict.GetHandle(); + args.GetReturnValue().Set(dict.GetHandle()); } void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused, v8::Local<v8::Context> 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~i<o8*=J6&gY5ad|<p|Y>BRFFl4?Z8(Y=>!!9+|8<2SzhBMM?ZNQQ_3CN68 zjfJAG?CXdZb<tv8KH}r*>XOC@B1&OOJS(0_kebF!1R_poz;Ve)s6^x}WvSqj=b20r znsO>N&^QInHDgq#LhB5fWZkOuYS#!0GZqEx=MFo(Jzn5$7-r<T?bpyBm}c>wXPm%) 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 c3b73935a2999..ae8a2e84cd878 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 800b96fe142446faa08aa0d380e71e3bea79b12f Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 22 Mar 2022 17:45:23 -0700 Subject: [PATCH 157/811] docs: add new IPC validation section to the security tutorial (#33369) * docs: add new IPC validation section to the security tutorial * Update security.md * Update docs/tutorial/security.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/tutorial/security.md Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Erick Zhao <erick@hotmail.ca> --- docs/tutorial/security.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index d267a61a47d00..db5b1b60a337c 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -723,6 +723,41 @@ 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. +### 17. Validate the `sender` of all IPC messages + +You should always validate incoming IPC messages `sender` property to ensure you +aren't performing actions or sending information to untrusted renderers. + +#### Why? + +All Web Frames can in theory send IPC messages to the main process, including +iframes and child windows in some scenarios. If you have an IPC message that returns +user data to the sender via `event.reply` or performs privileged actions that the renderer +can't natively, you should ensure you aren't listening to third party web frames. + +You should be validating the `sender` of **all** IPC messages by default. + +#### How? + +```js title='main.js (Main Process)' +// Bad +ipcMain.handle('get-secrets', () => { + return getSecrets(); +}); + +// Good +ipcMain.handle('get-secrets', (e) => { + if (!validateSender(e.senderFrame)) return null; + return getSecrets(); +}); + +function validateSender(frame) { + // Value the host of the URL using an actual URL parser and an allowlist + if ((new URL(frame.url)).host === 'electronjs.org') return true; + return false; +} +``` + [breaking-changes]: ../breaking-changes.md [browser-window]: ../api/browser-window.md [browser-view]: ../api/browser-view.md From 3744ac0a520562e08ecc4ec5f88f059818a0ad1e Mon Sep 17 00:00:00 2001 From: andreasdj <johansson.d.andreas@gmail.com> Date: Wed, 23 Mar 2022 02:16:15 +0100 Subject: [PATCH 158/811] fix: persist BrowserView content bounds when calculating layout (#32747) Reverting change introduced in PR: https://github.com/electron/electron/pull/30510 Co-authored-by: Andreas Johansson <aj3621@tobii.com> --- 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 6bb492ac231777437e6d7a1cd5ecf703093fba91 Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Wed, 23 Mar 2022 02:46:45 -0700 Subject: [PATCH 159/811] docs: update Ubuntu version used for Linux prebuilt binaries (#33372) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00bb29edb3c9f..a239e00ada6b4 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Each Electron release provides binaries for macOS, Windows, and Linux. * macOS (El Capitan and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11. * Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. -* Linux: The prebuilt binaries of Electron are built on Ubuntu 18.04. They have also been verified to work on: +* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on: * Ubuntu 14.04 and newer * Fedora 24 and newer * Debian 8 and newer From a5ab10f3d2370aa8c3d9abb409776dc4875966af Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 06:00:58 -0700 Subject: [PATCH 160/811] Bump v19.0.0-nightly.20220323 --- 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 7ed2959db92aa..def1880de7559 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220322 \ No newline at end of file +19.0.0-nightly.20220323 \ No newline at end of file diff --git a/package.json b/package.json index e385ef6a7ab8b..f4eab271f4e6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220322", + "version": "19.0.0-nightly.20220323", "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 b311dceaba875..38eebf5219792 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 19,0,0,20220322 - PRODUCTVERSION 19,0,0,20220322 + FILEVERSION 19,0,0,20220323 + PRODUCTVERSION 19,0,0,20220323 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f912130be6731e2636ed31f6da6e7a1d1d9e8b9d Mon Sep 17 00:00:00 2001 From: Jeremy Rose <jeremya@chromium.org> Date: Wed, 23 Mar 2022 06:30:54 -0700 Subject: [PATCH 161/811] fix: libuv patches to address child_process.spawn slowness (#33337) * fix: libuv patches to address child_process.spawn slowness * chore: backport additional patches Co-authored-by: deepak1556 <hop2deep@gmail.com> --- 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 85ca6d4b58d7c..2c7f73453169f 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -35,3 +35,14 @@ fix_failing_node_js_test_on_outdated.patch be_compatible_with_cppgc.patch feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch worker_thread_add_asar_support.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 <info@bnoordhuis.nl> +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 <vtjnash@gmail.com> +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 <vtjnash@gmail.com> +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 <sys/event.h> ++#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 <nornagon@nornagon.net> +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 <sys/event.h> ++#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 <vtjnash@gmail.com> +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 <vtjnash@gmail.com> +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 <vtjnash@gmail.com> +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 <vtjnash@gmail.com> +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 <assert.h> + #include <errno.h> + #include <signal.h> ++#include <string.h> + + #include <sys/types.h> + #include <sys/wait.h> +@@ -35,8 +36,21 @@ + #include <poll.h> + + #if defined(__APPLE__) && !TARGET_OS_IPHONE ++# include <spawn.h> ++# include <paths.h> ++# include <sys/kauth.h> ++# include <sys/types.h> ++# include <sys/sysctl.h> ++# include <dlfcn.h> + # include <crt_externs.h> ++# include <xlocale.h> + # 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 <vtjnash@gmail.com> +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 <info@bnoordhuis.nl> + +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 <stdlib.h> + #include <assert.h> + #include <errno.h> ++#include <signal.h> + + #include <sys/types.h> + #include <sys/wait.h> +@@ -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 <vtjnash@gmail.com> +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 <info@bnoordhuis.nl> +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 41f94ef1549815f9e44ad29927d338d71a95d3ee Mon Sep 17 00:00:00 2001 From: John Kleinschmidt <jkleinsc@electronjs.org> Date: Wed, 23 Mar 2022 12:40:29 -0400 Subject: [PATCH 162/811] Revert "test: re-enable webview resize events test (#33220)" (#33409) This reverts commit c262eac441a8fb69ee22b1ecb22979b8ce3b7948. --- spec/webview-spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index ca2ce8f84ad94..0b649d1bd77ad 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -1214,7 +1214,9 @@ describe('<webview> tag', function () { const generateSpecs = (description, sandbox) => { describe(description, () => { - it('emits resize events', async () => { + // TODO(nornagon): disabled during chromium roll 2019-06-11 due to a + // 'ResizeObserver loop limit exceeded' error on Windows + xit('emits resize events', async () => { const firstResizeSignal = waitForEvent(webview, 'resize'); const domReadySignal = waitForEvent(webview, 'dom-ready'); From cc253f5de96dc4f798673b0bbb5cb2c49ea2b7ce Mon Sep 17 00:00:00 2001 From: John Kleinschmidt <jkleinsc@electronjs.org> Date: Wed, 23 Mar 2022 18:55:26 -0400 Subject: [PATCH 163/811] ci: abort CI if goma authentication is invalid (#33413) --- .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 3d4f5c162644a..a6c0411fcab71 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 db5a3c014ae17e464fcd1fa6bfcd05a40ea2ed71 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 18:59:54 -0400 Subject: [PATCH 164/811] chore: bump node to v16.14.2 (main) (#32833) * chore: bump node in DEPS to v16.14.0 * src: add flags for controlling process behavior https://github.com/nodejs/node/pull/40339 * src: add x509.fingerprint512 to crypto module https://github.com/nodejs/node/pull/39809 * deps: upgrade to libuv 1.43.0 https://github.com/nodejs/node/pull/41398 * chore: fixup patch indices * chore: add missing filenames https://github.com/nodejs/node/pull/39283 https://github.com/nodejs/node/pull/40665 * crypto: trim input for NETSCAPE_SPKI_b64_decode https://github.com/nodejs/node/pull/40757 * chore: update patches * chore: bump node in DEPS to v16.14.1 * tools: enable no-empty ESLint rule https://github.com/nodejs/node/pull/41831 * chore: update patches * chore: update patches * chore: bump node in DEPS to v16.14.2 * chore: update patches Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- DEPS | 2 +- patches/node/.patches | 3 - ...m_env_option_to_disable_node_options.patch | 68 ---------------- patches/node/be_compatible_with_cppgc.patch | 2 +- patches/node/build_add_gn_build_files.patch | 20 +++-- ...f_original-fs_and_custom_embedder_js.patch | 2 +- ...de_entrypoint_to_be_a_builtin_module.patch | 18 +++-- ...owserglobals_from_global_not_process.patch | 4 +- ...imum_supported_version_to_10_15_3406.patch | 2 +- ...ove_eprototype_error_workaround_3405.patch | 2 +- ...nslate_eprototype_to_econnreset_3413.patch | 2 +- ...is_on_64bit_arch_and_ptr_compression.patch | 2 +- ...s_for_low-level_hooks_and_exceptions.patch | 81 ------------------- .../feat_add_uv_loop_watcher_queue_code.patch | 4 +- .../node/feat_initialize_asar_support.patch | 4 +- ...nt_for_debugger_agent_race_condition.patch | 4 +- ..._values_for_variables_in_common_gypi.patch | 2 +- ...everse_jsargs_defines_in_common_gypi.patch | 4 +- ...reventing_initializeinspector_in_env.patch | 12 +-- ..._caused_by_gethostnamew_on_windows_7.patch | 68 +--------------- .../fix_crypto_tests_to_run_with_bssl.patch | 25 +++--- ...se_tracing_tracingcontroller_instead.patch | 4 +- ...ingssl_and_openssl_incompatibilities.patch | 26 +++--- ...g_-wdeprecated-declarations_in_libuv.patch | 4 +- .../pass_all_globals_through_require.patch | 4 +- ...dder_overriding_of_internal_fs_calls.patch | 6 +- ...cess_fork_to_use_execute_script_with.patch | 4 +- ...rash_when_sharedarraybuffer_disabled.patch | 2 +- ...to_provide_a_custom_pageallocator_to.patch | 6 +- .../node/test_add_fixture_trim_option.patch | 49 ----------- shell/common/node_bindings.cc | 10 ++- 31 files changed, 95 insertions(+), 351 deletions(-) delete mode 100644 patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch delete mode 100644 patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch delete mode 100644 patches/node/test_add_fixture_trim_option.patch diff --git a/DEPS b/DEPS index 790da2014c4de..c8b39d0e1ec0e 100644 --- a/DEPS +++ b/DEPS @@ -17,7 +17,7 @@ vars = { 'chromium_version': '100.0.4894.0', 'node_version': - 'v16.13.2', + 'v16.14.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/.patches b/patches/node/.patches index 2c7f73453169f..7b2b6aae5d061 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -4,7 +4,6 @@ feat_initialize_asar_support.patch expose_get_builtin_module_function.patch build_add_gn_build_files.patch fix_add_default_values_for_variables_in_common_gypi.patch -feat_add_flags_for_low-level_hooks_and_exceptions.patch fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch pass_all_globals_through_require.patch build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch @@ -19,11 +18,9 @@ fix_allow_preventing_initializeinspector_in_env.patch src_allow_embedders_to_provide_a_custom_pageallocator_to.patch fix_crypto_tests_to_run_with_bssl.patch fix_account_for_debugger_agent_race_condition.patch -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 -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/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 deleted file mode 100644 index 8f7b86fbef1fb..0000000000000 --- a/patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard <samuel.r.attard@gmail.com> -Date: Wed, 21 Jul 2021 13:40:59 -0700 -Subject: add should_read_node_options_from_env option to disable NODE_OPTIONS - parsing at runtime - -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 2cb2dccdf32ba4ad58972bb1d2b185996104b5ee..0abd61d6ddd1fb55afde40b38cf7c9400a8c3d41 100644 ---- a/src/env.cc -+++ b/src/env.cc -@@ -329,6 +329,9 @@ std::string GetExecPath(const std::vector<std::string>& argv) { - return exec_path; - } - -+/* static */ -+bool Environment::should_read_node_options_from_env_ = true; -+ - Environment::Environment(IsolateData* isolate_data, - Isolate* isolate, - const std::vector<std::string>& args, -diff --git a/src/env.h b/src/env.h -index e0deca497feb111622b257b952c9ed9161c7d001..ab8334bf0e3405fee4d21a4b541bd1164d92ca89 100644 ---- a/src/env.h -+++ b/src/env.h -@@ -1145,6 +1145,8 @@ class Environment : public MemoryRetainer { - inline double trigger_async_id(); - inline double get_default_trigger_async_id(); - -+ static bool should_read_node_options_from_env_; -+ - // List of id's that have been destroyed and need the destroy() cb called. - inline std::vector<double>* destroy_async_id_list(); - -diff --git a/src/node.cc b/src/node.cc -index 207a95d202b4e422a39f837241f1655f7111b1e3..14b9002dbd918b59b05d8b12c5441080695ed9f0 100644 ---- a/src/node.cc -+++ b/src/node.cc -@@ -875,7 +875,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv, - #if !defined(NODE_WITHOUT_NODE_OPTIONS) - std::string node_options; - -- if (credentials::SafeGetenv("NODE_OPTIONS", &node_options)) { -+ if (Environment::should_read_node_options_from_env_ && credentials::SafeGetenv("NODE_OPTIONS", &node_options)) { - std::vector<std::string> env_argv = - ParseNodeOptionsEnvVar(node_options, errors); - -diff --git a/src/node_worker.cc b/src/node_worker.cc -index 16b7be36f284311f38583fa1df28a2945560b524..62a7dae080fad7e18863968dee22dbe4b461ab82 100644 ---- a/src/node_worker.cc -+++ b/src/node_worker.cc -@@ -467,6 +467,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) { - }); - - #ifndef NODE_WITHOUT_NODE_OPTIONS -+ if (Environment::should_read_node_options_from_env_) { - MaybeLocal<String> maybe_node_opts = - env_vars->Get(isolate, OneByteString(isolate, "NODE_OPTIONS")); - Local<String> node_opts; -@@ -497,6 +498,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) { - return; - } - } -+ } - #endif - } - diff --git a/patches/node/be_compatible_with_cppgc.patch b/patches/node/be_compatible_with_cppgc.patch index 3bbc3ce0bde16..c907fff1e20a4 100644 --- a/patches/node/be_compatible_with_cppgc.patch +++ b/patches/node/be_compatible_with_cppgc.patch @@ -83,7 +83,7 @@ index bb1e8d4b46bce3bf08f730ac5d43f7113d17ae39..6da0669943fc6465ffc47a1c8c3dadfe } diff --git a/src/base_object.h b/src/base_object.h -index d46a0f216009c63f45c440fc352b54d1ac4a08d8..81913c0d7762bf499ee19aaa3b63b986ca370bb4 100644 +index 1c63da92fd80c042d5ea729bdd70049cae51a141..3b8127e884187b21cebeabb39b60bd3010b62217 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -40,7 +40,7 @@ class TransferData; diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 3d78f40a42624..d18f8e519d5a4 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -964,10 +964,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636 +} diff --git a/filenames.json b/filenames.json new file mode 100644 -index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc41054754 +index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424afb63ca5 --- /dev/null +++ b/filenames.json -@@ -0,0 +1,604 @@ +@@ -0,0 +1,612 @@ +// This file is automatically generated by generate_gn_filenames_json.py +// DO NOT EDIT +{ @@ -1191,6 +1191,7 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "lib/internal/blob.js", + "lib/internal/socket_list.js", + "lib/internal/socketaddress.js", ++ "lib/internal/promise_hooks.js", + "lib/internal/stream_base_commons.js", + "lib/internal/url.js", + "lib/internal/async_hooks.js", @@ -1229,6 +1230,7 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "lib/internal/webstreams/queuingstrategies.js", + "lib/internal/webstreams/encoding.js", + "lib/internal/webstreams/transformstream.js", ++ "lib/internal/webstreams/adapters.js", + "lib/internal/webstreams/transfer.js", + "lib/internal/bootstrap/loaders.js", + "lib/internal/bootstrap/pre_execution.js", @@ -1252,6 +1254,7 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "lib/internal/streams/destroy.js", + "lib/internal/streams/legacy.js", + "lib/internal/streams/passthrough.js", ++ "lib/internal/streams/operators.js", + "lib/internal/streams/readable.js", + "lib/internal/streams/from.js", + "lib/internal/streams/writable.js", @@ -1263,6 +1266,7 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "lib/internal/streams/lazy_transform.js", + "lib/internal/streams/duplex.js", + "lib/internal/streams/pipeline.js", ++ "lib/internal/readline/interface.js", + "lib/internal/readline/utils.js", + "lib/internal/readline/emitKeypressEvents.js", + "lib/internal/readline/callbacks.js", @@ -1300,11 +1304,14 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "lib/internal/modules/run_main.js", + "lib/internal/modules/package_json_reader.js", + "lib/internal/modules/esm/module_job.js", ++ "lib/internal/modules/esm/assert.js", + "lib/internal/modules/esm/get_source.js", + "lib/internal/modules/esm/translators.js", + "lib/internal/modules/esm/resolve.js", + "lib/internal/modules/esm/create_dynamic_module.js", + "lib/internal/modules/esm/load.js", ++ "lib/internal/modules/esm/handle_process_exit.js", ++ "lib/internal/modules/esm/initialize_import_meta.js", + "lib/internal/modules/esm/module_map.js", + "lib/internal/modules/esm/get_format.js", + "lib/internal/modules/esm/loader.js", @@ -1565,6 +1572,7 @@ index 0000000000000000000000000000000000000000..ac32bd83b683b048ffde3314f4caebbc + "src/tracing/trace_event_common.h", + "src/tracing/traced_value.h", + "src/timer_wrap.h", ++ "src/timer_wrap-inl.h", + "src/tty_wrap.h", + "src/udp_wrap.h", + "src/util.h", @@ -1778,7 +1786,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 31e75367f8263f575f37243475acb58bb5c40d04..8f102792fe66847dad0ba7176299cf09686cd182 100644 +index 41081f82714169f3bf388c3a8c2d9aa78e21a3f4..48c0d2655789a0528dfea0a60f756aacb48a6f60 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ @@ -1905,10 +1913,10 @@ index 0000000000000000000000000000000000000000..3088ae4bdf814ae255c9805ebd393b2e + + out_file.writelines(new_contents) diff --git a/tools/install.py b/tools/install.py -index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..dd13ad149f1b4cb807ca7aff62e1b15718116855 100755 +index 8a050dfa7c8b771ceb30fd2b74dc47f3de96834c..ad3bee1660de26d3502c6247f23b091171a6416c 100755 --- a/tools/install.py +++ b/tools/install.py -@@ -170,17 +170,72 @@ def files(action): +@@ -172,17 +172,72 @@ def files(action): def headers(action): def wanted_v8_headers(files_arg, dest): v8_headers = [ @@ -1991,7 +1999,7 @@ index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..dd13ad149f1b4cb807ca7aff62e1b157 files_arg = [name for name in files_arg if name in v8_headers] action(files_arg, dest) -@@ -201,7 +256,7 @@ def headers(action): +@@ -209,7 +264,7 @@ def headers(action): if sys.platform.startswith('aix'): action(['out/Release/node.exp'], 'include/node/') 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 711d8326bb029..519b9bf148983 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 006a30903184d76d6c11849784e6c6b38fd39807..edde37f281c10a1cb69db642149cc300744499cb 100644 +index 5d20e1d6a86416c0de9f01a22b992aad889078d3..c836540c7d9328ae4646097ecc18023c1d8add8f 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 a5087a9679b6c..b921424c37b37 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,31 +8,33 @@ 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 4d4996e9868c35ac3e0babbf08c38d90a6857abc..419ffd9d5deb84eb94381259d3084411f6c3341b 100644 +index 3c5e6fe40070f52d8b3f4e9757485845c1d6dbed..2af6b11c97ecdca3c40792ab35c69b07b9db76a0 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -104,10 +104,12 @@ function patchProcessObject(expandArgv1) { +@@ -95,11 +95,13 @@ function patchProcessObject(expandArgv1) { if (expandArgv1 && process.argv[1] && !StringPrototypeStartsWith(process.argv[1], '-')) { // Expand process.argv[1] into a full path. - const path = require('path'); - try { - process.argv[1] = path.resolve(process.argv[1]); -- } catch {} +- } catch { +- // Continue regardless of error. + if (!process.argv[1] || !process.argv[1].startsWith('electron/js2c')) { + const path = require('path'); + try { + process.argv[1] = path.resolve(process.argv[1]); -+ } catch {} -+ } ++ } catch { ++ // Continue regardless of error. ++ } + } } - // TODO(joyeecheung): most of these should be deprecated and removed, diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 05a62bb3c3852536001912cb0b69fe5578ace125..37f395e9f2b7ab9ce99b0f8f4217253fcbd9175b 100644 +index caca939942cb721a3efde7005b0a987a19237a8b..2d30a56a87ff8657cddb3d9e6af5bd9f81deffdb 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1075,6 +1075,13 @@ Module.prototype._compile = function(content, filename) { +@@ -1077,6 +1077,13 @@ Module.prototype._compile = function(content, filename) { if (getOptionValue('--inspect-brk') && process._eval == null) { if (!resolvedArgv) { // We enter the repl if we're not given a filename argument. diff --git a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch index 046a66f06ab2f..a666b1d9744f7 100644 --- a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch +++ b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch @@ -7,10 +7,10 @@ This is used so that we can modify the flag at runtime where config can only be set at compile time. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index ef06d0563fa7452348754418867a56c9b8c6f4e1..a313402f93937cf2f1f93eb74422d9609e291d76 100644 +index 085dd7e09d31fb1800b3596cc068637e1956ba52..9e0f811b2a37f45a9d8162dff7c9d5c935b856d6 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js -@@ -193,7 +193,7 @@ const { +@@ -209,7 +209,7 @@ const { queueMicrotask } = require('internal/process/task_queues'); 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 index 43023e3d02254..555ee607137d1 100644 --- 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 @@ -11,7 +11,7 @@ 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 +index 87e23823ad6424526fdbc2457e535875124b31cb..79509db5b17bb9e7fe245d8a0fd7fa25f8665426 100644 --- a/deps/uv/SUPPORTED_PLATFORMS.md +++ b/deps/uv/SUPPORTED_PLATFORMS.md @@ -3,7 +3,7 @@ diff --git a/patches/node/darwin_remove_eprototype_error_workaround_3405.patch b/patches/node/darwin_remove_eprototype_error_workaround_3405.patch index 60dc8b799e4b7..45d8d4936d74e 100644 --- a/patches/node/darwin_remove_eprototype_error_workaround_3405.patch +++ b/patches/node/darwin_remove_eprototype_error_workaround_3405.patch @@ -18,7 +18,7 @@ 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 +index 5858258d2868c3352e0e9e3313045aa29ff4a873..c5cd6ddc0b627eeb047e0cb08677f65b4601b89b 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -58,20 +58,6 @@ struct uv__stream_select_s { diff --git a/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch b/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch index 903921bce934b..c6199bc4c1388 100644 --- a/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch +++ b/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch @@ -18,7 +18,7 @@ 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 +index c5cd6ddc0b627eeb047e0cb08677f65b4601b89b..b5b05a6a4a737f50b780b7c15717b4f465496fa8 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, 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 3beda4a974e9f..6b9b4d53271ba 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 4b6a965f65b9ad711507e4dd7ade4d54d52277cc..9e4064b263819756f17fb712a54bd6f828c5be35 100644 +index b86c3f3bbeddfa57c223ff066451fd3e1ce1315d..59e6a857060a35ca52cff2b44bc412a3f5e8eece 100644 --- a/common.gypi +++ b/common.gypi @@ -64,7 +64,7 @@ diff --git a/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch b/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch deleted file mode 100644 index bfe9ef5ec6ade..0000000000000 --- a/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr <shelley.vohr@gmail.com> -Date: Thu, 13 Sep 2018 08:42:22 -0700 -Subject: feat: add flags for low-level hooks and exceptions - -This commit adds two new exposed methods to `node.cc`, `InitGeneric` and -`LoadEnvironmentGeneric` that allow for control of which mode Node -should run, which i have called `standalone_mode` and -`upstream_node_mode`. Default behavior of `Init` and `LoadEnvironment` -remain the same. - -We have 3 modes when running Node in Electron: -1. In the main process, we want to have a full Node environment, but -with signal handlers and other low level things disabled -2. In renderer process, we want Node to reuse the web page's context -3. In `ELECTRON_RUN_AS_NODE`, we want Node to run as it runs officially -by default - -For modes 1 and 3, we have Node create a new V8 context with a Node -Environment on it. However, for mode 2, since the V8 context is created -by blink for web frames and web workers we make Node create the Node -Environment on the V8 context of blink, so no new V8 context is created. - -As a result, a renderer process may have multiple Node Environments in it. - -diff --git a/src/node.cc b/src/node.cc -index e942c108a15a3c50d92c08b344f6691050c7859d..207a95d202b4e422a39f837241f1655f7111b1e3 100644 ---- a/src/node.cc -+++ b/src/node.cc -@@ -139,6 +139,8 @@ using v8::Undefined; - using v8::V8; - using v8::Value; - -+bool g_upstream_node_mode = true; -+ - namespace per_process { - - // node_revert.h -@@ -853,7 +855,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv, - binding::RegisterBuiltinModules(); - - // Make inherited handles noninheritable. -- uv_disable_stdio_inheritance(); -+ if (g_upstream_node_mode) { -+ uv_disable_stdio_inheritance(); -+ } - - // Cache the original command line to be - // used in diagnostic reports. -@@ -887,7 +891,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv, - if (exit_code != 0) return exit_code; - } - #endif -- -+ if (g_upstream_node_mode) { -+ // NOTE(jeremy): indentation is intentionally wrong here, to ease rebasing. - const int exit_code = ProcessGlobalArgs(argv, - exec_argv, - errors, -@@ -930,7 +935,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv, - return 9; - } - per_process::metadata.versions.InitializeIntlVersions(); -- -+ } // g_upstream_node_mode - # ifndef __POSIX__ - std::string tz; - if (credentials::SafeGetenv("TZ", &tz) && !tz.empty()) { -diff --git a/src/node.h b/src/node.h -index 1f9afa558d0c8b7950a0f5862017e09a08118ec1..45de72bd94cf669ac2badf89d23164cb7022a5b3 100644 ---- a/src/node.h -+++ b/src/node.h -@@ -213,6 +213,8 @@ namespace node { - - class IsolateData; - class Environment; -+// Whether node should open some low level hooks. -+NODE_EXTERN extern bool g_upstream_node_mode; - - // TODO(addaleax): Officially deprecate this and replace it with something - // better suited for a public embedder API. diff --git a/patches/node/feat_add_uv_loop_watcher_queue_code.patch b/patches/node/feat_add_uv_loop_watcher_queue_code.patch index 610da58034be2..49468ed2ae2fe 100644 --- a/patches/node/feat_add_uv_loop_watcher_queue_code.patch +++ b/patches/node/feat_add_uv_loop_watcher_queue_code.patch @@ -6,10 +6,10 @@ Subject: feat: add uv_loop watcher_queue code Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h -index 77503bde9f28e4769ae3832fb2117e632e9c9268..49930027bdad013d8fcbc375c534d67cc5201bc7 100644 +index 606083c87de5790d7e66fc34aeaae9a58acb8ef4..ca9568c58b1ccd554318f5deb27d2b4e80f08a28 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h -@@ -1802,6 +1802,8 @@ union uv_any_req { +@@ -1805,6 +1805,8 @@ union uv_any_req { struct uv_loop_s { /* User data - use this for whatever. */ void* data; diff --git a/patches/node/feat_initialize_asar_support.patch b/patches/node/feat_initialize_asar_support.patch index b32de0a339035..350139338d233 100644 --- a/patches/node/feat_initialize_asar_support.patch +++ b/patches/node/feat_initialize_asar_support.patch @@ -6,7 +6,7 @@ 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 f2a10641906e317270e7f27f4ee3ee1956802113..4d4996e9868c35ac3e0babbf08c38d90a6857abc 100644 +index f21ba048b4863863e6c7b740f410775776a7649a..3c5e6fe40070f52d8b3f4e9757485845c1d6dbed 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { @@ -17,7 +17,7 @@ index f2a10641906e317270e7f27f4ee3ee1956802113..4d4996e9868c35ac3e0babbf08c38d90 } function patchProcessObject(expandArgv1) { -@@ -484,6 +485,10 @@ function loadPreloadModules() { +@@ -477,6 +478,10 @@ function loadPreloadModules() { } } diff --git a/patches/node/fix_account_for_debugger_agent_race_condition.patch b/patches/node/fix_account_for_debugger_agent_race_condition.patch index e2c4b5401c958..f4f70161ba85a 100644 --- a/patches/node/fix_account_for_debugger_agent_race_condition.patch +++ b/patches/node/fix_account_for_debugger_agent_race_condition.patch @@ -10,7 +10,7 @@ errors. This is remedied by adding a small timeout to the test. We'll either upstream this or figure out a better solution. diff --git a/test/parallel/test-debugger-address.js b/test/parallel/test-debugger-address.js -index 95dd1c6e3f82835d5ccaf65544d654b71efaa392..ed8dccf91247068455dd593bb3e8c02bddc89ae5 100644 +index bffc28ac916e8d241465f1e2649ab8aa4a15a0c7..079e668a3d1c505fa0a540fb1df87b32e603db48 100644 --- a/test/parallel/test-debugger-address.js +++ b/test/parallel/test-debugger-address.js @@ -59,6 +59,7 @@ function launchTarget(...args) { @@ -22,7 +22,7 @@ index 95dd1c6e3f82835d5ccaf65544d654b71efaa392..ed8dccf91247068455dd593bb3e8c02b .then(() => cli.waitFor(/break/)) .then(() => cli.waitForPrompt()) diff --git a/test/sequential/test-debugger-pid.js b/test/sequential/test-debugger-pid.js -index 402c1f86dd4ed99b413eca5fce8a2db47797b11a..74ef0a1618ccf1f6671bbe2a03548eee6cd0b88c 100644 +index 0056113ecaecd3a176ee9539b7fda0132ef59963..3228d0ecc220b5c8c8034fea0dce20f8c38ac68c 100644 --- a/test/sequential/test-debugger-pid.js +++ b/test/sequential/test-debugger-pid.js @@ -41,6 +41,7 @@ function launchTarget(...args) { 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 fc9a9c0e2182d..3278701357152 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 b8d61f0d32709f3476dd2fd870d3959ab8f16a60..4b6a965f65b9ad711507e4dd7ade4d54d52277cc 100644 +index be30169cf58d9759320f1763ede7e0ce89be3aa2..b86c3f3bbeddfa57c223ff066451fd3e1ce1315d 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 7b1e9bff157a1..cc2b2f0f7cbb4 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 9e4064b263819756f17fb712a54bd6f828c5be35..2e59efb38d95231fcbcbb5a7859a6cfad3cf232c 100644 +index 59e6a857060a35ca52cff2b44bc412a3f5e8eece..7741f97758282d1c601eecf263cb4ce1510be284 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ @@ -25,7 +25,7 @@ index 9e4064b263819756f17fb712a54bd6f828c5be35..2e59efb38d95231fcbcbb5a7859a6cfa ##### end V8 defaults ##### # When building native modules using 'npm install' with the system npm, -@@ -390,6 +392,9 @@ +@@ -398,6 +400,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_allow_preventing_initializeinspector_in_env.patch b/patches/node/fix_allow_preventing_initializeinspector_in_env.patch index e018f2af59442..8cfa46d3819e0 100644 --- a/patches/node/fix_allow_preventing_initializeinspector_in_env.patch +++ b/patches/node/fix_allow_preventing_initializeinspector_in_env.patch @@ -36,10 +36,10 @@ index 523d252e08974a10f9a53fb46d3345669cec3380..5bf19a0dda42849159d954181058897c #endif diff --git a/src/env-inl.h b/src/env-inl.h -index 1e85bc07a4cc29f3b380da3c0e217a85309eb3a5..845e00208af4b12960ed8b3f3926323af7685185 100644 +index e679780900abc9f6b6d1d6baa52576df278be8c7..2da8174fe9e4209f4705af0a1cf8bca5928f088c 100644 --- a/src/env-inl.h +++ b/src/env-inl.h -@@ -892,6 +892,10 @@ inline bool Environment::no_global_search_paths() const { +@@ -882,6 +882,10 @@ inline bool Environment::no_global_search_paths() const { !options_->global_search_paths; } @@ -51,10 +51,10 @@ index 1e85bc07a4cc29f3b380da3c0e217a85309eb3a5..845e00208af4b12960ed8b3f3926323a return emit_filehandle_warning_; } diff --git a/src/env.h b/src/env.h -index 0c3715151488f425a723618252e1277b78fafe5f..e0deca497feb111622b257b952c9ed9161c7d001 100644 +index 7aa5822abf11f1858d1ef8551cfc7a8c3d931f1e..2554c530f2ca7078ed0cca03968b31f56027231b 100644 --- a/src/env.h +++ b/src/env.h -@@ -1204,6 +1204,7 @@ class Environment : public MemoryRetainer { +@@ -1215,6 +1215,7 @@ class Environment : public MemoryRetainer { inline bool tracks_unmanaged_fds() const; inline bool hide_console_windows() const; inline bool no_global_search_paths() const; @@ -63,10 +63,10 @@ index 0c3715151488f425a723618252e1277b78fafe5f..e0deca497feb111622b257b952c9ed91 inline worker::Worker* worker_context() const; Environment* worker_parent_env() const; diff --git a/src/node.h b/src/node.h -index 364f789fbcbec8e3234961294698d8e69b04a310..85b5ac6a5a5cb5e4388a92a1d07c9afe17140a8c 100644 +index 70518ba49b3bcbfaf2e46ba8ddc3f04236bc27b8..7ca7502e086190c87ae6a61dca2192253894e906 100644 --- a/src/node.h +++ b/src/node.h -@@ -420,7 +420,11 @@ enum Flags : uint64_t { +@@ -439,7 +439,11 @@ enum Flags : uint64_t { // $HOME/.node_modules and $NODE_PATH. This is used by standalone apps that // do not expect to have their behaviors changed because of globally // installed modules. diff --git a/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch b/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch index eb24c26a805cb..5ebadbf25bec8 100644 --- a/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch +++ b/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch @@ -6,7 +6,7 @@ Subject: fix: crash caused by GetHostNameW on Windows 7 Backported from https://github.com/libuv/libuv/pull/3285. diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c -index 88602c7ee8623f16f87398cf3ffd1f71555fc1a0..5ffde08e1aed041c4da679156ed10f7e54bfc386 100644 +index 33e874ac442f88b58d2b68c8ec9764f6f664552e..2d4cc0aaa02e61bf359e80eca27527efb49fd85e 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -37,6 +37,7 @@ @@ -166,69 +166,3 @@ index 88602c7ee8623f16f87398cf3ffd1f71555fc1a0..5ffde08e1aed041c4da679156ed10f7e int uv_os_gethostname(char* buffer, size_t* size) { WCHAR buf[UV_MAXHOSTNAMESIZE]; size_t len; -@@ -1674,7 +1803,9 @@ int uv_os_gethostname(char* buffer, size_t* size) { - - uv__once_init(); /* Initialize winsock */ - -- if (GetHostNameW(buf, UV_MAXHOSTNAMESIZE) != 0) -+ sGetHostNameW gethostnamew = -+ pGetHostNameW == NULL ? uv__gethostnamew_nt60 : pGetHostNameW; -+ if (gethostnamew(buf, UV_MAXHOSTNAMESIZE) != 0) - return uv_translate_sys_error(WSAGetLastError()); - - convert_result = uv__convert_utf16_to_utf8(buf, -1, &utf8_str); -diff --git a/deps/uv/src/win/winapi.c b/deps/uv/src/win/winapi.c -index bb86ec8ceac8ba3fccd02b292aca7ddfab38e187..9d6effb10ddd1801f7411ee71a70575b7072ab7d 100644 ---- a/deps/uv/src/win/winapi.c -+++ b/deps/uv/src/win/winapi.c -@@ -45,12 +45,15 @@ sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification; - /* User32.dll function pointer */ - sSetWinEventHook pSetWinEventHook; - -+/* ws2_32.dll function pointer */ -+sGetHostNameW pGetHostNameW; - - void uv_winapi_init(void) { - HMODULE ntdll_module; - HMODULE powrprof_module; - HMODULE user32_module; - HMODULE kernel32_module; -+ HMODULE ws2_32_module;; - - ntdll_module = GetModuleHandleA("ntdll.dll"); - if (ntdll_module == NULL) { -@@ -134,4 +137,10 @@ void uv_winapi_init(void) { - pSetWinEventHook = (sSetWinEventHook) - GetProcAddress(user32_module, "SetWinEventHook"); - } -+ -+ ws2_32_module = LoadLibraryA("ws2_32.dll"); -+ if (ws2_32_module != NULL) { -+ pGetHostNameW = (sGetHostNameW) -+ GetProcAddress(ws2_32_module, "GetHostNameW"); -+ } - } -diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h -index 0b66b5634bca88cec65b1bf0c0193986f5ddd542..5951717ab9e21db274f956c44410cc03c1617eaf 100644 ---- a/deps/uv/src/win/winapi.h -+++ b/deps/uv/src/win/winapi.h -@@ -4739,6 +4739,11 @@ typedef struct _TCP_INITIAL_RTO_PARAMETERS { - # define SIO_TCP_INITIAL_RTO _WSAIOW(IOC_VENDOR,17) - #endif - -+/* From winsock2.h */ -+typedef int (WSAAPI *sGetHostNameW) -+ (PWSTR name, -+ int namelen); -+ - /* Ntdll function pointers */ - extern sRtlGetVersion pRtlGetVersion; - extern sRtlNtStatusToDosError pRtlNtStatusToDosError; -@@ -4759,4 +4764,7 @@ extern sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotifi - /* User32.dll function pointer */ - extern sSetWinEventHook pSetWinEventHook; - -+/* ws2_32.dll function pointer */ -+extern sGetHostNameW pGetHostNameW; -+ - #endif /* UV_WIN_WINAPI_H_ */ 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 7774100703837..20e89d87ef6be 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -590,7 +590,7 @@ index 9afcb38616dafd6da1ab7b5843d68f4f796ca9a6..00d3381056a5a40c549f06d74c130149 } +*/ diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js -index 6893f0c0e6d49a8e171ec9f156f74656dab9fd06..4c8ccd10e0dcd64669cccca1e8c2e5279d683595 100644 +index b2c14b1efcd68bd20e9c946106f1ab5fb58627c5..eef0bfe638b641c68fdadd95226a74df044921cb 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -29,6 +29,7 @@ const keySize = 2048; @@ -673,20 +673,19 @@ index 008ab129f0e019c659eecf5a76b7eb412c947fe3..6688f5d916f50e1e4fcfff1619c8634a cipher.end('Papaya!'); // Should not cause an unhandled exception. diff --git a/test/parallel/test-crypto-x509.js b/test/parallel/test-crypto-x509.js -index c85a79b4854369e35fbe89833e9df9a12065671e..8f13ac60362854d12264f26b74533bd55efd6605 100644 +index d1782359277dc52d7a60830a6dd958544d610e6b..4c781f062bc505b860b821773070551f4cd80067 100644 --- a/test/parallel/test-crypto-x509.js +++ b/test/parallel/test-crypto-x509.js -@@ -104,7 +104,8 @@ const der = Buffer.from( - '84:AC:5B:08:9A:20:89:B6:8F:D6' +@@ -110,7 +110,7 @@ const der = Buffer.from( + 'A3:06:C5:CE:43:C1:7F:2D:7E:5F:44:A5:EE:A3:CB:97:05:A3:E3:68' ); assert.strictEqual(x509.keyUsage, undefined); - assert.strictEqual(x509.serialNumber, 'ECC9B856270DA9A8'); -+ + assert.match(x509.serialNumber, /ECC9B856270DA9A8/i); assert.deepStrictEqual(x509.raw, der); -@@ -190,6 +191,12 @@ const der = Buffer.from( +@@ -196,6 +196,12 @@ const der = Buffer.from( }); mc.port2.postMessage(x509); @@ -699,7 +698,7 @@ index c85a79b4854369e35fbe89833e9df9a12065671e..8f13ac60362854d12264f26b74533bd5 // Verify that legacy encoding works const legacyObjectCheck = { subject: 'C=US\n' + -@@ -213,11 +220,7 @@ const der = Buffer.from( +@@ -219,11 +225,7 @@ const der = Buffer.from( 'CA Issuers - URI:http://ca.nodejs.org/ca.cert' : 'OCSP - URI:http://ocsp.nodejs.org/\n' + 'CA Issuers - URI:http://ca.nodejs.org/ca.cert\n', @@ -712,16 +711,16 @@ index c85a79b4854369e35fbe89833e9df9a12065671e..8f13ac60362854d12264f26b74533bd5 bits: 1024, exponent: '0x10001', valid_from: 'Nov 16 18:42:21 2018 GMT', -@@ -226,7 +229,7 @@ const der = Buffer.from( - fingerprint256: - 'B0:BE:46:49:B8:29:63:E0:6F:63:C8:8A:57:9C:3F:9B:72:' + - 'C6:F5:89:E3:0D:84:AC:5B:08:9A:20:89:B6:8F:D6', +@@ -237,7 +239,7 @@ const der = Buffer.from( + 'D0:39:97:54:B6:D0:B4:46:5B:DE:13:5B:68:86:B6:F2:A8:' + + '95:22:D5:6E:8B:35:DA:89:29:CA:A3:06:C5:CE:43:C1:7F:' + + '2D:7E:5F:44:A5:EE:A3:CB:97:05:A3:E3:68', - serialNumber: 'ECC9B856270DA9A8' + serialNumberPattern: /ECC9B856270DA9A8/i }; const legacyObject = x509.toLegacyObject(); -@@ -235,7 +238,7 @@ const der = Buffer.from( +@@ -246,7 +248,7 @@ const der = Buffer.from( assert.strictEqual(legacyObject.subject, legacyObjectCheck.subject); assert.strictEqual(legacyObject.issuer, legacyObjectCheck.issuer); assert.strictEqual(legacyObject.infoAccess, legacyObjectCheck.infoAccess); @@ -730,7 +729,7 @@ index c85a79b4854369e35fbe89833e9df9a12065671e..8f13ac60362854d12264f26b74533bd5 assert.strictEqual(legacyObject.bits, legacyObjectCheck.bits); assert.strictEqual(legacyObject.exponent, legacyObjectCheck.exponent); assert.strictEqual(legacyObject.valid_from, legacyObjectCheck.valid_from); -@@ -244,7 +247,5 @@ const der = Buffer.from( +@@ -255,7 +257,5 @@ const der = Buffer.from( assert.strictEqual( legacyObject.fingerprint256, legacyObjectCheck.fingerprint256); diff --git a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch index 8c641431ad5cc..97e7fb79cfe5a 100644 --- a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch +++ b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch @@ -22,7 +22,7 @@ index 0fb750c5abbe00740f2095ec397c823e26666199..523d252e08974a10f9a53fb46d334566 int thread_pool_size, node::tracing::TracingController* tracing_controller) { diff --git a/src/node.h b/src/node.h -index 45de72bd94cf669ac2badf89d23164cb7022a5b3..364f789fbcbec8e3234961294698d8e69b04a310 100644 +index 5b1404ff8e290a505a1143b582494e9a3319a183..70518ba49b3bcbfaf2e46ba8ddc3f04236bc27b8 100644 --- a/src/node.h +++ b/src/node.h @@ -118,6 +118,7 @@ namespace node { @@ -33,7 +33,7 @@ index 45de72bd94cf669ac2badf89d23164cb7022a5b3..364f789fbcbec8e3234961294698d8e6 class TracingController; } -@@ -499,6 +500,8 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> PrepareStackTraceCallback( +@@ -518,6 +519,8 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> PrepareStackTraceCallback( NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env); NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env); diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index a91c0a3cdd949..f7b4c08817e12 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 fe828bafa6422cc1f1717afddbd4b199055e9c43..74c56954e5e2d8efc3d8495860addc0138f39f3a 100644 +index f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda45426038d199 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -176,7 +176,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { @@ -66,7 +66,7 @@ index fe828bafa6422cc1f1717afddbd4b199055e9c43..74c56954e5e2d8efc3d8495860addc01 } const char* X509ErrorCode(long err) { // NOLINT(runtime/int) -@@ -1117,14 +1124,14 @@ MaybeLocal<Array> GetClientHelloCiphers( +@@ -1126,14 +1133,14 @@ MaybeLocal<Array> GetClientHelloCiphers( Environment* env, const SSLPointer& ssl) { EscapableHandleScope scope(env->isolate()); @@ -86,10 +86,10 @@ index fe828bafa6422cc1f1717afddbd4b199055e9c43..74c56954e5e2d8efc3d8495860addc01 if (!Set(env->context(), obj, diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc -index 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb6d29b366 100644 +index b6ef5e5b1e004e663fbfd2578b82644cb53051e0..1d48ea6d022304b1e6a4f703fea790437edcc876 100644 --- a/src/crypto/crypto_dh.cc +++ b/src/crypto/crypto_dh.cc -@@ -144,13 +144,11 @@ void DiffieHellman::MemoryInfo(MemoryTracker* tracker) const { +@@ -143,13 +143,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 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb return false; } BIGNUM* bn_p = -@@ -168,21 +166,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) { +@@ -167,21 +165,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 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb return false; } BIGNUM* bn_p = -@@ -502,16 +497,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { +@@ -501,16 +496,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 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb if (!param_ctx || EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 || EVP_PKEY_CTX_set_dh_paramgen_prime_len( -@@ -523,8 +522,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { +@@ -522,8 +521,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0) { return EVPKeyCtxPointer(); } @@ -244,10 +244,10 @@ index ae4550e9fde8120c35409e495d5b763a95546509..188a7efe76df2a1aa2eb2746f4d74836 if (target diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7a4bb18d7 100644 +index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba1e76ce0a 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc -@@ -503,24 +503,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj, +@@ -508,24 +508,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj, V(BIO) \ V(PKCS7) \ V(X509V3) \ @@ -272,7 +272,7 @@ index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7 V(USER) \ #define V(name) case ERR_LIB_##name: lib = #name "_"; break; -@@ -680,7 +670,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { +@@ -684,7 +674,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { CHECK(args[0]->IsUint32()); Environment* env = Environment::GetCurrent(args); uint32_t len = args[0].As<Uint32>()->Value(); @@ -281,7 +281,7 @@ index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7 if (data == nullptr) { // There's no memory available for the allocation. // Return nothing. -@@ -692,7 +682,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { +@@ -696,7 +686,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { data, len, [](void* data, size_t len, void* deleter_data) { @@ -290,7 +290,7 @@ index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7 }, data); Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store); -@@ -700,10 +690,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { +@@ -704,10 +694,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) { } void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) { @@ -304,7 +304,7 @@ index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7 } // namespace diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index 463a19f516d23fdb56eb83025f4a3f2b3f4a426b..86e66e29ee644f86cb8ac20f37061fc03dc3099b 100644 +index 5060fc3f2fbd67d8b33975f2512cbd7cf7fedf1a..4f86810f8366b490ca2293cd1a811e69a199f708 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h @@ -16,7 +16,9 @@ diff --git a/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch index 1613f28863fd0..bb7df671a3957 100644 --- a/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch +++ b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch @@ -6,10 +6,10 @@ 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 +index 2d4cc0aaa02e61bf359e80eca27527efb49fd85e..aaa16052e2a9c7d1dca82763c41c0890371f1471 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) { +@@ -1950,10 +1950,17 @@ int uv_os_uname(uv_utsname_t* buffer) { #ifdef _MSC_VER #pragma warning(suppress : 4996) #endif diff --git a/patches/node/pass_all_globals_through_require.patch b/patches/node/pass_all_globals_through_require.patch index e0ef037d54b9e..ee776addc06a7 100644 --- a/patches/node/pass_all_globals_through_require.patch +++ b/patches/node/pass_all_globals_through_require.patch @@ -6,7 +6,7 @@ Subject: Pass all globals through "require" (cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index b8eff0440624a41d89a39c46303fa51d581bf4bf..67eb7717f13379312721fc4da2e760bc08d8ed3a 100644 +index cfe2982bf22c245d3249a743e341c9948d98c18b..2c188ae0b5cb86493a7fd701c343b36370369f20 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -127,6 +127,13 @@ const { @@ -23,7 +23,7 @@ index b8eff0440624a41d89a39c46303fa51d581bf4bf..67eb7717f13379312721fc4da2e760bc const { isProxy } = require('internal/util/types'); -@@ -1096,10 +1103,12 @@ Module.prototype._compile = function(content, filename) { +@@ -1098,10 +1105,12 @@ Module.prototype._compile = function(content, filename) { if (requireDepth === 0) statCache = new SafeMap(); if (inspectorWrapper) { result = inspectorWrapper(compiledWrapper, thisValue, exports, diff --git a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch index 1eccad9b31b62..ff492a0b6b9b0 100644 --- a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch +++ b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch @@ -7,10 +7,10 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were a real filesystem. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index 58f7396990dddb7dd4cf3d23fcdcc1d48f52623e..ef06d0563fa7452348754418867a56c9b8c6f4e1 100644 +index 1393cc20f45db69c9e133e25ac9428fcb6d81100..085dd7e09d31fb1800b3596cc068637e1956ba52 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js -@@ -62,6 +62,10 @@ setupBuffer(); +@@ -66,6 +66,10 @@ setupBuffer(); process.domain = null; process._exiting = false; @@ -22,7 +22,7 @@ index 58f7396990dddb7dd4cf3d23fcdcc1d48f52623e..ef06d0563fa7452348754418867a56c9 const nativeModule = internalBinding('native_module'); diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 67eb7717f13379312721fc4da2e760bc08d8ed3a..05a62bb3c3852536001912cb0b69fe5578ace125 100644 +index 2c188ae0b5cb86493a7fd701c343b36370369f20..caca939942cb721a3efde7005b0a987a19237a8b 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -86,7 +86,7 @@ const fs = require('fs'); diff --git a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch index 686eb257df509..67c1845b31c13 100644 --- a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch +++ b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch @@ -7,10 +7,10 @@ Subject: refactor: alter child_process.fork to use execute script with When forking a child script, we setup a special environment to make the Electron binary run like the upstream node. On Mac, we use the helper app as node binary. diff --git a/lib/child_process.js b/lib/child_process.js -index 62c552d567eaad07ffe65ea5cb24be101b57ebdd..73c11500d7e4a540f26cc7ee3b692a2f4b158b19 100644 +index a7ef8ba1e4af1aaabf88ea424b0a101397f7eb16..9cd99a7440ee4d2273fe94a0d51b4bf4051f612d 100644 --- a/lib/child_process.js +++ b/lib/child_process.js -@@ -161,6 +161,15 @@ function fork(modulePath /* , args, options */) { +@@ -160,6 +160,15 @@ function fork(modulePath, args = [], options) { throw new ERR_CHILD_PROCESS_IPC_REQUIRED('options.stdio'); } diff --git a/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch b/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch index fe3a805081ff7..510461bd8a1be 100644 --- a/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch +++ b/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch @@ -25,7 +25,7 @@ index a771b1813731edf4f0dd60f3505799e389f1d876..b9461677e2d7d1df192e752496e62cca bench.start(); for (let i = 0; i < n; i++) diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js -index 71a07a63a3636ab211746004ebab24a0058b08fc..e3ce67987ee3185a93750ebad72beab304c71e3a 100644 +index 65827ecd593ffb050484152fc6d31411fd3e4dcc..2e5d6b01d86e34549c1c7a3d3128350cad2b0c47 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -9,7 +9,7 @@ const { diff --git a/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch b/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch index 455cc74afe3e6..08195a21f54d5 100644 --- a/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch +++ b/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch @@ -40,10 +40,10 @@ index 5bf19a0dda42849159d954181058897c45d280fd..03078ff3869fcd17101f1cdaf77f725d MaybeLocal<Object> GetPerContextExports(Local<Context> context) { diff --git a/src/node.h b/src/node.h -index 85b5ac6a5a5cb5e4388a92a1d07c9afe17140a8c..4201c0d0460b032721ef42a26d79c38a9ee20c24 100644 +index 7ca7502e086190c87ae6a61dca2192253894e906..b2b766f242e02593631be087fceaf63f71d74284 100644 --- a/src/node.h +++ b/src/node.h -@@ -313,7 +313,8 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform { +@@ -332,7 +332,8 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform { static std::unique_ptr<MultiIsolatePlatform> Create( int thread_pool_size, @@ -53,7 +53,7 @@ index 85b5ac6a5a5cb5e4388a92a1d07c9afe17140a8c..4201c0d0460b032721ef42a26d79c38a }; enum IsolateSettingsFlags { -@@ -509,7 +510,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent(); +@@ -528,7 +529,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent(); NODE_DEPRECATED("Use MultiIsolatePlatform::Create() instead", NODE_EXTERN MultiIsolatePlatform* CreatePlatform( int thread_pool_size, diff --git a/patches/node/test_add_fixture_trim_option.patch b/patches/node/test_add_fixture_trim_option.patch deleted file mode 100644 index 8a20a9354c089..0000000000000 --- a/patches/node/test_add_fixture_trim_option.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr <shelley.vohr@gmail.com> -Date: Mon, 8 Nov 2021 15:52:17 +0100 -Subject: test: add fixture trim option - -Fixes a spec failure originating with a strict requirement in BoringSSL -that base64 strings be evenly divisible by 4 in their implementation of -`NETSCAPE_SPKI_b64_decode`. - -Fixes that issue by trimming the newlines out of the file. - -Upstreamed at https://github.com/nodejs/node/pull/40757. - -diff --git a/test/common/fixtures.js b/test/common/fixtures.js -index e5e1d887df525e493989a4aa8df6952a0e5b6c47..2da8aeb6a694e4b45d76bc3908284783d83f6755 100644 ---- a/test/common/fixtures.js -+++ b/test/common/fixtures.js -@@ -15,8 +15,13 @@ function readFixtureSync(args, enc) { - return fs.readFileSync(fixturesPath(args), enc); - } - --function readFixtureKey(name, enc) { -- return fs.readFileSync(fixturesPath('keys', name), enc); -+function readFixtureKey(name, enc, trim) { -+ let result = fs.readFileSync(fixturesPath('keys', name), enc); -+ if (trim) { -+ result = Buffer.from(result.toString().trim(), 'utf8'); -+ } -+ -+ return result; - } - - function readFixtureKeys(enc, ...names) { -diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js -index 4a5f1f149fe6c739f7f1d2ee17df6e61a942d621..a21fbff81c840da29034cb07ae2bd711cfe78b0a 100644 ---- a/test/parallel/test-crypto-certificate.js -+++ b/test/parallel/test-crypto-certificate.js -@@ -30,9 +30,9 @@ const { Certificate } = crypto; - const fixtures = require('../common/fixtures'); - - // Test Certificates --const spkacValid = fixtures.readKey('rsa_spkac.spkac'); -+const spkacValid = fixtures.readKey('rsa_spkac.spkac', null, true); - const spkacChallenge = 'this-is-a-challenge'; --const spkacFail = fixtures.readKey('rsa_spkac_invalid.spkac'); -+const spkacFail = fixtures.readKey('rsa_spkac_invalid.spkac', null, true); - const spkacPublicPem = fixtures.readKey('rsa_public.pem'); - - function copyArrayBuffer(buf) { diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index aad85fb2c9c68..1af890a2a0b3b 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -365,7 +365,6 @@ bool NodeBindings::IsInitialized() { void NodeBindings::Initialize() { TRACE_EVENT0("electron", "NodeBindings::Initialize"); // Open node's error reporting system for browser process. - node::g_upstream_node_mode = false; #if BUILDFLAG(IS_LINUX) // Get real command line in renderer process forked by zygote. @@ -381,14 +380,17 @@ void NodeBindings::Initialize() { auto env = base::Environment::Create(); SetNodeOptions(env.get()); - node::Environment::should_read_node_options_from_env_ = - fuses::IsNodeOptionsEnabled(); std::vector<std::string> argv = {"electron"}; std::vector<std::string> exec_argv; std::vector<std::string> errors; + uint64_t process_flags = node::ProcessFlags::kEnableStdioInheritance; + if (!fuses::IsNodeOptionsEnabled()) + process_flags |= node::ProcessFlags::kDisableNodeOptionsEnv; - int exit_code = node::InitializeNodeWithArgs(&argv, &exec_argv, &errors); + int exit_code = node::InitializeNodeWithArgs( + &argv, &exec_argv, &errors, + static_cast<node::ProcessFlags::Flags>(process_flags)); for (const std::string& error : errors) fprintf(stderr, "%s: %s\n", argv[0].c_str(), error.c_str()); From 9d698c76c56b0751f4951bc7f7c817c26e1d75b7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao <zcbenz@gmail.com> Date: Thu, 24 Mar 2022 18:26:34 +0900 Subject: [PATCH 165/811] chore: update out-dated node patches (#33421) --- patches/node/.patches | 1 - ...nalhandler_to_environment_to_prevent.patch | 14 +- ...handle_kevent_note_exit_failure_3451.patch | 4 +- ...rocess_fix_hang_after_note_exit_3521.patch | 2 +- ...or_for_exit_with_kqueue_on_bsds_3441.patch | 18 +- ...rotect_fork_in_uv_spawn_from_signals.patch | 173 ------------------ .../node/worker_thread_add_asar_support.patch | 6 +- 7 files changed, 22 insertions(+), 196 deletions(-) delete mode 100644 patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch diff --git a/patches/node/.patches b/patches/node/.patches index 7b2b6aae5d061..c2b5fdf528bbf 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -33,7 +33,6 @@ be_compatible_with_cppgc.patch feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch worker_thread_add_asar_support.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 diff --git a/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch index c08a9efde794b..3deaaeccdc157 100644 --- a/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch +++ b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch @@ -7,10 +7,10 @@ Subject: feat: add kNoStartDebugSignalHandler to Environment to prevent This patch should be upstreamed, it allows embedders to prevent the call to StartDebugSignalHandler which handles SIGUSR1 and starts the inspector agent. Apps that have --inspect disabled also don't want SIGUSR1 to have this affect. diff --git a/src/env-inl.h b/src/env-inl.h -index 845e00208af4b12960ed8b3f3926323af7685185..1ebc33324907654d16e9c0e19b2955efbac7cac7 100644 +index 2da8174fe9e4209f4705af0a1cf8bca5928f088c..954602f3fc7c3344509bb57530840bb1dfeacab3 100644 --- a/src/env-inl.h +++ b/src/env-inl.h -@@ -896,6 +896,10 @@ inline bool Environment::should_initialize_inspector() const { +@@ -886,6 +886,10 @@ inline bool Environment::should_initialize_inspector() const { return (flags_ & EnvironmentFlags::kNoInitializeInspector) == 0; } @@ -22,10 +22,10 @@ index 845e00208af4b12960ed8b3f3926323af7685185..1ebc33324907654d16e9c0e19b2955ef return emit_filehandle_warning_; } diff --git a/src/env.h b/src/env.h -index ab8334bf0e3405fee4d21a4b541bd1164d92ca89..b2537ebd44bc5b37dd97752735f84e87de1f24bf 100644 +index 2554c530f2ca7078ed0cca03968b31f56027231b..1fbf965788f9c68d2999f38b40d39579f746d768 100644 --- a/src/env.h +++ b/src/env.h -@@ -1207,6 +1207,7 @@ class Environment : public MemoryRetainer { +@@ -1216,6 +1216,7 @@ class Environment : public MemoryRetainer { inline bool hide_console_windows() const; inline bool no_global_search_paths() const; inline bool should_initialize_inspector() const; @@ -34,7 +34,7 @@ index ab8334bf0e3405fee4d21a4b541bd1164d92ca89..b2537ebd44bc5b37dd97752735f84e87 inline worker::Worker* worker_context() const; Environment* worker_parent_env() const; diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc -index c4a3322c6d972fc2052af75b79389c522924d9c5..39ff8df415be1908ba404fba34d9cedda04a88af 100644 +index fd9f514b9b6a7b7b1c1a6f5fe834f51266156596..14565f6885b3f88194b3b8efb340a4099ca1966c 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -680,8 +680,10 @@ bool Agent::Start(const std::string& path, @@ -51,10 +51,10 @@ index c4a3322c6d972fc2052af75b79389c522924d9c5..39ff8df415be1908ba404fba34d9cedd parent_env_->AddCleanupHook([](void* data) { Environment* env = static_cast<Environment*>(data); diff --git a/src/node.h b/src/node.h -index 4201c0d0460b032721ef42a26d79c38a9ee20c24..6873fc89406b046823db9e45234eb7f6b767099d 100644 +index b2b766f242e02593631be087fceaf63f71d74284..535df2d8dfb48ddc4d01e94565fdc527aed15ef7 100644 --- a/src/node.h +++ b/src/node.h -@@ -425,7 +425,11 @@ enum Flags : uint64_t { +@@ -444,7 +444,11 @@ enum Flags : uint64_t { // Controls whether or not the Environment should call InitializeInspector. // This control is needed by embedders who may not want to initialize the V8 // inspector in situations where it already exists. 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 index c0ab59bbeab92..b8b4e9ef2541c 100644 --- a/patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch +++ b/patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch @@ -25,7 +25,7 @@ index 16be13b99f5db77741aa276e90a437ef4eb5ba32..2dcc8b32f5165dd75061a1b55cc1abd2 /* flags of excluding ifaddr */ diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c -index 35200f17495d80ed2d19ef9f6f76bbc92ee042f6..071fe0ce0938657d0fb840af62a432352e938a8a 100644 +index efbc561dee2574f06ebd9408d1e89e435c93cc5a..857eb1d54bfde99754ce2c6e92a287c288bd9f52 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) { @@ -37,7 +37,7 @@ index 35200f17495d80ed2d19ef9f6f76bbc92ee042f6..071fe0ce0938657d0fb840af62a43235 nevents++; continue; } -@@ -383,6 +383,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { +@@ -382,6 +382,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { nevents++; } diff --git a/patches/node/process_fix_hang_after_note_exit_3521.patch b/patches/node/process_fix_hang_after_note_exit_3521.patch index 68702cf332b81..768eda13452b3 100644 --- a/patches/node/process_fix_hang_after_note_exit_3521.patch +++ b/patches/node/process_fix_hang_after_note_exit_3521.patch @@ -10,7 +10,7 @@ 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 +index 857eb1d54bfde99754ce2c6e92a287c288bd9f52..036055149fcabcb9ff8f43522120c82b3474ab99 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) { 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 index 917b589dbd37b..38609025d0f79 100644 --- 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 @@ -23,7 +23,7 @@ index 12d4da93686e993830a7d09e74d08191fc808f4f..16be13b99f5db77741aa276e90a437ef /* 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 +index 75e9110709da8d30628449311cb916a26c775ecf..efbc561dee2574f06ebd9408d1e89e435c93cc5a 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) { @@ -39,10 +39,10 @@ index bf183d5fdc0ba89913469a294322eef84bc4cee8..35200f17495d80ed2d19ef9f6f76bbc9 /* 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 +index 91bf3c507022b2eddc0d36f40d73a977bf731fbc..c1f6bd4b0076f0835caf83c45a6a896e7ae5def9 100644 --- a/deps/uv/src/unix/process.c +++ b/deps/uv/src/unix/process.c -@@ -48,10 +48,20 @@ extern char **environ; +@@ -49,10 +49,20 @@ extern char **environ; # include "zos-base.h" #endif @@ -64,7 +64,7 @@ index f4aebb0490e198cd9adcadfeb6b006de479cc993..cfcba341e0e380ecd595e4b59e39c08a int exit_status; int term_signal; int status; -@@ -60,10 +70,7 @@ static void uv__chld(uv_signal_t* handle, int signum) { +@@ -61,10 +71,7 @@ static void uv__chld(uv_signal_t* handle, int signum) { QUEUE* q; QUEUE* h; @@ -75,7 +75,7 @@ index f4aebb0490e198cd9adcadfeb6b006de479cc993..cfcba341e0e380ecd595e4b59e39c08a h = &loop->process_handles; q = QUEUE_HEAD(h); -@@ -419,7 +426,9 @@ int uv_spawn(uv_loop_t* loop, +@@ -420,7 +427,9 @@ int uv_spawn(uv_loop_t* loop, if (err) goto error; @@ -85,7 +85,7 @@ index f4aebb0490e198cd9adcadfeb6b006de479cc993..cfcba341e0e380ecd595e4b59e39c08a /* 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, +@@ -495,6 +504,13 @@ int uv_spawn(uv_loop_t* loop, /* Only activate this handle if exec() happened successfully */ if (exec_errorno == 0) { @@ -100,10 +100,10 @@ index f4aebb0490e198cd9adcadfeb6b006de479cc993..cfcba341e0e380ecd595e4b59e39c08a uv__handle_start(process); } diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h -index 59b95da9ebe3464bd1f9ce1c534122b1f9e06636..58489c4be7b3a7b36d5b01a1f07d411ef3d99ae3 100644 +index 1f566861a0e2e9e29c925972155f49667bb7ce85..a43edf1a4a9b0932ec73b8edaca0f676ecf3ccfa 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) +@@ -320,6 +320,7 @@ TEST_DECLARE (spawn_reads_child_path) TEST_DECLARE (spawn_inherit_streams) TEST_DECLARE (spawn_quoted_path) TEST_DECLARE (spawn_tcp_server) @@ -111,7 +111,7 @@ index 59b95da9ebe3464bd1f9ce1c534122b1f9e06636..58489c4be7b3a7b36d5b01a1f07d411e TEST_DECLARE (fs_poll) TEST_DECLARE (fs_poll_getpath) TEST_DECLARE (fs_poll_close_request) -@@ -944,6 +945,7 @@ TASK_LIST_START +@@ -950,6 +951,7 @@ TASK_LIST_START TEST_ENTRY (spawn_inherit_streams) TEST_ENTRY (spawn_quoted_path) TEST_ENTRY (spawn_tcp_server) 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 deleted file mode 100644 index e8f06d17973e6..0000000000000 --- a/patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jameson Nash <vtjnash@gmail.com> -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 <info@bnoordhuis.nl> - -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 <stdlib.h> - #include <assert.h> - #include <errno.h> -+#include <signal.h> - - #include <sys/types.h> - #include <sys/wait.h> -@@ -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/worker_thread_add_asar_support.patch b/patches/node/worker_thread_add_asar_support.patch index 7300f87fd4fc3..070774bf05748 100644 --- a/patches/node/worker_thread_add_asar_support.patch +++ b/patches/node/worker_thread_add_asar_support.patch @@ -7,10 +7,10 @@ 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 +index 2af6b11c97ecdca3c40792ab35c69b07b9db76a0..e79ce2b79a5f88a315ac013b6e12534ba1531d6b 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -505,6 +505,7 @@ module.exports = { +@@ -498,6 +498,7 @@ module.exports = { loadPreloadModules, setupTraceCategoryState, setupInspectorHooks, @@ -19,7 +19,7 @@ index 419ffd9d5deb84eb94381259d3084411f6c3341b..17a1860d158976f11035553601560d17 initializeCJSLoader, initializeWASI diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js -index e3ce67987ee3185a93750ebad72beab304c71e3a..ef5082d73b6153b49875c61d9b365b873b16145d 100644 +index 2e5d6b01d86e34549c1c7a3d3128350cad2b0c47..74ab84ca39a01269925ca0e326e4aa8894fce8a1 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -27,6 +27,7 @@ const { From d5ad18db03039f946726de14c6a615af85590e5e 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:00:50 -0700 Subject: [PATCH 166/811] Bump v19.0.0-nightly.20220324 --- 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 def1880de7559..2090a0b04f329 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220323 \ No newline at end of file +19.0.0-nightly.20220324 \ No newline at end of file diff --git a/package.json b/package.json index f4eab271f4e6c..197c6c519779b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220323", + "version": "19.0.0-nightly.20220324", "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 38eebf5219792..eea937658b6b5 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 19,0,0,20220323 - PRODUCTVERSION 19,0,0,20220323 + FILEVERSION 19,0,0,20220324 + PRODUCTVERSION 19,0,0,20220324 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 962f4a6558af1bc132c0df324581636d22c695cf Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Thu, 24 Mar 2022 06:09:12 -0700 Subject: [PATCH 167/811] docs: remove pywin32 from Windows build instructions (#33402) --- docs/development/build-instructions-windows.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/development/build-instructions-windows.md b/docs/development/build-instructions-windows.md index b827a713784b2..171679ddab5ba 100644 --- a/docs/development/build-instructions-windows.md +++ b/docs/development/build-instructions-windows.md @@ -15,8 +15,6 @@ Follow the guidelines below for building **Electron itself** on Windows, for the set a few environment variables to point the toolchains to your installation path. * `vs2019_install = DRIVE:\path\to\Microsoft Visual Studio\2019\Community`, replacing `2019` and `Community` with your installed versions and replacing `DRIVE:` with the drive that Visual Studio is on. Often, this will be `C:`. * `WINDOWSSDKDIR = DRIVE:\path\to\Windows Kits\10`, replacing `DRIVE:` with the drive that Windows Kits is on. Often, this will be `C:`. - * [Python for Windows (pywin32) Extensions](https://pypi.org/project/pywin32/#files) - is also needed in order to run the build process. * [Node.js](https://nodejs.org/download/) * [Git](https://git-scm.com) * Debugging Tools for Windows of Windows SDK 10.0.15063.468 if you plan on From 4fdf8584ed6820a1b464cabc80c41acedbbce814 Mon Sep 17 00:00:00 2001 From: Jeremy Rose <jeremya@chromium.org> Date: Thu, 24 Mar 2022 10:12:47 -0700 Subject: [PATCH 168/811] docs: fix SCA and postMessage links in web-frame-main.md (#33415) --- docs/api/web-frame-main.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/api/web-frame-main.md b/docs/api/web-frame-main.md index a3fd055d80134..0190f4dbc0ac5 100644 --- a/docs/api/web-frame-main.md +++ b/docs/api/web-frame-main.md @@ -195,3 +195,6 @@ have the same `routingId`. A `string` representing the [visibility state](https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState) of the frame. See also how the [Page Visibility API](browser-window.md#page-visibility) is affected by other Electron APIs. + +[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm +[`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage From f69b59effc6d56f74445adbd2de7bc472892bdac Mon Sep 17 00:00:00 2001 From: Calvin <clavin@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:02:45 -0600 Subject: [PATCH 169/811] feat: add WCO title bar style setters (#33066) * feat: add wco title bar style setters * return after throwing --- 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 9f5e2349004b5..0903009ef503a 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<v8::Value> BrowserWindow::GetWebContents(v8::Isolate* isolate) { return v8::Local<v8::Value>::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<NativeWindowViews*>(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<WinFrameView*>( + 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<v8::Value> 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 7ca295ec5c12d..bf67ab5d82033 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -62,6 +62,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 92c5dedc76275fb84814aa05ab71c85d84a05663 Mon Sep 17 00:00:00 2001 From: Hanlin <onion7878@gmail.com> Date: Fri, 25 Mar 2022 08:08:33 +0800 Subject: [PATCH 170/811] Update china npmmirror (#33401) Source: https://zhuanlan.zhihu.com/p/465424728 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a239e00ada6b4..fcf0ab6216411 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ const child = proc.spawn(electron) ### Mirrors -* [China](https://npm.taobao.org/mirrors/electron) +* [China](https://npmmirror.com/mirrors/electron/) See the [Advanced Installation Instructions](https://www.electronjs.org/docs/latest/tutorial/installation#mirror) to learn how to use a custom mirror. From 7e59d784a0b5c922564cbc8c55f95f0e7daf6997 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 21:39:03 -0400 Subject: [PATCH 171/811] chore: bump chromium to 102.0.4961.0 (main) (#33091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: bump chromium in DEPS to 101.0.4911.0 * chore: bump chromium in DEPS to 101.0.4913.0 * chore: bump chromium in DEPS to 101.0.4915.0 * chore: bump chromium in DEPS to 101.0.4917.0 * chore: bump chromium in DEPS to 101.0.4919.0 * chore: bump chromium in DEPS to 101.0.4921.0 * chore: bump chromium in DEPS to 101.0.4923.0 * chore: bump chromium in DEPS to 101.0.4925.0 * chore: bump chromium in DEPS to 101.0.4927.0 * chore: bump chromium in DEPS to 101.0.4929.0 * chore: update patches * chore: bump chromium in DEPS to 101.0.4931.0 * chore: update patches * 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T> Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3475388 Actual fixes in 1824792: Migrate DisplayClient to the new Mojo types | https://chromium-review.googlesource.com/c/chromium/src/+/1824792 * 3503874: Remove base::size(), base::empty(), and base::data(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3503874 * chore: reconcile patches with main rebase * chore: bump chromium in DEPS to 101.0.4933.0 * chore: update patches * 3329593: [Fenced Frame] Ensure to support external protocols in a fenced frame Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3329593 * 3503874: Remove base::size(), base::empty(), and base::data(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3503874 * 3446451: Use forward decl of ImageSkiaRep in //ui/gfx/image/image_skia.h Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3446451 * 3499818: partition_alloc: Rename AllocFlags to AllocWithFlags Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3499818 * chore: bump chromium in DEPS to 101.0.4935.0 * chore: update patches * 3463286: partition_alloc: Move PartitionAlloc into the own namespaces (15 of N) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3463286 * 3506590: Reland "Support ChromeOS external protocol dialog for Fenced Frame navigations" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3506590 * 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T> Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3475388 Actual fixes in 1880987: Convert URLLoaderReqeust from //content to new Mojo types | https://chromium-review.googlesource.com/c/chromium/src/+/1880987 The change in the roll started causing the legacy types to fail * chore: missing SkRegion include * 3499600: Introduce blink::WebCssOrigin Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3499600 * fixup!: 3503874: Remove base::size(), base::empty(), and base::data(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3503874 * chore: bump chromium in DEPS to 101.0.4937.0 * chore: update patches * 3500826: [locales] Refactor locales for ios Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3500826 * 3509531: Make some public Blink media files private Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3509531 * 3497377: bluetooth: Add BluetoothDevice.forget() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3497377 * chore: bump chromium in DEPS to 101.0.4939.0 * chore: bump chromium in DEPS to 101.0.4941.0 * 3514804: Deprecate all existing uses of mojo_base.mojom.{Dictionary,List}Value. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3514804 * 3502592: Delete PPAPI init/shutdown code in //pdf. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3502592 * chore: update patches * fixup! 3502592: Delete PPAPI init/shutdown code in //pdf. * chore: bump chromium in DEPS to 101.0.4943.0 * chore: fix lint, remove unneeded headers * fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T> * update mojo calls in offscreen patch * update hunspell filenames * chore: bump chromium in DEPS to 101.0.4945.0 * chore: update patches * fix offscreen patch again * chore: bump chromium in DEPS to 101.0.4947.0 * chore: update patches * chore: bump chromium in DEPS to 101.0.4949.0 * support unseasoned pdf * update patches * chore: update patches * chore: [IWYU] include missing skia headers * chore: bump chromium in DEPS to 101.0.4951.0 * chore: update patches * 3457645: media: Remove IsKeySystemsUpdateNeeded() https://chromium-review.googlesource.com/c/chromium/src/+/3457645 * chore: bump chromium in DEPS to 102.0.4952.2 * chore: update patches * 3488672: Add documentId as a parameter in tabs.connect() and tabs.sendMessage(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3488672 * 3508375: Fix an issue dangerous dialog is not shown for some apk download Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3508375 * chore: bump chromium in DEPS to 102.0.4953.0 * chore: update patches * 3510189: Harden up drag and drop support across same-process boundaries. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3510189 * 3526815: Remove hardcoded colors from chrome/browser/ui/views/overlay/. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3526815 * chore: bump chromium in DEPS to 102.0.4955.0 * build: add af and ur locale to manifests 3498914 [locales] Add af and ur to desktop Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3498914 * fixup! build: add af and ur locale to manifests * chore: bump chromium in DEPS to 102.0.4957.0 * 3529090: gin: set JS flags before v8 initialization Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3529090 chore: fix code shear in chromium/gin_enable_disable_v8_platform.patch * chore: update patches * 3536433: [network] Rename data_path and http_cache_path from _path to _directory. Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3536433 * 3111565: Relocated Page.printToPDF implementation to //components Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3111565 refactor: inject E args to PrintRequestedPages() and ScriptedPrintCallback TODO: currently passes a placeholder for job_settings. We have other code paths that inject settings from electron_api_web_contents.cc. Should those be injected here as well? (CC @codebytere) * fixup! 3111565: Relocated Page.printToPDF implementation to //components * fixup! 3111565: Relocated Page.printToPDF implementation to //components * 3520025: Make "libcxx_abi_unstable" not a gn arg Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3520025 build: since it is no longer a gn arg, patch it in * chore: change usages of std::vector with const elements (#33373) * chore: bump chromium in DEPS to 102.0.4959.0 * chore: update patches * build: iwyu base/threading/platform_thread.h * 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate. Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3525774 refactor: copy upstream impl of GetPermissionStatusForCurrentDocument into +ElectronPermissionManager * use gclient_gn_args_from instead of hand-copying * checkout mac on mac * chore: update patches * Revert "checkout mac on mac" This reverts commit fe9ccf49ec6139868ccf2272c2016cefa3f32769. * fixup! 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate. * fixup! 3457645: media: Remove IsKeySystemsUpdateNeeded() add nogncheck * fix: set .eslintrc.json to root to avoid cascade to chromium eslintrc * Xref: https://github.com/llvm/llvm-project/commit/6dfdf79b8c482c892a76406799d285baf5d71198 Xref: https://reviews.llvm.org/D101458 Upstream added a CMakeLists.txt in an include dir ¯\_(ツ)_/¯ and so it must be enumerated in filenames.libcxxabi.gni * 3511268: Remove unused headers from cxx17_backports.h https://chromium-review.googlesource.com/c/chromium/src/+/3511268 use std::size instead of base::size * iwyu: SkPaint 3488428: [includes] Fix transitive includes of SkImageEncoder * chore: [IWYU] include missing skia headers * fixup! 3511268: Remove unused headers from cxx17_backports.h * chore: bump chromium in DEPS to 102.0.4961.0 * chore: update patches * fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T> chore: remove unused #include * fixup! 3510189: Harden up drag and drop support across same-process boundaries. | https://chromium-review.googlesource.com/c/chromium/src/+/3510189 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org> --- .eslintrc.json | 1 + BUILD.gn | 12 +- DEPS | 17 +- build/args/all.gn | 3 - chromium_src/BUILD.gn | 8 +- electron_paks.gni | 2 +- filenames.hunspell.gni | 16 +- filenames.libcxxabi.gni | 1 + patches/chromium/.patches | 2 +- .../add_didinstallconditionalfeatures.patch | 32 ++-- ..._scheduler_throttling_per_renderview.patch | 30 +-- ..._windows_to_have_different_web_prefs.patch | 20 +- patches/chromium/blink_local_frame.patch | 8 +- .../build_add_electron_tracing_category.patch | 4 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 16 +- patches/chromium/build_gn.patch | 4 +- .../build_libc_as_static_library.patch | 4 +- ...bcxx_abi_unstable_false_for_electron.patch | 23 +++ patches/chromium/can_create_window.patch | 34 ++-- ...dows_in_cryptotoken_webrequestsender.patch | 6 +- ..._v8_initialization_isolate_callbacks.patch | 2 +- ...screationoverridden_with_full_params.patch | 34 ++-- ...esources_not_chrome_for_spellchecker.patch | 4 +- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/command-ismediakey.patch | 18 +- .../crash_allow_setting_more_options.patch | 12 +- patches/chromium/crashpad_pid_check.patch | 2 +- patches/chromium/dcheck.patch | 4 +- patches/chromium/desktop_media_list.patch | 16 +- patches/chromium/disable-redraw-lock.patch | 2 +- .../disable_color_correct_rendering.patch | 62 +++--- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 16 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 8 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 2 +- ...locator_for_usage_outside_of_the_gin.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 12 +- .../extend_apply_webpreferences.patch | 6 +- ...ransfer_to_requestsingleinstancelock.patch | 48 ++--- .../feat_add_onclose_to_messageport.patch | 4 +- ...dd_set_theme_source_to_allow_apps_to.patch | 14 +- ..._registry_to_multibuffer_data_source.patch | 30 +-- ...g_the_base_spellchecker_download_url.patch | 8 +- ...screen_rendering_with_viz_compositor.patch | 34 ++-- ..._raw_response_headers_from_urlloader.patch | 12 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 24 +-- ...ntcapturercount_in_web_contents_impl.patch | 6 +- ...media_key_usage_with_globalshortcuts.patch | 6 +- ...king_and_message_bubbling_on_windows.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 8 +- ...out_profile_refs_in_accessibility_ui.patch | 17 +- ..._properly_honor_printing_page_ranges.patch | 8 +- ...fix_use_electron_generated_resources.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 7 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- patches/chromium/mas-cfisobjc.patch | 8 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- .../mas_disable_remote_accessibility.patch | 36 ++-- patches/chromium/mas_no_private_api.patch | 6 +- ...emote_certificate_verification_logic.patch | 22 +-- .../chromium/notification_provenance.patch | 10 +- patches/chromium/pepper_plugin_support.patch | 53 ++---- patches/chromium/picture-in-picture.patch | 83 +++++---- ...utofill_colors_to_the_color_pipeline.patch | 40 ++-- patches/chromium/printing.patch | 176 +++++++++++++----- patches/chromium/process_singleton.patch | 34 ++-- ...r_changes_to_the_webcontentsobserver.patch | 12 +- ...e_incorrect_width_height_adjustments.patch | 39 ---- .../render_widget_host_view_base.patch | 4 +- .../render_widget_host_view_mac.patch | 8 +- patches/chromium/resource_file_conflict.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/web_contents.patch | 8 +- patches/chromium/webview_cross_drag.patch | 18 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 18 +- ...feat_add_hook_to_notify_script_ready.patch | 14 +- ...bals_to_allow_patching_devtools_dock.patch | 2 +- patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 6 +- ...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 | 2 +- .../zip_manifests/dist_zip.linux.arm.manifest | 2 + .../dist_zip.linux.arm64.manifest | 2 + .../zip_manifests/dist_zip.linux.x64.manifest | 2 + .../zip_manifests/dist_zip.linux.x86.manifest | 2 + .../zip_manifests/dist_zip.mac.arm64.manifest | 6 + .../zip_manifests/dist_zip.mac.x64.manifest | 6 + .../dist_zip.mac_mas.arm64.manifest | 6 + .../dist_zip.mac_mas.x64.manifest | 6 + .../zip_manifests/dist_zip.win.arm64.manifest | 2 + .../zip_manifests/dist_zip.win.ia32.manifest | 2 + .../zip_manifests/dist_zip.win.x64.manifest | 2 + shell/app/electron_content_client.cc | 16 +- shell/app/electron_main_delegate.cc | 2 +- .../bluetooth/electron_bluetooth_delegate.cc | 6 + .../bluetooth/electron_bluetooth_delegate.h | 3 + shell/browser/browser_win.cc | 4 +- shell/browser/electron_browser_client.cc | 46 ++++- shell/browser/electron_browser_client.h | 10 +- .../electron_browser_main_parts_posix.cc | 1 + .../electron_download_manager_delegate.cc | 17 +- shell/browser/electron_permission_manager.cc | 10 + shell/browser/electron_permission_manager.h | 3 + .../electron_extension_message_filter.cc | 2 +- .../extensions/electron_messaging_delegate.cc | 39 +++- .../extensions/electron_messaging_delegate.h | 3 +- shell/browser/font_defaults.cc | 2 +- shell/browser/javascript_environment.cc | 6 +- shell/browser/native_window_views.h | 1 + shell/browser/net/asar/asar_url_loader.cc | 4 +- shell/browser/net/asar/asar_url_loader.h | 2 +- shell/browser/net/network_context_service.cc | 4 +- .../net/proxying_url_loader_factory.cc | 7 +- .../browser/net/proxying_url_loader_factory.h | 5 +- .../electron_desktop_window_tree_host_linux.h | 1 + shell/browser/ui/file_dialog_win.cc | 2 +- shell/browser/ui/gtk/app_indicator_icon.h | 1 + shell/browser/ui/inspectable_web_contents.cc | 2 +- shell/browser/ui/win/jump_list.cc | 8 +- shell/common/api/electron_api_native_image.h | 1 + .../api/electron_api_native_image_mac.mm | 2 +- shell/common/gin_helper/callback.cc | 2 +- shell/common/platform_util_win.cc | 2 +- shell/common/skia_util.cc | 1 + shell/common/v8_value_serializer.h | 1 + shell/renderer/api/electron_api_web_frame.cc | 11 +- shell/renderer/renderer_client_base.cc | 90 ++++++--- shell/renderer/renderer_client_base.h | 17 +- 142 files changed, 998 insertions(+), 754 deletions(-) create mode 100644 patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch delete mode 100644 patches/chromium/remove_incorrect_width_height_adjustments.patch diff --git a/.eslintrc.json b/.eslintrc.json index 55d0f1712134a..7669da1863675 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "extends": "standard", "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], diff --git a/BUILD.gn b/BUILD.gn index 60af73d56c7bb..013b61c740ea3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -363,6 +363,10 @@ source_set("electron_lib") { "//components/network_session_configurator/common", "//components/omnibox/browser:buildflags", "//components/os_crypt", + "//components/pdf/browser", + "//components/pdf/browser:interceptors", + "//components/pdf/common", + "//components/pdf/renderer", "//components/pref_registry", "//components/prefs", "//components/security_state/content", @@ -698,7 +702,7 @@ source_set("electron_lib") { "//chrome/browser/resources/pdf:resources", "//components/pdf/browser", "//components/pdf/renderer", - "//pdf:pdf_ppapi", + "//pdf", ] sources += [ "shell/browser/electron_pdf_web_contents_helper_client.cc", @@ -1006,14 +1010,14 @@ if (is_mac) { action("electron_app_lproj_dirs") { outputs = [] - foreach(locale, locales_as_mac_outputs) { + foreach(locale, locales_as_apple_outputs) { outputs += [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ] } script = "build/mac/make_locale_dirs.py" args = rebase_path(outputs) } - foreach(locale, locales_as_mac_outputs) { + foreach(locale, locales_as_apple_outputs) { bundle_data("electron_app_strings_${locale}_bundle_data") { sources = [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ] outputs = [ "{{bundle_resources_dir}}/$locale.lproj" ] @@ -1022,7 +1026,7 @@ if (is_mac) { } group("electron_app_strings_bundle_data") { public_deps = [] - foreach(locale, locales_as_mac_outputs) { + foreach(locale, locales_as_apple_outputs) { public_deps += [ ":electron_app_strings_${locale}_bundle_data" ] } } diff --git a/DEPS b/DEPS index c8b39d0e1ec0e..4aa74e7395add 100644 --- a/DEPS +++ b/DEPS @@ -1,21 +1,8 @@ -gclient_gn_args_file = 'src/build/config/gclient_args.gni' -gclient_gn_args = [ - 'build_with_chromium', - 'checkout_android', - 'checkout_android_native_support', - 'checkout_libaom', - 'checkout_nacl', - 'checkout_pgo_profiles', - 'checkout_oculus_sdk', - 'checkout_openxr', - 'checkout_google_benchmark', - 'mac_xcode_version', - 'generate_location_tags', -] +gclient_gn_args_from = 'src' vars = { 'chromium_version': - '100.0.4894.0', + '102.0.4961.0', 'node_version': 'v16.14.2', 'nan_version': diff --git a/build/args/all.gn b/build/args/all.gn index a346a9b3d4939..91c53266a80d9 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -25,9 +25,6 @@ enable_basic_printing = true angle_enable_vulkan_validation_layers = false dawn_enable_vulkan_validation_layers = false -# This breaks native node modules -libcxx_abi_unstable = false - # These are disabled because they cause the zip manifest to differ between # testing and release builds. # See https://chromium-review.googlesource.com/c/chromium/src/+/2774898. diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 4c048a63aef2e..7db91d633a5d0 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -298,12 +298,14 @@ static_library("chrome") { if (enable_pdf_viewer) { sources += [ + "//chrome/browser/pdf/chrome_pdf_stream_delegate.cc", + "//chrome/browser/pdf/chrome_pdf_stream_delegate.h", "//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", + "//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc", + "//chrome/browser/plugins/pdf_iframe_navigation_throttle.h", ] } } @@ -346,8 +348,6 @@ source_set("plugins") { sources += [ "//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc", "//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h", - "//chrome/renderer/pepper/pepper_flash_font_file_host.cc", - "//chrome/renderer/pepper/pepper_flash_font_file_host.h", "//chrome/renderer/pepper/pepper_shared_memory_message_filter.cc", "//chrome/renderer/pepper/pepper_shared_memory_message_filter.h", ] diff --git a/electron_paks.gni b/electron_paks.gni index 84cec359e201b..0140e358710f6 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -197,7 +197,7 @@ template("electron_paks") { output_dir = "${invoker.output_dir}/locales" if (is_mac) { - output_locales = locales_as_mac_outputs + output_locales = locales_as_apple_outputs } else { output_locales = platform_pak_locales } diff --git a/filenames.hunspell.gni b/filenames.hunspell.gni index 0c91ae1db77c2..64574354e4244 100644 --- a/filenames.hunspell.gni +++ b/filenames.hunspell.gni @@ -7,11 +7,16 @@ hunspell_dictionaries = [ "//third_party/hunspell_dictionaries/da-DK-3-0.bdic", "//third_party/hunspell_dictionaries/de-DE-3-0.bdic", "//third_party/hunspell_dictionaries/el-GR-3-0.bdic", - "//third_party/hunspell_dictionaries/en-AU-9-0.bdic", - "//third_party/hunspell_dictionaries/en-CA-9-0.bdic", - "//third_party/hunspell_dictionaries/en-GB-9-0.bdic", - "//third_party/hunspell_dictionaries/en-GB-oxendict-9-0.bdic", - "//third_party/hunspell_dictionaries/en-US-9-0.bdic", + "//third_party/hunspell_dictionaries/en-AU-10-0.bdic", + "//third_party/hunspell_dictionaries/en-AU-10-1.bdic", + "//third_party/hunspell_dictionaries/en-CA-10-0.bdic", + "//third_party/hunspell_dictionaries/en-CA-10-1.bdic", + "//third_party/hunspell_dictionaries/en-GB-10-0.bdic", + "//third_party/hunspell_dictionaries/en-GB-10-1.bdic", + "//third_party/hunspell_dictionaries/en-GB-oxendict-10-0.bdic", + "//third_party/hunspell_dictionaries/en-GB-oxendict-10-1.bdic", + "//third_party/hunspell_dictionaries/en-US-10-0.bdic", + "//third_party/hunspell_dictionaries/en-US-10-1.bdic", "//third_party/hunspell_dictionaries/es-ES-3-0.bdic", "//third_party/hunspell_dictionaries/et-EE-3-0.bdic", "//third_party/hunspell_dictionaries/fa-IR-9-0.bdic", @@ -46,6 +51,7 @@ hunspell_dictionaries = [ "//third_party/hunspell_dictionaries/tg-TG-5-0.bdic", "//third_party/hunspell_dictionaries/tr-TR-4-0.bdic", "//third_party/hunspell_dictionaries/uk-UA-4-0.bdic", + "//third_party/hunspell_dictionaries/uk-UA-5-0.bdic", "//third_party/hunspell_dictionaries/vi-VN-3-0.bdic", "//third_party/hunspell_dictionaries/xx-XX-3-0.bdic", ] diff --git a/filenames.libcxxabi.gni b/filenames.libcxxabi.gni index 813f95070a2fa..69bb490ccd89a 100644 --- a/filenames.libcxxabi.gni +++ b/filenames.libcxxabi.gni @@ -1,4 +1,5 @@ libcxxabi_headers = [ + "//buildtools/third_party/libc++abi/trunk/include/CMakeLists.txt", "//buildtools/third_party/libc++abi/trunk/include/__cxxabi_config.h", "//buildtools/third_party/libc++abi/trunk/include/cxxabi.h", ] diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 7dcf136c34928..2b208694ba35a 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -113,4 +113,4 @@ fix_crash_when_saving_edited_pdf_files.patch port_autofill_colors_to_the_color_pipeline.patch build_disable_partition_alloc_on_mac.patch fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch -remove_incorrect_width_height_adjustments.patch +build_make_libcxx_abi_unstable_false_for_electron.patch diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index b76baf2e4e6ba..18a816de672d4 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 a92e09dc651a5f1a9bbae2572fad32233afcd46c..f99b652dda817b62615d2b3f00b4ae4b438ec44d 100644 +index 19c936be477f944d62e85cec81359a71bbcfa45d..b02bb1cd67488f996b6142058c52c34dfe523fff 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, +@@ -132,6 +132,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidHandleOnloadEvents() {} virtual void DidCreateScriptContext(v8::Local<v8::Context> context, int32_t world_id) {} @@ -23,10 +23,10 @@ index a92e09dc651a5f1a9bbae2572fad32233afcd46c..f99b652dda817b62615d2b3f00b4ae4b int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 4473c5e812a4a598f3e2f2bb06f78def5791af24..44c0ec9815aafd61182fd18a9d125e185d7196bc 100644 +index c9296960c76e34646bf7cb3195b80c0cbc483b58..bc8bdba3facba81c572d43b85881ec02ad7d2f00 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4455,6 +4455,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context, +@@ -4423,6 +4423,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context, observer.DidCreateScriptContext(context, world_id); } @@ -40,11 +40,11 @@ index 4473c5e812a4a598f3e2f2bb06f78def5791af24..44c0ec9815aafd61182fd18a9d125e18 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 21b90bbb8fe8ddc03eb20538be423a5396d18eb3..f9c735038f733d990783dd66ffe8c74f824c78f2 100644 +index 7be2fd1e02917537805a271f16f5f248f1c4fc45..ce0fc928448b597fb6401b77730700407ce406da 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -597,6 +597,8 @@ class CONTENT_EXPORT RenderFrameImpl - blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override; +@@ -595,6 +595,8 @@ class CONTENT_EXPORT RenderFrameImpl + uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local<v8::Context> context, int world_id) override; + void DidInstallConditionalFeatures(v8::Local<v8::Context> context, @@ -53,10 +53,10 @@ index 21b90bbb8fe8ddc03eb20538be423a5396d18eb3..f9c735038f733d990783dd66ffe8c74f 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 3d6e0c0395ff7c92d8908c5151b467beec3a7516..2fadd6d9b2e3747eacea08973d8d3c7aa9c15f26 100644 +index 5adee94f81c0e98db976ac1c6c55fb5eab8c2e65..9d3e43f4394ad9a4377b47a001c4baf4027cbe7c 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -599,6 +599,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -584,6 +584,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local<v8::Context>, int32_t world_id) {} @@ -79,10 +79,10 @@ index aa4b510137d60e6fb924f4f1a6554fe06c19ad75..816b6260020a6cbb6880b0eed197743c 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 0dda1f7cd77c47f7e61ba48dd20429c13679b543..2f73aacda1bafe07775213e232eda56c4b33325b 100644 +index bca4cbb2b2ba84fe58b5cfeaf190add5803e27c9..b6c9dd3a2a1c9b6667c563d5da86ccb4871ae81f 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local<v8::Context>, int32_t world_id) = 0; @@ -92,10 +92,10 @@ index 0dda1f7cd77c47f7e61ba48dd20429c13679b543..2f73aacda1bafe07775213e232eda56c 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 5297ad63f1c76240d57a64cc5ea64cbf8c7e1b95..006da6072db12da1632f9d45ecb5710136573641 100644 +index e06c96c068139e829af7bd99ebb111507b2bddb0..a98bc22fc5c96ad1fd2071ea1c9e1aab2fb4d5ff 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( +@@ -275,6 +275,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( web_frame_->Client()->DidCreateScriptContext(context, world_id); } @@ -110,10 +110,10 @@ index 5297ad63f1c76240d57a64cc5ea64cbf8c7e1b95..006da6072db12da1632f9d45ecb57101 v8::Local<v8::Context> 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 708414fca139eb8328e425d909a48ca97038e442..48b2a0e129ec166ebd4c9bbd32330b0cc43dbeb2 100644 +index 6658e44e65f8236927f283e3f65f007ae97ac81f..f384dcc4efd6c56c3e3e212c7e597f13bc9dae57 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 { +@@ -79,6 +79,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { void DidCreateScriptContext(v8::Local<v8::Context>, int32_t world_id) override; @@ -123,7 +123,7 @@ index 708414fca139eb8328e425d909a48ca97038e442..48b2a0e129ec166ebd4c9bbd32330b0c 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 4b639069d5d9173f0c35fe7656356031ba424a61..3da6699b40bf4f91e6d76a37e5fa8f680f7a7850 100644 +index 8087d1f62e9b1a8ac33a9e92c10a7cb8b8363e08..845c3329674d99dd385316dbfd1287fa3566a60e 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -357,6 +357,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { 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..04504a209f10a 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 56c08919ab626a8a7b3bcb892ee94cdee2a106fc..b85bdf4ed574a149a6502e8d21e54f2ee80777a5 100644 +index 84044606fb0644b2b6053c72a9750bae3729f666..995c5dfc49a392669f73d85a92fbdb54cf0e11ca 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -647,6 +647,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -649,6 +649,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,24 +22,24 @@ index 56c08919ab626a8a7b3bcb892ee94cdee2a106fc..b85bdf4ed574a149a6502e8d21e54f2e 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 9e32df9f5fd765895c8470c3922a62f754e7d409..9bac2321d65d9e54ce88fffafd72a74803ed2c87 100644 +index a099eed10dd061994bff696519099c3ef7437a46..a1f1e9b55272e70b4acd5d1f1515fba7d91538fa 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 - bool IsRenderViewLive() override; - void WriteIntoTrace(perfetto::TracedValue context) override; +@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl + bool IsRenderViewLive() const override; + void WriteIntoTrace(perfetto::TracedProto<TraceProto> context) const override; + void SetSchedulerThrottling(bool allowed) override; void SendWebPreferencesToRenderer(); 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 787077d71c04d571aa825bec0a549c5fad2b8574..4b05b80802ba97a46eed60e509b503fc8375016b 100644 +index a6fe708878eb9afba9a68e0be71ba2c0b2a84d7d..5cc81ceb44d0a8baee3ebcc63aa4137b1e9ef08e 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h -@@ -74,6 +74,9 @@ class CONTENT_EXPORT RenderViewHost { - // Write a representation of this object into a trace. - virtual void WriteIntoTrace(perfetto::TracedValue context) = 0; +@@ -80,6 +80,9 @@ class CONTENT_EXPORT RenderViewHost { + virtual void WriteIntoTrace( + perfetto::TracedProto<TraceProto> context) const = 0; + // Disable/Enable scheduler throttling. + virtual void SetSchedulerThrottling(bool allowed) = 0; @@ -73,10 +73,10 @@ index befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 14d4a00293ab0b11e733676844ce483992d6cd8e..c6c2dbb9dddd1eaa21e8c7b276d871a3898463fa 100644 +index 560b72dfbc70172bc668229b29fe0c9da139f320..13ec73b9d627259625d64f5b97838033db89745c 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -368,6 +368,7 @@ class WebView { +@@ -369,6 +369,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -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 daab024ee0e2010e177eabeb7e0fb964c631dd17..06d8ca44fb1dc3748d81b5c5a407dfdf7183f845 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 { +@@ -3666,6 +3666,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( +@@ -3677,7 +3684,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( 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 763b2ecf84401..eac065943d3a7 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 30e237f886b41bdf528b2a0e81054d15fb323f1f..43f7920cf6ff12d8a48ddef5440814a42266e8c5 100644 +index effc18673a7f832352f427c9f4fb8b276fc28ad6..96b67b56002f88e0f4e2af9997aa6a78a1accd96 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -145,6 +145,20 @@ WebPreferences::WebPreferences() +@@ -144,6 +144,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 30e237f886b41bdf528b2a0e81054d15fb323f1f..43f7920cf6ff12d8a48ddef5440814a4 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 d278453a261fe2dd3bacce433e35d50879b555a7..140f8d6273d944bfe36831d27aef757d89240b56 100644 +index a62792e0d484dc133f1df34a2c67dde838db203c..ef77424fc6778b047ac98700a5e18a3b6b161aba 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 StructTraits<blink::mojom::WebPreferencesDataView, @@ -47,7 +47,7 @@ index d278453a261fe2dd3bacce433e35d50879b555a7..140f8d6273d944bfe36831d27aef757d !data.ReadLazyFrameLoadingDistanceThresholdsPx( &out->lazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -151,6 +155,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView, +@@ -150,6 +154,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView, data.fake_no_alloc_direct_call_for_testing_enabled(); out->v8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index d278453a261fe2dd3bacce433e35d50879b555a7..140f8d6273d944bfe36831d27aef757d 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 8509f720c5afb816c6cbb2313dd566a24236a790..b9f0f79d96c58a7769939610bb72f8b2bcd3be94 100644 +index 27d0bcc02a57b1a8f8f8e25df7af383d0e9a8c00..1cb920f4d0b01df012bc9b60eb3d9caa555d4e9e 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 8509f720c5afb816c6cbb2313dd566a24236a790..b9f0f79d96c58a7769939610bb72f8b2 #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" -@@ -160,6 +161,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -159,6 +160,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index 8509f720c5afb816c6cbb2313dd566a24236a790..b9f0f79d96c58a7769939610bb72f8b2 // 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 a6291be3e953ceaee1d996e4b30a6ae78916bc7a..c3baf95c5d9b6a6ace56bcde9e1dc8179f18eaa0 100644 +index 0f5ed102b071001acc566b258946b359d33f5d45..aac80b973e4622d2207b92fcd2537342a60c6909 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 a6291be3e953ceaee1d996e4b30a6ae78916bc7a..c3baf95c5d9b6a6ace56bcde9e1dc817 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -441,6 +442,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView, +@@ -436,6 +437,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView, return r.record_whole_document; } @@ -176,7 +176,7 @@ index a6291be3e953ceaee1d996e4b30a6ae78916bc7a..c3baf95c5d9b6a6ace56bcde9e1dc817 return r.cookie_enabled; } diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom -index 96dd9fd56e44e66c5ea24d9df7c6cbff25409d6c..e0d113b4dee6a72f350b8494448f516be01d0468 100644 +index 4feef4089d59cef252ba73f49d4e490875f657ff..db92219655b824ca630edb6afe85d85e017a4a06 100644 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom @@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom"; @@ -187,7 +187,7 @@ index 96dd9fd56e44e66c5ea24d9df7c6cbff25409d6c..e0d113b4dee6a72f350b8494448f516b enum PointerType { kPointerNone = 1, // 1 << 0 -@@ -212,6 +213,22 @@ struct WebPreferences { +@@ -211,6 +212,22 @@ struct WebPreferences { V8CacheOptions v8_cache_options; bool record_whole_document; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 1ad52265500fd..6ed95034fa73c 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 da12f2f47f97628f1adeabc8900ffd16132afd7e..61d373f78520a063c7f86bde6869af9d26f32d11 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) { @@ -49,10 +49,10 @@ index 2b0c8720866b45c2a83d639533cb4c3e5dbb70e0..97c251cdc310eb22859efb1ba3ca6312 // 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 db69148e0756ed36bcf3a04f1ace69cc166261a6..bcf072a6d8bc46e5c71d9ef3f248b6af69693ac9 100644 +index 1efaff0e92061bc97dcbf3105f6b6c1dcefff17c..ec2e19c3ccf60f01b73259e1e6eff405ebf15f07 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -538,10 +538,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index db69148e0756ed36bcf3a04f1ace69cc166261a6..bcf072a6d8bc46e5c71d9ef3f248b6af if (!Client()) return false; -@@ -587,6 +583,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 22145207fe628..f096f681035eb 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 107516329273ee4a6cc49433b69f307b1264362b..0c9555a04233d07a186e34ada8b7615095854950 100644 +index 083a46a96bf969a075ef05cfe4837c4cce784191..22f18293e65035cc3b9af322520b102eb6b24a76 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -78,6 +78,7 @@ +@@ -80,6 +80,7 @@ X("drmcursor") \ X("dwrite") \ X("DXVA_Decoding") \ diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index 944a1f80f3927..5fd0656a2cdea 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 97a57dfb1626ae9a781736dd8b0b55bf201162c1..5c97441faad781b459255cb1f7d0652ec86e40c8 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..e3a17bcbab19f 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 a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015..95a7e70eee0303471702b81c68f46a0fea2b6f0e 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 fca255a2cd49f1f5d2bcb4418b04355c5befba38..2a0f3edc10a7ba48ee5a0efac0a6053f62b184e0 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4502,7 +4502,7 @@ static_library("browser") { +@@ -4508,7 +4508,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 3a3318c9586c88af0333d1b7586cbb426c205e7d..183d0c8ceb42a23424c3aa6d21c72e0a197ae638 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5719,7 +5719,6 @@ test("unit_tests") { +@@ -5904,7 +5904,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") { +@@ -5927,6 +5926,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") { +@@ -6616,7 +6619,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") { +@@ -6662,6 +6664,11 @@ 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 8155d69721913..bd23b789dcd3b 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 fcc7e12834733fa0927c35708de9665db4c59eba..faac97db5a2c86f1fcc89c3c045ef74b7b2b878a 100644 +index d960648941d8b959b25f87b364a594ec44760348..74a14a2373305e2e62b974b34a28ea9a62c6a911 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { @@ -27,7 +27,7 @@ index fcc7e12834733fa0927c35708de9665db4c59eba..faac97db5a2c86f1fcc89c3c045ef74b # 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 -@@ -346,6 +349,7 @@ default_compiler_configs = [ +@@ -349,6 +352,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 e778543bd5674..67ef2bf3d247c 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 7915346430db72d18474d7a011b8dc7637c3f281..cd736d988f9c5e37dc24c724268fe115e00914d9 100644 +index dec348e235b1306cec50e0602fb910f21eaed925..0545e0ce5490df51088ca7a4cacd968e69fa0d09 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { @@ -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/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch new file mode 100644 index 0000000000000..89e171dc5eb23 --- /dev/null +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Charles Kerr <charles@charleskerr.com> +Date: Tue, 22 Mar 2022 16:24:44 -0500 +Subject: build: make libcxx_abi_unstable false for electron + +https://nornagon.medium.com/a-libc-odyssey-973e51649063 + +diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn +index 046792ac275853bf109537589b911cfada44ed24..e43daeaa8f8c8e23eea99b3f8f5f48f92012bbc1 100644 +--- a/build/config/c++/BUILD.gn ++++ b/build/config/c++/BUILD.gn +@@ -8,6 +8,11 @@ assert(use_custom_libcxx, "should only be used if use_custom_libcxx is set") + + libcxx_abi_unstable = true + ++if (is_electron_build) { ++ # This breaks native node modules ++ libcxx_abi_unstable = false ++} ++ + # TODO(xiaohuic): https://crbug/917533 Crashes on internal ChromeOS build. + # Do unconditionally once the underlying problem is fixed. + if (is_chromeos_ash && is_chrome_branded) { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index bb9b959820869..278d3581d311a 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 20b9d7cd590361b176298e24b5aac6f546acb518..a6ed7b9f89b7fca2c6a6676053d520ba6c7716d7 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( +@@ -6866,6 +6866,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To<Referrer>(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 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 2afbf96abef912bf483d08f6c011aa4a2e515e25..92dcf2308842ce8922426b0cafdd5a3e83f4bd52 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( +@@ -3931,6 +3931,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3967,12 +3975,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3975,12 +3983,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd new_contents_impl, opener, params.target_url, params.referrer.To<Referrer>(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index ace032dc2ffac27fbdddee5a4b13c3c3e36ba5ae..80f7dd56fdaa94a9880995b2b5393af0414eef29 100644 +index afc0dc34e4a1f6c06e96d7fa09922e8aaf4bab28..f3d13fc719324e064f70077deb5d95cb9e467820 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -550,6 +550,10 @@ struct CreateNewWindowParams { @@ -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 d832c0c37554dafad0c44c78f6dc9233015b152f..654abc174a237a90225ad7be7f1180e929b9829b 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -571,6 +571,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -576,6 +576,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 e142bc65c2a0fe06a1cf59621c424170dc2d641c..8573ea54135e363f83bd786db3483d1c539e4bb1 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 { +@@ -958,6 +959,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -124,7 +124,7 @@ index f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index f889d0bf33cf218a68bf5a9422aecaed23fa260a..3330876f623e5b2cb600b1ce1fd10b3375568613 100644 +index 9c70cc90402dd1541b2b58b3be2fa7ff215f8f57..a998c64237a7ffd6583a33cd54fe3229196300a6 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,7 +150,7 @@ index f889d0bf33cf218a68bf5a9422aecaed23fa260a..3330876f623e5b2cb600b1ce1fd10b33 // 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 83517883144a77a0c775ce2d146b4e85ef79ea97..aa65517a568aa0b324b2c8cca8f60bb532ba085a 100644 +index 9bdeb8745b3dd6d329f0403ca8c4a6f5de1d59c6..11815bca2741002dd8595af026ef402bc2af999e 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -32,6 +32,7 @@ @@ -173,10 +173,10 @@ index 83517883144a77a0c775ce2d146b4e85ef79ea97..aa65517a568aa0b324b2c8cca8f60bb5 /*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 54b62065d148ab860a49dc03daaf7680ff00d778..3008d3efe89585a562ae55734938b10ef8b0074e 100644 +index 4379497806bf7c85ade2f4e4554d6a60c4ec966c..fa860bbcf0c12df33dae69d25b01587676a1b79e 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -438,6 +438,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -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 12658b5c9ca6bc10cffd2c9e8ddf45bac697e75c..284f3ed1513009092ecdf2be6ff87641cc404cd9 100644 +index c18012a217bfc492ac2cdef5776bb23099df57ae..b96bd45cfee98c8177b3ac5979273d1f9ba47388 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2051,6 +2051,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2069,6 +2069,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 a1ba014a796d3..380b7d15612c7 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 67385e25a9233ce7a5077e69e9be1f457252ea5d..3e6864e6ea3374874598a0175746451126ddb165 100644 +index 8ea2d1c6d7269d25cd34a61d971d35c81b561670..8609defbb5de5c11614858586a9100974aed067c 100644 --- a/chrome/browser/resources/cryptotoken/webrequestsender.js +++ b/chrome/browser/resources/cryptotoken/webrequestsender.js -@@ -141,10 +141,11 @@ function tabInForeground(tabId) { +@@ -142,10 +142,11 @@ function tabInForeground(tabId) { reject(); return; } @@ -29,7 +29,7 @@ index 67385e25a9233ce7a5077e69e9be1f457252ea5d..3e6864e6ea3374874598a01757464511 chrome.tabs.get(tabId, function(tab) { if (chrome.runtime.lastError) { resolve(false); -@@ -154,9 +155,13 @@ function tabInForeground(tabId) { +@@ -155,9 +156,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 a0affa82eec7a..00838845586bb 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,7 +9,7 @@ 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 10f34d87d74d81de91cbd006665465cee6c0d21e..93f09cd74b225a8b0c2d2f5280636513e852e8ff 100644 +index 5040ec838c64ffa8aa58ba43f51df649443b2f81..7a7a87d00fa392b7bd07267d9059664d5d472252 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -446,8 +446,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 19409a0d9762f..04ad43d0a65ff 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -49,7 +49,7 @@ index 27452df45433e4aeb7b9008f8e5b91dd4b5f50db..5c6f9936e6d3d2647d7efbc70efda855 // 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 88b68339823142f9b2b2d4730d6ebc1033ac86a3..e2d53e1b233adced355be667d006d5d2ba3d5110 100644 +index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03a2c4e558 100644 --- a/chrome/browser/media/offscreen_tab.h +++ b/chrome/browser/media/offscreen_tab.h @@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver, @@ -63,10 +63,10 @@ index 88b68339823142f9b2b2d4730d6ebc1033ac86a3..e2d53e1b233adced355be667d006d5d2 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; 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 +index 593cbe8038789e3b071ec9f5c243be6f0be629f0..18e5ade28bb966b35a6f69b2543768ac482d4730 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( +@@ -79,10 +79,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -80,7 +80,7 @@ index 4df94c57d6be19d6e76430391386e84d2816d94a..f1c0c6e8bec7ef17292c2a5a3b33800f /*from_user_gesture=*/true); return true; 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 +index e1adc822d8086b6c1b103a107923247cbb0aa7f2..2d2d65fa78d8fdccbe44aa1bf9b297e7038781c5 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, @@ -108,10 +108,10 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 04e327d970b872f0a9c505a0b99c6273900930f9..5993b3cb0cbe76cd266dee074effd736efa8fc50 100644 +index ace0c593debb46c9238e5708634fc6088a1bc715..31d5c0f00ae43706f16fc8615761e96eab31f1f3 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1767,12 +1767,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1770,12 +1770,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,7 +127,7 @@ index 04e327d970b872f0a9c505a0b99c6273900930f9..5993b3cb0cbe76cd266dee074effd736 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index a63ba24be314eb4372d7dda7206dee4b52730d1e..f9bcaa001bfed987edd0ebb001f5cda0e0aca4aa 100644 +index 5edda102ff59ccb30d2150a88e75e8fb65379fca..82aaa442bca9e7a5e57315ace0b1c62e40ec1d24 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -808,8 +808,7 @@ class Browser : public TabStripModelObserver, @@ -246,10 +246,10 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7 void AddNewContents(content::WebContents* source, std::unique_ptr<content::WebContents> new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 5c63a024827359ccf697d0b7fc8fa2092eb107b7..3da88b5831717c979373c064b4c1520c28d4fd98 100644 +index d69e028b34ab4407abcdea3ece93db39926c587e..a82b571fdabe90771bc8f8ed4ae40df3085592c7 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( +@@ -3879,8 +3879,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -274,7 +274,7 @@ index 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 3330876f623e5b2cb600b1ce1fd10b3375568613..a9f48c6577afef8876cd8304ff5a66405b7d8343 100644 +index a998c64237a7ffd6583a33cd54fe3229196300a6..4f57227a9033f905be13bc5166d0324d495a6531 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -318,8 +318,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -288,7 +288,7 @@ index 3330876f623e5b2cb600b1ce1fd10b3375568613..a9f48c6577afef8876cd8304ff5a6640 // 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 ce83daee0eb44d72caaf1e7e250ce0c3fadb827c..ed0b508a5d6cdd4433a8117ef2032ce8e1d99273 100644 +index bddbd37ca73369adb82dad5bb8b25f0ab2a7f878..9bf28cd7f926f41041f40d4bc0a497c8b8730b86 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( @@ -316,10 +316,10 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10 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 0b01120f6a6053ab03355c93216d703d0958aeab..a1c6c5a4b507bbf50668d7ed2febe97aca942c1d 100644 +index 56b6d5d28fe21a2bea723060ad48ee0134e814a2..a3da9c86c0018e7f4810feb73ca32896cd6ce93c 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( +@@ -402,8 +402,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,10 +372,10 @@ index f2054bca778784c223beb02de150cfeb31c52907..53bf6bc205e9c631597bfbda46f4a0b5 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 2214ba7726f105e62bdc92bd0e6142ea9fa6ed72..2b9b804106317bfc914efacc7adfd282563e4c8b 100644 +index 899b8beabdf1131a08583470ace5b468576eeab6..21ab4ae22c54846af78518e897dc23ebe4ce8317 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc -@@ -176,8 +176,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { +@@ -177,8 +177,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -386,10 +386,10 @@ index 2214ba7726f105e62bdc92bd0e6142ea9fa6ed72..2b9b804106317bfc914efacc7adfd282 ->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 1c3eebdc2cc3f5d8f110562eb3e18a1f45521c4f..11b7b0c6617c40c766d64cd0d4e60d22e569bfb1 100644 +index 749200efec166e0c29402a3d5e079f2e94460363..2cbc96e911291fb0b31c3f4a1444ded0be4521f5 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( +@@ -427,8 +427,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( 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 262ac6344b129..10a9d5dbeb4c8 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 ec55c3f97988a7de06a738e61e389ba07712ad4e..6a40a73520a951d7c6fd06cbd07329a40ff41544 100644 +index 863c9e088c2d967506a9fabd044d7b08cc8bee23..fca255a2cd49f1f5d2bcb4418b04355c5befba38 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7088,6 +7088,7 @@ static_library("browser") { +@@ -7123,6 +7123,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index e1eba13e55ffa..2c9718a540923 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 0cdaa37db5a4c992c8051a6e4370f61b3e4559a3..58108239e1b5aad967eff63d8eed10a560726c6e 100644 +index ff769b9855810bfe3761079ddae286fc8aa5602f..1fea025e8fc1d4e2496f117780fa4d0eb2f2e983 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 0cdaa37db5a4c992c8051a6e4370f61b3e4559a3..58108239e1b5aad967eff63d8eed10a5 #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" -@@ -230,12 +232,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { +@@ -183,12 +185,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 3a7e3c694cc04..ab63b9153c409 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<gfx::SingletonHwndHotKeyObserver> observer = diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 4e9e4f4d21fbe650d8f32254a3b450074a038751..ac923f436cbdd6ded0629da4e4c659d94258e55b 100644 +index 3f37f08ccc06137317164e96e8934a0202fa5550..b954f8dde00d4f5257223c464e9145a6bef48900 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc -@@ -296,6 +296,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { +@@ -297,6 +297,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { case ui::VKEY_MEDIA_STOP: system_media_controls_->SetIsStopEnabled(should_enable); break; @@ -146,10 +146,10 @@ index ada705fb42e88d4bfa05b212c84111be9057a50e..a866b975687dd08ad88031a63f161b31 } diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc -index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688ada1a3ad3 100644 +index 898e15a25c99ad25221c41594803521565ff4432..664337941023e800c9605f987d0e1d65bb0a444d 100644 --- a/ui/base/x/x11_global_shortcut_listener.cc +++ b/ui/base/x/x11_global_shortcut_listener.cc -@@ -32,11 +32,13 @@ const x11::ModMask kModifiersMasks[] = { +@@ -31,11 +31,13 @@ const x11::ModMask kModifiersMasks[] = { x11::ModMask GetNativeModifiers(bool is_alt_down, bool is_ctrl_down, @@ -165,7 +165,7 @@ index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688a } } // namespace -@@ -82,8 +84,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) { +@@ -81,8 +83,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) { bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, @@ -177,7 +177,7 @@ index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688a auto keysym = XKeysymForWindowsKeyCode(key_code, false); auto keycode = connection_->KeysymToKeycode(keysym); -@@ -108,7 +111,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code, +@@ -107,7 +110,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code, } registered_combinations_.insert( @@ -186,7 +186,7 @@ index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688a return true; } -@@ -116,8 +119,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code, +@@ -115,8 +118,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code, void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, @@ -198,7 +198,7 @@ index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688a auto keysym = XKeysymForWindowsKeyCode(key_code, false); auto keycode = connection_->KeysymToKeycode(keysym); -@@ -125,7 +129,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code, +@@ -124,7 +128,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code, connection_->UngrabKey({keycode, x_root_window_, modifiers | mask}); registered_combinations_.erase( @@ -207,7 +207,7 @@ index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688a } void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) { -@@ -135,14 +139,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) { +@@ -134,14 +138,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) { const bool is_alt_down = event.flags() & EF_ALT_DOWN; const bool is_ctrl_down = event.flags() & EF_CONTROL_DOWN; const bool is_shift_down = event.flags() & EF_SHIFT_DOWN; diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index c16edea8ac147..ff3fe7c4fcfae 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -75,10 +75,10 @@ index 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4 // 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 dc2b18b322350121768571b7997d632a10220ac9..3e3ee0f721a2316d324fb31e17ba97ff24d9e6d7 100644 +index 32e2038e15adae14aa218a353f074cd6654bdc16..72bec9c08d7ec50257a86b0ee7173864d879d7d9 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc -@@ -180,6 +180,7 @@ bool PlatformCrashpadInitialization( +@@ -170,6 +170,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 dc2b18b322350121768571b7997d632a10220ac9..3e3ee0f721a2316d324fb31e17ba97ff std::vector<std::string> arguments; if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -201,6 +202,13 @@ bool PlatformCrashpadInitialization( +@@ -191,6 +192,13 @@ bool PlatformCrashpadInitialization( } #endif @@ -128,10 +128,10 @@ index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index 1a8f42cb4e2ea493642d8b264d0be5c3da358793..e972272de54107aaed6143e3f3569ba56bd3cf3e 100644 +index d2354b84f3a184ad53571518198055a0a91cbc25..c05529257dda2acf0fa588d49e2b902736d9b02f 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -89,6 +89,7 @@ bool PlatformCrashpadInitialization( +@@ -88,6 +88,7 @@ bool PlatformCrashpadInitialization( std::map<std::string, std::string> process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -139,7 +139,7 @@ index 1a8f42cb4e2ea493642d8b264d0be5c3da358793..e972272de54107aaed6143e3f3569ba5 std::string url = crash_reporter_client->GetUploadUrl(); -@@ -127,6 +128,13 @@ bool PlatformCrashpadInitialization( +@@ -126,6 +127,13 @@ bool PlatformCrashpadInitialization( std::vector<std::string> arguments(start_arguments); diff --git a/patches/chromium/crashpad_pid_check.patch b/patches/chromium/crashpad_pid_check.patch index 597472b3ec79d..5560d4b3ec9f8 100644 --- a/patches/chromium/crashpad_pid_check.patch +++ b/patches/chromium/crashpad_pid_check.patch @@ -16,7 +16,7 @@ https://github.com/electron/electron/pull/18483#discussion_r292703588 https://github.com/electron/electron/pull/18483#issuecomment-501090683 diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -index 92d5c5d47cfa5bd70300bb8bbc16ab944cd93509..87c14718221a83d531d15abf1f1d2d1bbc020e77 100644 +index 6890a01cc4b333927be6c36ff3392706020f57a3..36da005deed5893989585427216fd1e16d5e9f0c 100644 --- a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc +++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc @@ -446,9 +446,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 5374f0423050e..0af9aeccfd053 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 183503c7d9891b7e651f0cac4b2dc97157b61928..1630a0a49a4b88ceda0ee14980236dc614b42c67 100644 +index 7a6503d4a4ad33290d97078336c18d81839a8675..0f162b8e681ebb67c5f3b23a40fe3b6ec97cec49 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 -@@ -511,8 +511,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( +@@ -506,8 +506,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index de4da5324bf23..4db38bb6a59dd 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -8,10 +8,10 @@ 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..c5339603930f68e7019ca33d8b9f148cf4ac86af 100644 +index 03af516b6c85523c51a70dac281dbd732c10ea7e..b6f91fbd15181dff4d8ddc4be2b66c2a5012f495 100644 --- a/chrome/browser/media/webrtc/desktop_media_list.h +++ b/chrome/browser/media/webrtc/desktop_media_list.h -@@ -94,7 +94,8 @@ class DesktopMediaList { +@@ -96,7 +96,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. @@ -22,10 +22,10 @@ index 57cfc646f8ea545271c22d79ec158a04b148bc9c..c5339603930f68e7019ca33d8b9f148c virtual int GetSourceCount() const = 0; virtual const Source& GetSource(int index) const = 0; diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc -index 24bd95b79479c21182a0d1a61364e1794f900261..2b2a7494ee9bd88fd5c8ebf50a5e29738b2dffd0 100644 +index ac1e7854dc9ae629a499fac7626ec456e18c7867..087da9bbfb9081b94ca8ea8d245871dc3601b1a7 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc -@@ -63,12 +63,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) { +@@ -65,12 +65,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) { Refresh(true); } @@ -41,10 +41,10 @@ index 24bd95b79479c21182a0d1a61364e1794f900261..2b2a7494ee9bd88fd5c8ebf50a5e2973 int DesktopMediaListBase::GetSourceCount() const { diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h -index c56bc6dcc73cf0e0d5e0e64d45436ccac833cd66..69aaecca38ede55ee71310698710e3f17b04abff 100644 +index 9c77a2d5872cc340b7a237b896afea1dd3be2503..d06869ff78ec0d48e97c3aeb7ac86d4aa9d9b1ba 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h -@@ -36,7 +36,7 @@ class DesktopMediaListBase : public DesktopMediaList { +@@ -38,7 +38,7 @@ class DesktopMediaListBase : public DesktopMediaList { void SetThumbnailSize(const gfx::Size& thumbnail_size) override; void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override; void StartUpdating(DesktopMediaListObserver* observer) override; @@ -54,10 +54,10 @@ index c56bc6dcc73cf0e0d5e0e64d45436ccac833cd66..69aaecca38ede55ee71310698710e3f1 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 +index 2bf801156b93305705914d3dcb7dcbbebd03c096..6ea87e4471ab64c838b705c64be6bc10d74b213e 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) { +@@ -77,7 +77,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) { thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); } diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 678825807237a..90badb12ad13f 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 bf32a083d0f0873e112debe0e88ab1be8125a417..8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c 100644 +index bb79a55d46730a4a127ee6483a7a25ecdc2aea5b..b14fa0f41166a904991ec920cec2f45c3b71c953 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; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index dac0d9fbd0df3..24227afe87461 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 a7636e4535d0c4303c4022620b2fc7d18870f6da..5de5f020da02f30b28bf02701e9fd1662424c914 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1882,6 +1882,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1900,6 +1900,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -34,7 +34,7 @@ index 61ab59e0d97a392ae18c1d7ad7dd606b5cd1c567..2a899818ebb67ba4fc06ccbcff3ee03f // 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 64f1a3a3cb8d82235ff04f5c01a7cf571d8ba00c..ffa8d1a53870663647e423975f00e5650c6ab579 100644 +index f6094a5defe12c34564020b0779626b3e5bff99e..a068a9ba33d3f8c8cdc74ae63ab5e16caa0b90c3 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -80,10 +80,10 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b949187690aca71c 100644 +index 553c3be2562e836e2ce6d6f44997cebf3cba7466..fbe38d97a8d1861ecfb5ccb583d050a28b9ab108 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc -@@ -87,6 +87,9 @@ +@@ -86,6 +86,9 @@ using gpu::gles2::GLES2Interface; @@ -93,7 +93,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 namespace viz { namespace { -@@ -684,8 +687,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -683,8 +686,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -105,7 +105,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1675,7 +1679,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1674,7 +1678,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, params->use_color_matrix, tint_gl_composited_content_, params->apply_shader_based_rounded_corner && ShouldApplyRoundedCorner(params->quad)), @@ -115,7 +115,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2148,7 +2153,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2147,7 +2152,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -125,7 +125,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); SkColor4f color_f = SkColor4f::FromColor(color); -@@ -2156,7 +2162,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2155,7 +2161,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, // Apply color transform if the color space or source and target do not match. if (quad_color_space != CurrentRenderPassColorSpace()) { const gfx::ColorTransform* color_transform = @@ -134,7 +134,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB); color_transform->Transform(&col, 1); color_f.fR = col.x(); -@@ -2378,7 +2384,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -2377,7 +2383,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -144,7 +144,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2477,7 +2484,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2476,7 +2483,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -154,7 +154,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2587,7 +2595,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2586,7 +2594,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, // The source color space should never be RGB. DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); @@ -164,7 +164,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 #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, +@@ -2767,7 +2776,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, ShouldApplyRoundedCorner(quad)), @@ -174,7 +174,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2839,8 +2849,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2838,8 +2848,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -185,7 +185,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 /*adjust_src_white_level=*/draw_cache_.is_video_frame, locked_quad.hdr_metadata()); -@@ -3697,7 +3707,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3696,7 +3706,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& dst_color_space, bool adjust_src_white_level, absl::optional<gfx::HDRMetadata> hdr_metadata) { @@ -196,7 +196,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 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 -@@ -4085,9 +4097,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -4084,9 +4096,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -209,7 +209,7 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -4307,8 +4319,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4305,8 +4317,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -221,14 +221,14 @@ index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b9491876 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4514,3 +4527,5 @@ bool GLRenderer::ColorTransformKey::operator<( +@@ -4512,3 +4525,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 f5d73922086b5b27907fd393d4d4204a574c3b25..5b09f5ef5f04b519ed4148498c82d003c9fd6c91 100644 +index 90c7ace352fe909e3f521403c2a7fbf030ccc31e..f011183e21921f38ce5062079e8430a030159bc1 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -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 d8939c1936830b101d6bb4079cd99e6015b481c4..366f801cbe84a28ef462037a26da47c9f65057b4 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 @@ +@@ -197,6 +197,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( +@@ -3212,6 +3213,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[] = { @@ -260,7 +260,7 @@ index ac9570fa3d9cb3b0026f70465e5b21ac7778c3df..acc0e121e7746da397cfab07b3707de7 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 6260d73068636f4a8d4c73c161a4ffe165b267d0..2686ef0dfb7d8b667647d11fece5aa8e1be76fe5 100644 +index 648f25d99884b99f49e26cd9f280a8a6ae63e1c7..0f87961ecd8c24e3ba82c6bae187a12c9b112bd4 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 @@ @@ -292,7 +292,7 @@ index 6260d73068636f4a8d4c73c161a4ffe165b267d0..2686ef0dfb7d8b667647d11fece5aa8e } 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 49ef0d352cfb6163499fa42416187595c7011a68..d5bc620847872fcba96f6941be529428755d83a2 100644 +index 4187a703f62f36ff14d3a95f4b116febd5242c09..8d3b82e802bbd011380df21915427aba26193952 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 @@ @@ -303,7 +303,7 @@ index 49ef0d352cfb6163499fa42416187595c7011a68..d5bc620847872fcba96f6941be529428 #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -184,6 +185,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -183,6 +184,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -314,10 +314,10 @@ index 49ef0d352cfb6163499fa42416187595c7011a68..d5bc620847872fcba96f6941be529428 // 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 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d652120ecb913e 100644 +index e36187917ecec5d9e40009d1c394a07e72281919..de9698d577ab48358d06362fc78575fd0ad98d30 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc -@@ -21,6 +21,7 @@ +@@ -20,6 +20,7 @@ #include "ui/gfx/buffer_format_util.h" #include "ui/gfx/color_space.h" #include "ui/gfx/icc_profile.h" @@ -325,7 +325,7 @@ index 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d65212 namespace gfx { -@@ -143,6 +144,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { +@@ -142,6 +143,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { // Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace. bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface, const ColorSpace& color_space) { @@ -340,7 +340,7 @@ index 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d65212 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -313,6 +322,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -312,6 +321,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } @@ -357,7 +357,7 @@ index 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d65212 if (__builtin_available(macos 10.12, *)) { IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index be932ac3094a441cd5d9afa2ffd2c6d4a64ce559..a6aa9b4c6ba958eb81276911368cd053b9fb59f8 100644 +index 0e8044c6d87008c51fd165c6ef8bdc3687d6cc29..78015868927602b5225f252f0a9182f61b8431dc 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -11,6 +11,8 @@ namespace switches { @@ -370,7 +370,7 @@ index be932ac3094a441cd5d9afa2ffd2c6d4a64ce559..a6aa9b4c6ba958eb81276911368cd053 // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index 442809de1631081efbe062922539318f5172a5ae..b8e5c7e53d58a06175105c9396a7d976bda7a4bd 100644 +index e8e5d44e246364dd45594efb442c129676c14270..252096ee18ca33f4b98f68beb1f534e1c2ab805e 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 23daa8d150e30..cb16038fb732b 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 58002d37ba340f84f47e2522c0d7bf7c1a64c5d2..bc0a73f08e77bf13eb1cafa55f955e6083071104 100644 +index 54a1142f17e2a63b86e1fab52ea90276091c85a4..df9381bf8dc4b2b85548c529038f60cc3185fcdd 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 @@ +@@ -511,7 +511,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 755b0eb4b9951..e9e9af547fe6f 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 03e318b14025f3c971d471351068986f8a1dd14d..59437e69e25fe85cffc9b558dec2284123ac48be 100644 +index 63f51521afa85f53073df2e3747eba95e80de09d..ed56e947fa137cbaddaa12503ae983d7acd4463f 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() { +@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,12 +20,12 @@ index 03e318b14025f3c971d471351068986f8a1dd14d..59437e69e25fe85cffc9b558dec22841 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 5cc97c9c8305bf23b7cdf39ea68c304fac20b479..a6a65a251711394a33fb02bd66c2eeb7b559f711 100644 +index 5e2e1fe4482fdde0df1a02ae9ae6d68431dac4d8..3ae005ae898ee0dd8befa7699b469fc379b5a1d1 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -877,6 +877,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl - void OnLocalSurfaceIdChanged( - const cc::RenderFrameMetadata& metadata) override; +@@ -880,6 +880,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl + + SiteInstanceGroup* GetSiteInstanceGroup(); + // Electron: Prevents the widget from getting hidden. + bool disable_hidden_ = false; @@ -34,10 +34,10 @@ index 5cc97c9c8305bf23b7cdf39ea68c304fac20b479..a6a65a251711394a33fb02bd66c2eeb7 // |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 a819dcf960a4c70c0c8cd57710971de2c41e13ca..bbc3671c3fa8e058b8f107d601233735c0822297 100644 +index b39dd8d70aa590677f7d3e95412c0709f0fbbc81..558fd14566a4b953b5140b59ad614b70e1855bc5 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -619,7 +619,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -618,7 +618,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 cc1a3911ab8ab..075e38265e551 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 a460f4643881a0bd70a863884aa50ae76e25c3b7..0635d66dad36e2d6042dd317962527793f5b96f7 100644 +index cd286b4925b3d2d9e74caecee759360488f2b8ba..0bc714a78e58719824ffeba8ced7854474fa6e92 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1159,6 +1159,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1177,6 +1177,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index a460f4643881a0bd70a863884aa50ae76e25c3b7..0635d66dad36e2d6042dd31796252779 // 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 && -@@ -1205,6 +1206,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1223,6 +1224,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 6bd042bd527b8..692ebe4ddcdb1 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 63819bf2593894bd763547d58cfae31d821bd7eb..a4ee9520cfc11125837e42955f8f6f6c3f21bf9e 100644 +index 60a33e1501b58d486217d934de6f5c2c392e01bb..3b9ccdf82c6be5b12d32f053bedc5c6d1cd4bc0e 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc -@@ -67,7 +67,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { +@@ -66,7 +66,7 @@ void MemoryReclaimer::Reclaim(int flags) { // // Lastly decommit empty slot spans and lastly try to discard unused pages at // the end of the remaining active slots. @@ -17,9 +17,9 @@ index 63819bf2593894bd763547d58cfae31d821bd7eb..a4ee9520cfc11125837e42955f8f6f6c +#if PA_STARSCAN_ENABLE_STARSCAN_ON_RECLAIM && defined(PA_ALLOW_PCSCAN) { using PCScan = internal::PCScan; - const auto invocation_mode = flags & PartitionPurgeAggressiveReclaim + const auto invocation_mode = flags & PurgeFlags::kAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index 4bfe2501309e832dc9962d5f4642c6b7c782f83d..c45f1207be984fae9aee2cc5b9a7c405ed5ed96e 100644 +index d1b71673ca79ea0f2293cda46564ceb8a018f4e5..ca70bb8fdf7fec2e0d5e2b3bf0ece86def72e21b 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc @@ -43,6 +43,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 017e3d5431128..d8cdef4d187c5 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 44c0ec9815aafd61182fd18a9d125e185d7196bc..a77c39adfc687d43004341d4ca9e6fa676c814f5 100644 +index bc8bdba3facba81c572d43b85881ec02ad7d2f00..3b12ab113f7c159beb74a09f95335977b4ee2b4f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2394,7 +2394,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2367,7 +2367,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index a124b5b3d2ae1..b038130828869 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -19,7 +19,7 @@ index a1de50d6b0f699d0651c369cafafdd5bb542242d..65b9f5e5f81e8ef8b591ef2e027e095d aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c..9ca11a19e66e34585b4b11e89cc3b789a4389b5e 100644 +index b14fa0f41166a904991ec920cec2f45c3b71c953..37bb1e9788a251b3f2c79b5272d4a44c22b707b3 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -936,8 +936,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { 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 c05e1e16aceef..cad261c043f60 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 a7dad3d1053c3101183b9686adbccaa5cf3a87fc..24da1fde55c345cb58829539aec381af9af57bae 100644 +index 78b8a28eadf392422b55e441634e3161c8c1694c..af3ed7813d9ed5fb294b67a0da1237140b40abbf 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 b30988fba7e9c..d04ad170f9062 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 20373c0e86852446569c401c4a993512cb388fc7..9b6dbdad1a17148303ddecaada17a57d4ea22bb2 100644 +index 4c8982a8ae3ae23fbeef244cd23b43c889d3fa94..13b48d5acadf5dcfb40a829751b089c1c29f9450 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1343,6 +1343,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1350,6 +1350,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ 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 eed05c05d1da28284af6ae0cef45dbbb47254058..f32671202010fa57901a09723feecacc72dbd5f9 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -282,6 +282,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -283,6 +283,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 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 c929eb10af5b8856debdc0d665eac767e9730714..c20bd2a2d6b989386ce7ef97e43f677e2c5291fa 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1067,6 +1067,9 @@ interface NetworkContext { +@@ -1089,6 +1089,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..1a14cd39962aa 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 7e7927c7258963bd95a2c064ef85e410f4d2571d..05353bda1169df38499e6f789bb632307d7bcfde 100644 +index 06d8ca44fb1dc3748d81b5c5a407dfdf7183f845..85e1772fbcbb190e32dd30996541cc2e9d19d057 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 @@ +@@ -159,6 +159,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 7e7927c7258963bd95a2c064ef85e410f4d2571d..05353bda1169df38499e6f789bb63230 #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" -@@ -1776,6 +1777,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1774,6 +1775,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 1f6c211951b05..07752f798efa4 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -96,19 +96,19 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..5b701b1361707b610ed60c344e441e67 // 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 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a5a1f1424 100644 +index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190f7d1137d 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -148,7 +148,7 @@ const char kACKToken[] = "ACK"; +@@ -146,7 +146,7 @@ const char kACKToken[] = "ACK"; const char kShutdownToken[] = "SHUTDOWN"; const char kTokenDelimiter = '\0'; const int kMaxMessageLength = 32 * 1024; --const int kMaxACKMessageLength = base::size(kShutdownToken) - 1; +-const int kMaxACKMessageLength = std::size(kShutdownToken) - 1; +const int kMaxACKMessageLength = kMaxMessageLength; bool g_disable_prompt = false; bool g_skip_is_chrome_process_check = false; -@@ -614,6 +614,7 @@ class ProcessSingleton::LinuxWatcher +@@ -612,6 +612,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector<std::string>& argv, @@ -116,7 +116,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a SocketReader* reader); private: -@@ -638,6 +639,9 @@ class ProcessSingleton::LinuxWatcher +@@ -636,6 +637,9 @@ class ProcessSingleton::LinuxWatcher // The ProcessSingleton that owns us. ProcessSingleton* const parent_; @@ -126,7 +126,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a std::set<std::unique_ptr<SocketReader>, base::UniquePtrComparator> readers_; }; -@@ -668,16 +672,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -666,16 +670,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -141,7 +141,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a - if (parent_->notification_callback_.Run(base::CommandLine(argv), - base::FilePath(current_dir))) { - // Send back "ACK" message to prevent the client process from starting up. -- reader->FinishWithACK(kACKToken, base::size(kACKToken) - 1); +- reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1); - } else { + auto wrapped_ack_callback = + base::BindRepeating(&ProcessSingleton::LinuxWatcher::AckCallback, @@ -154,7 +154,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a LOG(WARNING) << "Not handling interprocess notification as browser" " is shutting down"; // Send back "SHUTDOWN" message, so that the client process can start up -@@ -687,6 +696,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( +@@ -685,6 +694,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( } } @@ -165,7 +165,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a + if (!ack_callback_called_) { + ack_callback_called_ = true; + std::string ack_message; -+ ack_message.append(kACKToken, base::size(kACKToken) - 1); ++ ack_message.append(kACKToken, std::size(kACKToken) - 1); + if (response && response->size_bytes()) { + ack_message.append(reinterpret_cast<const char*>(response->data()), + response->size_bytes()); @@ -177,17 +177,17 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(reader); -@@ -722,7 +747,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -720,7 +745,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } - // Validate the message. The shortest message is kStartToken\0x\0x + // Validate the message. The shortest message kStartToken\0\00 + // The shortest message with additional data is kStartToken\0\00\00\0. - const size_t kMinMessageLength = base::size(kStartToken) + 4; + const size_t kMinMessageLength = std::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -752,10 +778,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -750,10 +776,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -217,7 +217,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -784,8 +828,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -782,8 +826,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -231,7 +231,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -904,7 +952,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -902,7 +950,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -241,7 +241,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -914,11 +963,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -912,11 +961,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector<std::string>& argv = cmd_line.argv(); @@ -263,14 +263,14 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a // 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. -@@ -960,6 +1019,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -958,6 +1017,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( linux_ui->NotifyWindowManagerStartupComplete(); #endif -+ size_t ack_data_len = len - (base::size(kACKToken) - 1); ++ size_t ack_data_len = len - (std::size(kACKToken) - 1); + if (ack_data_len) { + const uint8_t* raw_ack_data = -+ reinterpret_cast<const uint8_t*>(buf + base::size(kACKToken) - 1); ++ reinterpret_cast<const uint8_t*>(buf + std::size(kACKToken) - 1); + base::span<const uint8_t> ack_data = + base::make_span(raw_ack_data, raw_ack_data + ack_data_len); + notification_ack_callback_.Run(&ack_data); @@ -282,7 +282,7 @@ index 7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75..44d563e35efb318c5684c30fc441996a return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce82ad6abb2 100644 +index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f941384b249a5d 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -21,6 +21,7 @@ @@ -434,7 +434,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce8 return true; } -@@ -254,9 +343,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -261,9 +350,13 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -449,7 +449,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce8 program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -271,6 +364,37 @@ ProcessSingleton::~ProcessSingleton() { +@@ -278,6 +371,37 @@ ProcessSingleton::~ProcessSingleton() { ::CloseHandle(lock_file_); } @@ -487,7 +487,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce8 // Code roughly based on Mozilla. ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); -@@ -283,8 +407,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { +@@ -290,8 +414,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } @@ -498,7 +498,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce8 return PROCESS_NOTIFIED; case chrome::NOTIFY_FAILED: remote_window_ = NULL; -@@ -422,6 +547,18 @@ bool ProcessSingleton::Create() { +@@ -429,6 +554,18 @@ bool ProcessSingleton::Create() { << "Lock file can not be created! Error code: " << error; if (lock_file_ != INVALID_HANDLE_VALUE) { @@ -517,7 +517,7 @@ index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..1d393e6e161b896a47d3490d902f2ce8 // 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. TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); -@@ -449,6 +586,7 @@ bool ProcessSingleton::Create() { +@@ -456,6 +593,7 @@ bool ProcessSingleton::Create() { } void ProcessSingleton::Cleanup() { diff --git a/patches/chromium/feat_add_onclose_to_messageport.patch b/patches/chromium/feat_add_onclose_to_messageport.patch index cf52cfa05ff50..01d4fd5beeb27 100644 --- a/patches/chromium/feat_add_onclose_to_messageport.patch +++ b/patches/chromium/feat_add_onclose_to_messageport.patch @@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a whole bunch more useful! diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc -index c5714d115210488cb531c1e54de540f429636638..6f67b21803fcdc2498ef207878d1541e04822fca 100644 +index a284d187968914b4304eb49362b2a8ccafa5e5c2..d6f8bf39c47cfc622dec5736d82ccc308d406cfa 100644 --- a/third_party/blink/renderer/core/messaging/message_port.cc +++ b/third_party/blink/renderer/core/messaging/message_port.cc -@@ -161,6 +161,7 @@ void MessagePort::close() { +@@ -162,6 +162,7 @@ void MessagePort::close() { Entangle(pipe.TakePort0()); } closed_ = true; 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 fbd9cec05e06c..8b78ba638e7d5 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 5376b01ad03c346ecc1c5d47ff125103dbc05eb8..a60ce1d4fe6b7132d7adac1a7687c7185d1abee3 100644 +index 3f596e0d24ccf7586e2e20d219b73300ee3f56a0..0eb957667b591d1215b60f83141d8431079c1f45 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -114,6 +114,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, +@@ -124,6 +124,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, NativeTheme::~NativeTheme() = default; bool NativeTheme::ShouldUseDarkColors() const { @@ -26,12 +26,12 @@ index 5376b01ad03c346ecc1c5d47ff125103dbc05eb8..a60ce1d4fe6b7132d7adac1a7687c718 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index e46bc2cf64ca554c0e21a4e0851ad092f504e080..0ffe583d56ddc3abec8c848c1cd5dbc3623acb5b 100644 +index 3b9c8841ac65471141307025394464a90b02daa9..dba57a6af6a3ce8dc258a747d721fbc9d50b0ebf 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -389,6 +389,23 @@ class NATIVE_THEME_EXPORT NativeTheme { - scoped_refptr<ColorProviderManager::InitializerSupplier> custom_theme) - const; +@@ -392,6 +392,23 @@ class NATIVE_THEME_EXPORT NativeTheme { + custom_theme, + bool use_custom_frame = true) const; + + enum ThemeSource { @@ -53,7 +53,7 @@ index e46bc2cf64ca554c0e21a4e0851ad092f504e080..0ffe583d56ddc3abec8c848c1cd5dbc3 // 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 -@@ -558,6 +575,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -557,6 +574,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 8aec002466d42..72cb9fc018ca2 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 @@ -12,21 +12,8 @@ This patch adds a list of "streaming protocols" to the MultibufferDataSource in other protocols to register their streaming behavior. MultibufferDataSource::AssumeFullyBuffered() 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 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 -@@ -33,6 +33,8 @@ namespace blink { - class BufferedDataSourceHost; - class MultiBufferReader; - -+void BLINK_PLATFORM_EXPORT AddStreamingScheme(const char* new_scheme); -+ - // A data source capable of loading URLs and buffering the data using an - // 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 ba3e8d75ce49614e26dd77692166a11b614a5d9c..4c3170ecb94716ec2869c363381759cbf08f3ae6 100644 +index 58256037e0a2485a9f8de9f4086550f39e865b2d..3456f1d55b16239698ba83d1d27beec1c3806192 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 @@ @@ -39,7 +26,7 @@ index ba3e8d75ce49614e26dd77692166a11b614a5d9c..4c3170ecb94716ec2869c363381759cb +#include "base/strings/string_util.h" #include "media/base/media_log.h" #include "net/base/net_errors.h" - #include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h" + #include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h" @@ -60,8 +62,20 @@ const int kUpdateBufferSizeFrequency = 32; // How long to we delay a seek after a read? constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20); @@ -77,3 +64,16 @@ index ba3e8d75ce49614e26dd77692166a11b614a5d9c..4c3170ecb94716ec2869c363381759cb } void MultiBufferDataSource::SetReader(MultiBufferReader* reader) { +diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +index cb5d1951af2ff71cc6c7905235d85d6cbc541ae7..292bcf55be733a5cc1e32e11bd00e9acebdbfcbf 100644 +--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h ++++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +@@ -33,6 +33,8 @@ namespace blink { + class BufferedDataSourceHost; + class MultiBufferReader; + ++void BLINK_PLATFORM_EXPORT AddStreamingScheme(const char* new_scheme); ++ + // A data source capable of loading URLs and buffering the data using an + // in-memory sliding window. + // 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 9fc5bef9c5021..ae711b32caf32 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,10 +9,10 @@ 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 22fade6370fe654e48373f35bbac079131b873ff..57d694eab66c1431789405656f600390e023b533 100644 +index c1821235df8abd9c0991efeb1d82f8b6075e48e7..a35fc3aa63e6d57ef78ee4690f761060b074ec85 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -@@ -51,6 +51,9 @@ namespace { +@@ -52,6 +52,9 @@ namespace { base::LazyInstance<GURL>::Leaky g_download_url_for_testing = LAZY_INSTANCE_INITIALIZER; @@ -22,7 +22,7 @@ index 22fade6370fe654e48373f35bbac079131b873ff..57d694eab66c1431789405656f600390 // Close the file. void CloseDictionary(base::File file) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -271,6 +274,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { +@@ -272,6 +275,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { g_download_url_for_testing.Get() = url; } @@ -33,7 +33,7 @@ index 22fade6370fe654e48373f35bbac079131b873ff..57d694eab66c1431789405656f600390 GURL SpellcheckHunspellDictionary::GetDictionaryURL() { if (g_download_url_for_testing.Get() != GURL()) return g_download_url_for_testing.Get(); -@@ -278,6 +285,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { +@@ -279,6 +286,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII(); DCHECK(!bdict_file.empty()); 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..f8f64ec23fbe9 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 002b3ddfb0f77b787b74ee088578e3eb813d0192..a9003a98546bbfe78e2d30457a032218cc263441 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,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 8a277c6337d446890bb32814a68db2a9d3d3cd72..4c4e631d5a1476eaad6f54281e6d6899070d1a65 100644 +index 8a277c6337d446890bb32814a68db2a9d3d3cd72..1c967969a03c985e68f744cf4815cefbdd2c0f71 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -26,6 +26,7 @@ @@ -159,9 +159,9 @@ index 8a277c6337d446890bb32814a68db2a9d3d3cd72..4c4e631d5a1476eaad6f54281e6d6899 +#if !BUILDFLAG(IS_APPLE) + if (offscreen) { + DCHECK(display_client); -+ mojom::LayeredWindowUpdaterPtr layered_window_updater; ++ mojo::PendingRemote<mojom::LayeredWindowUpdater> layered_window_updater; + display_client->CreateLayeredWindowUpdater( -+ mojo::MakeRequest(&layered_window_updater)); ++ layered_window_updater.InitWithNewPipeAndPassReceiver()); + return std::make_unique<SoftwareOutputDeviceProxy>( + std::move(layered_window_updater)); + } @@ -226,7 +226,7 @@ index a480befb5d8db36e7e281d5033aeef0bea83d220..4e54acc897d08c87bccc3b44f68634e2 diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc new file mode 100644 -index 0000000000000000000000000000000000000000..88aba74877a6490e08e357266b1ce8461b5b6dff +index 0000000000000000000000000000000000000000..d5e90022d129ce6a7a8effd6c85d3a5295ac79bf --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.cc @@ -0,0 +1,158 @@ @@ -302,7 +302,7 @@ index 0000000000000000000000000000000000000000..88aba74877a6490e08e357266b1ce846 +SoftwareOutputDeviceProxy::~SoftwareOutputDeviceProxy() = default; + +SoftwareOutputDeviceProxy::SoftwareOutputDeviceProxy( -+ mojom::LayeredWindowUpdaterPtr layered_window_updater) ++ mojo::PendingRemote<mojom::LayeredWindowUpdater> layered_window_updater) + : layered_window_updater_(std::move(layered_window_updater)) { + DCHECK(layered_window_updater_.is_bound()); +} @@ -390,10 +390,10 @@ index 0000000000000000000000000000000000000000..88aba74877a6490e08e357266b1ce846 +} // 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..a80258d6165e45a3c3d2b551158ff7d2a5778a7c +index 0000000000000000000000000000000000000000..daeabe1906b177adfe56b8057a72afb33269f976 --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.h -@@ -0,0 +1,93 @@ +@@ -0,0 +1,95 @@ +// 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. @@ -409,6 +409,8 @@ index 0000000000000000000000000000000000000000..a80258d6165e45a3c3d2b551158ff7d2 +#include "components/viz/host/host_display_client.h" +#include "components/viz/service/display/software_output_device.h" +#include "components/viz/service/viz_service_export.h" ++#include "mojo/public/cpp/bindings/pending_remote.h" ++#include "mojo/public/cpp/bindings/remote.h" +#include "services/viz/privileged/mojom/compositing/display_private.mojom.h" +#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" + @@ -455,7 +457,7 @@ index 0000000000000000000000000000000000000000..a80258d6165e45a3c3d2b551158ff7d2 +class SoftwareOutputDeviceProxy : public SoftwareOutputDeviceBase { + public: + explicit SoftwareOutputDeviceProxy( -+ mojom::LayeredWindowUpdaterPtr layered_window_updater); ++ mojo::PendingRemote<mojom::LayeredWindowUpdater> layered_window_updater); + ~SoftwareOutputDeviceProxy() override; + + SoftwareOutputDeviceProxy(const SoftwareOutputDeviceProxy&) = delete; @@ -473,7 +475,7 @@ index 0000000000000000000000000000000000000000..a80258d6165e45a3c3d2b551158ff7d2 + // Runs |swap_ack_callback_| after draw has happened. + void DrawAck(); + -+ mojom::LayeredWindowUpdaterPtr layered_window_updater_; ++ mojo::Remote<mojom::LayeredWindowUpdater> layered_window_updater_; + + std::unique_ptr<SkCanvas> canvas_; + bool waiting_on_draw_ack_ = false; @@ -501,7 +503,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 df92bab44402330869b44aa76bb40fc20e33b16a..2b3fbaee17c0a8bb7b04cd4c4edb13626dd1bb27 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( @@ -571,7 +573,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222d7a7870c 100644 +index b30b9460889b9bb3862f4e28b5f1292a118f2a09..d8f1f921d3e6e74c99d6a22c902f81dfc5bb646e 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -81,6 +81,7 @@ class DisplayPrivate; @@ -599,7 +601,7 @@ index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222 // 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 -@@ -177,6 +188,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -178,6 +189,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -609,7 +611,7 @@ index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222 // 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 -@@ -467,6 +481,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -466,6 +480,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_; @@ -619,7 +621,7 @@ index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222 raw_ptr<Layer> 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 +632,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..f07fe207b2f52 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 1530c51f9090ce51de1f3bc495ca83590d6430ab..d053aa813ab53092dcefb81116ff850318f439c2 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -469,6 +469,7 @@ URLLoader::URLLoader( +@@ -470,6 +470,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( +@@ -637,7 +638,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) { +@@ -1408,6 +1409,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -144,10 +144,10 @@ index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be // 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 98fe2512671e43a4e0da6e9b9ff714d7204fc3a8..bf8751c1b37a678f73ec8e11c86e1eb1287443e4 100644 +index 53822d17b20f4e6d163d0dc84eea6c455254a5f7..c494a63b0c1dcb39120e8aabc84a60ebbf2ff224 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -506,6 +506,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -502,6 +502,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr<ResourceScheduler::ScheduledResourceRequest> 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 195ea7ae74d67..498c91f8f91a2 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 9ca11a19e66e34585b4b11e89cc3b789a4389b5e..264a9109e42c23e9be6bf7269b3cfee2634b61e4 100644 +index 37bb1e9788a251b3f2c79b5272d4a44c22b707b3..29c3104308e9e64d0ab99bdfae00479f8e1bfaa1 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3581,6 +3581,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3597,6 +3597,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 7db4c0911e37d..a17c7119f3e7b 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -12,11 +12,11 @@ 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 f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b66399eb9 100644 ---- a/chrome/browser/resources/pdf/pdf_viewer.js -+++ b/chrome/browser/resources/pdf/pdf_viewer.js -@@ -966,25 +966,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts +index 2e370bf7fd61d75677cfc84798ba543a48f3bc19..fc8f471745c8daf30679df1ffb994febe62cfbea 100644 +--- a/chrome/browser/resources/pdf/pdf_viewer.ts ++++ b/chrome/browser/resources/pdf/pdf_viewer.ts +@@ -855,26 +855,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -25,7 +25,8 @@ index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b const blob = new Blob(dataArray); - const fileName = this.attachments_[index].name; - chrome.fileSystem.chooseEntry( -- {type: 'saveFile', suggestedName: fileName}, entry => { +- {type: 'saveFile', suggestedName: fileName}, +- (entry?: FileSystemFileEntry) => { - if (chrome.runtime.lastError) { - if (chrome.runtime.lastError.message !== 'User cancelled') { - console.error( @@ -34,7 +35,7 @@ index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b - } - return; - } -- entry.createWriter(writer => { +- entry!.createWriter((writer: FileWriter) => { - writer.write(blob); - // Unblock closing the window now that the user has saved - // successfully. @@ -47,12 +48,11 @@ index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b } /** -@@ -1111,30 +1098,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { - if (!fileName.toLowerCase().endsWith('.pdf')) { +@@ -982,30 +968,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { 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'}); @@ -62,7 +62,7 @@ index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b - accepts: [{description: '*.pdf', extensions: ['pdf']}], - suggestedName: fileName - }, -- entry => { +- (entry?: FileSystemFileEntry) => { - if (chrome.runtime.lastError) { - if (chrome.runtime.lastError.message !== 'User cancelled') { - console.error( @@ -71,7 +71,7 @@ index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b - } - return; - } -- entry.createWriter(writer => { +- entry!.createWriter((writer: FileWriter) => { - writer.write(blob); - // Unblock closing the window now that the user has saved - // successfully. 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..1bc8ed89784d0 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 55224f960151b0cae23b2a49d755eace630e9e3a..86ab5a5e5e3e881fdaf3528640f097493123da74 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, +@@ -1827,7 +1827,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,7 +21,7 @@ index 7440f2025701ccde0ade36cda22467dd0614109b..3c6ee78454dc9154a37ec9046e382878 // 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 cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd..72bc509b0506fafd026aa858864623886142b5f0 100644 +index d159f44dc855fee799f7b97b59a2a4e64631e7b4..b583fb7ff191d5dfce4b8fee5f06e074b3a6ea4f 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -673,6 +673,10 @@ class WebContents : public PageNavigator, diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 7460a09ea3beb..f9edde8861faa 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -59,10 +59,10 @@ 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 ac923f436cbdd6ded0629da4e4c659d94258e55b..43f9531075bcef87de8e60f24071f49fe4cd0891 100644 +index b954f8dde00d4f5257223c464e9145a6bef48900..b58999f295586a61bcc2648488a8b28f15d80a7e 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( +@@ -56,7 +56,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey( CanActiveMediaSessionControllerReceiveEvents(); // Tell the underlying MediaKeysListener to listen for the key. @@ -76,7 +76,7 @@ index ac923f436cbdd6ded0629da4e4c659d94258e55b..43f9531075bcef87de8e60f24071f49f !media_keys_listener_->StartWatchingMediaKey(key_code)) { return false; } -@@ -238,18 +243,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { +@@ -239,18 +244,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { #endif if (system_media_controls_) { 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..5f83968390667 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 @@ -48,10 +48,10 @@ index 4a894ef70eeb1d8489049aef552c9bae4f24ae62..f5049d730a850f2947023f976b25fb77 } } diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.h b/content/browser/renderer_host/legacy_render_widget_host_win.h -index 79dffd981f4d461f30bd3796cfba1457eda3a89d..ae378ce95f90989fd0e74c38b57f5f7dc0a1ee29 100644 +index 81e5cde38627914e6a19ed2c1ab62547fdd7fc19..111c59c91073578d8d176598b5e4d10b84918d4c 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.h +++ b/content/browser/renderer_host/legacy_render_widget_host_win.h -@@ -105,6 +105,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND +@@ -106,6 +106,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND MESSAGE_HANDLER_EX(WM_NCHITTEST, OnNCHitTest) MESSAGE_RANGE_HANDLER(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) 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 f957509ddd87c..dfbc1343d6826 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 9b2c91d39324b61afa49ccea6be2eda8308473ff..1652b52c5c752809348b3ab44d3703ac343c829d 100644 +index 8d6f8aedab475c1a553949bfcba3753ebed87778..e379e4995b0812be5970cf9741a00e4f99dea3f1 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( +@@ -384,13 +384,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 9b2c91d39324b61afa49ccea6be2eda8308473ff..1652b52c5c752809348b3ab44d3703ac #endif toggled_into_fullscreen_ = true; -@@ -401,6 +397,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -403,6 +399,7 @@ void FullscreenController::EnterFullscreenModeInternal( url = extension_caused_fullscreen_; } @@ -41,7 +41,7 @@ index 9b2c91d39324b61afa49ccea6be2eda8308473ff..1652b52c5c752809348b3ab44d3703ac 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. -@@ -413,6 +410,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -415,6 +412,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 0559a3d4c4528..929bc1574435b 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 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a65560d9e 100644 +index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b90008d9b 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -20,7 +20,10 @@ @@ -61,21 +61,22 @@ index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a data.SetStringKey(kInternal, show_internal ? kOn : kOff); std::unique_ptr<base::ListValue> rvh_list(new base::ListValue()); -@@ -271,11 +278,11 @@ void HandleAccessibilityRequestCallback( +@@ -271,12 +278,12 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(rvh_list)); std::unique_ptr<base::ListValue> browser_list(new base::ListValue()); -#if !BUILDFLAG(IS_ANDROID) +#if 0 for (Browser* browser : *BrowserList::GetInstance()) { - browser_list->Append(BuildTargetDescriptor(browser)); + browser_list->Append( + base::Value::FromUniquePtrValue(BuildTargetDescriptor(browser))); } -#endif // !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_ANDROID) data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr<base::ListValue> widgets_list(new base::ListValue()); -@@ -491,8 +498,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { +@@ -493,8 +500,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { AllowJavascript(); if (flag_name_str == kInternal) { @@ -86,7 +87,7 @@ index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a return; } -@@ -599,10 +608,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -601,10 +610,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -100,7 +101,7 @@ index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a result->SetStringKey(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } -@@ -627,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -629,6 +640,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -108,7 +109,7 @@ index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { std::unique_ptr<base::DictionaryValue> result( -@@ -641,6 +653,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -643,6 +655,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -116,7 +117,7 @@ index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); -@@ -757,5 +770,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -759,5 +772,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 7addac9d25797..fb162f70ab70e 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -62,10 +62,10 @@ index 9e351c7e80a135adf0ebe011763f5164e51981bb..b9fcb4d2a8c7a22ebc7cd8434636454e PMPrintSettings print_settings = static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]); diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc -index a964910a3b7e3bd225a3b8dc35ef9dc57c77248d..9f791d9ba5f0b540f5e3a67f5e1abb318ddb7680 100644 +index ba604d33cc0601276320f3f81f20e98cb2811f74..1da667c66b75ab44727c5029c02d44379f924007 100644 --- a/printing/printing_context_system_dialog_win.cc +++ b/printing/printing_context_system_dialog_win.cc -@@ -54,14 +54,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( +@@ -53,14 +53,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( PRINTPAGERANGE ranges[32]; dialog_options.nStartPage = START_PAGE_GENERAL; if (max_pages) { @@ -74,7 +74,7 @@ index a964910a3b7e3bd225a3b8dc35ef9dc57c77248d..9f791d9ba5f0b540f5e3a67f5e1abb31 - ranges[0].nFromPage = 1; - ranges[0].nToPage = max_pages; - dialog_options.nPageRanges = 1; -- dialog_options.nMaxPageRanges = base::size(ranges); +- dialog_options.nMaxPageRanges = std::size(ranges); + + auto page_ranges = settings_->ranges(); + if (!page_ranges.empty()) { @@ -95,7 +95,7 @@ index a964910a3b7e3bd225a3b8dc35ef9dc57c77248d..9f791d9ba5f0b540f5e3a67f5e1abb31 + dialog_options.nMinPage = 1; dialog_options.nMaxPage = max_pages; -+ dialog_options.nMaxPageRanges = base::size(ranges); ++ dialog_options.nMaxPageRanges = std::size(ranges); dialog_options.lpPageRanges = ranges; } else { // No need to bother, we don't know how many pages are available. diff --git a/patches/chromium/fix_use_electron_generated_resources.patch b/patches/chromium/fix_use_electron_generated_resources.patch index 60b0f49524594..686e94326c210 100644 --- a/patches/chromium/fix_use_electron_generated_resources.patch +++ b/patches/chromium/fix_use_electron_generated_resources.patch @@ -12,7 +12,7 @@ as they will loaded as empty strings. * IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index f72431f5bc7ba82316cf318f7845e7523c366d92..5133f3cd28c0d630a039118eb91c6c37ee202f3e 100644 +index ccb9d3fb018b4153cfebad8b87579dd5005398e9..5ee9583dddcceed80c7a6e0fa6a0365dbd6c9a6a 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc @@ -11,8 +11,7 @@ @@ -24,7 +24,7 @@ index f72431f5bc7ba82316cf318f7845e7523c366d92..5133f3cd28c0d630a039118eb91c6c37 +#include "electron/grit/electron_resources.h" #include "components/strings/grit/components_strings.h" #include "components/zoom/page_zoom_constants.h" - #include "pdf/pdf_features.h" + #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644 --- a/chrome/browser/printing/printing_service.cc diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 481bd633fe47e..80c56304eadfc 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 1ca418461788e5b7d58c14b03c456d2c21f1305b..7a65b6713e3d0547f1990f8c59d0d11459532477 100644 +index 6ecce70efe2d63259f8de512de276a49da1ee9c0..3068a27d60c109156d91dee68715d00aaf5f972d 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( +@@ -3167,6 +3167,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -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 8573ea54135e363f83bd786db3483d1c539e4bb1..11036e52affafe46bab3146184b8d89696d4163c 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/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index 5043b8a49a854..e67cc4c13a9ed 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b18 // 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 f411bbde031d18bd3e0322ce154ccfd8eace930d..5db96b7402de70d1b4eba8b12a51fbc89fcb7fb6 100644 +index b123e69bf6a57b1a4041c79c1cddd0117ed3851c..a8a23ccd0837866c1cb0657e0b8713d484042f38 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -342,12 +342,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -348,7 +348,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, @@ -51,6 +51,9 @@ index f411bbde031d18bd3e0322ce154ccfd8eace930d..5db96b7402de70d1b4eba8b12a51fbc8 static bool v8_is_initialized = false; if (v8_is_initialized) return; +@@ -358,7 +359,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, + // See https://crbug.com/v8/11043 + SetFlags(mode, js_command_line_flags); - v8::V8::InitializePlatform(V8Platform::Get()); + if (create_v8_platform) diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index e595534ffa59e..ea0050fc48222 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 77f77f2deb13fc1c02903fc436028cce2d051cf0..25223130a82b22ad46eddf7e133c6085c5c843d3 100644 +index 22896db086972ff3865df9cbb4d904f1e00b7321..8e23293f8cd7f0a4203b3d5fdae24aa5e26fc2ec 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -952,6 +952,11 @@ +@@ -955,6 +955,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 52f3cc0d8a50e..db6a2993b6c77 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # 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 +index 27d6cc30cad2dffed0a2587fdd49199248e006e1..f6c0974ca21e6b83faf81e5d11add0eb534645d1 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") 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..c558d7e41b89e 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 ceeeedc42d9fe86383f9fda2b1a26d39119e655c..ff3b3cb47cbce01bcdcb28f1ef8a360143b2488f 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index b960942083b87..d8a9cd23bbe73 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 9d22238878e3204dd1d866d2bb085d5311dca36a..e3610815fd942e631a61089ca5eeba07edd7213c 100644 +index 7074141f95253587ae3ca156118ac6b10dd60e26..0476d00de005060c991cd6fa9ccd323ef5d56ea3 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -249,11 +249,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -248,11 +248,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 6cf5df78a02c3..def44cb73a8ec 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 332b7d026e0365a66d5f4f275a90b48d0f2db5aa..3813fe1a3b2e95af5e213201ab3ea08a656e01c3 100644 +index bb2d3e991195877264fca46abd224d3a6ffd17e8..fc4f271f54235d2d8d823fdb0d95e3c76243390f 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -381,8 +381,12 @@ RunContentProcess(ContentMainParams params, +@@ -387,8 +387,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch index 88035201b5109..7efd6508d3fcc 100644 --- a/patches/chromium/mas-cfisobjc.patch +++ b/patches/chromium/mas-cfisobjc.patch @@ -6,10 +6,10 @@ 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 bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1606afbc2 100644 +index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm -@@ -31,12 +31,6 @@ +@@ -30,12 +30,6 @@ #if !BUILDFLAG(IS_IOS) CFTypeID SecACLGetTypeID(); CFTypeID SecTrustedApplicationGetTypeID(); @@ -22,7 +22,7 @@ index bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1 #endif } // extern "C" -@@ -317,8 +311,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -316,8 +310,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -32,7 +32,7 @@ index bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1 return ns_val; } -@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -388,9 +381,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 c55b2981c5830..50554c76583ba 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 1fb42e658d219e46bbc157d929d3b2158c063204..cb6dec724dbe511cb0c66d507d0b68db7296b648 100644 +index 21778ef0c7657937987fdc70bf9ceb9439aebf15..2f6e1390a3b824d80832e47f6c368e757e2d9806 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -155,7 +155,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -162,7 +162,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 21bddfec34c2b..8ac081f88cbfc 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,7 +11,7 @@ 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 9734fb620a9a4010083af41a9e5cea038556eef5..05c95fb9b15f5ccbfecaee29d360dd27bf42f086 100644 +index 04691696ee653b95cf046edfd464b1a800a38abe..b567b1e1fa9e5103a6219292a649f8807f0aa7ae 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm @@ -51,6 +51,7 @@ @@ -44,10 +44,10 @@ 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 6394980da8ab8b38e29693ccedfc3827ac111a4c..7fff28ee83475963f80987f7736ac866daa7dad2 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) { +@@ -567,10 +567,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -87,7 +87,7 @@ index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf } 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 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103709c95e9 100644 +index 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b442248c6a 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 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103 @class RenderWidgetHostViewCocoa; namespace content { -@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -661,10 +663,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -114,10 +114,10 @@ index 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103 // 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 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c1a64c5d2 100644 +index 14fec4b1b39d995553b029ca7ec780ce29b27162..54a1142f17e2a63b86e1fab52ea90276091c85a4 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 @@ +@@ -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 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1498,8 +1500,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1519,8 +1521,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c return [GetInProcessNSView() window]; } -@@ -1543,9 +1547,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1564,9 +1568,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2038,12 +2044,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2061,12 +2067,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector<uint8_t>& window_token) { @@ -167,10 +167,10 @@ index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 37f37c3a8e8a00cf9d4b8959ac2d97fe31629ad8..fa06bafbbaa69a20ce5a3260ca92947cb2bb9228 100644 +index be753e5ea42cc8757b0e7f9a21aa12b40f1928f2..83f3ef36e17b484d838c9338ae6ad0073b42283c 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -317,6 +317,13 @@ component("base") { +@@ -319,6 +319,13 @@ component("base") { ] } @@ -205,7 +205,7 @@ 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 1964f624abc96c54645d1697b598799cfd9a2a00..30580103974b99dcaed2adb0b460b1af17658927 100644 +index d4051a7a8755c7b10d4df3746cb2857471f07c45..de04616893d1c97e3607eb5a4b942733ae597b05 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -31,7 +31,9 @@ @@ -218,7 +218,7 @@ index 1964f624abc96c54645d1697b598799cfd9a2a00..30580103974b99dcaed2adb0b460b1af @class NSView; namespace remote_cocoa { -@@ -445,11 +447,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -449,11 +451,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow> remote_ns_window_remote_; @@ -233,10 +233,10 @@ index 1964f624abc96c54645d1697b598799cfd9a2a00..30580103974b99dcaed2adb0b460b1af // 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 b77478d96caba7e94c198e9cc8cdd7a6b78e6b25..79af41886c66b51219b69282db17497c5af702d5 100644 +index 7ed5041b0625a98be269b4f4daeef33c3bc1f8b6..803d8bc43fa57c8e49d33d4be618d51a408ffe47 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -294,14 +294,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -296,14 +296,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 b77478d96caba7e94c198e9cc8cdd7a6b78e6b25..79af41886c66b51219b69282db17497c } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1275,6 +1283,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1287,6 +1295,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector<uint8_t>& window_token, const std::vector<uint8_t>& view_token) { @@ -267,7 +267,7 @@ index b77478d96caba7e94c198e9cc8cdd7a6b78e6b25..79af41886c66b51219b69282db17497c remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1282,14 +1291,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1294,14 +1303,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_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 02127ca0ad5c1..dd209431cba87 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 6ffc09426b92b0623957f4a5f547865f49e29546..45cf4e11a77c175d61c2ffe69009802596c97e25 100644 +index ebe37172d254e8441fe2b8c290bd5a59af38d754..6a131f5c41f3e43a1467efeec2ce63f6903691b7 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -175,6 +175,12 @@ source_set("audio") { +@@ -173,6 +173,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] @@ -169,7 +169,7 @@ index ebdc6364312ee710d416318836c03aeec9bfb65c..aa9b50de7efaf0e1b64effea93204984 } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index e59fec60e9d593d311b21c12daf2d611a36a2d6e..b812dee59b55edee6efe73ce4b1da0a89b45240e 100644 +index 3cce5f20af78f4456466df64fe0d040b5dba5fa8..1814ebbca91007b242a4e4ef359896594c23616a 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -129,8 +129,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 d524259dd9428..e3324296a3770 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512cb388fc7 100644 +index 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c889d3fa94 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -126,6 +126,11 @@ +@@ -127,6 +127,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -433,6 +438,91 @@ bool GetFullDataFilePath( +@@ -434,6 +439,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -671,6 +761,13 @@ void NetworkContext::SetClient( +@@ -678,6 +768,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver<mojom::URLLoaderFactory> receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2226,6 +2323,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2242,6 +2339,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 3fd4c43562aa5de00d8698096f154522420c8f24..eed05c05d1da28284af6ae0cef45dbbb47254058 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -105,6 +105,7 @@ class URLMatcher; @@ -150,7 +150,7 @@ index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec3960 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -220,6 +221,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -221,6 +222,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver<mojom::URLLoaderFactory> receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec3960 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver<mojom::CookieManager> receiver) override; -@@ -793,6 +796,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -796,6 +799,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -169,10 +169,10 @@ 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 64199b44316ab4671941c734444d207591512d0a..c929eb10af5b8856debdc0d665eac767e9730714 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -277,6 +277,17 @@ struct NetworkContextFilePaths { +@@ -280,6 +280,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -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 { +@@ -829,6 +840,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote<NetworkContextClient> client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index fbb057eaf0f80..ff03cd3658ee0 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 06a1db7fd9324de7d1fcf49c5b8a40b922a945be..c63b92a5a100785bf00b5e6da4c7f71bb9e769b7 100644 +index 225609e52130d4113c8ae667f3ffa565bbde5b73..b33d27ce4fc6222146255cf4c0e7342751c75c9b 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( @@ -31,7 +31,7 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48 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 +index fd2c2d72ebc3cab0cc824bb091da32d4be635dd9..8bcd6a87c38413a5281d164e3c0fcfd23c3fa04b 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( @@ -90,7 +90,7 @@ index f0d5ea365cf09d2dc06de88fc03e4bf5ddfdf4a6..b68666813ab231a3d4233d3ed2f9655b /*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 8e23ab272000a1244959bf9164d6880660d4a843..ff89f2bdf07e91029841bab7ce7c7a92526c0132 100644 +index 5580c415a1e8a45327147861d7c71cebd1ecbd5a..d37711f83be7566ec5ad2078942aaca1948a77c5 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() { @@ -131,10 +131,10 @@ index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df6 const GURL& document_url, mojo::PendingReceiver<blink::mojom::NotificationService> 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 cc5f7c8d616ec9a433da428f180483da60736a9d..fb25a7c19f20ca690963c5a15bd09224687b5f57 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( +@@ -2083,7 +2083,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 b9d73ff072c6d..bae8f486133f3 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -7,13 +7,13 @@ 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 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc244092d2 100644 +index 2425ccd480f4b0f3ac3b9dddb5dbf90639fe515b..6f20e2edd880e34149668ece6e80e79b3da8dc66 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 @@ +@@ -6,17 +6,21 @@ + #include <stddef.h> - #include "base/cxx17_backports.h" +#if 0 #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" @@ -32,7 +32,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc #include "ppapi/c/pp_errors.h" #include "ppapi/host/dispatch_host_message.h" #include "ppapi/host/host_message_context.h" -@@ -26,12 +30,11 @@ +@@ -25,12 +29,11 @@ #include "ppapi/shared_impl/file_system_util.h" #include "storage/browser/file_system/isolated_context.h" @@ -46,7 +46,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc namespace { -@@ -41,6 +44,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = { +@@ -40,6 +43,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = { }; } // namespace @@ -54,7 +54,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc // static PepperIsolatedFileSystemMessageFilter* -@@ -64,11 +68,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( +@@ -63,11 +67,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( const base::FilePath& profile_directory, const GURL& document_url, ppapi::host::PpapiHost* ppapi_host) @@ -62,7 +62,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc : render_process_id_(render_process_id), profile_directory_(profile_directory), document_url_(document_url) { - for (size_t i = 0; i < base::size(kPredefinedAllowedCrxFsOrigins); ++i) + for (size_t i = 0; i < std::size(kPredefinedAllowedCrxFsOrigins); ++i) allowed_crxfs_origins_.insert(kPredefinedAllowedCrxFsOrigins[i]); +#else + : profile_directory_(profile_directory), @@ -71,7 +71,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc } PepperIsolatedFileSystemMessageFilter:: -@@ -93,6 +102,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( +@@ -92,6 +101,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( return PP_ERROR_FAILED; } @@ -79,7 +79,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); ProfileManager* profile_manager = g_browser_process->profile_manager(); -@@ -117,6 +127,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { +@@ -116,6 +126,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { return storage::IsolatedContext::ScopedFSHandle(); #endif } @@ -87,7 +87,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( ppapi::host::HostMessageContext* context, -@@ -125,7 +136,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( +@@ -124,7 +135,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID: break; case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX: @@ -96,7 +96,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc } NOTREACHED(); context->reply_msg = -@@ -133,6 +144,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( +@@ -132,6 +143,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( return PP_ERROR_FAILED; } @@ -104,7 +104,7 @@ index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( ppapi::host::HostMessageContext* context) { #if BUILDFLAG(ENABLE_EXTENSIONS) -@@ -173,3 +185,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( +@@ -172,3 +184,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( return PP_ERROR_NOTSUPPORTED; #endif } @@ -156,41 +156,28 @@ 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 4b84f4ef068a76fa2be244a7f7ca2c6a8734bd46..13ae0a57535dfb516eb70b272fdaa5a4720d0591 100644 +index e3ee403ec5d4d75f22f1853ec8637a0559ce3c43..76232286e02a20bcd578c5ba28af638dfc8f562c 100644 --- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc +++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -@@ -6,8 +6,13 @@ +@@ -5,7 +5,9 @@ + #include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h" #include "base/check_op.h" - #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" +#if 0 #include "chrome/renderer/pepper/pepper_uma_host.h" -+#endif -+#include "electron/buildflags/buildflags.h" -+#if BUILDFLAG(ENABLE_PDF_VIEWER) - #include "components/pdf/renderer/pepper_pdf_host.h" +#endif #include "content/public/renderer/renderer_ppapi_host.h" - #include "pdf/buildflags.h" #include "ppapi/host/ppapi_host.h" -@@ -55,7 +60,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - } - } - --#if BUILDFLAG(ENABLE_PDF) -+#if BUILDFLAG(ENABLE_PDF_VIEWER) - if (host_->GetPpapiHost()->permissions().HasPermission( - ppapi::PERMISSION_PDF)) { - switch (message.type()) { -@@ -66,6 +71,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - } - #endif + #include "ppapi/host/resource_host.h" +@@ -33,6 +35,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( + if (!host_->IsValidInstance(instance)) + return nullptr; +#if 0 // 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 -@@ -75,6 +81,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -42,6 +45,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( return std::make_unique<PepperUMAHost>(host_, instance, resource); } } diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 22bc937a11a4c..ff258785cd530 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,49 +9,49 @@ 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 063cbf00a7ae871d426cef5cec00aa379c3ace11..444d3cc2e1b00a62f382232d3d2eccdd481abf11 100644 +index 7bc8d118f87b91baf1c3bd1d34374996ab1d3638..2d2c1c86f311b07f0c2b09d5a4c082cc5599600c 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 @@ #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" - #include "ui/gfx/color_palette.h" + #include "ui/base/models/image_model.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 648e199cb015155ba84cf1c846cf6d2a16858007..294bfb625d1155e640eeeb37bea597dc2d980e58 100644 +index 7d0e39968bf34cdc99549cb48f6bf0a11c182565..f21c1672abf34dc9d19cd39c5d09083a60ef6978 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 @@ #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#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" diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index 0c1fa8676d00240e60ddd037664a409d1c9619dd..64d21f1878c3433324fc61353a10ee21d59c0b47 100644 +index d3400d7b02edc9cffba4cb53ec601b6e4cfea3b2..8e620ad6172a650ea96f80c0b44035932471d88b 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 @@ #include "build/chromeos_buildflags.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" - #include "ui/gfx/color_palette.h" + #include "ui/base/models/image_model.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 +index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca8751134eaf3c33 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 @@ +@@ -15,24 +15,28 @@ #include "base/timer/timer.h" #include "build/build_config.h" #include "chrome/app/vector_icons/vector_icons.h" @@ -59,8 +59,12 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 #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/themes/theme_service.h" + #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" ++#endif + #include "chrome/browser/ui/color/chrome_color_id.h" ++#if 0 #include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" +#endif @@ -71,12 +75,13 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 #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/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 @@ +@@ -57,7 +61,7 @@ #include "ui/aura/window.h" #endif @@ -85,7 +90,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 #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<std::unique_ptr<views::View>>* views, +@@ -109,7 +113,7 @@ END_METADATA } // namespace OverlayLocationBarViewProxy::~OverlayLocationBarViewProxy() = default; @@ -94,7 +99,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, public ChromeLocationBarModelDelegate, public LocationBarView::Delegate, -@@ -149,7 +151,7 @@ class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, +@@ -167,7 +171,7 @@ class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, const std::unique_ptr<LocationBarModelImpl> location_bar_model_; CommandUpdaterImpl command_updater_; }; @@ -103,7 +108,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 // static std::unique_ptr<DocumentOverlayWindowViews> DocumentOverlayWindowViews::Create( content::DocumentPictureInPictureWindowController* controller, -@@ -185,7 +187,7 @@ std::unique_ptr<DocumentOverlayWindowViews> DocumentOverlayWindowViews::Create( +@@ -203,7 +207,7 @@ std::unique_ptr<DocumentOverlayWindowViews> DocumentOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); @@ -112,7 +117,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 std::wstring app_user_model_id; Browser* browser = chrome::FindBrowserWithWebContents(controller->GetWebContents()); -@@ -260,12 +262,6 @@ views::View* DocumentOverlayWindowViews::GetControlsContainerView() const { +@@ -278,12 +282,6 @@ views::View* DocumentOverlayWindowViews::GetControlsContainerView() const { return controls_container_view_; } @@ -125,7 +130,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 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() { +@@ -299,6 +297,7 @@ void DocumentOverlayWindowViews::SetUpViews() { // +-------------------------------------+ content::WebContents* pip_contents = controller_->GetChildWebContents(); @@ -133,7 +138,7 @@ index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d4 auto* profile = Profile::FromBrowserContext(pip_contents->GetBrowserContext()); profile_for_theme_ = profile; -@@ -291,8 +288,8 @@ void DocumentOverlayWindowViews::SetUpViews() { +@@ -309,8 +308,8 @@ void DocumentOverlayWindowViews::SetUpViews() { location_bar_view_proxy_ = std::make_unique<OverlayLocationBarViewImpl>( profile, controller_->GetWebContents()); } @@ -157,20 +162,20 @@ index 86d385842501d28b5eb42f841822294eb597e6ed..43c19dfa6ec6b48f8694636cc184dd61 // 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 8e54570ea4c83483eedee4c781f0498ba07bc3dd..b1eb0b2f1a3dfb71e1f5d3917c67e66ac2b27d22 100644 +index 26f8f5ffa444d874b229b5e8debf087e4469dfd1..10149e812a43e3d5c92701e9b2ae8d68ed8395c7 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 @@ - +@@ -5,7 +5,7 @@ #include "chrome/browser/ui/views/overlay/hang_up_button.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index d96a4937e6ff6bbf4311673b4c91e9f0e957832a..a06cae5f50eb671fc05bd3d41ae4d218a649e991 100644 +index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c36ad14705 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -14,13 +14,15 @@ @@ -200,85 +205,85 @@ index d96a4937e6ff6bbf4311673b4c91e9f0e957832a..a06cae5f50eb671fc05bd3d41ae4d218 #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index ad413df822af98f4f80a460c6e464cf5237d5ac4..821b75400a7a4921e59a414516739c6de5a66df7 100644 +index bcd3b2e1038786b660a4b91fbc20d9d8b4afffb4..a953c9d0ee0b49d6cc096e3eb236296b57cbc6c0 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 @@ #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc -index 90c9dbbfa741da8cf72594738c1686b14e277663..34063436a7e8e36f624c1b86765fe886434df54a 100644 +index 8bf217b9b0c2bd22d6940c24c58eccb9865c5286..91f061a1243135db475371dda00c2fe054f4e8e3 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 @@ #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/hit_test.h" #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 ae3b37b13498d63b0bc8d7d66e228f974e1c4b4a..9a4e7de29921209a5a7807efeecb02e05f38692d 100644 +index 51c7db1bfbd3c03b9cb2786c8c7482b33e3aca0b..2890f7420d2fd258f84019963eab6c9606e228db 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 @@ #include "chrome/browser/ui/views/overlay/skip_ad_label_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc -index c5254509559fd89a8831d69498e2f120416b08df..711490193ac7a9a122fe2b85661dd1a63d3a06ac 100644 +index 46ec4441ddb227325b319359f9d33a80aa856d85..57957d72310c0a232c78489fba5a07cdf475dc53 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 @@ #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -index 98d653475bf2aaa57bd11961df3697882a9a40d7..3870cad08c531a2a8b3f6ba84088065a0d31f033 100644 +index 59b9a5442185bfb9efd8ed571ec63d56e3bc3326..34d58bf54019e0b8001c29cb301861d045c60214 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 @@ #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc -index d5690233eb85d9f2992ae90461c0d1fd83730d84..d32ee40d1dc7a0004d534540189179b240964888 100644 +index 5e136488b37887e9523ac04a9ff4ccdfaf96c104..24899f4c2b6fe66b96a6728bf747f1aad66f20a9 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 @@ #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/views/overlay/constants.h" + #include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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 +index b2e281840f48592eb773c16042fb6b56a0fa132b..d5156bab0c81ca508733a8d3ba95f052ff6d83e6 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 @@ @@ -290,10 +295,10 @@ index d25bffe434d866760d1efc4dd972b6ba4946acd0..2819bcefb83b6b4cb10114b7ad1df881 #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" +#endif + #include "chrome/browser/ui/color/chrome_color_id.h" #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 @@ +@@ -29,10 +31,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" @@ -305,7 +310,7 @@ index d25bffe434d866760d1efc4dd972b6ba4946acd0..2819bcefb83b6b4cb10114b7ad1df881 #include "media/base/media_switches.h" #include "media/base/video_util.h" #include "third_party/skia/include/core/SkColor.h" -@@ -53,7 +55,7 @@ +@@ -56,7 +58,7 @@ #include "ui/aura/window.h" #endif @@ -314,7 +319,7 @@ index d25bffe434d866760d1efc4dd972b6ba4946acd0..2819bcefb83b6b4cb10114b7ad1df881 #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> VideoOverlayWindowViews::Create( +@@ -148,7 +150,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); 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..e81c37f12f38f 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,13 +8,19 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 1b9518366ba6c44421a86565ea3eba80e14b6c43..203ac8902eda26262f4178985ee565874bf879b8 100644 +index d9db2d705c88e828383e81efd8f8c6d28e1520bb..7f0e1672af0fef134fc637324e366e9e8d985054 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) \ +@@ -122,6 +122,16 @@ + E_CPONLY(kColorOverlayScrollbarStrokeHoveredDark) \ + E_CPONLY(kColorOverlayScrollbarStrokeHoveredLight) \ + E_CPONLY(kColorProgressBar) \ ++ E_CPONLY(kColorPwaSecurityChipForeground) \ ++ E_CPONLY(kColorPwaSecurityChipForegroundDangerous) \ ++ E_CPONLY(kColorPwaSecurityChipForegroundPolicyCert) \ ++ E_CPONLY(kColorPwaSecurityChipForegroundSecure) \ ++ E_CPONLY(kColorPwaToolbarBackground) \ ++ E_CPONLY(kColorPwaToolbarForeground) \ + E_CPONLY(kColorResultsTableNormalBackground) \ + E_CPONLY(kColorResultsTableHoveredBackground) \ + E_CPONLY(kColorResultsTableNormalText) \ @@ -22,7 +28,7 @@ index 1b9518366ba6c44421a86565ea3eba80e14b6c43..203ac8902eda26262f4178985ee56587 E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -173,6 +177,7 @@ +@@ -174,6 +184,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -31,13 +37,13 @@ index 1b9518366ba6c44421a86565ea3eba80e14b6c43..203ac8902eda26262f4178985ee56587 #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 1d8415814c6245e3f2dfd01de7a2de11f09cdc7a..6db48efe454820e242b862edbfaf4d40cf16eb9d 100644 +index a89f393da6c06ba21d5303a925dd9e907bde5e03..e0106610831ca36544161672f3663e54b2585228 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}; +@@ -138,6 +138,17 @@ void AddUiColorMixer(ColorProvider* provider, + SetAlpha(GetColorWithMaxContrast(kColorOverlayScrollbarFillHoveredLight), + gfx::kGoogleGreyAlpha500); + mixer[kColorProgressBar] = {kColorAccent}; + mixer[kColorResultsTableNormalBackground] = {SK_ColorWHITE}; + mixer[kColorResultsTableHoveredBackground] = + SetAlpha(kColorResultsTableNormalText, 0x0D); @@ -52,7 +58,7 @@ index 1d8415814c6245e3f2dfd01de7a2de11f09cdc7a..6db48efe454820e242b862edbfaf4d40 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -216,6 +227,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -213,6 +224,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; @@ -61,10 +67,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 +81,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 +95,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..6aae32dba1e9f 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -69,10 +69,10 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 7dbb9aea759e4a80a4ef3133eeffcd952bbe6d50..62fbaa0e24dff2037f47ef4ccf09993aa79b3ef8 100644 +index 27305997182f0a669291d2f36dd6b0b98c43f314..cbb83e1f5661852d84468ec9d342af1b2d05ae45 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc -@@ -20,13 +20,13 @@ +@@ -20,7 +20,6 @@ #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/printing/print_job.h" @@ -80,14 +80,15 @@ index 7dbb9aea759e4a80a4ef3133eeffcd952bbe6d50..62fbaa0e24dff2037f47ef4ccf09993a #include "components/crash/core/common/crash_keys.h" #include "components/device_event_log/device_event_log.h" #include "content/public/browser/browser_task_traits.h" - #include "content/public/browser/browser_thread.h" +@@ -28,6 +27,7 @@ + #include "content/public/browser/global_routing_id.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" +#include "electron/grit/electron_resources.h" #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -239,16 +239,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -234,16 +234,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -113,10 +114,10 @@ index 7dbb9aea759e4a80a4ef3133eeffcd952bbe6d50..62fbaa0e24dff2037f47ef4ccf09993a #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 +index 52a13c0c47f7f3f18c4f552806add67291ce8726..765bde402fec094b51faea68e67d3782bbc06564 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() { +@@ -226,7 +226,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -126,10 +127,10 @@ index 457749cf31578666304c30a5df1b8428629caafe..21c4a76411ee06775fb5bbb2d5a2ac17 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd0828b8a1 100644 +index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521e01702ac 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc -@@ -29,10 +29,10 @@ +@@ -30,10 +30,10 @@ #include "chrome/browser/printing/print_view_manager_common.h" #include "chrome/browser/printing/printer_query.h" #include "chrome/browser/profiles/profile.h" @@ -142,7 +143,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd #include "components/prefs/pref_service.h" #include "components/printing/browser/print_composite_client.h" #include "components/printing/browser/print_manager_utils.h" -@@ -47,6 +47,7 @@ +@@ -49,6 +49,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" @@ -150,7 +151,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -81,6 +82,8 @@ using PrintSettingsCallback = +@@ -86,6 +87,8 @@ using PrintSettingsCallback = base::OnceCallback<void(std::unique_ptr<PrinterQuery>)>; void ShowWarningMessageBox(const std::u16string& message) { @@ -159,7 +160,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -89,6 +92,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -94,6 +97,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset<bool> auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -167,7 +168,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -188,7 +192,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -191,7 +195,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -178,7 +179,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -241,6 +247,7 @@ void ScriptedPrintReplyOnIO( +@@ -244,6 +250,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -186,7 +187,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -250,8 +257,9 @@ void ScriptedPrintReplyOnIO( +@@ -253,8 +260,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -197,7 +198,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -290,12 +298,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -292,12 +300,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -212,7 +213,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -303,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -305,7 +315,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -224,7 +225,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd // 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) { +@@ -328,7 +341,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // go in `ReleasePrintJob()`. SetPrintingRFH(rfh); @@ -235,7 +236,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -470,7 +485,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -471,7 +486,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -245,7 +246,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (!content::RenderProcessHost::FromID(process_id)) { -@@ -478,16 +494,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -479,16 +495,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -259,17 +260,17 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd void PrintViewManagerBase::UpdatePrintingEnabled() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - // The Unretained() is safe because ForEachFrame() is synchronous. -- web_contents()->ForEachFrame(base::BindRepeating( + // The Unretained() is safe because ForEachRenderFrameHost() is synchronous. +- web_contents()->GetMainFrame()->ForEachRenderFrameHost(base::BindRepeating( - &PrintViewManagerBase::SendPrintingEnabled, base::Unretained(this), - printing_enabled_.GetValue())); -+ web_contents()->ForEachFrame( ++ web_contents()->GetMainFrame()->ForEachRenderFrameHost( + base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, + base::Unretained(this), true)); } void PrintViewManagerBase::NavigationStopped() { -@@ -601,12 +620,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -602,12 +621,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -322,16 +323,16 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd + std::move(callback).Run(CreateEmptyPrintPagesParamsPtr(), false); return; } - int process_id = render_process_host->GetID(); -@@ -693,7 +716,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { + auto callback_wrapper = base::BindOnce( +@@ -691,7 +714,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); - #if BUILDFLAG(ENABLE_PRINT_PREVIEW) + #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. - ShowPrintErrorDialog(); #endif ReleasePrinterQuery(); -@@ -708,6 +730,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -706,6 +728,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -343,13 +344,15 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -718,8 +745,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -716,10 +743,12 @@ 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) ++#if 0 + if (new_state == content::RenderFrameHost::LifecycleState::kActive && + render_frame_host->GetProcess()->IsPdf()) { SendPrintingEnabled(printing_enabled_.GetValue(), render_frame_host); + } +#endif } @@ -402,7 +405,7 @@ index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 2661776307f773ac8f2c62529ec86349b045ee8f..4fa8f358ee59baed32ef4fd0684d010256206a54 100644 +index 2661776307f773ac8f2c62529ec86349b045ee8f..cb41b271adbb02517a5e1ad222d0320000437dfb 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 { @@ -420,9 +423,9 @@ index 2661776307f773ac8f2c62529ec86349b045ee8f..4fa8f358ee59baed32ef4fd0684d0102 // this function. Returns false if printing is impossible at the moment. - virtual bool PrintNow(content::RenderFrameHost* rfh); + virtual bool PrintNow(content::RenderFrameHost* rfh, -+ bool silent, -+ base::Value settings, -+ CompletionCallback callback); ++ bool silent = true, ++ base::Value settings = {}, ++ CompletionCallback callback = {}); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in @@ -460,8 +463,83 @@ index 2661776307f773ac8f2c62529ec86349b045ee8f..4fa8f358ee59baed32ef4fd0684d0102 // 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/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +index 879004c790d57b28e7a816ebf560971876c17168..334509d3ab45af4bb7877f656ca5aca7ee1bce00 100644 +--- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc ++++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +@@ -20,7 +20,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( + + FakePrintRenderFrame::~FakePrintRenderFrame() = default; + +-void FakePrintRenderFrame::PrintRequestedPages() {} ++void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value /*settings*/) {} + + void FakePrintRenderFrame::PrintForSystemDialog() {} + +diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +index 10f46664d8337d6be2fac24d9a6933429f3b2c2b..6de833f2da3ae85cf0752284146974f2026ab174 100644 +--- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h ++++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +@@ -24,7 +24,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { + + private: + // printing::mojom::PrintRenderFrame: +- void PrintRequestedPages() override; ++ void PrintRequestedPages(bool silent, ::base::Value settings) override; + void PrintForSystemDialog() override; + void SetPrintPreviewUI( + mojo::PendingAssociatedRemote<mojom::PrintPreviewUI> preview) override; +diff --git a/components/printing/browser/print_to_pdf/pdf_print_manager.cc b/components/printing/browser/print_to_pdf/pdf_print_manager.cc +index 66810a2a5f0c77ba107c71d2abaef8692bda0fea..cd6103af4571f82f11652a3c7ecf0e534428dc49 100644 +--- a/components/printing/browser/print_to_pdf/pdf_print_manager.cc ++++ b/components/printing/browser/print_to_pdf/pdf_print_manager.cc +@@ -116,7 +116,8 @@ void PdfPrintManager::PrintToPdf( + set_cookie(print_pages_params_->params->document_cookie); + callback_ = std::move(callback); + +- GetPrintRenderFrame(rfh)->PrintRequestedPages(); ++ // TODO(electron-maintainers): do something with job_settings here? ++ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/); + } + + void PdfPrintManager::GetDefaultPrintSettings( +@@ -138,14 +139,14 @@ void PdfPrintManager::ScriptedPrint( + if (!printing_rfh_) { + DLOG(ERROR) << "Unexpected message received before PrintToPdf is " + "called: ScriptedPrint"; +- std::move(callback).Run(std::move(default_param)); ++ std::move(callback).Run(std::move(default_param), true/*canceled*/); + return; + } + if (params->is_scripted && + GetCurrentTargetFrame()->IsNestedWithinFencedFrame()) { + DLOG(ERROR) << "Unexpected message received. Script Print is not allowed" + " in a fenced frame."; +- std::move(callback).Run(std::move(default_param)); ++ std::move(callback).Run(std::move(default_param), true/*canceled*/); + return; + } + absl::variant<printing::PageRanges, PageRangeError> page_ranges = +@@ -162,7 +163,7 @@ void PdfPrintManager::ScriptedPrint( + break; + } + ReleaseJob(print_result); +- std::move(callback).Run(std::move(default_param)); ++ std::move(callback).Run(std::move(default_param), true/*canceled*/); + return; + } + +@@ -170,7 +171,7 @@ void PdfPrintManager::ScriptedPrint( + print_pages_params_->pages = printing::PageRange::GetPages( + absl::get<printing::PageRanges>(page_ranges)); + +- std::move(callback).Run(print_pages_params_->Clone()); ++ std::move(callback).Run(print_pages_params_->Clone(), false/*canceled*/); + } + + void PdfPrintManager::ShowInvalidPrinterSettingsError() { diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df2d989964 100644 +index 5afad24754e12554368a6619466ca025edc26180..e2e786692bd877d3b8bf7c31829496afa99ed539 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -274,7 +274,7 @@ interface PrintPreviewUI { @@ -469,7 +547,7 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. - PrintRequestedPages(); -+ PrintRequestedPages(bool silent, mojo_base.mojom.DictionaryValue settings); ++ PrintRequestedPages(bool silent, mojo_base.mojom.DeprecatedDictionaryValue settings); // 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 @@ -483,7 +561,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 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d0801b43a8ea 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 +572,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) { +@@ -1263,7 +1264,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -504,7 +582,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 if (!weak_this) return; -@@ -1285,7 +1287,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1294,7 +1296,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -513,7 +591,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1300,7 +1302,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1309,7 +1311,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -522,7 +600,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1331,7 +1333,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1340,7 +1342,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -532,7 +610,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) { +@@ -1387,6 +1390,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -541,7 +619,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1915,7 +1920,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1924,7 +1929,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -551,7 +629,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) { +@@ -1939,7 +1945,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -562,7 +640,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, +@@ -1947,7 +1955,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -571,7 +649,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, +@@ -1966,8 +1974,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -588,7 +666,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 // Check if |this| is still valid. if (!self) return; -@@ -2206,36 +2221,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2215,36 +2230,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -652,7 +730,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2380,7 +2410,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2389,7 +2419,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -661,7 +739,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2625,18 +2655,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2634,18 +2664,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 565c00742ba81..e5d125cd0dbb9 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -75,18 +75,18 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35a2fd1b75 100644 +index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd0493c942 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -53,6 +53,7 @@ +@@ -54,6 +54,7 @@ #include <memory> #include <set> #include <string> +#include <tuple> #include <type_traits> - #include <stddef.h> -@@ -82,6 +83,7 @@ + #include "base/base_paths.h" +@@ -80,6 +81,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/sequenced_task_runner_helpers.h" #include "base/task/single_thread_task_runner.h" @@ -94,7 +94,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 #include "base/threading/platform_thread.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -@@ -98,9 +100,11 @@ +@@ -96,9 +98,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" @@ -106,7 +106,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 #if defined(TOOLKIT_VIEWS) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -349,6 +353,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -347,6 +351,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -116,7 +116,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -368,6 +375,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -366,6 +373,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -124,7 +124,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 } bool IsChromeProcess(pid_t pid) { -@@ -408,6 +416,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -406,6 +414,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -146,7 +146,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -775,6 +798,10 @@ ProcessSingleton::ProcessSingleton( +@@ -773,6 +796,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -157,7 +157,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -947,6 +974,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -945,6 +972,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -178,7 +178,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1046,14 +1087,32 @@ bool ProcessSingleton::Create() { +@@ -1044,14 +1085,32 @@ bool ProcessSingleton::Create() { #endif } @@ -216,7 +216,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1096,10 +1155,13 @@ bool ProcessSingleton::Create() { +@@ -1094,10 +1153,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); @@ -235,7 +235,7 @@ index c9f26ea2d2ea16484d416fdce095ec1b8b885991..7d3a441bdb64268ed5fbfa7bf589fb35 return true; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac53287f2d7 100644 +index e2312c65623a3f54ecbc18058720ccae53822e76..ec725b44296266bea1a51aea889463a0bba8449c 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -28,7 +28,9 @@ @@ -265,7 +265,7 @@ index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac5 } // Function was copied from Process::Terminate. -@@ -245,9 +252,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -252,9 +259,13 @@ bool ProcessSingleton::EscapeVirtualization( } ProcessSingleton::ProcessSingleton( @@ -279,7 +279,7 @@ index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac5 is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE), user_data_dir_(user_data_dir), -@@ -361,13 +372,16 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -368,13 +379,16 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { return PROFILE_IN_USE; } @@ -297,7 +297,7 @@ index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac5 remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -376,7 +390,7 @@ bool ProcessSingleton::Create() { +@@ -383,7 +397,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. @@ -306,7 +306,7 @@ index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac5 if (!only_me.IsValid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -415,6 +429,17 @@ bool ProcessSingleton::Create() { +@@ -422,6 +436,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); 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..a4aa00e1ae186 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 59437e69e25fe85cffc9b558dec2284123ac48be..d3af2aed32f6047cbb86bd2b4ce1df9fee80437c 100644 +index ed56e947fa137cbaddaa12503ae983d7acd4463f..e1d77416991bac0178935b1bd255947d20db6210 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) { +@@ -2073,6 +2073,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 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 92dcf2308842ce8922426b0cafdd5a3e83f4bd52..d69e028b34ab4407abcdea3ece93db39926c587e 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() { +@@ -4494,6 +4494,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -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 fdb4a26de507f260466a7bc22c5cadc64190c342..55224f960151b0cae23b2a49d755eace630e9e3a 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, +@@ -961,6 +961,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; diff --git a/patches/chromium/remove_incorrect_width_height_adjustments.patch b/patches/chromium/remove_incorrect_width_height_adjustments.patch deleted file mode 100644 index 4fce52ba6e282..0000000000000 --- a/patches/chromium/remove_incorrect_width_height_adjustments.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bruce Dawson <brucedawson@chromium.org> -Date: Mon, 28 Feb 2022 19:07:41 +0000 -Subject: Remove incorrect width/height adjustments - -In late 2016 a change which fixed some problems around window sizing -when attaching or detaching additional displays was landed, which fixed -some genuine bugs. Unfortunately it included a subtraction of 1 from the -width and height of the Chrome window. I couldn't find any discussion of -this size adjustment and I think that it was just a misunderstanding of -how window rectangles work (inclusive versus exclusive extents). - -This size adjustment causes non-maximized Chrome windows to shrink every -time a monitor is added or removed. The problematic commit was found -by the bug-filer through a bisect of more than four years of Chrome -history - I'm just landing the fix that they suggested. - -Bug: 1300415 -Change-Id: Ief124f584a91aa9cc3f10704b0cc1e83356dea5b -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3492658 -Reviewed-by: Allen Bauer <kylixrd@chromium.org> -Commit-Queue: Bruce Dawson <brucedawson@chromium.org> -Cr-Commit-Position: refs/heads/main@{#975872} - -diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 264a9109e42c23e9be6bf7269b3cfee2634b61e4..86f06d2a2c9588a2210a9f78f47e73f1b7c5e329 100644 ---- a/ui/views/win/hwnd_message_handler.cc -+++ b/ui/views/win/hwnd_message_handler.cc -@@ -2834,8 +2834,8 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) { - // (Win+Shift+Arrows). See crbug.com/656001. - window_rect.left = window_pos->x; - window_rect.top = window_pos->y; -- window_rect.right = window_pos->x + window_pos->cx - 1; -- window_rect.bottom = window_pos->y + window_pos->cy - 1; -+ window_rect.right = window_pos->x + window_pos->cx; -+ window_rect.bottom = window_pos->y + window_pos->cy; - } - - HMONITOR monitor; diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 24054daa57a97..229cc895360e4 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 <webview> as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 5fd8cb63f589dd204c2477f2375ec1d3716b55f0..85e52f7a99fe350da05270cf6fde0fe82a1bec40 100644 +index 6944f34edbfb7656c19883243ab2eb15f5ce51d9..0a2ddf31689b0d2ba2600a40067f9892b06033a7 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( +@@ -662,6 +662,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 9500c595ccfb4..88293ba5df857 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ 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 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b28d8de6f 100644 +index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66dc8d9d5da 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 @@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -50,7 +50,7 @@ index 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1006,6 +1022,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1005,6 +1021,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -61,7 +61,7 @@ index 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1752,9 +1772,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1751,9 +1771,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 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1763,7 +1785,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1762,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6ed6e2f5790a2..536be6ee276a4 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 6a696e816a185f8492674fcaf1cbbf7e2faabf99..a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1591,7 +1591,7 @@ if (is_chrome_branded && !is_android) { +@@ -1545,7 +1545,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) { +@@ -1574,6 +1574,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 0a1e41b6d04e2..c90a98511a533 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 0b42cba8667225c25df2405d99efe119a26c3585..ee8b42500499dc6a1700bc38e5b75976bb408490 100644 +index 347526056c09a34c62512869b7c21b9e2b6ea0d7..dda90e2043eaba4dd951628f4876cad60a553b9b 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1339,7 +1339,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 dd479d4ad0215..b40543e80b56a 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 fb25a7c19f20ca690963c5a15bd09224687b5f57..d8939c1936830b101d6bb4079cd99e6015b481c4 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() { +@@ -1786,9 +1786,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate = std::make_unique<RendererSandboxedProcessLauncherDelegateWin>( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 849e94be20ccd..0eea1a2d4de6d 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 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c4583215f9cd189 100644 +index a82b571fdabe90771bc8f8ed4ae40df3085592c7..1942d3446225411bdce80628e219641b3089d4a3 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, +@@ -3045,6 +3045,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c458321 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3050,6 +3057,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3055,6 +3062,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -35,7 +35,7 @@ index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c458321 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index ad5c13965f1ccc078de5f25b08d51ed43e37f259..cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd 100644 +index cb672eb5276e8d3bb686f98405854f67970e72cb..d159f44dc855fee799f7b97b59a2a4e64631e7b4 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 67d32c0a23bbd..45933f1ae2cd9 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,17 +8,17 @@ This allows dragging and dropping between <webview>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 eff6616ef019ea8b661b878cc5fccd1e4b9217aa..9aff1848395dc41311df575dd7cbf0771271ed03 100644 +index 4095ee0ef25226180acb35d320630f971305528e..a0aff5ad93e7644211a2c15553b3d0988f380b7b 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -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. -- return !drag_start_ || -- target_rwh->GetProcess()->GetID() == drag_start_->process_id || -- GetRenderViewHostID(web_contents_->GetRenderViewHost()) != -- drag_start_->view_id; +@@ -899,10 +899,7 @@ bool WebContentsViewAura::IsValidDragTarget( + // for the outermost view. Inner `WebContents` will have a + // `WebContentsViewChildFrame` so when dragging between an inner + // `WebContents` and its embedder the view IDs will be the same. +- bool cross_tab_drag = +- GetRenderViewHostID(web_contents_->GetRenderViewHost()) != +- drag_start_->view_id; +- return cross_tab_drag; + return true; } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index af32042b3d84e..87438368253cc 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 a6ed7b9f89b7fca2c6a6676053d520ba6c7716d7..dd8c421545d75cd8c9864b88701e0f9071259444 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( +@@ -6253,6 +6253,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..0ba771e680e52 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 63ead7f8ab838693bade7163ddebd1787cc82344..8512a66eda07202b6c6faea049736fd8f16c93db 100644 +index eb8968c2a86102d0d3a21f07c394f1c360083c6c..025ef3f70a5ae34faf8c6013fbfba171c7f501ac 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local<v8::Context> context) {} @@ -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 030fd7ed2ea675e42e7894b1d89e636f5f5b85a6..998fe8b45959b8cfd91a1ed4f75f5946adf61537 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -950,6 +950,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,7 +43,7 @@ index a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca6993 const v8::Local<v8::Context>& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 10c96d3915e64ebebd283c70292b33e22612b8eb..9fa6853a2945e2a34ed319f874f356a4afd72dd3 100644 +index 8cbfe0a939e97de8dd8d4b5e4d741fb46e94fd45..2bc2ef61890a4c189613ae8a3f61c746ffc5d310 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 { @@ -55,10 +55,10 @@ index 10c96d3915e64ebebd283c70292b33e22612b8eb..9fa6853a2945e2a34ed319f874f356a4 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 d188491afffbd259d4287b0668a9d1cec291934a..2fe5234832f8a3510326171e1ccf5dbfeca49fc9 100644 +index ced2c8e433d5b807bd4f1aa44c6af53e93261c23..53b1ebb708e2332e38090d1adba88dbe850bf02d 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 { +@@ -716,6 +716,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {} @@ -67,10 +67,10 @@ index d188491afffbd259d4287b0668a9d1cec291934a..2fe5234832f8a3510326171e1ccf5dbf 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 3d29142e7e9d641d17ad16a8b24bf263f0bd4c73..9f5f07b2865df5ed8dd4a8c01082f4378b5f9ccf 100644 +index 2406a8b438de5f01f5354e08bcfc8810238b1bea..e7a60f6cae0fabeac6a5adec633ad5f45d43ef33 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -730,6 +730,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -731,6 +731,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 8c14560076af0..6608ad6735fa2 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 8512a66eda07202b6c6faea049736fd8f16c93db..afe767350c8878da38ab2b566fa89bcb831f8716 100644 +index 025ef3f70a5ae34faf8c6013fbfba171c7f501ac..cea3f3dc05f91927f4ee8be5eec85ec26c8e1e07 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local<v8::Context> context) {} @@ -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 998fe8b45959b8cfd91a1ed4f75f5946adf61537..30d22188daed7f0b451ae75655e12bac3c4f10ac 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -962,6 +962,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,7 +52,7 @@ 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 2bc2ef61890a4c189613ae8a3f61c746ffc5d310..36661d62ec1e6f7966b0789326fcbefa5fc3db6e 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 { @@ -65,10 +65,10 @@ index 9fa6853a2945e2a34ed319f874f356a4afd72dd3..87f9190d227e501a648dbbaa350bbb10 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 2fe5234832f8a3510326171e1ccf5dbfeca49fc9..b36a118861b2efae6ae28ef0e7f14db5d284b929 100644 +index 53b1ebb708e2332e38090d1adba88dbe850bf02d..8e86b79cf98c5e2429d0ec54b27eb950c6ce6303 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 { +@@ -716,6 +716,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {} 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 98510d24c4e2c..e94b4197ec86b 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 @@ -12,7 +12,7 @@ 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 +index 848d6edb722a88aa2d1b42290e65d677f5107acf..86e1c70d7693db0f1a6df32f0413c45f4854e586 100644 --- a/front_end/entrypoints/shell/BUILD.gn +++ b/front_end/entrypoints/shell/BUILD.gn @@ -31,6 +31,7 @@ devtools_entrypoint("shell") { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 13649f1c4acc8..dbd23d4d3ed74 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 fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa187603a84 100644 +index 076b75e2e5b3465ab3115f7186296c34f59480fc..7eaa7582fc1efc2381c267fec96fe94d274f922b 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -598,7 +598,7 @@ config("internal_config") { +@@ -605,7 +605,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa1 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5733,7 +5733,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5819,7 +5819,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa1 deps = [ ":v8_libbase", -@@ -5771,6 +5771,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5857,6 +5857,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index b4231609ce27d..1db85681252e3 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 e6797c92a52ab7805261ace2156a39fe368bd747..1aed7cad8b7dfff9fc7b1f93040c3eda33693af3 100644 +index f0f1355f590b37d4b0ff1b68124165ab61099cc1..15d94af6d969f93cefb21d82ddb7d508320bea30 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9097,7 +9097,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9088,7 +9088,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index e6797c92a52ab7805261ace2156a39fe368bd747..1aed7cad8b7dfff9fc7b1f93040c3eda isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 8e4ad43c1957f4ed555327588c41d049824c1dc5..54cf3b263ac5654b370897b951aa0be8f8d566e5 100644 +index ccef6add27d782845a404741e4a42d07c86d0222..659f5187f80f74b3902facebe8f34d8898244093 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6235,9 +6235,9 @@ void Heap::TearDown() { +@@ -6152,9 +6152,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 59cf1289c5fab..bb775eb8c65e1 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 c784f859ba874b9a79be3dd9c69d306b8a590660..93158da71e2e7dd1aecc421664d4d21687cb38a6 100644 +index 5338cdfd2067f1621ecb63ce8b8d1111e3677377..1f876cec9c66c2d92662c235ab5c9c608c242a37 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -598,6 +598,10 @@ config("internal_config") { +@@ -605,6 +605,10 @@ config("internal_config") { ":cppgc_header_features", ] @@ -27,7 +27,7 @@ index c784f859ba874b9a79be3dd9c69d306b8a590660..93158da71e2e7dd1aecc421664d4d216 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index 3a73afc1ce7712a0683992608ff399734eea1f9d..f90f4ebffd6295bfa3e047cfb9c5ff0f2c30f26a 100644 +index fcb9f8756fd3ce9b83fe4ef60ad02fb225ec32dd..57dcd3deab5f37420a427954699dd85175328f3d 100644 --- a/src/base/macros.h +++ b/src/base/macros.h @@ -393,13 +393,17 @@ bool is_inbounds(float_t v) { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 4068e9b55533e..c2e6211db28bb 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 48f595a24ec7ead3076e1d44afb4f18b7bb810c3..df7cb44387a42fa173ce68ee8464d6abc050986f 100644 +index d57ad0a847ed1903228db4fb0650e1ca2922b608..de8947cb558455537e251f66cc3fe4f2f08c640b 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -886,7 +886,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -910,7 +910,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 ae318986f9b8a..452d901cd2707 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 dbbe9ae10bebdd71f441fda00c7dbfa187603a84..c784f859ba874b9a79be3dd9c69d306b8a590660 100644 +index 7eaa7582fc1efc2381c267fec96fe94d274f922b..5338cdfd2067f1621ecb63ce8b8d1111e3677377 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5745,7 +5745,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5831,7 +5831,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 ad3c1b6198b4c..def8b4cf37dd3 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 b16ab3ff88d1054d12af4de3ad0018c97c0b7fcc..c9963b43c121964c0c37c858adb228cd090d5c2a 100644 +index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..010b3633546601ba70a55aeb8e8fc503ef79e2f5 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -452,10 +452,13 @@ path. Add it with -I<path> to the command line +@@ -454,10 +454,13 @@ path. Add it with -I<path> to the command line # define V8_NOINLINE /* NOT SUPPORTED */ #endif @@ -28,7 +28,7 @@ index b16ab3ff88d1054d12af4de3ad0018c97c0b7fcc..c9963b43c121964c0c37c858adb228cd #else # define V8_DEPRECATED(message) #endif -@@ -463,7 +466,11 @@ path. Add it with -I<path> to the command line +@@ -465,7 +468,11 @@ path. Add it with -I<path> 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 4226bc8f1acae..5ced839d89dbf 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 ac7a46a895dd914f48038f36738c40ccfbd5c63f..e9f7bc7d022d05b6b62caf171d4e457119256831 100644 +index 1edc2bd6cb05ec1000c0cc651ad10ee40a71e1ec..87b7ed6862c8bfa25b63ac0dbd9e97028bbeb17d 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, diff --git a/script/zip_manifests/dist_zip.linux.arm.manifest b/script/zip_manifests/dist_zip.linux.arm.manifest index 7e08e3f695f0c..82bcb68f4d167 100644 --- a/script/zip_manifests/dist_zip.linux.arm.manifest +++ b/script/zip_manifests/dist_zip.linux.arm.manifest @@ -11,6 +11,7 @@ libGLESv2.so libffmpeg.so libvk_swiftshader.so libvulkan.so.1 +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -61,6 +62,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.linux.arm64.manifest b/script/zip_manifests/dist_zip.linux.arm64.manifest index 7e08e3f695f0c..82bcb68f4d167 100644 --- a/script/zip_manifests/dist_zip.linux.arm64.manifest +++ b/script/zip_manifests/dist_zip.linux.arm64.manifest @@ -11,6 +11,7 @@ libGLESv2.so libffmpeg.so libvk_swiftshader.so libvulkan.so.1 +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -61,6 +62,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.linux.x64.manifest b/script/zip_manifests/dist_zip.linux.x64.manifest index 7e08e3f695f0c..82bcb68f4d167 100644 --- a/script/zip_manifests/dist_zip.linux.x64.manifest +++ b/script/zip_manifests/dist_zip.linux.x64.manifest @@ -11,6 +11,7 @@ libGLESv2.so libffmpeg.so libvk_swiftshader.so libvulkan.so.1 +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -61,6 +62,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.linux.x86.manifest b/script/zip_manifests/dist_zip.linux.x86.manifest index 7e08e3f695f0c..82bcb68f4d167 100644 --- a/script/zip_manifests/dist_zip.linux.x86.manifest +++ b/script/zip_manifests/dist_zip.linux.x86.manifest @@ -11,6 +11,7 @@ libGLESv2.so libffmpeg.so libvk_swiftshader.so libvulkan.so.1 +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -61,6 +62,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.mac.arm64.manifest b/script/zip_manifests/dist_zip.mac.arm64.manifest index 91ed477f54512..997413de941ee 100644 --- a/script/zip_manifests/dist_zip.mac.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac.arm64.manifest @@ -24,6 +24,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ @@ -128,6 +130,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.arm64.bin Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak @@ -193,6 +197,7 @@ Electron.app/Contents/MacOS/ Electron.app/Contents/MacOS/Electron Electron.app/Contents/PkgInfo Electron.app/Contents/Resources/ +Electron.app/Contents/Resources/af.lproj/ Electron.app/Contents/Resources/am.lproj/ Electron.app/Contents/Resources/ar.lproj/ Electron.app/Contents/Resources/bg.lproj/ @@ -245,6 +250,7 @@ Electron.app/Contents/Resources/te.lproj/ Electron.app/Contents/Resources/th.lproj/ Electron.app/Contents/Resources/tr.lproj/ Electron.app/Contents/Resources/uk.lproj/ +Electron.app/Contents/Resources/ur.lproj/ Electron.app/Contents/Resources/vi.lproj/ Electron.app/Contents/Resources/zh_CN.lproj/ Electron.app/Contents/Resources/zh_TW.lproj/ diff --git a/script/zip_manifests/dist_zip.mac.x64.manifest b/script/zip_manifests/dist_zip.mac.x64.manifest index e411bc46d62d3..d20306318cf65 100644 --- a/script/zip_manifests/dist_zip.mac.x64.manifest +++ b/script/zip_manifests/dist_zip.mac.x64.manifest @@ -24,6 +24,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ @@ -128,6 +130,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.x86_64.bin Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak @@ -193,6 +197,7 @@ Electron.app/Contents/MacOS/ Electron.app/Contents/MacOS/Electron Electron.app/Contents/PkgInfo Electron.app/Contents/Resources/ +Electron.app/Contents/Resources/af.lproj/ Electron.app/Contents/Resources/am.lproj/ Electron.app/Contents/Resources/ar.lproj/ Electron.app/Contents/Resources/bg.lproj/ @@ -245,6 +250,7 @@ Electron.app/Contents/Resources/te.lproj/ Electron.app/Contents/Resources/th.lproj/ Electron.app/Contents/Resources/tr.lproj/ Electron.app/Contents/Resources/uk.lproj/ +Electron.app/Contents/Resources/ur.lproj/ Electron.app/Contents/Resources/vi.lproj/ Electron.app/Contents/Resources/zh_CN.lproj/ Electron.app/Contents/Resources/zh_TW.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest index 20ca9e4428da2..5f319b17895a3 100644 --- a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest @@ -21,6 +21,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ @@ -125,6 +127,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.arm64.bin Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak @@ -170,6 +174,7 @@ Electron.app/Contents/MacOS/ Electron.app/Contents/MacOS/Electron Electron.app/Contents/PkgInfo Electron.app/Contents/Resources/ +Electron.app/Contents/Resources/af.lproj/ Electron.app/Contents/Resources/am.lproj/ Electron.app/Contents/Resources/ar.lproj/ Electron.app/Contents/Resources/bg.lproj/ @@ -222,6 +227,7 @@ Electron.app/Contents/Resources/te.lproj/ Electron.app/Contents/Resources/th.lproj/ Electron.app/Contents/Resources/tr.lproj/ Electron.app/Contents/Resources/uk.lproj/ +Electron.app/Contents/Resources/ur.lproj/ Electron.app/Contents/Resources/vi.lproj/ Electron.app/Contents/Resources/zh_CN.lproj/ Electron.app/Contents/Resources/zh_TW.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.x64.manifest b/script/zip_manifests/dist_zip.mac_mas.x64.manifest index c3a864ce25578..7736d9750d8e9 100644 --- a/script/zip_manifests/dist_zip.mac_mas.x64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.x64.manifest @@ -21,6 +21,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/ @@ -125,6 +127,8 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resourc Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/ +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ur.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.x86_64.bin Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak @@ -170,6 +174,7 @@ Electron.app/Contents/MacOS/ Electron.app/Contents/MacOS/Electron Electron.app/Contents/PkgInfo Electron.app/Contents/Resources/ +Electron.app/Contents/Resources/af.lproj/ Electron.app/Contents/Resources/am.lproj/ Electron.app/Contents/Resources/ar.lproj/ Electron.app/Contents/Resources/bg.lproj/ @@ -222,6 +227,7 @@ Electron.app/Contents/Resources/te.lproj/ Electron.app/Contents/Resources/th.lproj/ Electron.app/Contents/Resources/tr.lproj/ Electron.app/Contents/Resources/uk.lproj/ +Electron.app/Contents/Resources/ur.lproj/ Electron.app/Contents/Resources/vi.lproj/ Electron.app/Contents/Resources/zh_CN.lproj/ Electron.app/Contents/Resources/zh_TW.lproj/ diff --git a/script/zip_manifests/dist_zip.win.arm64.manifest b/script/zip_manifests/dist_zip.win.arm64.manifest index 6f4e96ded7738..9ae29943b772f 100755 --- a/script/zip_manifests/dist_zip.win.arm64.manifest +++ b/script/zip_manifests/dist_zip.win.arm64.manifest @@ -7,6 +7,7 @@ ffmpeg.dll icudtl.dat libEGL.dll libGLESv2.dll +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -57,6 +58,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.win.ia32.manifest b/script/zip_manifests/dist_zip.win.ia32.manifest index 61abecd09b4d0..cb7d05e9a4ec7 100644 --- a/script/zip_manifests/dist_zip.win.ia32.manifest +++ b/script/zip_manifests/dist_zip.win.ia32.manifest @@ -8,6 +8,7 @@ ffmpeg.dll icudtl.dat libEGL.dll libGLESv2.dll +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -58,6 +59,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/script/zip_manifests/dist_zip.win.x64.manifest b/script/zip_manifests/dist_zip.win.x64.manifest index 61abecd09b4d0..cb7d05e9a4ec7 100644 --- a/script/zip_manifests/dist_zip.win.x64.manifest +++ b/script/zip_manifests/dist_zip.win.x64.manifest @@ -8,6 +8,7 @@ ffmpeg.dll icudtl.dat libEGL.dll libGLESv2.dll +locales/af.pak locales/am.pak locales/ar.pak locales/bg.pak @@ -58,6 +59,7 @@ locales/te.pak locales/th.pak locales/tr.pak locales/uk.pak +locales/ur.pak locales/vi.pak locales/zh-CN.pak locales/zh-TW.pak diff --git a/shell/app/electron_content_client.cc b/shell/app/electron_content_client.cc index 14e0c0c372833..598e7bf9d739f 100644 --- a/shell/app/electron_content_client.cc +++ b/shell/app/electron_content_client.cc @@ -18,6 +18,7 @@ #include "content/public/common/content_switches.h" #include "electron/buildflags/buildflags.h" #include "extensions/common/constants.h" +#include "pdf/buildflags.h" #include "ppapi/buildflags/buildflags.h" #include "shell/common/electron_paths.h" #include "shell/common/options_switches.h" @@ -34,8 +35,8 @@ #endif // defined(WIDEVINE_CDM_AVAILABLE) #if BUILDFLAG(ENABLE_PDF_VIEWER) -#include "pdf/pdf.h" // nogncheck -#include "pdf/pdf_ppapi.h" // nogncheck +#include "components/pdf/renderer/internal_plugin_renderer_helpers.h" +#include "pdf/pdf.h" // nogncheck #include "shell/common/electron_constants.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) @@ -43,7 +44,8 @@ #include "content/public/browser/plugin_service.h" #include "content/public/common/pepper_plugin_info.h" #include "ppapi/shared_impl/ppapi_permissions.h" -#endif // BUILDFLAG(ENABLE_PLUGINS) +#include "ppapi/shared_impl/ppapi_switches.h" // nogncheck crbug.com/1125897 +#endif // BUILDFLAG(ENABLE_PLUGINS) namespace electron { @@ -104,6 +106,8 @@ bool IsWidevineAvailable( #if BUILDFLAG(ENABLE_PLUGINS) void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { #if BUILDFLAG(ENABLE_PDF_VIEWER) + // TODO(upstream/thestig): Figure out how to make the PDF Viewer work without + // this PPAPI plugin registration. content::PepperPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; @@ -114,12 +118,6 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { content::WebPluginMimeType pdf_mime_type(kPdfPluginMimeType, "pdf", "Portable Document Format"); pdf_info.mime_types.push_back(pdf_mime_type); - pdf_info.internal_entry_points.get_interface = chrome_pdf::PPP_GetInterface; - pdf_info.internal_entry_points.initialize_module = - chrome_pdf::PPP_InitializeModule; - pdf_info.internal_entry_points.shutdown_module = - chrome_pdf::PPP_ShutdownModule; - pdf_info.permissions = ppapi::PERMISSION_PDF | ppapi::PERMISSION_DEV; plugins->push_back(pdf_info); // NB. in Chrome, this plugin isn't registered until the PDF extension is diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index caa13d764c7ba..e1769670fb8ba 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -234,7 +234,7 @@ ElectronMainDelegate::~ElectronMainDelegate() = default; const char* const ElectronMainDelegate::kNonWildcardDomainNonPortSchemes[] = { extensions::kExtensionScheme}; const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize = - base::size(kNonWildcardDomainNonPortSchemes); + std::size(kNonWildcardDomainNonPortSchemes); bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) { auto* command_line = base::CommandLine::ForCurrentProcess(); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index d25b4bd535d67..fcc90988bffb5 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -91,6 +91,12 @@ bool ElectronBluetoothDelegate::HasDevicePermission( return true; } +void ElectronBluetoothDelegate::RevokeDevicePermissionWebInitiated( + RenderFrameHost* frame, + const WebBluetoothDeviceId& device_id) { + NOTIMPLEMENTED(); +} + bool ElectronBluetoothDelegate::IsAllowedToAccessService( RenderFrameHost* frame, const WebBluetoothDeviceId& device_id, diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 897ce2f2d31fa..9e9888ab42210 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -71,6 +71,9 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { bool HasDevicePermission( content::RenderFrameHost* frame, const blink::WebBluetoothDeviceId& device_id) override; + void RevokeDevicePermissionWebInitiated( + content::RenderFrameHost* frame, + const blink::WebBluetoothDeviceId& device_id) override; bool IsAllowedToAccessService(content::RenderFrameHost* frame, const blink::WebBluetoothDeviceId& device_id, const device::BluetoothUUID& service) override; diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index 56a62ac32548f..ced835e59c1fc 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -40,7 +40,9 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/skia_util.h" #include "skia/ext/legacy_display_globals.h" +#include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkFont.h" +#include "third_party/skia/include/core/SkPaint.h" #include "ui/base/l10n/l10n_util.h" #include "ui/events/keycodes/keyboard_code_conversion_win.h" #include "ui/strings/grit/ui_strings.h" @@ -97,7 +99,7 @@ std::wstring GetAppInfoHelperForProtocol(ASSOCSTR assoc_str, const GURL& url) { return std::wstring(); wchar_t out_buffer[1024]; - DWORD buffer_size = base::size(out_buffer); + DWORD buffer_size = std::size(out_buffer); HRESULT hr = AssocQueryString(ASSOCF_IS_PROTOCOL, assoc_str, url_scheme.c_str(), NULL, out_buffer, &buffer_size); diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 50fff944a3af3..a11af4a0182e3 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -27,11 +27,16 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h" +#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version.h" #include "components/net_log/chrome_net_log.h" #include "components/network_hints/common/network_hints.mojom.h" +#include "components/pdf/browser/pdf_navigation_throttle.h" +#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" +#include "components/pdf/common/internal_plugin_helpers.h" #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck #include "content/browser/site_instance_impl.h" // nogncheck #include "content/public/browser/browser_main_runner.h" @@ -620,7 +625,7 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches( switches::kServiceWorkerSchemes, switches::kStreamingSchemes}; command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), kCommonSwitchNames, - base::size(kCommonSwitchNames)); + std::size(kCommonSwitchNames)); if (process_type == ::switches::kUtilityProcess || content::RenderProcessHost::FromID(process_id)) { MaybeAppendSecureOriginsAllowlistSwitch(command_line); @@ -1042,10 +1047,10 @@ void HandleExternalProtocolInUI( bool ElectronBrowserClient::HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, @@ -1070,6 +1075,18 @@ ElectronBrowserClient::CreateThrottlesForNavigation( std::make_unique<extensions::ExtensionNavigationThrottle>(handle)); #endif +#if BUILDFLAG(ENABLE_PDF_VIEWER) + std::unique_ptr<content::NavigationThrottle> pdf_iframe_throttle = + PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(handle); + if (pdf_iframe_throttle) + throttles.push_back(std::move(pdf_iframe_throttle)); + std::unique_ptr<content::NavigationThrottle> pdf_throttle = + pdf::PdfNavigationThrottle::MaybeCreateThrottleFor( + handle, std::make_unique<ChromePdfStreamDelegate>()); + if (pdf_throttle) + throttles.push_back(std::move(pdf_throttle)); +#endif + return throttles; } @@ -1474,6 +1491,26 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory( return true; } +std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> +ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors( + content::NavigationUIData* navigation_ui_data, + int frame_tree_node_id, + const scoped_refptr<network::SharedURLLoaderFactory>& + network_loader_factory) { + std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> + interceptors; +#if BUILDFLAG(ENABLE_PDF_VIEWER) + { + std::unique_ptr<content::URLLoaderRequestInterceptor> pdf_interceptor = + pdf::PdfURLLoaderRequestInterceptor::MaybeCreateInterceptor( + frame_tree_node_id, std::make_unique<ChromePdfStreamDelegate>()); + if (pdf_interceptor) + interceptors.push_back(std::move(pdf_interceptor)); + } +#endif + return interceptors; +} + void ElectronBrowserClient::OverrideURLLoaderFactoryParams( content::BrowserContext* browser_context, const url::Origin& origin, @@ -1747,6 +1784,9 @@ ElectronBrowserClient::GetPluginMimeTypesWithExternalHandlers( auto map = PluginUtils::GetMimeTypeToExtensionIdMap(browser_context); for (const auto& pair : map) mime_types.insert(pair.first); +#endif +#if BUILDFLAG(ENABLE_PDF_VIEWER) + mime_types.insert(pdf::kInternalPluginMimeType); #endif return mime_types; } diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 730fc07e687e8..a19b04c4a6851 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -227,6 +227,12 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool* bypass_redirect_checks, bool* disable_secure_dns, network::mojom::URLLoaderFactoryOverridePtr* factory_override) override; + std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> + WillCreateURLLoaderRequestInterceptors( + content::NavigationUIData* navigation_ui_data, + int frame_tree_node_id, + const scoped_refptr<network::SharedURLLoaderFactory>& + network_loader_factory) override; bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( base::StringPiece scheme, bool is_embedded_origin_secure) override; @@ -247,10 +253,10 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index 766dbd5785a7e..6640dd2e3c4b3 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -16,6 +16,7 @@ #include "base/debug/leak_annotations.h" #include "base/posix/eintr_wrapper.h" #include "base/task/post_task.h" +#include "base/threading/platform_thread.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/browser.h" diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index f1a54d9a6f15c..7558535ca29c7 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -141,11 +141,11 @@ void ElectronDownloadManagerDelegate::OnDownloadPathGenerated( std::ignore = dialog_promise.Then(std::move(dialog_callback)); file_dialog::ShowSaveDialog(settings, std::move(dialog_promise)); } else { - std::move(callback).Run(path, - download::DownloadItem::TARGET_DISPOSITION_PROMPT, - download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - item->GetMixedContentStatus(), path, absl::nullopt, - download::DOWNLOAD_INTERRUPT_REASON_NONE); + std::move(callback).Run( + path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, + item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt, + download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -184,7 +184,7 @@ void ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone( std::move(download_callback) .Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - item->GetMixedContentStatus(), path, absl::nullopt, + item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt, interrupt_reason); } @@ -204,7 +204,7 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - download->GetForcedFilePath(), absl::nullopt, + download->GetForcedFilePath(), base::FilePath(), absl::nullopt, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } @@ -217,7 +217,8 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( save_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, save_path, - absl::nullopt, download::DOWNLOAD_INTERRUPT_REASON_NONE); + base::FilePath(), absl::nullopt, + download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index a6902499aaf9f..cab9b82abe3a9 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -9,6 +9,7 @@ #include <vector> #include "base/values.h" +#include "content/browser/permissions/permission_util.h" // nogncheck #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/global_routing_id.h" #include "content/public/browser/permission_controller.h" @@ -398,4 +399,13 @@ ElectronPermissionManager::GetPermissionStatusForFrame( : blink::mojom::PermissionStatus::DENIED; } +blink::mojom::PermissionStatus +ElectronPermissionManager::GetPermissionStatusForCurrentDocument( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host) { + return GetPermissionStatus( + permission, render_frame_host->GetLastCommittedOrigin().GetURL(), + content::PermissionUtil::GetLastCommittedOriginAsURL(render_frame_host)); +} + } // namespace electron diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 38cedf2ebfda6..e823b3c18833b 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -85,6 +85,9 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { content::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host) override; bool CheckPermissionWithDetails(content::PermissionType permission, content::RenderFrameHost* render_frame_host, diff --git a/shell/browser/extensions/electron_extension_message_filter.cc b/shell/browser/extensions/electron_extension_message_filter.cc index 688c76c024f04..2da25a7627d25 100644 --- a/shell/browser/extensions/electron_extension_message_filter.cc +++ b/shell/browser/extensions/electron_extension_message_filter.cc @@ -40,7 +40,7 @@ ElectronExtensionMessageFilter::ElectronExtensionMessageFilter( int render_process_id, content::BrowserContext* browser_context) : BrowserMessageFilter(kExtensionFilteredMessageClasses, - base::size(kExtensionFilteredMessageClasses)), + std::size(kExtensionFilteredMessageClasses)), render_process_id_(render_process_id), browser_context_(browser_context) { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index 3d05445222416..416254206dfa4 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/shell/browser/extensions/electron_messaging_delegate.cc @@ -75,13 +75,40 @@ std::unique_ptr<MessagePort> ElectronMessagingDelegate::CreateReceiverForTab( const std::string& extension_id, const PortId& receiver_port_id, content::WebContents* receiver_contents, - int receiver_frame_id) { + int receiver_frame_id, + const std::string& receiver_document_id) { // Frame ID -1 is every frame in the tab. - bool include_child_frames = receiver_frame_id == -1; - content::RenderFrameHost* receiver_rfh = - include_child_frames ? receiver_contents->GetMainFrame() - : ExtensionApiFrameIdMap::GetRenderFrameHostById( - receiver_contents, receiver_frame_id); + bool include_child_frames = + receiver_frame_id == -1 && receiver_document_id.empty(); + + content::RenderFrameHost* receiver_rfh = nullptr; + if (include_child_frames) { + // The target is the active outermost main frame of the WebContents. + receiver_rfh = receiver_contents->GetMainFrame(); + } else if (!receiver_document_id.empty()) { + ExtensionApiFrameIdMap::DocumentId document_id = + ExtensionApiFrameIdMap::DocumentIdFromString(receiver_document_id); + + // Return early for invalid documentIds. + if (!document_id) + return nullptr; + + receiver_rfh = + ExtensionApiFrameIdMap::Get()->GetRenderFrameHostByDocumentId( + document_id); + + // If both |document_id| and |receiver_frame_id| are provided they + // should find the same RenderFrameHost, if not return early. + if (receiver_frame_id != -1 && + ExtensionApiFrameIdMap::GetRenderFrameHostById( + receiver_contents, receiver_frame_id) != receiver_rfh) { + return nullptr; + } + } else { + DCHECK_GT(receiver_frame_id, -1); + receiver_rfh = ExtensionApiFrameIdMap::GetRenderFrameHostById( + receiver_contents, receiver_frame_id); + } if (!receiver_rfh) return nullptr; diff --git a/shell/browser/extensions/electron_messaging_delegate.h b/shell/browser/extensions/electron_messaging_delegate.h index ac82d85ca2029..3c0942e654245 100644 --- a/shell/browser/extensions/electron_messaging_delegate.h +++ b/shell/browser/extensions/electron_messaging_delegate.h @@ -37,7 +37,8 @@ class ElectronMessagingDelegate : public MessagingDelegate { const std::string& extension_id, const PortId& receiver_port_id, content::WebContents* receiver_contents, - int receiver_frame_id) override; + int receiver_frame_id, + const std::string& receiver_document_id) override; std::unique_ptr<MessagePort> CreateReceiverForNativeApp( content::BrowserContext* browser_context, base::WeakPtr<MessagePort::ChannelDelegate> channel_delegate, diff --git a/shell/browser/font_defaults.cc b/shell/browser/font_defaults.cc index 89fd78281b369..a4ac516fa24e4 100644 --- a/shell/browser/font_defaults.cc +++ b/shell/browser/font_defaults.cc @@ -103,7 +103,7 @@ const FontDefault kFontDefaults[] = { IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN}, #endif }; -const size_t kFontDefaultsLength = base::size(kFontDefaults); +const size_t kFontDefaultsLength = std::size(kFontDefaults); // ^^^^^ DO NOT EDIT ^^^^^ diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 0a40c5ca356fd..e4c79c77f907b 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -107,7 +107,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { private: static void* AllocateMemoryOrNull(size_t size, InitializationPolicy policy) { return AllocateMemoryWithFlags(size, policy, - base::PartitionAllocReturnNull); + partition_alloc::AllocFlags::kReturnNull); } static void* AllocateMemoryWithFlags(size_t size, @@ -131,9 +131,9 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { } if (policy == kZeroInitialize) { - flags |= base::PartitionAllocZeroFill; + flags |= partition_alloc::AllocFlags::kZeroFill; } - void* data = allocator_->root()->AllocFlags(flags, size, "Electron"); + void* data = allocator_->root()->AllocWithFlags(flags, size, "Electron"); if (base::kAlignment < 16) { char* ptr = reinterpret_cast<char*>(data); DCHECK_EQ(base::bits::AlignUp(ptr, 16), ptr) diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 56823eb4b6297..ad839239f25af 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -13,6 +13,7 @@ #include <vector> #include "shell/common/api/api.mojom.h" +#include "third_party/skia/include/core/SkRegion.h" #include "ui/views/widget/widget_observer.h" #if BUILDFLAG(IS_WIN) diff --git a/shell/browser/net/asar/asar_url_loader.cc b/shell/browser/net/asar/asar_url_loader.cc index bfa2a7d0e4832..7c39b2ed0b8b7 100644 --- a/shell/browser/net/asar/asar_url_loader.cc +++ b/shell/browser/net/asar/asar_url_loader.cc @@ -63,7 +63,7 @@ class AsarURLLoader : public network::mojom::URLLoader { public: static void CreateAndStart( const network::ResourceRequest& request, - network::mojom::URLLoaderRequest loader, + mojo::PendingReceiver<network::mojom::URLLoader> loader, mojo::PendingRemote<network::mojom::URLLoaderClient> client, scoped_refptr<net::HttpResponseHeaders> extra_response_headers) { // Owns itself. Will live as long as its URLLoader and URLLoaderClientPtr @@ -390,7 +390,7 @@ class AsarURLLoader : public network::mojom::URLLoader { void CreateAsarURLLoader( const network::ResourceRequest& request, - network::mojom::URLLoaderRequest loader, + mojo::PendingReceiver<network::mojom::URLLoader> loader, mojo::PendingRemote<network::mojom::URLLoaderClient> client, scoped_refptr<net::HttpResponseHeaders> extra_response_headers) { auto task_runner = base::ThreadPool::CreateSequencedTaskRunner( diff --git a/shell/browser/net/asar/asar_url_loader.h b/shell/browser/net/asar/asar_url_loader.h index 09d255fd5d2d5..4cd61df37b69d 100644 --- a/shell/browser/net/asar/asar_url_loader.h +++ b/shell/browser/net/asar/asar_url_loader.h @@ -13,7 +13,7 @@ namespace asar { void CreateAsarURLLoader( const network::ResourceRequest& request, - network::mojom::URLLoaderRequest loader, + mojo::PendingReceiver<network::mojom::URLLoader> loader, mojo::PendingRemote<network::mojom::URLLoaderClient> client, scoped_refptr<net::HttpResponseHeaders> extra_response_headers); diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index be8f3403dc81a..176f28aa688da 100644 --- a/shell/browser/net/network_context_service.cc +++ b/shell/browser/net/network_context_service.cc @@ -80,14 +80,14 @@ void NetworkContextService::ConfigureNetworkContextParams( // Configure on-disk storage for persistent sessions. if (!in_memory) { // Configure the HTTP cache path and size. - network_context_params->http_cache_path = + network_context_params->http_cache_directory = path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = browser_context_->GetMaxCacheSize(); network_context_params->file_paths = network::mojom::NetworkContextFilePaths::New(); - network_context_params->file_paths->data_path = + network_context_params->file_paths->data_directory = path.Append(chrome::kNetworkDataDirname); network_context_params->file_paths->unsandboxed_data_path = path; network_context_params->file_paths->trigger_migration = diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index 6eb27c8395083..d079c7b286ff9 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -523,8 +523,9 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToStartRequest( if (has_any_extra_headers_listeners_) options |= network::mojom::kURLLoadOptionUseHeaderClient; factory_->target_factory_->CreateLoaderAndStart( - mojo::MakeRequest(&target_loader_), network_service_request_id_, - options, request_, proxied_client_receiver_.BindNewPipeAndPassRemote(), + target_loader_.BindNewPipeAndPassReceiver(), + network_service_request_id_, options, request_, + proxied_client_receiver_.BindNewPipeAndPassRemote(), traffic_annotation_); } @@ -760,7 +761,7 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory( uint64_t* request_id_generator, std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data, absl::optional<int64_t> navigation_id, - network::mojom::URLLoaderFactoryRequest loader_request, + mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_request, mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote, mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient> header_client_receiver, diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index 35d8e89be9332..10b6d561cd695 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/shell/browser/net/proxying_url_loader_factory.h @@ -28,6 +28,7 @@ #include "services/network/public/mojom/url_loader.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" #include "services/network/public/mojom/url_response_head.mojom.h" +#include "services/network/url_loader_factory.h" #include "shell/browser/net/electron_url_loader_factory.h" #include "shell/browser/net/web_request_api_interface.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -146,7 +147,7 @@ class ProxyingURLLoaderFactory mojo::Receiver<network::mojom::URLLoaderClient> proxied_client_receiver_{ this}; - network::mojom::URLLoaderPtr target_loader_; + mojo::Remote<network::mojom::URLLoader> target_loader_; network::mojom::URLResponseHeadPtr current_response_; mojo::ScopedDataPipeConsumerHandle current_body_; @@ -198,7 +199,7 @@ class ProxyingURLLoaderFactory uint64_t* request_id_generator, std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data, absl::optional<int64_t> navigation_id, - network::mojom::URLLoaderFactoryRequest loader_request, + mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_request, mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote, mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient> diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.h b/shell/browser/ui/electron_desktop_window_tree_host_linux.h index bbf5782dcb38a..58824f4dd63ea 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.h +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.h @@ -12,6 +12,7 @@ #include "base/scoped_observation.h" #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/client_frame_view_linux.h" +#include "third_party/skia/include/core/SkRRect.h" #include "ui/native_theme/native_theme_observer.h" #include "ui/views/linux_ui/device_scale_factor_observer.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" diff --git a/shell/browser/ui/file_dialog_win.cc b/shell/browser/ui/file_dialog_win.cc index 5aeaa238c2108..18fc06b0b7063 100644 --- a/shell/browser/ui/file_dialog_win.cc +++ b/shell/browser/ui/file_dialog_win.cc @@ -206,7 +206,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings, wchar_t file_name[MAX_PATH]; hr = GetFileNameFromShellItem(item, SIGDN_FILESYSPATH, file_name, - base::size(file_name)); + std::size(file_name)); if (FAILED(hr)) return false; diff --git a/shell/browser/ui/gtk/app_indicator_icon.h b/shell/browser/ui/gtk/app_indicator_icon.h index 3219beb5ee154..0e50b89148a3f 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.h +++ b/shell/browser/ui/gtk/app_indicator_icon.h @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/memory/weak_ptr.h" #include "base/nix/xdg_util.h" +#include "third_party/skia/include/core/SkImage.h" #include "ui/base/glib/glib_signal.h" #include "ui/views/linux_ui/status_icon_linux.h" diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 4779ee6c77f1e..f249de999c7fd 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -142,7 +142,7 @@ void SetZoomLevelForWebContents(content::WebContents* web_contents, double GetNextZoomLevel(double level, bool out) { double factor = blink::PageZoomLevelToZoomFactor(level); - size_t size = base::size(kPresetZoomFactors); + size_t size = std::size(kPresetZoomFactors); for (size_t i = 0; i < size; ++i) { if (!blink::PageZoomValuesEqual(kPresetZoomFactors[i], factor)) continue; diff --git a/shell/browser/ui/win/jump_list.cc b/shell/browser/ui/win/jump_list.cc index eb985984a7b36..12311f6377d1e 100644 --- a/shell/browser/ui/win/jump_list.cc +++ b/shell/browser/ui/win/jump_list.cc @@ -93,7 +93,7 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link, item->type = JumpListItem::Type::kTask; wchar_t path[MAX_PATH]; - if (FAILED(shell_link->GetPath(path, base::size(path), nullptr, 0))) + if (FAILED(shell_link->GetPath(path, std::size(path), nullptr, 0))) return false; item->path = base::FilePath(path); @@ -111,18 +111,18 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link, item->title = prop.get().pwszVal; } - if (SUCCEEDED(shell_link->GetWorkingDirectory(path, base::size(path)))) + if (SUCCEEDED(shell_link->GetWorkingDirectory(path, std::size(path)))) item->working_dir = base::FilePath(path); int icon_index; if (SUCCEEDED( - shell_link->GetIconLocation(path, base::size(path), &icon_index))) { + shell_link->GetIconLocation(path, std::size(path), &icon_index))) { item->icon_path = base::FilePath(path); item->icon_index = icon_index; } wchar_t item_desc[INFOTIPSIZE]; - if (SUCCEEDED(shell_link->GetDescription(item_desc, base::size(item_desc)))) + if (SUCCEEDED(shell_link->GetDescription(item_desc, std::size(item_desc)))) item->description = item_desc; return true; diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index 7be02ad27b7af..9c417fa6d200c 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -14,6 +14,7 @@ #include "gin/wrappable.h" #include "shell/common/gin_helper/error_thrower.h" #include "ui/gfx/image/image.h" +#include "ui/gfx/image/image_skia_rep.h" #if BUILDFLAG(IS_WIN) #include "base/files/file_path.h" diff --git a/shell/common/api/electron_api_native_image_mac.mm b/shell/common/api/electron_api_native_image_mac.mm index 60f3765a3def3..12cbad9f3e3b3 100644 --- a/shell/common/api/electron_api_native_image_mac.mm +++ b/shell/common/api/electron_api_native_image_mac.mm @@ -19,7 +19,7 @@ #include "shell/common/gin_converters/image_converter.h" #include "shell/common/gin_helper/promise.h" #include "ui/gfx/color_utils.h" -#include "ui/gfx/image/image.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia_operations.h" diff --git a/shell/common/gin_helper/callback.cc b/shell/common/gin_helper/callback.cc index a5abed2c7020b..569fc5d570bf7 100644 --- a/shell/common/gin_helper/callback.cc +++ b/shell/common/gin_helper/callback.cc @@ -147,7 +147,7 @@ v8::Local<v8::Value> BindFunctionWith(v8::Isolate* isolate, CHECK(!bind.IsEmpty()); v8::Local<v8::Function> bind_func = bind.ToLocalChecked().As<v8::Function>(); v8::Local<v8::Value> converted[] = {func, arg1, arg2}; - return bind_func->Call(context, func, base::size(converted), converted) + return bind_func->Call(context, func, std::size(converted), converted) .ToLocalChecked(); } diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index c45093a559a62..eb1da7228470e 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -288,7 +288,7 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) { return; const ITEMIDLIST* highlight[] = {file_item}; - hr = SHOpenFolderAndSelectItems(dir_item, base::size(highlight), highlight, + hr = SHOpenFolderAndSelectItems(dir_item, std::size(highlight), highlight, NULL); if (FAILED(hr)) { // On some systems, the above call mysteriously fails with "file not diff --git a/shell/common/skia_util.cc b/shell/common/skia_util.cc index 63f42a13ab41c..21b47fc8c27f3 100644 --- a/shell/common/skia_util.cc +++ b/shell/common/skia_util.cc @@ -21,6 +21,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia_operations.h" +#include "ui/gfx/image/image_skia_rep.h" #include "ui/gfx/image/image_util.h" #if BUILDFLAG(IS_WIN) diff --git a/shell/common/v8_value_serializer.h b/shell/common/v8_value_serializer.h index b75ed82a3228b..958677581bd47 100644 --- a/shell/common/v8_value_serializer.h +++ b/shell/common/v8_value_serializer.h @@ -6,6 +6,7 @@ #define ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_ #include "base/containers/span.h" +#include "ui/gfx/image/image_skia_rep.h" namespace v8 { class Isolate; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 6ec08e583da96..5f2ea089056a8 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -79,17 +79,17 @@ struct Converter<blink::WebLocalFrame::ScriptExecutionType> { }; template <> -struct Converter<blink::WebDocument::CSSOrigin> { +struct Converter<blink::WebCssOrigin> { static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val, - blink::WebDocument::CSSOrigin* out) { + blink::WebCssOrigin* out) { std::string css_origin; if (!ConvertFromV8(isolate, val, &css_origin)) return false; if (css_origin == "user") { - *out = blink::WebDocument::CSSOrigin::kUserOrigin; + *out = blink::WebCssOrigin::kUser; } else if (css_origin == "author") { - *out = blink::WebDocument::CSSOrigin::kAuthorOrigin; + *out = blink::WebCssOrigin::kAuthor; } else { return false; } @@ -613,8 +613,7 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>, std::u16string InsertCSS(v8::Isolate* isolate, const std::string& css, gin::Arguments* args) { - blink::WebDocument::CSSOrigin css_origin = - blink::WebDocument::CSSOrigin::kAuthorOrigin; + blink::WebCssOrigin css_origin = blink::WebCssOrigin::kAuthor; gin_helper::Dictionary options; if (args->GetNext(&options)) diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index 98f79468c5445..7b932f7f7576c 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -12,7 +12,9 @@ #include "base/command_line.h" #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" +#include "chrome/common/pdf_util.h" #include "components/network_hints/renderer/web_prescient_networking_impl.h" +#include "components/pdf/renderer/pdf_internal_plugin_delegate.h" #include "content/common/buildflags.h" #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" @@ -37,7 +39,6 @@ #include "shell/renderer/electron_autofill_agent.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h" -#include "third_party/blink/public/platform/media/multi_buffer_data_source.h" #include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha) #include "third_party/blink/public/web/web_frame_widget.h" @@ -46,6 +47,7 @@ #include "third_party/blink/public/web/web_script_source.h" #include "third_party/blink/public/web/web_security_policy.h" #include "third_party/blink/public/web/web_view.h" +#include "third_party/blink/renderer/platform/media/multi_buffer_data_source.h" // nogncheck #include "third_party/blink/renderer/platform/weborigin/scheme_registry.h" // nogncheck #if BUILDFLAG(IS_MAC) @@ -56,6 +58,10 @@ #include <shlobj.h> #endif +#if defined(WIDEVINE_CDM_AVAILABLE) +#include "chrome/renderer/media/chrome_key_systems.h" // nogncheck +#endif + #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) #include "components/spellcheck/renderer/spellcheck.h" #include "components/spellcheck/renderer/spellcheck_provider.h" @@ -186,12 +192,6 @@ void RendererClientBase::RenderThreadStarted() { thread->AddObserver(extensions_renderer_client_->GetDispatcher()); #endif -#if BUILDFLAG(ENABLE_PDF_VIEWER) - // Enables printing from Chrome PDF viewer. - pdf_print_client_ = std::make_unique<ChromePDFPrintClient>(); - pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); -#endif - #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) spellcheck_ = std::make_unique<SpellCheck>(this); #endif @@ -311,14 +311,38 @@ void RendererClientBase::DidClearWindowObject( render_frame->GetWebFrame()->ExecuteScript(blink::WebScriptSource("void 0")); } +class ChromePdfInternalPluginDelegate final + : public pdf::PdfInternalPluginDelegate { + public: + ChromePdfInternalPluginDelegate() = default; + ChromePdfInternalPluginDelegate(const ChromePdfInternalPluginDelegate&) = + delete; + ChromePdfInternalPluginDelegate& operator=( + const ChromePdfInternalPluginDelegate&) = delete; + ~ChromePdfInternalPluginDelegate() override = default; + + // `pdf::PdfInternalPluginDelegate`: + bool IsAllowedOrigin(const url::Origin& origin) const override { + return origin.scheme() == extensions::kExtensionScheme && + origin.host() == extension_misc::kPdfExtensionId; + } +}; + bool RendererClientBase::OverrideCreatePlugin( content::RenderFrame* render_frame, const blink::WebPluginParams& params, blink::WebPlugin** plugin) { - if (params.mime_type.Utf8() == content::kBrowserPluginMimeType || #if BUILDFLAG(ENABLE_PDF_VIEWER) - params.mime_type.Utf8() == kPdfPluginMimeType || + if (params.mime_type.Utf8() == kPdfPluginMimeType) { + *plugin = pdf::CreateInternalPlugin( + std::move(params), render_frame, + std::make_unique<ChromePdfInternalPluginDelegate>()); + return true; + } #endif // BUILDFLAG(ENABLE_PDF_VIEWER) + + if (params.mime_type.Utf8() == content::kBrowserPluginMimeType || + params.mime_type.Utf8() == kPdfPluginMimeType || render_frame->GetBlinkPreferences().enable_plugins) return false; @@ -329,15 +353,7 @@ bool RendererClientBase::OverrideCreatePlugin( void RendererClientBase::GetSupportedKeySystems( media::GetSupportedKeySystemsCB cb) { #if defined(WIDEVINE_CDM_AVAILABLE) - key_systems_provider_.GetSupportedKeySystems(std::move(cb)); -#endif -} - -bool RendererClientBase::IsKeySystemsUpdateNeeded() { -#if defined(WIDEVINE_CDM_AVAILABLE) - return key_systems_provider_.IsKeySystemsUpdateNeeded(); -#else - return false; + GetChromeKeySystems(std::move(cb)); #endif } @@ -355,6 +371,27 @@ bool RendererClientBase::IsPluginHandledExternally( #if BUILDFLAG(ENABLE_PDF_VIEWER) DCHECK(plugin_element.HasHTMLTagName("object") || plugin_element.HasHTMLTagName("embed")); + if (mime_type == "application/x-google-chrome-pdf") { + if (IsPdfInternalPluginAllowedOrigin( + render_frame->GetWebFrame()->GetSecurityOrigin())) { + return true; + } + + content::WebPluginInfo info; + info.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS; + const char16_t kPDFExtensionPluginName[] = u"Chromium PDF Viewer"; + info.name = kPDFExtensionPluginName; + info.path = base::FilePath::FromUTF8Unsafe("internal-pdf-viewer"); + info.background_color = content::WebPluginInfo::kDefaultBackgroundColor; + info.mime_types.emplace_back("application/x-google-chrome-pdf", "pdf", + "Portable Document Format"); + return extensions::MimeHandlerViewContainerManager::Get( + content::RenderFrame::FromWebFrame( + plugin_element.GetDocument().GetFrame()), + true /* create_if_does_not_exist */) + ->CreateFrameContainer(plugin_element, original_url, mime_type, info); + } + // TODO(nornagon): this info should be shared with the data in // electron_content_client.cc / ComputeBuiltInPlugins. content::WebPluginInfo info; @@ -375,10 +412,19 @@ bool RendererClientBase::IsPluginHandledExternally( #endif } -bool RendererClientBase::IsOriginIsolatedPepperPlugin( - const base::FilePath& plugin_path) { - // Isolate all Pepper plugins, including the PDF plugin. - return true; +v8::Local<v8::Object> RendererClientBase::GetScriptableObject( + const blink::WebElement& plugin_element, + v8::Isolate* isolate) { + // If there is a MimeHandlerView that can provide the scriptable object then + // MaybeCreateMimeHandlerView must have been called before and a container + // manager should exist. + auto* container_manager = extensions::MimeHandlerViewContainerManager::Get( + content::RenderFrame::FromWebFrame( + plugin_element.GetDocument().GetFrame()), + false /* create_if_does_not_exist */); + if (container_manager) + return container_manager->GetScriptableObject(plugin_element, isolate); + return v8::Local<v8::Object>(); } std::unique_ptr<blink::WebPrescientNetworking> diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index d830c6db5f88f..821e7e2d6d2d3 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -16,12 +16,8 @@ // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // NOLINT(build/include_directory) -#if defined(WIDEVINE_CDM_AVAILABLE) -#include "chrome/renderer/media/chrome_key_systems_provider.h" // nogncheck -#endif - #if BUILDFLAG(ENABLE_PDF_VIEWER) -#include "chrome/renderer/pepper/chrome_pdf_print_client.h" // nogncheck +#include "components/pdf/renderer/internal_plugin_renderer_helpers.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) @@ -105,13 +101,14 @@ class RendererClientBase : public content::ContentRendererClient const blink::WebPluginParams& params, blink::WebPlugin** plugin) override; void GetSupportedKeySystems(media::GetSupportedKeySystemsCB cb) override; - bool IsKeySystemsUpdateNeeded() override; void DidSetUserAgent(const std::string& user_agent) override; bool IsPluginHandledExternally(content::RenderFrame* render_frame, const blink::WebElement& plugin_element, const GURL& original_url, const std::string& mime_type) override; - bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path) override; + v8::Local<v8::Object> GetScriptableObject( + const blink::WebElement& plugin_element, + v8::Isolate* isolate) override; void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override; void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override; @@ -152,9 +149,6 @@ class RendererClientBase : public content::ContentRendererClient std::unique_ptr<ElectronExtensionsRendererClient> extensions_renderer_client_; #endif -#if defined(WIDEVINE_CDM_AVAILABLE) - ChromeKeySystemsProvider key_systems_provider_; -#endif std::string renderer_client_id_; // An increasing ID used for identifying an V8 context in this process. int64_t next_context_id_ = 0; @@ -162,9 +156,6 @@ class RendererClientBase : public content::ContentRendererClient #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) std::unique_ptr<SpellCheck> spellcheck_; #endif -#if BUILDFLAG(ENABLE_PDF_VIEWER) - std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; -#endif }; } // namespace electron From f60ff18b1488b5ba28d930d22924816452a638e4 Mon Sep 17 00:00:00 2001 From: Robo <hop2deep@gmail.com> Date: Fri, 25 Mar 2022 12:48:23 +0900 Subject: [PATCH 172/811] fix: gn check when //printing component is disabled (#33429) --- 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 c5238cead782f..e4030acac92d4 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 b03d6dfba91733f8fed50da38f7a37b7c6be2f18 Mon Sep 17 00:00:00 2001 From: Calvin <clavin@users.noreply.github.com> Date: Fri, 25 Mar 2022 04:12:09 -0600 Subject: [PATCH 173/811] fix: non-client windows messages on legacy widget host (again) (#33438) --- ...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 5f83968390667..4f26f498c4d3a 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 3c5c880a337eb8f2a8f801e07b28f5232c1c17ad Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 06:01:13 -0700 Subject: [PATCH 174/811] Bump v19.0.0-nightly.20220325 --- 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 2090a0b04f329..1e24e0ad0902e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220324 \ No newline at end of file +19.0.0-nightly.20220325 \ No newline at end of file diff --git a/package.json b/package.json index 197c6c519779b..5fdbc7772f896 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220324", + "version": "19.0.0-nightly.20220325", "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 eea937658b6b5..9eda6b7763560 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 19,0,0,20220324 - PRODUCTVERSION 19,0,0,20220324 + FILEVERSION 19,0,0,20220325 + PRODUCTVERSION 19,0,0,20220325 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c11cd3c14c2f2517b2de482e553545702ce6ab57 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 12:35:32 -0500 Subject: [PATCH 175/811] chore: bump chromium to 102.0.4962.3 (main) (#33447) * chore: bump chromium in DEPS to 102.0.4962.3 * 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 +- ..._do_not_depend_on_packed_resource_integrity.patch | 12 ++++++------ patches/chromium/can_create_window.patch | 4 ++-- ...ctron_resources_not_chrome_for_spellchecker.patch | 4 ++-- ...n_notifythreadcreated_if_pcscan_is_disabled.patch | 2 +- ...client_sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- patches/chromium/webview_fullscreen.patch | 4 ++-- patches/v8/build_gn.patch | 6 +++--- patches/v8/dcheck.patch | 8 ++++---- ...do_not_export_private_v8_symbols_on_windows.patch | 2 +- .../v8/export_symbols_needed_for_windows_build.patch | 4 ++-- patches/v8/expose_mksnapshot.patch | 4 ++-- ...mplies_dcheck_for_node_stream_array_buffers.patch | 2 +- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/DEPS b/DEPS index 4aa74e7395add..00113fcca6410 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '102.0.4961.0', + '102.0.4962.3', 'node_version': 'v16.14.2', 'nan_version': 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 e3a17bcbab19f..d6d7b7c762219 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 @@ -33,7 +33,7 @@ index a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015..95a7e70eee0303471702b81c68f46a0f "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index fca255a2cd49f1f5d2bcb4418b04355c5befba38..2a0f3edc10a7ba48ee5a0efac0a6053f62b184e0 100644 +index 5bbb64d83e2024feeb7a2eae45f6b8e937fc927c..20004fb890e726d11dc672894cdba4645b0a3606 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -4508,7 +4508,7 @@ static_library("browser") { @@ -46,10 +46,10 @@ index fca255a2cd49f1f5d2bcb4418b04355c5befba38..2a0f3edc10a7ba48ee5a0efac0a6053f sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 3a3318c9586c88af0333d1b7586cbb426c205e7d..183d0c8ceb42a23424c3aa6d21c72e0a197ae638 100644 +index 3d7606b8d7d5f1ec61c9c00be0cc530967985e4b..044b52e00d8b334e90a9f1126b5bc3df916a1af3 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5904,7 +5904,6 @@ test("unit_tests") { +@@ -5907,7 +5907,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 3a3318c9586c88af0333d1b7586cbb426c205e7d..183d0c8ceb42a23424c3aa6d21c72e0a "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5927,6 +5926,10 @@ test("unit_tests") { +@@ -5930,6 +5929,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 3a3318c9586c88af0333d1b7586cbb426c205e7d..183d0c8ceb42a23424c3aa6d21c72e0a ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6616,7 +6619,6 @@ test("unit_tests") { +@@ -6619,7 +6622,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 3a3318c9586c88af0333d1b7586cbb426c205e7d..183d0c8ceb42a23424c3aa6d21c72e0a "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6662,6 +6664,11 @@ test("unit_tests") { +@@ -6664,6 +6666,11 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 278d3581d311a..21f6a27357742 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 20b9d7cd590361b176298e24b5aac6f546acb518..a6ed7b9f89b7fca2c6a6676053d520ba6c7716d7 100644 +index dc75ab59ff7af972c950a9be682ebd9cddce2627..a969bbaaecb4b589808413d40299b68f3bc1fd3e 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6866,6 +6866,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6880,6 +6880,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To<Referrer>(), params->frame_name, params->disposition, *params->features, 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 10a9d5dbeb4c8..5c092bf9ad23d 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 863c9e088c2d967506a9fabd044d7b08cc8bee23..fca255a2cd49f1f5d2bcb4418b04355c5befba38 100644 +index 5f43b35aab6c2f277f0d021b378bee55f97572aa..5bbb64d83e2024feeb7a2eae45f6b8e937fc927c 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7123,6 +7123,7 @@ static_library("browser") { +@@ -7126,6 +7126,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", 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 692ebe4ddcdb1..8665613a56588 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,7 +6,7 @@ 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 60a33e1501b58d486217d934de6f5c2c392e01bb..3b9ccdf82c6be5b12d32f053bedc5c6d1cd4bc0e 100644 +index d871ceecd76e21b23c500643363ced2ca87e8013..e0a26a90ee38342aefdbdd76e9c56a932b214235 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc @@ -66,7 +66,7 @@ void MemoryReclaimer::Reclaim(int flags) { 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 c558d7e41b89e..13e3eec7f04d0 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 ceeeedc42d9fe86383f9fda2b1a26d39119e655c..ff3b3cb47cbce01bcdcb28f1ef8a360143b2488f 100755 +index 8cf820d7d1f5d9e85156a18e9ec573dbeb63d41a..a7d6ea676aaba90220761fa7ecc4569012806581 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 87438368253cc..4eb68495cc7ec 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 a6ed7b9f89b7fca2c6a6676053d520ba6c7716d7..dd8c421545d75cd8c9864b88701e0f9071259444 100644 +index a969bbaaecb4b589808413d40299b68f3bc1fd3e..6e5d3ae228b98295bd95bad3cc58215a13c20106 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6253,6 +6253,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6267,6 +6267,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index dbd23d4d3ed74..6cc87c66110b0 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 076b75e2e5b3465ab3115f7186296c34f59480fc..7eaa7582fc1efc2381c267fec96fe94d274f922b 100644 +index 8a09944249fb0c9ee77c49ed018d6e145265df6b..0fdbf62eae3e5bc2d3b16a2084a59ba9c394446f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,7 +605,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 076b75e2e5b3465ab3115f7186296c34f59480fc..7eaa7582fc1efc2381c267fec96fe94d defines += [ "BUILDING_V8_SHARED" ] } -@@ -5819,7 +5819,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5818,7 +5818,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 076b75e2e5b3465ab3115f7186296c34f59480fc..7eaa7582fc1efc2381c267fec96fe94d deps = [ ":v8_libbase", -@@ -5857,6 +5857,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5856,6 +5856,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 1db85681252e3..df2d1239081be 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 f0f1355f590b37d4b0ff1b68124165ab61099cc1..15d94af6d969f93cefb21d82ddb7d508320bea30 100644 +index e5a0e9fc7655bcc2359578e299b64952d6daa8a8..f15ccd03bc500b9a0095cb8581c6ffc143b29710 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9088,7 +9088,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9080,7 +9080,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index f0f1355f590b37d4b0ff1b68124165ab61099cc1..15d94af6d969f93cefb21d82ddb7d508 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index ccef6add27d782845a404741e4a42d07c86d0222..659f5187f80f74b3902facebe8f34d8898244093 100644 +index f0ba31671416f1d77d3b1a5ecb76a0dd3954c8c2..0436b896522b31904512694d20f883470a646a0f 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6152,9 +6152,9 @@ void Heap::TearDown() { +@@ -6151,9 +6151,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 bb775eb8c65e1..6fff7c78b7faf 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,7 +12,7 @@ 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 5338cdfd2067f1621ecb63ce8b8d1111e3677377..1f876cec9c66c2d92662c235ab5c9c608c242a37 100644 +index 2262d19f0f9ced2c9e69862252d94ecb885c839f..2e5dcdd037f29cf51b2ff5d325a43036c8713f33 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,6 +605,10 @@ config("internal_config") { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index c2e6211db28bb..1cbc270ca4e70 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 d57ad0a847ed1903228db4fb0650e1ca2922b608..de8947cb558455537e251f66cc3fe4f2f08c640b 100644 +index 1e3950ab2292ce6a3e6a4e469d8327da28f2d899..5e9b17acc59590147d8b3e2d74f62050e6b5a7ec 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -910,7 +910,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -911,7 +911,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 452d901cd2707..d1c6b34213e4c 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 7eaa7582fc1efc2381c267fec96fe94d274f922b..5338cdfd2067f1621ecb63ce8b8d1111e3677377 100644 +index 0fdbf62eae3e5bc2d3b16a2084a59ba9c394446f..2262d19f0f9ced2c9e69862252d94ecb885c839f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5831,7 +5831,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5830,7 +5830,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { 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 ce960703ace71..563444f217760 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 cd760b9e67820c6ab69164992bccf19411cf1db6..f28258bf1b797c2a2d904e25802a17b14ad0c19a 100644 +index f2563ef61d3f5bc2d866f8c3366ca6c9ef8357a6..ed6180e28467df90ed8d91093ae9269a24e919db 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<BackingStore> backing_store) { From d4a34fb175858b91f50b9dd7a125be3c7c26aca1 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:02:03 -0700 Subject: [PATCH 176/811] Bump v19.0.0-nightly.20220328 --- 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 1e24e0ad0902e..d10e2a276be81 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220325 \ No newline at end of file +19.0.0-nightly.20220328 \ No newline at end of file diff --git a/package.json b/package.json index 5fdbc7772f896..7cc43408a42fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220325", + "version": "19.0.0-nightly.20220328", "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 9eda6b7763560..8826798177c3c 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 19,0,0,20220325 - PRODUCTVERSION 19,0,0,20220325 + FILEVERSION 19,0,0,20220328 + PRODUCTVERSION 19,0,0,20220328 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9e45a1cd51397c9c3eecb3988877dee75ff0e283 Mon Sep 17 00:00:00 2001 From: Sofia Nguy <sofianguy@gmail.com> Date: Mon, 28 Mar 2022 09:30:05 -0700 Subject: [PATCH 177/811] docs: Update release dates for E19 and fix typos (#33464) --- docs/tutorial/electron-timelines.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/tutorial/electron-timelines.md b/docs/tutorial/electron-timelines.md index 80ac4ca66eeb4..91ea556110ee1 100644 --- a/docs/tutorial/electron-timelines.md +++ b/docs/tutorial/electron-timelines.md @@ -22,23 +22,23 @@ check out our [Electron Versioning](./electron-versioning.md) doc. | 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | M89 | v14.16 | 🚫 | | 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | M91 | v14.16 | 🚫 | | 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 | 🚫 | +| 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 | v16.13 | ✅ | -| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | TBD | ✅ | -| 19.0.0 | 2022-Mar-31 | 2022-Apr-30 | 2022-May-24 | M102 | TBD | ✅ | +| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | v16.13 | ✅ | +| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | TBD | ✅ | **Notes:** -* The `-beta.1` and `stable` dates are our solid release dates. -* We strive for weekly beta releases, but we often release more betas than scheduled. +* The `-alpha.1`, `-beta.1`, and `stable` dates are our solid release dates. +* We strive for weekly alpha/beta releases, but we often release more than scheduled. * All dates are our goals but there may be reasons for adjusting the stable deadline, such as security bugs. **Historical changes:** * Since Electron 5, Electron has been publicizing its release dates ([see blog post](https://electronjs.org/blog/electron-5-0-timeline)). -* Since Electron 6, Electron major versions have been targeting every other Chromium major version. Each Electron stable should happen on the same day as Chrome stable ([see blog post](https://www.electronjs.org/blog/12-week-cadence)). When this was announced -* Since Electron 16, Electron has been releasing major versions on an 8-week cadence in accordance to Chrome's change to a 4-week release cadence ([see blog post](https://www.electronjs.org/blog/8-week-cadence). +* Since Electron 6, Electron major versions have been targeting every other Chromium major version. Each Electron stable should happen on the same day as Chrome stable ([see blog post](https://www.electronjs.org/blog/12-week-cadence)). +* Since Electron 16, Electron has been releasing major versions on an 8-week cadence in accordance to Chrome's change to a 4-week release cadence ([see blog post](https://www.electronjs.org/blog/8-week-cadence)). :::info Chrome release dates From 1153a5ce5a34b553466b0da563831ff59cc6d328 Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Mon, 28 Mar 2022 18:47:08 +0200 Subject: [PATCH 178/811] fix: BrowserView background color in webContents (#33435) * chore: fix BrowserView background color in webContents * disable screen capture test on linux * spec: fix platform failure condition --- .../browser/api/electron_api_browser_view.cc | 19 ++++++- .../browser/api/electron_api_web_contents.cc | 10 ++-- spec-main/api-browser-view-spec.ts | 55 ++++++++++++++++++- 3 files changed, 77 insertions(+), 7 deletions(-) diff --git a/shell/browser/api/electron_api_browser_view.cc b/shell/browser/api/electron_api_browser_view.cc index 1a9735cef11e3..18bbdea9c23ed 100644 --- a/shell/browser/api/electron_api_browser_view.cc +++ b/shell/browser/api/electron_api_browser_view.cc @@ -6,10 +6,13 @@ #include <vector> +#include "content/browser/renderer_host/render_widget_host_view_base.h" // nogncheck +#include "content/public/browser/render_widget_host_view.h" #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/browser.h" #include "shell/browser/native_browser_view.h" #include "shell/browser/ui/drag_util.h" +#include "shell/browser/web_contents_preferences.h" #include "shell/common/color_util.h" #include "shell/common/gin_converters/gfx_converter.h" #include "shell/common/gin_helper/dictionary.h" @@ -154,11 +157,25 @@ gfx::Rect BrowserView::GetBounds() { } void BrowserView::SetBackgroundColor(const std::string& color_name) { - view_->SetBackgroundColor(ParseCSSColor(color_name)); + SkColor color = ParseCSSColor(color_name); + view_->SetBackgroundColor(color); if (web_contents()) { auto* wc = web_contents()->web_contents(); wc->SetPageBaseBackgroundColor(ParseCSSColor(color_name)); + + auto* const rwhv = wc->GetRenderWidgetHostView(); + if (rwhv) { + rwhv->SetBackgroundColor(color); + static_cast<content::RenderWidgetHostViewBase*>(rwhv) + ->SetContentBackgroundColor(color); + } + + // Ensure new color is stored in webPreferences, otherwise + // the color will be reset on the next load via HandleNewRenderFrame. + auto* web_preferences = WebContentsPreferences::From(wc); + if (web_preferences) + web_preferences->SetBackgroundColor(color); } } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index e4030acac92d4..714d0d60c6076 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1489,11 +1489,13 @@ void WebContents::HandleNewRenderFrame( // Set the background color of RenderWidgetHostView. auto* web_preferences = WebContentsPreferences::From(web_contents()); if (web_preferences) { + absl::optional<SkColor> maybe_color = web_preferences->GetBackgroundColor(); + web_contents()->SetPageBaseBackgroundColor(maybe_color); + bool guest = IsGuest() || type_ == Type::kBrowserView; - absl::optional<SkColor> color = - guest ? SK_ColorTRANSPARENT : web_preferences->GetBackgroundColor(); - web_contents()->SetPageBaseBackgroundColor(color); - SetBackgroundColor(rwhv, color.value_or(SK_ColorWHITE)); + SkColor color = + maybe_color.value_or(guest ? SK_ColorTRANSPARENT : SK_ColorWHITE); + SetBackgroundColor(rwhv, color); } if (!background_throttling_) diff --git a/spec-main/api-browser-view-spec.ts b/spec-main/api-browser-view-spec.ts index 8d54b9efe1cae..3352c06e991a4 100644 --- a/spec-main/api-browser-view-spec.ts +++ b/spec-main/api-browser-view-spec.ts @@ -1,9 +1,10 @@ import { expect } from 'chai'; import * as path from 'path'; import { emittedOnce } from './events-helpers'; -import { BrowserView, BrowserWindow, webContents } from 'electron/main'; +import { BrowserView, BrowserWindow, screen, webContents } from 'electron/main'; import { closeWindow } from './window-helpers'; -import { defer, startRemoteControlApp } from './spec-helpers'; +import { defer, ifit, startRemoteControlApp } from './spec-helpers'; +import { areColorsSimilar, captureScreen, getPixelColor } from './screen-helpers'; describe('BrowserView module', () => { const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures'); @@ -60,6 +61,56 @@ describe('BrowserView module', () => { view.setBackgroundColor(null as any); }).to.throw(/conversion failure/); }); + + // Linux and arm64 platforms (WOA and macOS) do not return any capture sources + ifit(process.platform !== 'linux' && process.arch !== 'arm64')('sets the background color to transparent if none is set', async () => { + const display = screen.getPrimaryDisplay(); + const WINDOW_BACKGROUND_COLOR = '#55ccbb'; + + w.show(); + w.setBounds(display.bounds); + w.setBackgroundColor(WINDOW_BACKGROUND_COLOR); + await w.loadURL('about:blank'); + + view = new BrowserView(); + view.setBounds(display.bounds); + w.setBrowserView(view); + await view.webContents.loadURL('data:text/html,hello there'); + + const screenCapture = await captureScreen(); + const centerColor = getPixelColor(screenCapture, { + x: display.size.width / 2, + y: display.size.height / 2 + }); + + expect(areColorsSimilar(centerColor, WINDOW_BACKGROUND_COLOR)).to.be.true(); + }); + + // Linux and arm64 platforms (WOA and macOS) do not return any capture sources + ifit(process.platform !== 'linux' && process.arch !== 'arm64')('successfully applies the background color', async () => { + const WINDOW_BACKGROUND_COLOR = '#55ccbb'; + const VIEW_BACKGROUND_COLOR = '#ff00ff'; + const display = screen.getPrimaryDisplay(); + + w.show(); + w.setBounds(display.bounds); + w.setBackgroundColor(WINDOW_BACKGROUND_COLOR); + await w.loadURL('about:blank'); + + view = new BrowserView(); + view.setBounds(display.bounds); + w.setBrowserView(view); + w.setBackgroundColor(VIEW_BACKGROUND_COLOR); + await view.webContents.loadURL('data:text/html,hello there'); + + const screenCapture = await captureScreen(); + const centerColor = getPixelColor(screenCapture, { + x: display.size.width / 2, + y: display.size.height / 2 + }); + + expect(areColorsSimilar(centerColor, VIEW_BACKGROUND_COLOR)).to.be.true(); + }); }); describe('BrowserView.setAutoResize()', () => { From cdf2b3f4e48799c3a6ab91d0d70b5aaaf3a44c0a Mon Sep 17 00:00:00 2001 From: Marek Rusinowski <marekrusinowski@gmail.com> Date: Mon, 28 Mar 2022 18:48:50 +0200 Subject: [PATCH 179/811] fix: calling of X11 functions when running under Wayland (#33355) * fix: don't call X11 functions in file dialog and message box * refactor: remove unused GtkUiPlatform declaration * fix: set gtk darktheme only when running under X11 * fix: replace X11 window state watcher with implementation using ozone * fix: make sure global menu barr is used only when supported * fix: don't call X11 function in native window views under wayland * style: fix lint issues * fix: use GtkUiPlatform::ShowGtkWindow instead of gtk_window_present directly * refactor: extract CreateGlobalMenuBar into separate function * refactor: move checking for WaylandWindowDecorations inside class * fix: check if we run under X11 only in ozone build * refactor: drop including unused ui/base/ui_base_features.h header * fix: modify ui_gtk_public_header.patch to also export gtk_ui.h * fix: refactor guarding of X11 calls - Introduce patch exposing new electron_can_call_x11 property - Replace defined(USE_OZONE) with BUILDFLAG(OZONE_PLATFORM_X11) flags * fix: remove the last remaining usage of USE_X11 * fix: usage of BUILDFLAG(OZONE_PLATFORM_X11) not building on non ozone * fix: call UpdateWindowState from OnBoundsChanged only under X11 --- BUILD.gn | 1 - filenames.gni | 2 - patches/chromium/.patches | 1 + ...tform_electron_can_call_x11_property.patch | 37 +++ patches/chromium/ui_gtk_public_header.patch | 20 +- shell/browser/electron_browser_main_parts.h | 6 - shell/browser/native_window.cc | 2 +- shell/browser/native_window_views.cc | 255 ++++++++++-------- shell/browser/native_window_views.h | 15 +- ...electron_desktop_window_tree_host_linux.cc | 73 ++++- .../electron_desktop_window_tree_host_linux.h | 3 + shell/browser/ui/file_dialog_gtk.cc | 18 +- shell/browser/ui/gtk/menu_util.cc | 30 ++- shell/browser/ui/message_box_gtk.cc | 16 +- shell/browser/ui/x/window_state_watcher.cc | 82 ------ shell/browser/ui/x/window_state_watcher.h | 45 ---- 16 files changed, 301 insertions(+), 305 deletions(-) create mode 100644 patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch delete mode 100644 shell/browser/ui/x/window_state_watcher.cc delete mode 100644 shell/browser/ui/x/window_state_watcher.h diff --git a/BUILD.gn b/BUILD.gn index 013b61c740ea3..b8a6396c4f4e8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -563,7 +563,6 @@ source_set("electron_lib") { defines += [ # Disable warnings for g_settings_list_schemas. "GLIB_DISABLE_DEPRECATION_WARNINGS", - "USE_X11=1", ] sources += [ diff --git a/filenames.gni b/filenames.gni index eae36f790483d..f7c6ce5dff438 100644 --- a/filenames.gni +++ b/filenames.gni @@ -53,8 +53,6 @@ filenames = { "shell/browser/ui/views/global_menu_bar_x11.h", "shell/browser/ui/x/event_disabler.cc", "shell/browser/ui/x/event_disabler.h", - "shell/browser/ui/x/window_state_watcher.cc", - "shell/browser/ui/x/window_state_watcher.h", "shell/browser/ui/x/x_window_utils.cc", "shell/browser/ui/x/x_window_utils.h", ] diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 2b208694ba35a..901b355c9245a 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -114,3 +114,4 @@ port_autofill_colors_to_the_color_pipeline.patch build_disable_partition_alloc_on_mac.patch fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch build_make_libcxx_abi_unstable_false_for_electron.patch +introduce_ozoneplatform_electron_can_call_x11_property.patch diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch new file mode 100644 index 0000000000000..f879002345cc1 --- /dev/null +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Marek Rusinowski <marekrusinowski@gmail.com> +Date: Wed, 23 Mar 2022 21:09:37 +0100 +Subject: introduce OzonePlatform::electron_can_call_x11 property + +We expose this additonal property in the OzonePlatform to be able to easily +determine whatever we can call X11 functions without crashing the application +at rutime. It would be best if eventually all usages of this property were +replaced with clean ozone native implementations. + +diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc +index 9008af973427d7dab8170449bc5767cebc9d2e9e..e312287e4aca61b51a69c8413088f56f9f704b5e 100644 +--- a/ui/ozone/platform/x11/ozone_platform_x11.cc ++++ b/ui/ozone/platform/x11/ozone_platform_x11.cc +@@ -200,6 +200,7 @@ class OzonePlatformX11 : public OzonePlatform, + properties->supports_vulkan_swap_chain = true; + properties->uses_external_vulkan_image_factory = true; + properties->skia_can_fall_back_to_x11 = true; ++ properties->electron_can_call_x11 = true; + properties->platform_shows_drag_image = false; + properties->supports_global_application_menus = true; + properties->app_modal_dialogs_use_event_blocker = true; +diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h +index 22ba32317a74df24249d1528dcaaa28ff18bd0f4..fa57f97520a0327be2c7f5179591ca61b801c8b0 100644 +--- a/ui/ozone/public/ozone_platform.h ++++ b/ui/ozone/public/ozone_platform.h +@@ -132,6 +132,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { + // Linux only: determines if Skia can fall back to the X11 output device. + bool skia_can_fall_back_to_x11 = false; + ++ // Linux only: determines is Electron can call selected X11 functions while ++ // it migrates to pure ozone abstractions. ++ bool electron_can_call_x11 = false; ++ + // Wayland only: determines whether windows which are not top level ones + // should be given parents explicitly. + bool set_parent_for_non_top_level_windows = false; diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index f54224072007c..12f9984100bd6 100644 --- a/patches/chromium/ui_gtk_public_header.patch +++ b/patches/chromium/ui_gtk_public_header.patch @@ -3,22 +3,32 @@ From: deepak1556 <hop2deep@gmail.com> Date: Fri, 10 Apr 2020 17:47:18 -0700 Subject: ui_gtk_public_header.patch -Allow electron to depend on //ui/gtk/gtk_util.h +Allow electron to depend on gtk_util.h and gtk_ui.h from //ui/gtk/ diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index 4093df78da0bbb1d8df743942f364cf728ad3414..2f31d99b207ffc3531b5334b5a01239cc1fefb35 100644 +index 4093df78da0bbb1d8df743942f364cf728ad3414..2f7c404307bfebb0e2890148cf9b0d6d9c68094f 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn -@@ -69,7 +69,7 @@ generate_stubs("gtk_stubs") { +@@ -69,7 +69,11 @@ generate_stubs("gtk_stubs") { } component("gtk") { - public = [ "gtk_ui_factory.h" ] -+ public = [ "gtk_ui_factory.h", "gtk_util.h" ] ++ public = [ ++ "gtk_ui.h", ++ "gtk_ui_factory.h", ++ "gtk_util.h", ++ ] sources = [ "gtk_color_mixers.cc", -@@ -85,7 +85,6 @@ component("gtk") { +@@ -79,13 +83,11 @@ component("gtk") { + "gtk_key_bindings_handler.cc", + "gtk_key_bindings_handler.h", + "gtk_ui.cc", +- "gtk_ui.h", + "gtk_ui_factory.cc", + "gtk_ui_platform.h", "gtk_ui_platform_stub.cc", "gtk_ui_platform_stub.h", "gtk_util.cc", diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index d8e49529e5641..e41097ef35826 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -36,12 +36,6 @@ class Screen; } #endif -#if defined(USE_X11) -namespace ui { -class GtkUiPlatform; -} -#endif - namespace device { class GeolocationManager; } diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index b62ce2f617055..1ca962fa92746 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -26,7 +26,7 @@ #include "ui/display/win/screen_win.h" #endif -#if defined(USE_OZONE) || defined(USE_X11) +#if defined(USE_OZONE) #include "ui/base/ui_base_features.h" #include "ui/ozone/public/ozone_platform.h" #endif diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 87d9dd1616627..f542365e290df 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -19,7 +19,6 @@ #include "content/public/browser/desktop_media_id.h" #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/native_browser_view_views.h" -#include "shell/browser/native_window_features.h" #include "shell/browser/ui/drag_util.h" #include "shell/browser/ui/inspectable_web_contents.h" #include "shell/browser/ui/inspectable_web_contents_view.h" @@ -55,20 +54,16 @@ #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #include "ui/views/window/native_frame_view.h" -#if defined(USE_X11) +#if defined(USE_OZONE) #include "shell/browser/ui/views/global_menu_bar_x11.h" #include "shell/browser/ui/x/event_disabler.h" -#include "shell/browser/ui/x/window_state_watcher.h" #include "shell/browser/ui/x/x_window_utils.h" #include "ui/base/x/x11_util.h" #include "ui/gfx/x/shape.h" #include "ui/gfx/x/x11_atom_cache.h" #include "ui/gfx/x/xproto.h" #include "ui/gfx/x/xproto_util.h" -#endif - -#if defined(USE_OZONE) || defined(USE_X11) -#include "ui/base/ui_base_features.h" +#include "ui/ozone/public/ozone_platform.h" #endif #elif BUILDFLAG(IS_WIN) @@ -130,6 +125,26 @@ gfx::Rect DIPToScreenRect(HWND hwnd, const gfx::Rect& pixel_bounds) { #endif +#if defined(USE_OZONE) + +bool CreateGlobalMenuBar() { + return ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .supports_global_application_menus; +} + +#endif + +#if defined(USE_OZONE_PLATFORM_X11) + +bool IsX11() { + return ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .electron_can_call_x11; +} + +#endif + class NativeWindowClientView : public views::ClientView { public: NativeWindowClientView(views::Widget* widget, @@ -257,12 +272,10 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, params.wm_class_name = base::ToLowerASCII(name); params.wm_class_class = name; - if (base::FeatureList::IsEnabled(features::kWaylandWindowDecorations)) { - auto* native_widget = new views::DesktopNativeWidgetAura(widget()); - params.native_widget = native_widget; - params.desktop_window_tree_host = - new ElectronDesktopWindowTreeHostLinux(this, native_widget); - } + auto* native_widget = new views::DesktopNativeWidgetAura(widget()); + params.native_widget = native_widget; + params.desktop_window_tree_host = + new ElectronDesktopWindowTreeHostLinux(this, native_widget); #endif widget()->Init(std::move(params)); @@ -274,55 +287,52 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, std::string window_type; options.Get(options::kType, &window_type); -#if defined(USE_X11) - // Start monitoring window states. - window_state_watcher_ = std::make_unique<WindowStateWatcher>(this); - +#if BUILDFLAG(IS_LINUX) // Set _GTK_THEME_VARIANT to dark if we have "dark-theme" option set. bool use_dark_theme = false; if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) { SetGTKDarkThemeEnabled(use_dark_theme); } -#endif -#if BUILDFLAG(IS_LINUX) if (parent) SetParentWindow(parent); #endif -#if defined(USE_X11) - // TODO(ckerr): remove in Electron v20.0.0 - // Before the window is mapped the SetWMSpecState can not work, so we have - // to manually set the _NET_WM_STATE. - std::vector<x11::Atom> state_atom_list; - bool skip_taskbar = false; - if (options.Get(options::kSkipTaskbar, &skip_taskbar) && skip_taskbar) { - state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR")); - } +#if defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + // TODO(ckerr): remove in Electron v20.0.0 + // Before the window is mapped the SetWMSpecState can not work, so we have + // to manually set the _NET_WM_STATE. + std::vector<x11::Atom> state_atom_list; + bool skip_taskbar = false; + if (options.Get(options::kSkipTaskbar, &skip_taskbar) && skip_taskbar) { + state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR")); + } - // Before the window is mapped, there is no SHOW_FULLSCREEN_STATE. - if (fullscreen) { - state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_FULLSCREEN")); - } + // Before the window is mapped, there is no SHOW_FULLSCREEN_STATE. + if (fullscreen) { + state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_FULLSCREEN")); + } - if (parent) { - // Force using dialog type for child window. - window_type = "dialog"; + if (parent) { + // Force using dialog type for child window. + window_type = "dialog"; - // Modal window needs the _NET_WM_STATE_MODAL hint. - if (is_modal()) - state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_MODAL")); - } + // Modal window needs the _NET_WM_STATE_MODAL hint. + if (is_modal()) + state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_MODAL")); + } - if (!state_atom_list.empty()) - SetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()), - x11::GetAtom("_NET_WM_STATE"), x11::Atom::ATOM, - state_atom_list); + if (!state_atom_list.empty()) + SetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()), + x11::GetAtom("_NET_WM_STATE"), x11::Atom::ATOM, + state_atom_list); - // Set the _NET_WM_WINDOW_TYPE. - if (!window_type.empty()) - SetWindowType(static_cast<x11::Window>(GetAcceleratedWidget()), - window_type); + // Set the _NET_WM_WINDOW_TYPE. + if (!window_type.empty()) + SetWindowType(static_cast<x11::Window>(GetAcceleratedWidget()), + window_type); + } #endif #if BUILDFLAG(IS_WIN) @@ -419,11 +429,13 @@ NativeWindowViews::~NativeWindowViews() { } void NativeWindowViews::SetGTKDarkThemeEnabled(bool use_dark_theme) { -#if defined(USE_X11) - const std::string color = use_dark_theme ? "dark" : "light"; - x11::SetStringProperty(static_cast<x11::Window>(GetAcceleratedWidget()), - x11::GetAtom("_GTK_THEME_VARIANT"), - x11::GetAtom("UTF8_STRING"), color); +#if defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + const std::string color = use_dark_theme ? "dark" : "light"; + x11::SetStringProperty(static_cast<x11::Window>(GetAcceleratedWidget()), + x11::GetAtom("_GTK_THEME_VARIANT"), + x11::GetAtom("UTF8_STRING"), color); + } #endif } @@ -478,7 +490,7 @@ void NativeWindowViews::Show() { NotifyWindowShow(); -#if defined(USE_X11) +#if defined(USE_OZONE) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); #endif @@ -489,7 +501,7 @@ void NativeWindowViews::ShowInactive() { NotifyWindowShow(); -#if defined(USE_X11) +#if defined(USE_OZONE) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); #endif @@ -503,7 +515,7 @@ void NativeWindowViews::Hide() { NotifyWindowHide(); -#if defined(USE_X11) +#if defined(USE_OZONE) if (global_menu_bar_) global_menu_bar_->OnWindowUnmapped(); #endif @@ -525,8 +537,9 @@ bool NativeWindowViews::IsEnabled() { #if BUILDFLAG(IS_WIN) return ::IsWindowEnabled(GetAcceleratedWidget()); #elif BUILDFLAG(IS_LINUX) -#if defined(USE_X11) - return !event_disabler_.get(); +#if defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) + return !event_disabler_.get(); #endif NOTIMPLEMENTED(); return true; @@ -565,16 +578,18 @@ void NativeWindowViews::SetEnabledInternal(bool enable) { #if BUILDFLAG(IS_WIN) ::EnableWindow(GetAcceleratedWidget(), enable); -#elif defined(USE_X11) - views::DesktopWindowTreeHostPlatform* tree_host = - views::DesktopWindowTreeHostLinux::GetHostForWidget( - GetAcceleratedWidget()); - if (enable) { - tree_host->RemoveEventRewriter(event_disabler_.get()); - event_disabler_.reset(); - } else { - event_disabler_ = std::make_unique<EventDisabler>(); - tree_host->AddEventRewriter(event_disabler_.get()); +#elif defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + views::DesktopWindowTreeHostPlatform* tree_host = + views::DesktopWindowTreeHostLinux::GetHostForWidget( + GetAcceleratedWidget()); + if (enable) { + tree_host->RemoveEventRewriter(event_disabler_.get()); + event_disabler_.reset(); + } else { + event_disabler_ = std::make_unique<EventDisabler>(); + tree_host->AddEventRewriter(event_disabler_.get()); + } } #endif } @@ -798,12 +813,14 @@ bool NativeWindowViews::MoveAbove(const std::string& sourceId) { ::SetWindowPos(GetAcceleratedWidget(), GetWindow(otherWindow, GW_HWNDPREV), 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); -#elif defined(USE_X11) - if (!IsWindowValid(static_cast<x11::Window>(id.id))) - return false; +#elif defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + if (!IsWindowValid(static_cast<x11::Window>(id.id))) + return false; - electron::MoveWindowAbove(static_cast<x11::Window>(GetAcceleratedWidget()), - static_cast<x11::Window>(id.id)); + electron::MoveWindowAbove(static_cast<x11::Window>(GetAcceleratedWidget()), + static_cast<x11::Window>(id.id)); + } #endif return true; @@ -818,9 +835,10 @@ void NativeWindowViews::MoveTop() { ::SetWindowPos(GetAcceleratedWidget(), HWND_TOP, pos.x(), pos.y(), size.width(), size.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); -#elif defined(USE_X11) - electron::MoveWindowToForeground( - static_cast<x11::Window>(GetAcceleratedWidget())); +#elif defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) + electron::MoveWindowToForeground( + static_cast<x11::Window>(GetAcceleratedWidget())); #endif } @@ -1002,9 +1020,10 @@ void NativeWindowViews::SetSkipTaskbar(bool skip) { taskbar->AddTab(GetAcceleratedWidget()); taskbar_host_.RestoreThumbarButtons(GetAcceleratedWidget()); } -#elif defined(USE_X11) - SetWMSpecState(static_cast<x11::Window>(GetAcceleratedWidget()), skip, - x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR")); +#elif defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) + SetWMSpecState(static_cast<x11::Window>(GetAcceleratedWidget()), skip, + x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR")); #endif } @@ -1104,24 +1123,28 @@ void NativeWindowViews::SetIgnoreMouseEvents(bool ignore, bool forward) { } else { SetForwardMouseMessages(forward); } -#elif defined(USE_X11) - auto* connection = x11::Connection::Get(); - if (ignore) { - x11::Rectangle r{0, 0, 1, 1}; - connection->shape().Rectangles({ - .operation = x11::Shape::So::Set, - .destination_kind = x11::Shape::Sk::Input, - .ordering = x11::ClipOrdering::YXBanded, - .destination_window = static_cast<x11::Window>(GetAcceleratedWidget()), - .rectangles = {r}, - }); - } else { - connection->shape().Mask({ - .operation = x11::Shape::So::Set, - .destination_kind = x11::Shape::Sk::Input, - .destination_window = static_cast<x11::Window>(GetAcceleratedWidget()), - .source_bitmap = x11::Pixmap::None, - }); +#elif defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + auto* connection = x11::Connection::Get(); + if (ignore) { + x11::Rectangle r{0, 0, 1, 1}; + connection->shape().Rectangles({ + .operation = x11::Shape::So::Set, + .destination_kind = x11::Shape::Sk::Input, + .ordering = x11::ClipOrdering::YXBanded, + .destination_window = + static_cast<x11::Window>(GetAcceleratedWidget()), + .rectangles = {r}, + }); + } else { + connection->shape().Mask({ + .operation = x11::Shape::So::Set, + .destination_kind = x11::Shape::Sk::Input, + .destination_window = + static_cast<x11::Window>(GetAcceleratedWidget()), + .source_bitmap = x11::Pixmap::None, + }); + } } #endif } @@ -1168,7 +1191,7 @@ bool NativeWindowViews::IsFocusable() { } void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) { -#if defined(USE_X11) +#if defined(USE_OZONE) // Remove global menu bar. if (global_menu_bar_ && menu_model == nullptr) { global_menu_bar_.reset(); @@ -1177,7 +1200,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) { } // Use global application menu bar when possible. - if (ShouldUseGlobalMenuBar()) { + if (CreateGlobalMenuBar() && ShouldUseGlobalMenuBar()) { if (!global_menu_bar_) global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this); if (global_menu_bar_->IsServerStarted()) { @@ -1264,12 +1287,13 @@ void NativeWindowViews::SetTopBrowserView(NativeBrowserView* view) { void NativeWindowViews::SetParentWindow(NativeWindow* parent) { NativeWindow::SetParentWindow(parent); -#if defined(USE_X11) - x11::SetProperty( - static_cast<x11::Window>(GetAcceleratedWidget()), - x11::Atom::WM_TRANSIENT_FOR, x11::Atom::WINDOW, - parent ? static_cast<x11::Window>(parent->GetAcceleratedWidget()) - : ui::GetX11RootWindow()); +#if defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) + x11::SetProperty( + static_cast<x11::Window>(GetAcceleratedWidget()), + x11::Atom::WM_TRANSIENT_FOR, x11::Atom::WINDOW, + parent ? static_cast<x11::Window>(parent->GetAcceleratedWidget()) + : ui::GetX11RootWindow()); #elif BUILDFLAG(IS_WIN) // To set parentship between windows into Windows is better to play with the // owner instead of the parent, as Windows natively seems to do if a parent @@ -1347,18 +1371,19 @@ void NativeWindowViews::SetVisibleOnAllWorkspaces( } bool NativeWindowViews::IsVisibleOnAllWorkspaces() { -#if defined(USE_X11) - // Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to - // determine whether the current window is visible on all workspaces. - x11::Atom sticky_atom = x11::GetAtom("_NET_WM_STATE_STICKY"); - std::vector<x11::Atom> wm_states; - GetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()), - x11::GetAtom("_NET_WM_STATE"), &wm_states); - return std::find(wm_states.begin(), wm_states.end(), sticky_atom) != - wm_states.end(); -#else - return false; +#if defined(USE_OZONE_PLATFORM_X11) + if (IsX11()) { + // Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to + // determine whether the current window is visible on all workspaces. + x11::Atom sticky_atom = x11::GetAtom("_NET_WM_STATE_STICKY"); + std::vector<x11::Atom> wm_states; + GetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()), + x11::GetAtom("_NET_WM_STATE"), &wm_states); + return std::find(wm_states.begin(), wm_states.end(), sticky_atom) != + wm_states.end(); + } #endif + return false; } content::DesktopMediaID NativeWindowViews::GetDesktopMediaID() const { diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index ad839239f25af..5454aafaec053 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -16,6 +16,13 @@ #include "third_party/skia/include/core/SkRegion.h" #include "ui/views/widget/widget_observer.h" +#if defined(USE_OZONE) +#include "ui/ozone/buildflags.h" +#if BUILDFLAG(OZONE_PLATFORM_X11) +#define USE_OZONE_PLATFORM_X11 +#endif +#endif + #if BUILDFLAG(IS_WIN) #include "base/win/scoped_gdi_object.h" #include "shell/browser/ui/win/taskbar_host.h" @@ -32,7 +39,7 @@ class GlobalMenuBarX11; class RootView; class WindowStateWatcher; -#if defined(USE_X11) +#if defined(USE_OZONE_PLATFORM_X11) class EventDisabler; #endif @@ -259,12 +266,12 @@ class NativeWindowViews : public NativeWindow, // events from resizing the window. extensions::SizeConstraints old_size_constraints_; -#if defined(USE_X11) +#if defined(USE_OZONE) std::unique_ptr<GlobalMenuBarX11> global_menu_bar_; - // Handles window state events. - std::unique_ptr<WindowStateWatcher> window_state_watcher_; +#endif +#if defined(USE_OZONE_PLATFORM_X11) // To disable the mouse events. std::unique_ptr<EventDisabler> event_disabler_; #endif diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc index f763c13dca689..045e7d9dcff9e 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc @@ -10,7 +10,9 @@ #include <vector> +#include "base/feature_list.h" #include "base/i18n/rtl.h" +#include "shell/browser/native_window_features.h" #include "shell/browser/ui/views/client_frame_view_linux.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/skia_conversions.h" @@ -20,6 +22,14 @@ #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" #include "ui/views/window/non_client_view.h" +#if defined(USE_OZONE) +#include "ui/ozone/buildflags.h" +#if BUILDFLAG(OZONE_PLATFORM_X11) +#define USE_OZONE_PLATFORM_X11 +#endif +#include "ui/ozone/public/ozone_platform.h" +#endif + namespace electron { ElectronDesktopWindowTreeHostLinux::ElectronDesktopWindowTreeHostLinux( @@ -46,6 +56,18 @@ void ElectronDesktopWindowTreeHostLinux::OnBoundsChanged( const BoundsChange& change) { views::DesktopWindowTreeHostLinux::OnBoundsChanged(change); UpdateFrameHints(); + +#if defined(USE_OZONE_PLATFORM_X11) + if (ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .electron_can_call_x11) { + // The OnWindowStateChanged should receive all updates but currently under + // X11 it doesn't receive changes to the fullscreen status because chromium + // is handling the fullscreen state changes synchronously, see + // X11Window::ToggleFullscreen in ui/ozone/platform/x11/x11_window.cc. + UpdateWindowState(platform_window()->GetPlatformWindowState()); + } +#endif } void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged( @@ -53,6 +75,43 @@ void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged( ui::PlatformWindowState new_state) { views::DesktopWindowTreeHostLinux::OnWindowStateChanged(old_state, new_state); UpdateFrameHints(); + UpdateWindowState(new_state); +} + +void ElectronDesktopWindowTreeHostLinux::UpdateWindowState( + ui::PlatformWindowState new_state) { + if (window_state_ == new_state) + return; + + switch (window_state_) { + case ui::PlatformWindowState::kMinimized: + native_window_view_->NotifyWindowRestore(); + break; + case ui::PlatformWindowState::kMaximized: + native_window_view_->NotifyWindowUnmaximize(); + break; + case ui::PlatformWindowState::kFullScreen: + native_window_view_->NotifyWindowLeaveFullScreen(); + break; + case ui::PlatformWindowState::kUnknown: + case ui::PlatformWindowState::kNormal: + break; + } + switch (new_state) { + case ui::PlatformWindowState::kMinimized: + native_window_view_->NotifyWindowMinimize(); + break; + case ui::PlatformWindowState::kMaximized: + native_window_view_->NotifyWindowMaximize(); + break; + case ui::PlatformWindowState::kFullScreen: + native_window_view_->NotifyWindowEnterFullScreen(); + break; + case ui::PlatformWindowState::kUnknown: + case ui::PlatformWindowState::kNormal: + break; + } + window_state_ = new_state; } void ElectronDesktopWindowTreeHostLinux::OnNativeThemeUpdated( @@ -65,13 +124,15 @@ void ElectronDesktopWindowTreeHostLinux::OnDeviceScaleFactorChanged() { } void ElectronDesktopWindowTreeHostLinux::UpdateFrameHints() { - if (SupportsClientFrameShadow() && native_window_view_->has_frame() && - native_window_view_->has_client_frame()) { - UpdateClientDecorationHints(static_cast<ClientFrameViewLinux*>( - native_window_view_->widget()->non_client_view()->frame_view())); - } + if (base::FeatureList::IsEnabled(features::kWaylandWindowDecorations)) { + if (SupportsClientFrameShadow() && native_window_view_->has_frame() && + native_window_view_->has_client_frame()) { + UpdateClientDecorationHints(static_cast<ClientFrameViewLinux*>( + native_window_view_->widget()->non_client_view()->frame_view())); + } - SizeConstraintsChanged(); + SizeConstraintsChanged(); + } } void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints( diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.h b/shell/browser/ui/electron_desktop_window_tree_host_linux.h index 58824f4dd63ea..e9bb28adb97dc 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.h +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.h @@ -14,6 +14,7 @@ #include "shell/browser/ui/views/client_frame_view_linux.h" #include "third_party/skia/include/core/SkRRect.h" #include "ui/native_theme/native_theme_observer.h" +#include "ui/platform_window/platform_window.h" #include "ui/views/linux_ui/device_scale_factor_observer.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" @@ -55,6 +56,7 @@ class ElectronDesktopWindowTreeHostLinux private: void UpdateFrameHints(); void UpdateClientDecorationHints(ClientFrameViewLinux* view); + void UpdateWindowState(ui::PlatformWindowState new_state); NativeWindowViews* native_window_view_; // weak ref @@ -65,6 +67,7 @@ class ElectronDesktopWindowTreeHostLinux &views::LinuxUI::AddDeviceScaleFactorObserver, &views::LinuxUI::RemoveDeviceScaleFactorObserver> scale_observation_{this}; + ui::PlatformWindowState window_state_ = ui::PlatformWindowState::kUnknown; }; } // namespace electron diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 6f2141ada00fe..440c06823cea3 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -18,16 +18,9 @@ #include "shell/browser/unresponsive_suppressor.h" #include "shell/common/gin_converters/file_path_converter.h" #include "ui/base/glib/glib_signal.h" +#include "ui/gtk/gtk_ui.h" #include "ui/gtk/gtk_util.h" -#if defined(USE_X11) -#include "ui/events/platform/x11/x11_event_source.h" -#endif - -#if defined(USE_OZONE) || defined(USE_X11) -#include "ui/base/ui_base_features.h" -#endif - namespace file_dialog { static GModule* gtk_module; @@ -247,14 +240,7 @@ class FileChooserDialog { dl_gtk_native_dialog_show(static_cast<void*>(dialog_)); } else { gtk_widget_show_all(GTK_WIDGET(dialog_)); - -#if defined(USE_X11) - // We need to call gtk_window_present after making the widgets visible - // to make sure window gets correctly raised and gets focus. - x11::Time time = ui::X11EventSource::GetInstance()->GetTimestamp(); - gtk_window_present_with_time(GTK_WINDOW(dialog_), - static_cast<uint32_t>(time)); -#endif + gtk::GtkUi::GetPlatform()->ShowGtkWindow(GTK_WINDOW(dialog_)); } } diff --git a/shell/browser/ui/gtk/menu_util.cc b/shell/browser/ui/gtk/menu_util.cc index 08f2a5544b8e3..fb1c0e63e91ac 100644 --- a/shell/browser/ui/gtk/menu_util.cc +++ b/shell/browser/ui/gtk/menu_util.cc @@ -22,8 +22,12 @@ #include "ui/events/event_constants.h" #include "ui/events/keycodes/keyboard_code_conversion_x.h" -#if defined(USE_OZONE) || defined(USE_X11) -#include "ui/base/ui_base_features.h" +#if defined(USE_OZONE) +#include "ui/ozone/buildflags.h" +#if BUILDFLAG(OZONE_PLATFORM_X11) +#define USE_OZONE_PLATFORM_X11 +#endif +#include "ui/ozone/public/ozone_platform.h" #endif namespace electron { @@ -45,6 +49,8 @@ int EventFlagsFromGdkState(guint state) { return flags; } +#if defined(USE_OZONE_PLATFORM_X11) + guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator) { // The second parameter is false because accelerator keys are expressed in // terms of the non-shift-modified key. @@ -64,6 +70,8 @@ GdkModifierType GetGdkModifierForAccelerator( return static_cast<GdkModifierType>(modifier); } +#endif + } // namespace GtkWidget* BuildMenuItemWithImage(const std::string& label, GtkWidget* image) { @@ -225,13 +233,17 @@ void BuildSubmenuFromModel(ui::MenuModel* model, connect_to_activate = false; } -#if defined(USE_X11) - ui::Accelerator accelerator; - if (model->GetAcceleratorAt(i, &accelerator)) { - gtk_widget_add_accelerator(menu_item, "activate", nullptr, - GetGdkKeyCodeForAccelerator(accelerator), - GetGdkModifierForAccelerator(accelerator), - GTK_ACCEL_VISIBLE); +#if defined(USE_OZONE_PLATFORM_X11) + if (ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .electron_can_call_x11) { + ui::Accelerator accelerator; + if (model->GetAcceleratorAt(i, &accelerator)) { + gtk_widget_add_accelerator(menu_item, "activate", nullptr, + GetGdkKeyCodeForAccelerator(accelerator), + GetGdkModifierForAccelerator(accelerator), + GTK_ACCEL_VISIBLE); + } } #endif diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 6945214920d12..28b332d6f8adf 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -18,13 +18,10 @@ #include "shell/browser/unresponsive_suppressor.h" #include "ui/base/glib/glib_signal.h" #include "ui/gfx/image/image_skia.h" +#include "ui/gtk/gtk_ui.h" #include "ui/gtk/gtk_util.h" -#if defined(USE_X11) -#include "ui/events/platform/x11/x11_event_source.h" -#endif - -#if defined(USE_OZONE) || defined(USE_X11) +#if defined(USE_OZONE) #include "ui/base/ui_base_features.h" #endif @@ -161,14 +158,7 @@ class GtkMessageBox : public NativeWindowObserver { void Show() { gtk_widget_show(dialog_); - -#if defined(USE_X11) - // We need to call gtk_window_present after making the widgets visible to - // make sure window gets correctly raised and gets focus. - x11::Time time = ui::X11EventSource::GetInstance()->GetTimestamp(); - gtk_window_present_with_time(GTK_WINDOW(dialog_), - static_cast<uint32_t>(time)); -#endif + gtk::GtkUi::GetPlatform()->ShowGtkWindow(GTK_WINDOW(dialog_)); } int RunSynchronous() { diff --git a/shell/browser/ui/x/window_state_watcher.cc b/shell/browser/ui/x/window_state_watcher.cc deleted file mode 100644 index 42e553b45e0cb..0000000000000 --- a/shell/browser/ui/x/window_state_watcher.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2014 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#include "shell/browser/ui/x/window_state_watcher.h" - -#include <vector> - -#include "ui/base/x/x11_util.h" -#include "ui/gfx/x/x11_atom_cache.h" -#include "ui/gfx/x/xproto_util.h" - -namespace electron { - -WindowStateWatcher::WindowStateWatcher(NativeWindowViews* window) - : window_(window), - widget_(window->GetAcceleratedWidget()), - net_wm_state_atom_(x11::GetAtom("_NET_WM_STATE")), - net_wm_state_hidden_atom_(x11::GetAtom("_NET_WM_STATE_HIDDEN")), - net_wm_state_maximized_vert_atom_( - 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")), - was_minimized_(window_->IsMinimized()), - was_maximized_(window_->IsMaximized()) { - ui::X11EventSource::GetInstance()->connection()->AddEventObserver(this); -} - -WindowStateWatcher::~WindowStateWatcher() { - ui::X11EventSource::GetInstance()->connection()->RemoveEventObserver(this); -} - -void WindowStateWatcher::OnEvent(const x11::Event& x11_event) { - if (IsWindowStateEvent(x11_event)) { - std::vector<x11::Atom> wm_states; - if (GetArrayProperty( - static_cast<x11::Window>(window_->GetAcceleratedWidget()), - net_wm_state_atom_, &wm_states)) { - const auto props = - base::flat_set<x11::Atom>(std::begin(wm_states), std::end(wm_states)); - const bool is_minimized = props.contains(net_wm_state_hidden_atom_); - const bool is_maximized = - props.contains(net_wm_state_maximized_vert_atom_) && - props.contains(net_wm_state_maximized_horz_atom_); - const bool is_fullscreen = props.contains(net_wm_state_fullscreen_atom_); - - if (is_minimized != was_minimized_) { - if (is_minimized) - window_->NotifyWindowMinimize(); - else - window_->NotifyWindowRestore(); - } else if (is_maximized != was_maximized_) { - if (is_maximized) - window_->NotifyWindowMaximize(); - else - window_->NotifyWindowUnmaximize(); - } else { - // If this is neither a "maximize" or "minimize" event, then we think it - // is a "fullscreen" event. - // The "IsFullscreen()" becomes true immediately before "OnEvent" - // is called, so we can not handle this like "maximize" and "minimize" - // by watching whether they have changed. - if (is_fullscreen) - window_->NotifyWindowEnterFullScreen(); - else - window_->NotifyWindowLeaveFullScreen(); - } - - was_minimized_ = is_minimized; - was_maximized_ = is_maximized; - } - } -} - -bool WindowStateWatcher::IsWindowStateEvent(const x11::Event& x11_event) const { - auto* property = x11_event.As<x11::PropertyNotifyEvent>(); - return (property && property->atom == net_wm_state_atom_ && - static_cast<uint32_t>(property->window) == widget_); -} - -} // namespace electron diff --git a/shell/browser/ui/x/window_state_watcher.h b/shell/browser/ui/x/window_state_watcher.h deleted file mode 100644 index 81b1117579c84..0000000000000 --- a/shell/browser/ui/x/window_state_watcher.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2014 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#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" - -#include "shell/browser/native_window_views.h" - -namespace electron { - -class WindowStateWatcher : public x11::EventObserver { - public: - explicit WindowStateWatcher(NativeWindowViews* window); - ~WindowStateWatcher() override; - - // disable copy - WindowStateWatcher(const WindowStateWatcher&) = delete; - WindowStateWatcher& operator=(const WindowStateWatcher&) = delete; - - protected: - // x11::EventObserver: - void OnEvent(const x11::Event& x11_event) override; - - private: - bool IsWindowStateEvent(const x11::Event& x11_event) const; - - NativeWindowViews* window_; - gfx::AcceleratedWidget widget_; - const x11::Atom net_wm_state_atom_; - const x11::Atom net_wm_state_hidden_atom_; - 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 - -#endif // ELECTRON_SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ From 3c30b59c3e64c39ae5b6dffc293d13efc537d6db Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Mon, 28 Mar 2022 10:34:10 -0700 Subject: [PATCH 180/811] build: store last ninja log in artifacts (#32936) --- .circleci/build_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index a6c0411fcab71..dc18ceadedcb3 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -1270,6 +1270,7 @@ commands: mv_if_exist src/out/Default/hunspell_dictionaries.zip mv_if_exist src/cross-arch-snapshots mv_if_exist src/out/electron_ninja_log + mv_if_exist src/out/Default/.ninja_log when: always - store_artifacts: path: generated_artifacts From c4e3a1aad3ae3fc2be4fc8efa64b17abddb7b621 Mon Sep 17 00:00:00 2001 From: Baitinq <30861839+Baitinq@users.noreply.github.com> Date: Mon, 28 Mar 2022 18:25:44 +0000 Subject: [PATCH 181/811] docs: Use Node's URL parser in the 5th security recommendation (#33463) Rule 13 recommends using Node's URL parser for handling url inputs. At the moment, this is not being followed in the code example for rule 5, which falls back on checking that the url ends with a '/'. If this was forgotten when a user copies this code it could introduce security vulnerabilities if an attacker uses an URL in the following way: "https://example.com.attacker.com" Using Node's URL parser fixes this potential missuse and enables the '/' to be omited from the code example. Co-authored-by: Baitinq <you@example.com> --- docs/tutorial/security.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index db5b1b60a337c..cda76d60b210a 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -279,11 +279,12 @@ security-conscious developers might want to assume the very opposite. ```js title='main.js (Main Process)' const { session } = require('electron') +const URL = require('url').URL session .fromPartition('some-partition') .setPermissionRequestHandler((webContents, permission, callback) => { - const url = webContents.getURL() + const parsedUrl = new URL(webContents.getURL()) if (permission === 'notifications') { // Approves the permissions request @@ -291,7 +292,7 @@ session } // Verify URL - if (!url.startsWith('https://example.com/')) { + if (parsedUrl.protocol !== 'https:' || parsedUrl.host !== 'example.com') { // Denies the permissions request return callback(false) } From 1c5bbba5cf2ef82839e46778b44d7737e50a6f06 Mon Sep 17 00:00:00 2001 From: Charles Kerr <charles@charleskerr.com> Date: Mon, 28 Mar 2022 15:06:11 -0500 Subject: [PATCH 182/811] docs: simplify skipTaskbar breaking changes text (#33479) --- docs/breaking-changes.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index c44fcc257ef52..7dcbaaff47e3a 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -29,19 +29,15 @@ renderers. ### Removed: `skipTaskbar` on Linux -See `skipTaskbar` discussion in 19.0 below. This feature is not available on -Wayland. Since most modern Linux desktops are transitioning to Wayland, this -feature will be removed for Linux. - -## Planned Breaking API Changes (19.0) - -### Unsupported: `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 + ## Planned Breaking API Changes (18.0) ### Removed: `nativeWindowOpen` From 594dc7e24a71bff68b2b6e69801e881a910a5604 Mon Sep 17 00:00:00 2001 From: Calvin <clavin@users.noreply.github.com> Date: Mon, 28 Mar 2022 15:37:35 -0600 Subject: [PATCH 183/811] chore: update node types version (#33452) * chore: update node types version * update express types to solve type conflict * one more yarn.lock type bump * 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 a66407d4e4d5c..6a5df9ee0b824 100644 --- a/npm/package.json +++ b/npm/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@electron/get": "^1.14.1", - "@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 7cc43408a42fa..2879902c047be 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 ae8a2e84cd878..0eb2f3d493a61 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -254,7 +254,7 @@ declare namespace NodeJS { _firstFileName?: string; helperExecPath: string; - mainModule: NodeJS.Module; + mainModule?: NodeJS.Module | undefined; } } diff --git a/yarn.lock b/yarn.lock index 484a7a5c18a4d..4a4bb3f3c5b17 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 4aeeb64d300555dacb6c3d17989266c3fd0bab57 Mon Sep 17 00:00:00 2001 From: Gellert Hegyi <gellert.hegyi@around.co> Date: Tue, 29 Mar 2022 05:02:44 +0200 Subject: [PATCH 184/811] fix: crash when WindowButtonsProxy references cleared NSWindow (#33069) * resets WindowButtonsProxy on window delete on macOS * fixes reset --- shell/browser/native_window_mac.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 3220741ec356c..92cebd9bb65ba 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -328,6 +328,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { [](NativeWindowMac* window) { if (window->window_) window->window_ = nil; + if (window->buttons_proxy_) + window->buttons_proxy_.reset(); }, this)); From 37a94d9857a611e38d799cb36790e872a5a722c6 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt <jkleinsc@electronjs.org> Date: Mon, 28 Mar 2022 23:57:11 -0400 Subject: [PATCH 185/811] ci: fixup esbuild on macos (#33486) * ci: fixup esbuild on macos * ci: call update_depot_tools right after clone * when all else fails, use sed --- .circleci/build_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index dc18ceadedcb3..f25a498be8d2c 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -470,6 +470,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 6b66fea67dda1fe56ba0fb1e44d57bac5af1fdbe Mon Sep 17 00:00:00 2001 From: Joseph <kartingman25@gmail.com> Date: Tue, 29 Mar 2022 03:02:30 -0400 Subject: [PATCH 186/811] docs: update heading level of webFrame.insertCSS (#33467) --- docs/api/web-frame.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index b59d98c54cb60..06bf313547d01 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -110,7 +110,7 @@ webFrame.setSpellCheckProvider('en-US', { }) ``` -#### `webFrame.insertCSS(css[, options])` +### `webFrame.insertCSS(css[, options])` * `css` string * `options` Object (optional) From 4e66b072da72c2a9c0445c2dcc132040d7a63b98 Mon Sep 17 00:00:00 2001 From: Cheng Zhao <zcbenz@gmail.com> Date: Tue, 29 Mar 2022 19:03:07 +0900 Subject: [PATCH 187/811] chore: update libuv patch for event loop integration (#31647) * chore: update libuv patch for loop integration * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/node/.patches | 2 +- ...o_change_option_to_uv_loop_configure.patch | 503 ++++++++++++++++++ .../feat_add_uv_loop_watcher_queue_code.patch | 59 -- .../unix_remove_uv_cloexec_ioctl_3515.patch | 2 +- .../unix_simplify_uv_cloexec_fcntl_3492.patch | 2 +- shell/common/node_bindings.cc | 3 + shell/common/node_bindings_linux.cc | 13 - shell/common/node_bindings_linux.h | 3 - shell/common/node_bindings_mac.cc | 13 - shell/common/node_bindings_mac.h | 3 - 10 files changed, 509 insertions(+), 94 deletions(-) create mode 100644 patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch delete mode 100644 patches/node/feat_add_uv_loop_watcher_queue_code.patch diff --git a/patches/node/.patches b/patches/node/.patches index c2b5fdf528bbf..29ed54ec0eb16 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -1,5 +1,4 @@ refactor_alter_child_process_fork_to_use_execute_script_with.patch -feat_add_uv_loop_watcher_queue_code.patch feat_initialize_asar_support.patch expose_get_builtin_module_function.patch build_add_gn_build_files.patch @@ -42,3 +41,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 +feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch diff --git a/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch b/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch new file mode 100644 index 0000000000000..df4c22dbe6633 --- /dev/null +++ b/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch @@ -0,0 +1,503 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Cheng Zhao <zcbenz@gmail.com> +Date: Mon, 31 Jan 2022 20:56:58 +0900 +Subject: feat: add UV_LOOP_INTERRUPT_ON_IO_CHANGE option to uv_loop_configure + +https://github.com/libuv/libuv/pull/3308 + +diff --git a/deps/uv/docs/src/loop.rst b/deps/uv/docs/src/loop.rst +index 0f5ddfb3ca21b7e5b38d0a4ce4b9e77387597199..ba815202fb157aa82859ec0518523cf6f2ec6ba1 100644 +--- a/deps/uv/docs/src/loop.rst ++++ b/deps/uv/docs/src/loop.rst +@@ -73,7 +73,15 @@ API + + This option is necessary to use :c:func:`uv_metrics_idle_time`. + ++ - UV_LOOP_INTERRUPT_ON_IO_CHANGE: Interrupt the loop whenever a new IO ++ event has been added or changed. ++ ++ This option is usually when implementing event loop integration, to make ++ the polling of backend fd interrupt to recognize the changes of IO events. ++ + .. versionchanged:: 1.39.0 added the UV_METRICS_IDLE_TIME option. ++ .. versionchanged:: 1.43.0 added the UV_LOOP_INTERRUPT_ON_IO_CHANGE option. ++ + + .. c:function:: int uv_loop_close(uv_loop_t* loop) + +diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h +index 606083c87de5790d7e66fc34aeaae9a58acb8ef4..824b0b77cf5f0a46dcb3855c44ac73faaba2055f 100644 +--- a/deps/uv/include/uv.h ++++ b/deps/uv/include/uv.h +@@ -252,7 +252,8 @@ typedef struct uv_statfs_s uv_statfs_t; + + typedef enum { + UV_LOOP_BLOCK_SIGNAL = 0, +- UV_METRICS_IDLE_TIME ++ UV_METRICS_IDLE_TIME, ++ UV_LOOP_INTERRUPT_ON_IO_CHANGE + } uv_loop_option; + + typedef enum { +diff --git a/deps/uv/src/unix/async.c b/deps/uv/src/unix/async.c +index e1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d9755993803beddd18 100644 +--- a/deps/uv/src/unix/async.c ++++ b/deps/uv/src/unix/async.c +@@ -38,7 +38,6 @@ + #include <sys/eventfd.h> + #endif + +-static void uv__async_send(uv_loop_t* loop); + static int uv__async_start(uv_loop_t* loop); + + +@@ -70,7 +69,7 @@ int uv_async_send(uv_async_t* handle) { + return 0; + + /* Wake up the other thread's event loop. */ +- uv__async_send(handle->loop); ++ uv__loop_interrupt(handle->loop); + + /* Tell the other thread we're done. */ + if (cmpxchgi(&handle->pending, 1, 2) != 1) +@@ -165,40 +164,6 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { + } + + +-static void uv__async_send(uv_loop_t* loop) { +- const void* buf; +- ssize_t len; +- int fd; +- int r; +- +- buf = ""; +- len = 1; +- fd = loop->async_wfd; +- +-#if defined(__linux__) +- if (fd == -1) { +- static const uint64_t val = 1; +- buf = &val; +- len = sizeof(val); +- fd = loop->async_io_watcher.fd; /* eventfd */ +- } +-#endif +- +- do +- r = write(fd, buf, len); +- while (r == -1 && errno == EINTR); +- +- if (r == len) +- return; +- +- if (r == -1) +- if (errno == EAGAIN || errno == EWOULDBLOCK) +- return; +- +- abort(); +-} +- +- + static int uv__async_start(uv_loop_t* loop) { + int pipefd[2]; + int err; +diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c +index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e28a3182f 100644 +--- a/deps/uv/src/unix/core.c ++++ b/deps/uv/src/unix/core.c +@@ -887,6 +887,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { + loop->watchers[w->fd] = w; + loop->nfds++; + } ++ ++ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE) ++ uv__loop_interrupt(loop); + } + + +@@ -918,6 +921,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { + } + else if (QUEUE_EMPTY(&w->watcher_queue)) + QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); ++ ++ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE) ++ uv__loop_interrupt(loop); + } + + +@@ -934,6 +940,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) { + void uv__io_feed(uv_loop_t* loop, uv__io_t* w) { + if (QUEUE_EMPTY(&w->pending_queue)) + QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue); ++ ++ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE) ++ uv__loop_interrupt(loop); + } + + +diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c +index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb7c43bb0b 100644 +--- a/deps/uv/src/unix/loop.c ++++ b/deps/uv/src/unix/loop.c +@@ -217,6 +217,11 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { + return 0; + } + ++ if (option == UV_LOOP_INTERRUPT_ON_IO_CHANGE) { ++ lfields->flags |= UV_LOOP_INTERRUPT_ON_IO_CHANGE; ++ return 0; ++ } ++ + if (option != UV_LOOP_BLOCK_SIGNAL) + return UV_ENOSYS; + +@@ -226,3 +231,37 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { + loop->flags |= UV_LOOP_BLOCK_SIGPROF; + return 0; + } ++ ++ ++void uv__loop_interrupt(uv_loop_t* loop) { ++ const void* buf; ++ ssize_t len; ++ int fd; ++ int r; ++ ++ buf = ""; ++ len = 1; ++ fd = loop->async_wfd; ++ ++#if defined(__linux__) ++ if (fd == -1) { ++ static const uint64_t val = 1; ++ buf = &val; ++ len = sizeof(val); ++ fd = loop->async_io_watcher.fd; /* eventfd */ ++ } ++#endif ++ ++ do ++ r = write(fd, buf, len); ++ while (r == -1 && errno == EINTR); ++ ++ if (r == len) ++ return; ++ ++ if (r == -1) ++ if (errno == EAGAIN || errno == EWOULDBLOCK) ++ return; ++ ++ abort(); ++} +diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h +index 6001b0cf68d0b0268b578218b664a737f43c9521..5d2212571f4bcb648ab332f0c5650d0fdb37c03a 100644 +--- a/deps/uv/src/uv-common.h ++++ b/deps/uv/src/uv-common.h +@@ -140,6 +140,8 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap); + + void uv__loop_close(uv_loop_t* loop); + ++void uv__loop_interrupt(uv_loop_t* loop); ++ + int uv__read_start(uv_stream_t* stream, + uv_alloc_cb alloc_cb, + uv_read_cb read_cb); +@@ -268,6 +270,10 @@ void uv__threadpool_cleanup(void); + if (((h)->flags & UV_HANDLE_ACTIVE) != 0) break; \ + (h)->flags |= UV_HANDLE_ACTIVE; \ + if (((h)->flags & UV_HANDLE_REF) != 0) uv__active_handle_add(h); \ ++ int loop_flags = uv__get_internal_fields((h)->loop)->flags; \ ++ if (loop_flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE) { \ ++ uv__loop_interrupt((h)->loop); \ ++ } \ + } \ + while (0) + +diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c +index e53a0f8e28637a58ceec7852d1a79874fc1a9548..dd4065c1cc68763bfe258492e3119669311394dc 100644 +--- a/deps/uv/src/win/core.c ++++ b/deps/uv/src/win/core.c +@@ -381,10 +381,20 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { + return 0; + } + ++ if (option == UV_LOOP_INTERRUPT_ON_IO_CHANGE) { ++ lfields->flags |= UV_LOOP_INTERRUPT_ON_IO_CHANGE; ++ return 0; ++ } ++ + return UV_ENOSYS; + } + + ++void uv__loop_interrupt(uv_loop_t* loop) { ++ PostQueuedCompletionStatus(loop->iocp, 0, 0, NULL); ++} ++ ++ + int uv_backend_fd(const uv_loop_t* loop) { + return -1; + } +diff --git a/deps/uv/test/test-embed.c b/deps/uv/test/test-embed.c +index c6ddceb149d9c1d68b0dd17b6dac0d4c3c3e9dbc..f6572c5dc2b6ef39bd11889ad1f7873007a6437d 100644 +--- a/deps/uv/test/test-embed.c ++++ b/deps/uv/test/test-embed.c +@@ -25,115 +25,179 @@ + #include <stdlib.h> + #include <errno.h> + +-#ifndef HAVE_KQUEUE +-# if defined(__APPLE__) || \ +- defined(__DragonFly__) || \ +- defined(__FreeBSD__) || \ +- defined(__FreeBSD_kernel__) || \ +- defined(__OpenBSD__) || \ +- defined(__NetBSD__) +-# define HAVE_KQUEUE 1 +-# endif +-#endif +- + #ifndef HAVE_EPOLL + # if defined(__linux__) + # define HAVE_EPOLL 1 + # endif + #endif + +-#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) ++#if defined(HAVE_EPOLL) ++# include <sys/epoll.h> ++#endif + +-#if defined(HAVE_KQUEUE) ++#if !defined(_WIN32) + # include <sys/types.h> +-# include <sys/event.h> + # include <sys/time.h> + #endif + +-#if defined(HAVE_EPOLL) +-# include <sys/epoll.h> +-#endif +- ++static uv_loop_t main_loop; ++static uv_loop_t external_loop; + static uv_thread_t embed_thread; + static uv_sem_t embed_sem; +-static uv_timer_t embed_timer; + static uv_async_t embed_async; ++static uv_async_t main_async; + static volatile int embed_closed; + +-static int embed_timer_called; ++static uv_timer_t main_timer; ++static int main_timer_called; + + +-static void embed_thread_runner(void* arg) { ++#if defined(_WIN32) ++static void embed_thread_poll_win(HANDLE iocp, int timeout) { ++ DWORD bytes; ++ ULONG_PTR key; ++ OVERLAPPED* overlapped; ++ ++ GetQueuedCompletionStatus(iocp, ++ &bytes, ++ &key, ++ &overlapped, ++ timeout >= 0 ? timeout : INFINITE); ++ ++ /* Give the event back so the loop can deal with it. */ ++ if (overlapped != NULL) ++ PostQueuedCompletionStatus(iocp, ++ bytes, ++ key, ++ overlapped); ++} ++#else ++static void embed_thread_poll_unix(int fd, int timeout) { + int r; +- int fd; ++ do { ++#if defined(HAVE_EPOLL) ++ struct epoll_event ev; ++ r = epoll_wait(fd, &ev, 1, timeout); ++#else ++ struct timeval tv; ++ if (timeout >= 0) { ++ tv.tv_sec = timeout / 1000; ++ tv.tv_usec = (timeout % 1000) * 1000; ++ } ++ fd_set readset; ++ FD_ZERO(&readset); ++ FD_SET(fd, &readset); ++ r = select(fd + 1, &readset, NULL, NULL, timeout >= 0 ? &tv : NULL); ++#endif ++ } while (r == -1 && errno == EINTR); ++} ++#endif /* !_WIN32 */ ++ ++ ++static void embed_thread_runner(void* arg) { + int timeout; + +- while (!embed_closed) { +- fd = uv_backend_fd(uv_default_loop()); +- timeout = uv_backend_timeout(uv_default_loop()); +- +- do { +-#if defined(HAVE_KQUEUE) +- struct timespec ts; +- ts.tv_sec = timeout / 1000; +- ts.tv_nsec = (timeout % 1000) * 1000000; +- r = kevent(fd, NULL, 0, NULL, 0, &ts); +-#elif defined(HAVE_EPOLL) +- { +- struct epoll_event ev; +- r = epoll_wait(fd, &ev, 1, timeout); +- } ++ do { ++ timeout = uv_backend_timeout(&main_loop); ++ ++#if defined(_WIN32) ++ embed_thread_poll_win(main_loop.iocp, timeout); ++#else ++ embed_thread_poll_unix(uv_backend_fd(&main_loop), timeout); + #endif +- } while (r == -1 && errno == EINTR); ++ + uv_async_send(&embed_async); ++ + uv_sem_wait(&embed_sem); +- } ++ } while (!embed_closed); + } + + + static void embed_cb(uv_async_t* async) { +- uv_run(uv_default_loop(), UV_RUN_ONCE); ++ /* Run tasks in main loop */ ++ uv_run(&main_loop, UV_RUN_NOWAIT); + ++ /* Tell embed thread to continue polling */ + uv_sem_post(&embed_sem); + } + + +-static void embed_timer_cb(uv_timer_t* timer) { +- embed_timer_called++; ++static void main_timer_cb(uv_timer_t* timer) { ++ main_timer_called++; + embed_closed = 1; + + uv_close((uv_handle_t*) &embed_async, NULL); ++ uv_close((uv_handle_t*) &main_async, NULL); + } +-#endif + + +-TEST_IMPL(embed) { +-#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) +- uv_loop_t external; +- +- ASSERT(0 == uv_loop_init(&external)); ++static void init_loops(void) { ++ ASSERT_EQ(0, uv_loop_init(&main_loop)); ++ ASSERT_EQ(0, uv_loop_init(&external_loop)); + +- embed_timer_called = 0; ++ main_timer_called = 0; + embed_closed = 0; + +- uv_async_init(&external, &embed_async, embed_cb); ++ uv_async_init(&external_loop, &embed_async, embed_cb); + +- /* Start timer in default loop */ +- uv_timer_init(uv_default_loop(), &embed_timer); +- uv_timer_start(&embed_timer, embed_timer_cb, 250, 0); ++ /* Create a dummy async for main loop otherwise backend timeout will ++ always be 0 */ ++ uv_async_init(&main_loop, &main_async, embed_cb); + +- /* Start worker that will interrupt external loop */ ++ /* Start worker that will poll main loop and interrupt external loop */ + uv_sem_init(&embed_sem, 0); + uv_thread_create(&embed_thread, embed_thread_runner, NULL); ++} + +- /* But run external loop */ +- uv_run(&external, UV_RUN_DEFAULT); ++ ++static void run_loop(void) { ++ /* Run external loop */ ++ uv_run(&external_loop, UV_RUN_DEFAULT); + + uv_thread_join(&embed_thread); +- uv_loop_close(&external); ++ uv_sem_destroy(&embed_sem); ++ uv_loop_close(&external_loop); ++ uv_loop_close(&main_loop); ++} + +- ASSERT(embed_timer_called == 1); +-#endif ++ ++TEST_IMPL(embed) { ++ init_loops(); ++ ++ /* Start timer in main loop */ ++ uv_timer_init(&main_loop, &main_timer); ++ uv_timer_start(&main_timer, main_timer_cb, 250, 0); ++ ++ run_loop(); ++ ASSERT_EQ(main_timer_called, 1); ++ ++ return 0; ++} ++ ++ ++static uv_timer_t external_timer; ++ ++ ++static void external_timer_cb(uv_timer_t* timer) { ++ /* Start timer in main loop */ ++ uv_timer_init(&main_loop, &main_timer); ++ uv_timer_start(&main_timer, main_timer_cb, 250, 0); ++} ++ ++ ++TEST_IMPL(embed_with_external_timer) { ++ init_loops(); ++ ++ /* Interrupt embed polling when a handle is started */ ++ ASSERT_EQ(0, uv_loop_configure(&main_loop, UV_LOOP_INTERRUPT_ON_IO_CHANGE)); ++ ++ /* Start timer in external loop, whose callback will not interrupt the ++ polling in embed thread */ ++ uv_timer_init(&external_loop, &external_timer); ++ uv_timer_start(&external_timer, external_timer_cb, 100, 0); ++ ++ run_loop(); ++ ASSERT_EQ(main_timer_called, 1); + + return 0; + } +diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h +index a43edf1a4a9b0932ec73b8edaca0f676ecf3ccfa..199402e31406cf8ba360d54769461bb5285011ee 100644 +--- a/deps/uv/test/test-list.h ++++ b/deps/uv/test/test-list.h +@@ -263,6 +263,7 @@ TEST_DECLARE (process_priority) + TEST_DECLARE (has_ref) + TEST_DECLARE (active) + TEST_DECLARE (embed) ++TEST_DECLARE (embed_with_external_timer) + TEST_DECLARE (async) + TEST_DECLARE (async_null_cb) + TEST_DECLARE (eintr_handling) +@@ -860,6 +861,7 @@ TASK_LIST_START + TEST_ENTRY (active) + + TEST_ENTRY (embed) ++ TEST_ENTRY (embed_with_external_timer) + + TEST_ENTRY (async) + TEST_ENTRY (async_null_cb) diff --git a/patches/node/feat_add_uv_loop_watcher_queue_code.patch b/patches/node/feat_add_uv_loop_watcher_queue_code.patch deleted file mode 100644 index 49468ed2ae2fe..0000000000000 --- a/patches/node/feat_add_uv_loop_watcher_queue_code.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr <shelley.vohr@gmail.com> -Date: Mon, 30 Jul 2018 10:34:54 -0700 -Subject: feat: add uv_loop watcher_queue code - -Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged - -diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h -index 606083c87de5790d7e66fc34aeaae9a58acb8ef4..ca9568c58b1ccd554318f5deb27d2b4e80f08a28 100644 ---- a/deps/uv/include/uv.h -+++ b/deps/uv/include/uv.h -@@ -1805,6 +1805,8 @@ union uv_any_req { - struct uv_loop_s { - /* User data - use this for whatever. */ - void* data; -+ /* Callback when loop's watcher queue updates. */ -+ void (*on_watcher_queue_updated)(uv_loop_t*); - /* Loop reference counting. */ - unsigned int active_handles; - void* handle_queue[2]; -diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c -index 71e9c525c4a77b8b5322e8516c58329100a8d951..a6425294086ff2f1435fdd6866380d3aaaf68200 100644 ---- a/deps/uv/src/unix/core.c -+++ b/deps/uv/src/unix/core.c -@@ -906,8 +906,11 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - return; - #endif - -- if (QUEUE_EMPTY(&w->watcher_queue)) -+ if (QUEUE_EMPTY(&w->watcher_queue)) { - QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); -+ if (loop->on_watcher_queue_updated) -+ loop->on_watcher_queue_updated(loop); -+ } - - if (loop->watchers[w->fd] == NULL) { - loop->watchers[w->fd] = w; -@@ -942,8 +945,11 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - loop->nfds--; - } - } -- else if (QUEUE_EMPTY(&w->watcher_queue)) -+ else if (QUEUE_EMPTY(&w->watcher_queue)) { - QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); -+ if (loop->on_watcher_queue_updated) -+ loop->on_watcher_queue_updated(loop); -+ } - } - - -@@ -960,6 +966,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) { - void uv__io_feed(uv_loop_t* loop, uv__io_t* w) { - if (QUEUE_EMPTY(&w->pending_queue)) - QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue); -+ if (loop->on_watcher_queue_updated) -+ loop->on_watcher_queue_updated(loop); - } - - diff --git a/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch b/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch index f49d25998bba2..937abe6108d84 100644 --- a/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch +++ b/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch @@ -8,7 +8,7 @@ Now that uv__cloexec_fcntl() is simplified 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 +index a87b96cfc1dfdc88fa712a4fa991320ff28f2dcd..7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2 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) { diff --git a/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch b/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch index 219ae54daa15b..13229f0466cd1 100644 --- a/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch +++ b/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch @@ -7,7 +7,7 @@ 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 +index 71e9c525c4a77b8b5322e8516c58329100a8d951..a87b96cfc1dfdc88fa712a4fa991320ff28f2dcd 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) { diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 1af890a2a0b3b..c83253dc9210b 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -322,6 +322,9 @@ NodeBindings::NodeBindings(BrowserEnvironment browser_env) } else { uv_loop_ = uv_default_loop(); } + + // Interrupt embed polling when a handle is started. + uv_loop_configure(uv_loop_, UV_LOOP_INTERRUPT_ON_IO_CHANGE); } NodeBindings::~NodeBindings() { diff --git a/shell/common/node_bindings_linux.cc b/shell/common/node_bindings_linux.cc index d361daec953e0..395dcfc28b480 100644 --- a/shell/common/node_bindings_linux.cc +++ b/shell/common/node_bindings_linux.cc @@ -38,22 +38,9 @@ void NodeBindingsLinux::RunMessageLoop() { handle_ = handle; - // Get notified when libuv's watcher queue changes. - uv_loop_->data = this; - uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged; - NodeBindings::RunMessageLoop(); } -// static -void NodeBindingsLinux::OnWatcherQueueChanged(uv_loop_t* loop) { - NodeBindingsLinux* self = static_cast<NodeBindingsLinux*>(loop->data); - - // We need to break the io polling in the epoll thread when loop's watcher - // queue changes, otherwise new events cannot be notified. - self->WakeupEmbedThread(); -} - void NodeBindingsLinux::PollEvents() { int timeout = uv_backend_timeout(uv_loop_); diff --git a/shell/common/node_bindings_linux.h b/shell/common/node_bindings_linux.h index 934ed68c597b8..4499f1c754fe1 100644 --- a/shell/common/node_bindings_linux.h +++ b/shell/common/node_bindings_linux.h @@ -19,9 +19,6 @@ class NodeBindingsLinux : public NodeBindings { void RunMessageLoop() override; private: - // Called when uv's watcher queue changes. - static void OnWatcherQueueChanged(uv_loop_t* loop); - void PollEvents() override; // Epoll to poll for uv's backend fd. diff --git a/shell/common/node_bindings_mac.cc b/shell/common/node_bindings_mac.cc index 7107d20c11b93..cfc37e5f50135 100644 --- a/shell/common/node_bindings_mac.cc +++ b/shell/common/node_bindings_mac.cc @@ -38,22 +38,9 @@ void NodeBindingsMac::RunMessageLoop() { handle_ = handle; - // Get notified when libuv's watcher queue changes. - uv_loop_->data = this; - uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged; - NodeBindings::RunMessageLoop(); } -// static -void NodeBindingsMac::OnWatcherQueueChanged(uv_loop_t* loop) { - NodeBindingsMac* self = static_cast<NodeBindingsMac*>(loop->data); - - // We need to break the io polling in the kqueue thread when loop's watcher - // queue changes, otherwise new events cannot be notified. - self->WakeupEmbedThread(); -} - void NodeBindingsMac::PollEvents() { struct timeval tv; int timeout = uv_backend_timeout(uv_loop_); diff --git a/shell/common/node_bindings_mac.h b/shell/common/node_bindings_mac.h index 7687f85a7b8d3..911287a65fd37 100644 --- a/shell/common/node_bindings_mac.h +++ b/shell/common/node_bindings_mac.h @@ -19,9 +19,6 @@ class NodeBindingsMac : public NodeBindings { void RunMessageLoop() override; private: - // Called when uv's watcher queue changes. - static void OnWatcherQueueChanged(uv_loop_t* loop); - void PollEvents() override; // uv's backend fd. From 9a2b35163ea5d372cdec3ab8c0a8644a044487d6 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 06:01:08 -0700 Subject: [PATCH 188/811] Bump v19.0.0-nightly.20220329 --- 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 d10e2a276be81..e078e2e369954 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220328 \ No newline at end of file +19.0.0-nightly.20220329 \ No newline at end of file diff --git a/package.json b/package.json index 2879902c047be..b5959d33c6396 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220328", + "version": "19.0.0-nightly.20220329", "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 8826798177c3c..194e1b56579c3 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 19,0,0,20220328 - PRODUCTVERSION 19,0,0,20220328 + FILEVERSION 19,0,0,20220329 + PRODUCTVERSION 19,0,0,20220329 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From bf3d0e225760a0026a1b58ac4f4d29a83b0aad20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 15:39:38 +0200 Subject: [PATCH 189/811] build(deps-dev): bump minimist from 1.2.5 to 1.2.6 (#33432) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b5959d33c6396..34f8e5b0b6a40 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "lint-staged": "^10.2.11", "markdownlint": "^0.21.1", "markdownlint-cli": "^0.25.0", - "minimist": "^1.2.5", + "minimist": "^1.2.6", "null-loader": "^4.0.0", "pre-flight": "^1.1.0", "remark-cli": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 4a4bb3f3c5b17..39af7f570db85 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4812,15 +4812,10 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.0.0, minimist@^1.2.5, minimist@~1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.0.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@~1.2.0, minimist@~1.2.5: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" From f0c22a770d131acb6117f6d07d86fb9b8b66476c Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Tue, 29 Mar 2022 16:05:08 +0200 Subject: [PATCH 190/811] chore: fix moveAbove desktopCapturer spec (#33471) --- spec-main/api-desktop-capturer-spec.ts | 84 ++++++++++++++------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/spec-main/api-desktop-capturer-spec.ts b/spec-main/api-desktop-capturer-spec.ts index 74e2bc73722aa..766b11b3325a9 100644 --- a/spec-main/api-desktop-capturer-spec.ts +++ b/spec-main/api-desktop-capturer-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { screen, desktopCapturer, BrowserWindow } from 'electron/main'; +import { delay, ifdescribe, ifit } from './spec-helpers'; import { emittedOnce } from './events-helpers'; -import { ifdescribe, ifit } from './spec-helpers'; + import { closeAllWindows } from './window-helpers'; const features = process._linkedBinding('electron_common_features'); @@ -156,26 +157,37 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt } }); - // TODO(deepak1556): currently fails on all ci, enable it after upgrade. - it.skip('moveAbove should move the window at the requested place', async () => { + it('moveAbove should move the window at the requested place', async () => { // DesktopCapturer.getSources() is guaranteed to return in the correct // z-order from foreground to background. const MAX_WIN = 4; - const mainWindow = w; - const wList = [mainWindow]; + const wList: BrowserWindow[] = []; + + const destroyWindows = () => { + for (const w of wList) { + w.destroy(); + } + }; + try { - for (let i = 0; i < MAX_WIN - 1; i++) { - const w = new BrowserWindow({ show: true, width: 100, height: 100 }); + for (let i = 0; i < MAX_WIN; i++) { + const w = new BrowserWindow({ show: false, width: 100, height: 100 }); wList.push(w); } expect(wList.length).to.equal(MAX_WIN); // Show and focus all the windows. - wList.forEach(async (w) => { + for (const w of wList) { + const wShown = emittedOnce(w, 'show'); const wFocused = emittedOnce(w, 'focus'); + + w.show(); w.focus(); + + await wShown; await wFocused; - }); + } + // At this point our windows should be showing from bottom to top. // DesktopCapturer.getSources() returns sources sorted from foreground to @@ -189,11 +201,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt // bots while it is not on my workstation, as expected, with and without // the --ci parameter. if (process.platform === 'linux' && sources.length === 0) { - wList.forEach((w) => { - if (w !== mainWindow) { - w.destroy(); - } - }); + destroyWindows(); it.skip('desktopCapturer.getSources returned an empty source list'); return; } @@ -207,44 +215,40 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt expect(sources.length).to.equal(wList.length); // Check that the sources and wList are sorted in the reverse order. - const wListReversed = wList.slice(0).reverse(); - const canGoFurther = sources.every( + // If they're not, skip remaining checks because either focus or + // window placement are not reliable in the running test environment. + const wListReversed = wList.slice().reverse(); + const proceed = sources.every( (source, index) => source.id === wListReversed[index].getMediaSourceId()); - if (!canGoFurther) { - // Skip remaining checks because either focus or window placement are - // not reliable in the running test environment. So there is no point - // to go further to test moveAbove as requirements are not met. - return; - } - - // Do the real work, i.e. move each window above the next one so that - // wList is sorted from foreground to background. - wList.forEach(async (w, index) => { - if (index < (wList.length - 1)) { - const wNext = wList[index + 1]; - w.moveAbove(wNext.getMediaSourceId()); + if (!proceed) return; + + // Move windows so wList is sorted from foreground to background. + for (const [i, w] of wList.entries()) { + if (i < wList.length - 1) { + const next = wList[wList.length - 1]; + w.focus(); + w.moveAbove(next.getMediaSourceId()); + // Ensure the window has time to move. + await delay(2000); } - }); + } sources = await desktopCapturer.getSources({ types: ['window'], thumbnailSize: { width: 0, height: 0 } }); - // Only keep our windows again. - sources.splice(MAX_WIN, sources.length - MAX_WIN); + + sources.splice(MAX_WIN, sources.length); expect(sources.length).to.equal(MAX_WIN); expect(sources.length).to.equal(wList.length); // Check that the sources and wList are sorted in the same order. - sources.forEach((source, index) => { - expect(source.id).to.equal(wList[index].getMediaSourceId()); - }); + for (const [index, source] of sources.entries()) { + const wID = wList[index].getMediaSourceId(); + expect(source.id).to.equal(wID); + } } finally { - wList.forEach((w) => { - if (w !== mainWindow) { - w.destroy(); - } - }); + destroyWindows(); } }); }); From 8ea0631b823aea7f01b1eb9e410ea74dbb857556 Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Tue, 29 Mar 2022 17:57:21 +0200 Subject: [PATCH 191/811] test: re-enable desktop specs (#33497) --- spec-main/api-desktop-capturer-spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/spec-main/api-desktop-capturer-spec.ts b/spec-main/api-desktop-capturer-spec.ts index 766b11b3325a9..ad343b9305ce7 100644 --- a/spec-main/api-desktop-capturer-spec.ts +++ b/spec-main/api-desktop-capturer-spec.ts @@ -23,8 +23,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt after(closeAllWindows); - // TODO(nornagon): figure out why this test is failing on Linux and re-enable it. - ifit(process.platform !== 'linux')('should return a non-empty array of sources', async () => { + it('should return a non-empty array of sources', async () => { const sources = await desktopCapturer.getSources({ types: ['window', 'screen'] }); expect(sources).to.be.an('array').that.is.not.empty(); }); @@ -34,8 +33,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt await expect(promise).to.be.eventually.rejectedWith(Error, 'Invalid options'); }); - // TODO(nornagon): figure out why this test is failing on Linux and re-enable it. - ifit(process.platform !== 'linux')('does not throw an error when called more than once (regression)', async () => { + it('does not throw an error when called more than once (regression)', async () => { const sources1 = await desktopCapturer.getSources({ types: ['window', 'screen'] }); expect(sources1).to.be.an('array').that.is.not.empty(); @@ -43,7 +41,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt expect(sources2).to.be.an('array').that.is.not.empty(); }); - ifit(process.platform !== 'linux')('responds to subsequent calls of different options', async () => { + it('responds to subsequent calls of different options', async () => { const promise1 = desktopCapturer.getSources({ types: ['window'] }); await expect(promise1).to.eventually.be.fulfilled(); @@ -52,7 +50,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt }); // Linux doesn't return any window sources. - ifit(process.platform !== 'linux')('returns an empty display_id for window sources on Windows and Mac', async () => { + ifit(process.platform !== 'linux')('returns an empty display_id for window sources', async () => { const w = new BrowserWindow({ width: 200, height: 200 }); await w.loadURL('about:blank'); @@ -64,7 +62,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt } }); - ifit(process.platform !== 'linux')('returns display_ids matching the Screen API on Windows and Mac', async () => { + ifit(process.platform !== 'linux')('returns display_ids matching the Screen API', async () => { const displays = screen.getAllDisplays(); const sources = await desktopCapturer.getSources({ types: ['screen'] }); expect(sources).to.be.an('array').of.length(displays.length); From d1ea62c3e835abc20e30e64d76823edfa5cbe75c Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Tue, 29 Mar 2022 18:22:58 +0200 Subject: [PATCH 192/811] fix: getting focused window with destroyed webContents (#33404) * fix: getting focused window with destroyed webContents * fix: add extra safeguards --- lib/browser/api/browser-window.ts | 5 ++++- spec-main/api-browser-window-spec.ts | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/browser/api/browser-window.ts b/lib/browser/api/browser-window.ts index 62630bfffb2f5..d20ea0bda5571 100644 --- a/lib/browser/api/browser-window.ts +++ b/lib/browser/api/browser-window.ts @@ -72,7 +72,10 @@ BrowserWindow.getAllWindows = () => { BrowserWindow.getFocusedWindow = () => { for (const window of BrowserWindow.getAllWindows()) { - if (window.isFocused() || window.isDevToolsFocused()) return window; + const hasWC = window.webContents && !window.webContents.isDestroyed(); + if (!window.isDestroyed() && hasWC) { + if (window.isFocused() || window.isDevToolsFocused()) return window; + } } return null; }; diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index d4d4a70799a16..19c08c0700813 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3725,6 +3725,25 @@ describe('BrowserWindow module', () => { expect(w.getChildWindows().length).to.equal(0); }); + it('closes a grandchild window when a middle child window is destroyed', (done) => { + const w = new BrowserWindow(); + + w.loadFile(path.join(fixtures, 'pages', 'base-page.html')); + w.webContents.executeJavaScript('window.open("")'); + + w.webContents.on('did-create-window', async (window) => { + const childWindow = new BrowserWindow({ parent: window }); + + await delay(); + window.close(); + + childWindow.on('closed', () => { + expect(() => { BrowserWindow.getFocusedWindow(); }).to.not.throw(); + done(); + }); + }); + }); + it('should not affect the show option', () => { const w = new BrowserWindow({ show: false }); const c = new BrowserWindow({ show: false, parent: w }); From 94498b923e407ab7e6ac094ae829c89744ebf65c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 12:25:40 -0400 Subject: [PATCH 193/811] build(deps): bump minimist from 1.2.5 to 1.2.6 in /spec-main (#33431) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- spec-main/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec-main/yarn.lock b/spec-main/yarn.lock index f4034d4e9be31..6f6264a60426e 100644 --- a/spec-main/yarn.lock +++ b/spec-main/yarn.lock @@ -660,9 +660,9 @@ mime-types@^2.0.1, mime-types@^2.1.12, mime-types@~2.1.19: 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== + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== ndarray-pack@^1.1.1: version "1.2.1" From 4c988a5a24a6e1dd81875c2ec3b2b7ed47d5c96a Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 29 Mar 2022 14:47:06 -0700 Subject: [PATCH 194/811] docs: fix type of 'value' param in setUserDefaults (#33481) --- docs/api/system-preferences.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index d0960f3b0a949..154e5750f093d 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -177,11 +177,11 @@ Some popular `key` and `type`s are: * `NSPreferredWebServices`: `dictionary` * `NSUserDictionaryReplacementItems`: `array` -### `systemPreferences.setUserDefault(key, type, value)` _macOS_ +### `systemPreferences.setUserDefault<Type extends keyof UserDefaultTypes>(key, type, value)` _macOS_ * `key` string -* `type` string - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`. -* `value` string +* `type` Type - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`. +* `value` UserDefaultTypes[Type] Set the value of `key` in `NSUserDefaults`. From 479f652f904f773fe3a73a207e97eb39be2748a1 Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 29 Mar 2022 14:47:34 -0700 Subject: [PATCH 195/811] feat: add new Squirrel.Mac bundle installation method behind flag (#33470) --- patches/squirrel.mac/.patches | 1 + ...ndle_installation_method_behind_flag.patch | 128 ++++++++++++++++++ spec-main/api-autoupdater-darwin-spec.ts | 62 ++++++++- 3 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 patches/squirrel.mac/feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch diff --git a/patches/squirrel.mac/.patches b/patches/squirrel.mac/.patches index 0950bcb5a678d..f16e10d95fdba 100644 --- a/patches/squirrel.mac/.patches +++ b/patches/squirrel.mac/.patches @@ -1,3 +1,4 @@ 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 +feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch diff --git a/patches/squirrel.mac/feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch b/patches/squirrel.mac/feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch new file mode 100644 index 0000000000000..ed8006fe96309 --- /dev/null +++ b/patches/squirrel.mac/feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch @@ -0,0 +1,128 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard <samuel.r.attard@gmail.com> +Date: Mon, 28 Mar 2022 02:43:18 -0700 +Subject: feat: add new Squirrel.Mac bundle installation method behind flag + +The 'SquirrelMacEnableDirectContentsWrite' user default in your apps defaults suite +can be used to control this new installation method. It is designed to remove the +requirement that the updating process have write access to its parent directory. + +With this feature enabled the updating process only needs write access to it's own +.app bundle folder, not the owning /Applications folder. This should allow more +non-admin users to update applications when appropriately granted group based permissions. + +E.g. 775 and chown :staff + +diff --git a/Squirrel/SQRLInstaller.m b/Squirrel/SQRLInstaller.m +index 7dd98ddee4ae0f4e01fd7aaa3486083bff7d0da1..c1f328fa8c3689218ef260347cb8f9d30b789efe 100644 +--- a/Squirrel/SQRLInstaller.m ++++ b/Squirrel/SQRLInstaller.m +@@ -249,6 +249,7 @@ - (RACSignal *)acquireTargetBundleURLForRequest:(SQRLShipItRequest *)request { + ] reduce:^(NSURL *directoryURL, SQRLCodeSignature *codeSignature) { + NSURL *targetBundleURL = request.targetBundleURL; + NSURL *newBundleURL = [directoryURL URLByAppendingPathComponent:targetBundleURL.lastPathComponent]; ++ [NSFileManager.defaultManager createDirectoryAtURL:newBundleURL withIntermediateDirectories:FALSE attributes:nil error:nil]; + + return [[SQRLInstallerOwnedBundle alloc] initWithOriginalURL:request.targetBundleURL temporaryURL:newBundleURL codeSignature:codeSignature]; + }] +@@ -481,10 +482,50 @@ - (RACSignal *)installItemToURL:(NSURL *)targetURL fromURL:(NSURL *)sourceURL { + NSParameterAssert(targetURL != nil); + NSParameterAssert(sourceURL != nil); + ++ NSLog(@"Moving bundle from %@ to %@", sourceURL, targetURL); ++ ++ // If both the sourceURL and the targetURL exist we can try to skip a permissions check ++ // by moving Thing.app/Contents directly. This allows us to update applications without ++ // permission to write files into the parent directory of Thing.app ++ // ++ // There is no known case where these directories don't exist but in order to handle ++ // edge cases / race conditions we'll handle it anyway. ++ // ++ // This exists check is non-atomic with the rename call below but that's OK ++ BOOL canRenameContentsDirectly = FALSE; ++ // For now while this is tested at scale this new option is behind a user default, this ++ // can be set by applications wishing to test this feature at runtime. If it causes issues ++ // it can be opted out by individual users by setting this key to false explicitly. ++ // Once this has bene tested at scale it will become the default for all Squirrel.Mac ++ // users. ++ NSUserDefaults *defaults = [[NSUserDefaults alloc] init]; ++ [defaults addSuiteNamed:_applicationIdentifier]; ++ // In cases where this code is being executed under the ShipIt executable it's running ++ // under an application identifier equal to {parent_identifier}.ShipIt ++ // In this case we need to use the true parent identifier too as that is 99% of the time ++ // where the key will be set. ++ if ([_applicationIdentifier hasSuffix:@".ShipIt"]) { ++ [defaults addSuiteNamed:[_applicationIdentifier substringToIndex:[_applicationIdentifier length] - 7]]; ++ } ++ ++ if ([defaults boolForKey:@"SquirrelMacEnableDirectContentsWrite"]) { ++ canRenameContentsDirectly = [NSFileManager.defaultManager fileExistsAtPath:targetURL.path] && [NSFileManager.defaultManager fileExistsAtPath:sourceURL.path]; ++ ++ if (canRenameContentsDirectly) { ++ NSLog(@"Moving bundles via 'Contents' folder rename"); ++ } else { ++ NSLog(@"Moving bundles directly as one of source / target does not exist. This is unexpected."); ++ } ++ } else { ++ NSLog(@"Moving bundles directly as SquirrelMacEnableDirectContentsWrite is disabled for app: %@", _applicationIdentifier); ++ } ++ NSURL *targetContentsURL = canRenameContentsDirectly ? [targetURL URLByAppendingPathComponent:@"Contents"] : targetURL; ++ NSURL *sourceContentsURL = canRenameContentsDirectly ? [sourceURL URLByAppendingPathComponent:@"Contents"] : sourceURL; ++ + return [[[[RACSignal + defer:^{ + // rename() is atomic, NSFileManager sucks. +- if (rename(sourceURL.path.fileSystemRepresentation, targetURL.path.fileSystemRepresentation) == 0) { ++ if (rename(sourceContentsURL.path.fileSystemRepresentation, targetContentsURL.path.fileSystemRepresentation) == 0) { + return [RACSignal empty]; + } else { + int code = errno; +@@ -497,24 +538,24 @@ - (RACSignal *)installItemToURL:(NSURL *)targetURL fromURL:(NSURL *)sourceURL { + } + }] + doCompleted:^{ +- NSLog(@"Moved bundle from %@ to %@", sourceURL, targetURL); ++ NSLog(@"Moved bundle contents from %@ to %@", sourceContentsURL, targetContentsURL); + }] + catch:^(NSError *error) { + if (![error.domain isEqual:NSPOSIXErrorDomain] || error.code != EXDEV) return [RACSignal error:error]; + + // If the locations lie on two different volumes, remove the + // destination by hand, then perform a move. +- [NSFileManager.defaultManager removeItemAtURL:targetURL error:NULL]; ++ [NSFileManager.defaultManager removeItemAtURL:targetContentsURL error:NULL]; + +- if ([NSFileManager.defaultManager moveItemAtURL:sourceURL toURL:targetURL error:&error]) { +- NSLog(@"Moved bundle across volumes from %@ to %@", sourceURL, targetURL); ++ if ([NSFileManager.defaultManager moveItemAtURL:sourceContentsURL toURL:targetContentsURL error:&error]) { ++ NSLog(@"Moved bundle contents across volumes from %@ to %@", sourceContentsURL, targetContentsURL); + return [RACSignal empty]; + } else { +- NSString *description = [NSString stringWithFormat:NSLocalizedString(@"Couldn't move bundle %@ across volumes to %@", nil), sourceURL, targetURL]; ++ NSString *description = [NSString stringWithFormat:NSLocalizedString(@"Couldn't move bundle contents %@ across volumes to %@", nil), sourceContentsURL, targetContentsURL]; + return [RACSignal error:[self errorByAddingDescription:description code:SQRLInstallerErrorMovingAcrossVolumes toError:error]]; + } + }] +- setNameWithFormat:@"%@ -installItemAtURL: %@ fromURL: %@", self, targetURL, sourceURL]; ++ setNameWithFormat:@"%@ -installItemAtURL: %@ fromURL: %@", self, targetContentsURL, sourceContentsURL]; + } + + #pragma mark Quarantine Bit Removal +diff --git a/Squirrel/SQRLUpdater.m b/Squirrel/SQRLUpdater.m +index c81c820d61da3c7d1cfd2c516147c954a5773a0c..4c703159a2bb0239b7d4e1793a985b5ec2edcfa9 100644 +--- a/Squirrel/SQRLUpdater.m ++++ b/Squirrel/SQRLUpdater.m +@@ -329,7 +329,12 @@ - (id)initWithUpdateRequest:(NSURLRequest *)updateRequest requestForDownload:(SQ + + BOOL targetWritable = [self canWriteToURL:targetURL]; + BOOL parentWritable = [self canWriteToURL:targetURL.URLByDeletingLastPathComponent]; +- return [SQRLShipItLauncher launchPrivileged:!targetWritable || !parentWritable]; ++ BOOL launchPrivileged = !targetWritable || !parentWritable; ++ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"SquirrelMacEnableDirectContentsWrite"]) { ++ // If SquirrelMacEnableDirectContentsWrite is enabled we don't care if the parent directory is writeable or not ++ BOOL launchPrivileged = !targetWritable; ++ } ++ return [SQRLShipItLauncher launchPrivileged:launchPrivileged]; + }] + replayLazily] + setNameWithFormat:@"shipItLauncher"]; diff --git a/spec-main/api-autoupdater-darwin-spec.ts b/spec-main/api-autoupdater-darwin-spec.ts index c4535337f9015..18c075f0c7695 100644 --- a/spec-main/api-autoupdater-darwin-spec.ts +++ b/spec-main/api-autoupdater-darwin-spec.ts @@ -7,6 +7,8 @@ import * as os from 'os'; import * as path from 'path'; import { AddressInfo } from 'net'; import { ifdescribe, ifit } from './spec-helpers'; +import * as uuid from 'uuid'; +import { systemPreferences } from 'electron'; const features = process._linkedBinding('electron_common_features'); @@ -132,7 +134,7 @@ ifdescribe(process.platform === 'darwin' && !(process.env.CI && process.arch === await signApp(secondAppPath); await mutateAppPostSign?.mutate(secondAppPath); updateZipPath = path.resolve(dir, 'update.zip'); - await spawn('zip', ['-r', '--symlinks', updateZipPath, './'], { + await spawn('zip', ['-0', '-r', '--symlinks', updateZipPath, './'], { cwd: dir }); }, false); @@ -321,6 +323,64 @@ ifdescribe(process.platform === 'darwin' && !(process.env.CI && process.arch === }); }); + describe('with SquirrelMacEnableDirectContentsWrite enabled', () => { + let previousValue: any; + + beforeEach(() => { + previousValue = systemPreferences.getUserDefault('SquirrelMacEnableDirectContentsWrite', 'boolean'); + systemPreferences.setUserDefault('SquirrelMacEnableDirectContentsWrite', 'boolean', true as any); + }); + + afterEach(() => { + systemPreferences.setUserDefault('SquirrelMacEnableDirectContentsWrite', 'boolean', previousValue as any); + }); + + it('should hit the download endpoint when an update is available and update successfully when the zip is provided leaving the parent directory untouched', async () => { + await withUpdatableApp({ + nextVersion: '2.0.0', + startFixture: 'update', + endFixture: 'update' + }, async (appPath, updateZipPath) => { + const randomID = uuid.v4(); + cp.spawnSync('xattr', ['-w', 'spec-id', randomID, appPath]); + 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 relaunchPromise = new Promise<void>((resolve) => { + server.get('/update-check/updated/:version', (req, res) => { + res.status(204).send(); + resolve(); + }); + }); + const launchResult = await launchApp(appPath, [`http://localhost:${port}/update-check`]); + logOnError(launchResult, () => { + expect(launchResult).to.have.property('code', 0); + expect(launchResult.out).to.include('Update Downloaded'); + 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/'); + }); + + await relaunchPromise; + expect(requests).to.have.lengthOf(3); + expect(requests[2].url).to.equal('/update-check/updated/2.0.0'); + expect(requests[2].header('user-agent')).to.include('Electron/'); + const result = cp.spawnSync('xattr', ['-l', appPath]); + expect(result.stdout.toString()).to.include(`spec-id: ${randomID}`); + }); + }); + }); + 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', From 0615fadeadc9de97b51ff4931ab1ea4400b7f42d Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Wed, 30 Mar 2022 00:34:44 +0200 Subject: [PATCH 196/811] chore: set v8_typed_array_max_size_in_heap to default (#33496) --- build/args/all.gn | 1 - script/node-disabled-tests.json | 3 --- 2 files changed, 4 deletions(-) diff --git a/build/args/all.gn b/build/args/all.gn index 91c53266a80d9..a9a472bc79c2c 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -5,7 +5,6 @@ root_extra_deps = [ "//electron" ] node_module_version = 106 v8_promise_internal_field_count = 1 -v8_typed_array_max_size_in_heap = 0 v8_embedder_string = "-electron.0" # TODO: this breaks mksnapshot diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 28368dce775d1..52128823432f0 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -3,9 +3,6 @@ "async-hooks/test-crypto-pbkdf2", "async-hooks/test-crypto-randomBytes", "parallel/test-bootstrap-modules", - "parallel/test-buffer-backing-arraybuffer", - "parallel/test-buffer-constructor-node-modules-paths", - "parallel/test-buffer-constructor-outside-node-modules", "parallel/test-child-process-fork-exec-path", "parallel/test-child-process-stdio-overlapped", "parallel/test-cli-node-print-help", From 10f67e64f945fa71f82c39d846a068ad71c8da06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:47:46 -0400 Subject: [PATCH 197/811] build(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /spec (#33484) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- spec/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/yarn.lock b/spec/yarn.lock index fc6bccebb7505..db24b66cc2cb1 100644 --- a/spec/yarn.lock +++ b/spec/yarn.lock @@ -30,9 +30,9 @@ ajv@^6.5.5: uri-js "^4.2.2" ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^5.0.0: version "5.0.0" From 89c1abd1b325c8ac815f37521754e377120a4171 Mon Sep 17 00:00:00 2001 From: Keeley Hammond <vertedinde@electronjs.org> Date: Tue, 29 Mar 2022 16:07:55 -0700 Subject: [PATCH 198/811] chore: bump NMV for Electron 20 (#33476) --- 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 a9a472bc79c2c..1e31472914a6d 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 = 106 +node_module_version = 107 v8_promise_internal_field_count = 1 v8_embedder_string = "-electron.0" From 9c3b159b956d30a60052a4c6c81b297ad5329567 Mon Sep 17 00:00:00 2001 From: David Sanders <dsanders11@ucsbalum.com> Date: Tue, 29 Mar 2022 16:08:34 -0700 Subject: [PATCH 199/811] fix: on macOS show BrowserWindow on maximize if not currently shown (#32949) --- shell/browser/native_window_mac.mm | 12 +++++++++++- spec-main/api-browser-window-spec.ts | 10 ++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 92cebd9bb65ba..04cca2461f5bc 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -602,13 +602,23 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } void NativeWindowMac::Maximize() { - if (IsMaximized()) + const bool is_visible = [window_ isVisible]; + + if (IsMaximized()) { + if (!is_visible) + ShowInactive(); return; + } // Take note of the current window size if (IsNormal()) original_frame_ = [window_ frame]; [window_ zoom:nil]; + + if (!is_visible) { + ShowInactive(); + NotifyWindowMaximize(); + } } void NativeWindowMac::Unmaximize() { diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 19c08c0700813..4c9f451a5952d 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3579,22 +3579,24 @@ 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 () => { + it('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'); + let shown = emittedOnce(w, 'show'); const maximize = emittedOnce(w, 'maximize'); expect(w.isVisible()).to.be.false('visible'); w.maximize(); await maximize; + await shown; + expect(w.isMaximized()).to.be.true('maximized'); 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'); + shown = emittedOnce(w, 'show'); w.maximize(); - await shown; // Ensure a 'show' event happens when it becomes visible + await shown; expect(w.isVisible()).to.be.true('visible'); }); }); From a9296229c8038f667ae93a3acb245e2093983453 Mon Sep 17 00:00:00 2001 From: Mitchell Cohen <mitch.cohen@me.com> Date: Tue, 29 Mar 2022 21:34:07 -0400 Subject: [PATCH 200/811] feat: add app.isHidden API for macOS (#32155) * feat: add app.isHidden API * Update docs/api/app.md Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fixed isHidden tests * Update docs/api/app.md Co-authored-by: John Kleinschmidt <jkleinsc@github.com> * Update spec-main/api-app-spec.ts Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> --- docs/api/app.md | 4 ++++ shell/browser/api/electron_api_app.cc | 1 + shell/browser/browser.h | 1 + shell/browser/browser_mac.mm | 4 ++++ spec-main/api-app-spec.ts | 19 ++++++++++++++++++- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/api/app.md b/docs/api/app.md index b8c4780b22853..b01b218b181cf 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -606,6 +606,10 @@ You should seek to use the `steal` option as sparingly as possible. Hides all application windows without minimizing them. +### `app.isHidden()` _macOS_ + +Returns `boolean` - `true` if the application—including all of its windows—is hidden (e.g. with `Command-H`), `false` otherwise. + ### `app.show()` _macOS_ Shows application windows after they were hidden. Does not automatically focus diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 353b8c3d67783..73db1e756f885 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1769,6 +1769,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) { base::BindRepeating(&Browser::IsEmojiPanelSupported, browser)) #if BUILDFLAG(IS_MAC) .SetMethod("hide", base::BindRepeating(&Browser::Hide, browser)) + .SetMethod("isHidden", base::BindRepeating(&Browser::IsHidden, browser)) .SetMethod("show", base::BindRepeating(&Browser::Show, browser)) .SetMethod("setUserActivity", base::BindRepeating(&Browser::SetUserActivity, browser)) diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 4a69bbd75dcb6..c56cc3ce84cd0 100755 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -158,6 +158,7 @@ class Browser : public WindowListObserver { // Hide the application. void Hide(); + bool IsHidden(); // Show the application. void Show(); diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index cdd3ba7711b4b..1094747b41130 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -117,6 +117,10 @@ [[AtomApplication sharedApplication] hide:nil]; } +bool Browser::IsHidden() { + return [[AtomApplication sharedApplication] isHidden]; +} + void Browser::Show() { [[AtomApplication sharedApplication] unhide:nil]; } diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index f4337d224bdb1..4de2ca2a0dd0a 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -9,7 +9,7 @@ import { promisify } from 'util'; import { app, BrowserWindow, Menu, session, net as electronNet } from 'electron/main'; import { emittedOnce } from './events-helpers'; import { closeWindow, closeAllWindows } from './window-helpers'; -import { ifdescribe, ifit } from './spec-helpers'; +import { ifdescribe, ifit, waitUntil } from './spec-helpers'; import split = require('split') const fixturesPath = path.resolve(__dirname, '../spec/fixtures'); @@ -1575,6 +1575,23 @@ describe('app module', () => { }); }); + ifdescribe(process.platform === 'darwin')('app hide and show API', () => { + describe('app.isHidden', () => { + it('returns true when the app is hidden', async () => { + app.hide(); + await expect( + waitUntil(() => app.isHidden()) + ).to.eventually.be.fulfilled(); + }); + it('returns false when the app is shown', async () => { + app.show(); + await expect( + waitUntil(() => !app.isHidden()) + ).to.eventually.be.fulfilled(); + }); + }); + }); + const dockDescribe = process.platform === 'darwin' ? describe : describe.skip; dockDescribe('dock APIs', () => { after(async () => { From df3cfb663c19bd580594d4d00d04bfe244054e7f Mon Sep 17 00:00:00 2001 From: Samuel Attard <sam@electronjs.org> Date: Tue, 29 Mar 2022 19:50:59 -0700 Subject: [PATCH 201/811] refactor: use posix_spawn instead of NSTask so we can disclaim the spawned ShipIt executable (#33468) --- patches/squirrel.mac/.patches | 1 + ...ead_of_nstask_so_we_can_disclaim_the.patch | 101 ++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 patches/squirrel.mac/refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch diff --git a/patches/squirrel.mac/.patches b/patches/squirrel.mac/.patches index f16e10d95fdba..53f27f11a9e25 100644 --- a/patches/squirrel.mac/.patches +++ b/patches/squirrel.mac/.patches @@ -2,3 +2,4 @@ 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 feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch +refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch diff --git a/patches/squirrel.mac/refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch b/patches/squirrel.mac/refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch new file mode 100644 index 0000000000000..c69df44026fd2 --- /dev/null +++ b/patches/squirrel.mac/refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch @@ -0,0 +1,101 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard <samuel.r.attard@gmail.com> +Date: Mon, 28 Mar 2022 02:36:39 -0700 +Subject: refactor: use posix_spawn instead of NSTask so we can disclaim the + spawned ShipIt executable + +This ensures that if the ShipIt executable is hotswapped it doesn't inherit TCC permissions + +diff --git a/Squirrel/ShipIt-main.m b/Squirrel/ShipIt-main.m +index db246534e176f9c3ea2dd8b1c8659378fdc2435d..2c515ffdd67052a08ee8155c0e46b57e9721a0e5 100644 +--- a/Squirrel/ShipIt-main.m ++++ b/Squirrel/ShipIt-main.m +@@ -13,6 +13,9 @@ + #import <ReactiveObjC/RACSignal+Operations.h> + #import <ReactiveObjC/RACScheduler.h> + ++#include <spawn.h> ++#include <sys/wait.h> ++ + #import "NSError+SQRLVerbosityExtensions.h" + #import "RACSignal+SQRLTransactionExtensions.h" + #import "SQRLInstaller.h" +@@ -20,6 +23,20 @@ + #import "SQRLTerminationListener.h" + #import "SQRLShipItRequest.h" + ++extern char **environ; ++ ++int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) ++__attribute__((availability(macos,introduced=10.14),weak_import)); ++ ++#define CHECK_ERR(expr) \ ++ { \ ++ int err = (expr); \ ++ if (err) { \ ++ fprintf(stderr, "%s: %s", #expr, strerror(err)); \ ++ exit(err); \ ++ } \ ++ } ++ + // The maximum number of times ShipIt should run the same installation state, in + // an attempt to update. + // +@@ -136,11 +153,37 @@ static void installRequest(RACSignal *readRequestSignal, NSString *applicationId + NSString *exe = NSProcessInfo.processInfo.arguments[0]; + NSLog(@"Launching new ShipIt at %@ with instructions to launch %@", exe, bundleURL); + +- NSTask *task = [[NSTask alloc] init]; +- [task setLaunchPath: exe]; +- [task setArguments: @[launchSignal, bundleURL.path]]; +- [task launch]; +- [task waitUntilExit]; ++ posix_spawnattr_t attr; ++ CHECK_ERR(posix_spawnattr_init(&attr)); ++ ++ if (@available(macOS 10.14, *)) { ++ // Disclaim TCC responsibilities ++ if (responsibility_spawnattrs_setdisclaim) ++ CHECK_ERR(responsibility_spawnattrs_setdisclaim(&attr, 1)); ++ } ++ ++ pid_t pid = 0; ++ ++ const char* launchPath = [exe fileSystemRepresentation]; ++ const char* signal = [launchSignal fileSystemRepresentation]; ++ const char* path = [bundleURL.path fileSystemRepresentation]; ++ const char* args[] = { launchPath, signal, path, 0 }; ++ int status = posix_spawn(&pid, [exe UTF8String], NULL, &attr, (char *const*)args, environ); ++ if (status == 0) { ++ NSLog(@"New ShipIt pid: %i", pid); ++ do { ++ if (waitpid(pid, &status, 0) != -1) { ++ NSLog(@"ShipIt status %d", WEXITSTATUS(status)); ++ } else { ++ perror("waitpid"); ++ exit(1); ++ } ++ } while (!WIFEXITED(status) && !WIFSIGNALED(status)); ++ } else { ++ NSLog(@"posix_spawn: %s", strerror(status)); ++ } ++ ++ posix_spawnattr_destroy(&attr); + + NSLog(@"New ShipIt exited"); + } else { +@@ -172,7 +215,13 @@ int main(int argc, const char * argv[]) { + }); + + if (argc < 3) { +- NSLog(@"Missing launchd job label or state path for ShipIt"); ++ NSLog(@"Missing launchd job label or state path for ShipIt (%d)", argc); ++ if (argc >= 1) { ++ NSLog(@"Arg 1: {%s}", argv[0]); ++ } ++ if (argc >= 2) { ++ NSLog(@"Arg 2: {%s}", argv[1]); ++ } + return EXIT_FAILURE; + } + From c119b1ebef0afe3b8dbedc4f869a1c67684d6009 Mon Sep 17 00:00:00 2001 From: Cheng Zhao <zcbenz@gmail.com> Date: Wed, 30 Mar 2022 12:09:42 +0900 Subject: [PATCH 202/811] chore: remove redundant code in node integration (#33500) --- shell/browser/electron_browser_main_parts.cc | 4 ++-- shell/common/node_bindings.cc | 21 ++++++++++++++-- shell/common/node_bindings.h | 11 +++++---- shell/common/node_bindings_linux.cc | 24 ------------------- shell/common/node_bindings_linux.h | 7 ------ shell/common/node_bindings_mac.cc | 24 ------------------- shell/common/node_bindings_mac.h | 7 ------ shell/common/node_bindings_win.cc | 25 -------------------- shell/common/node_bindings_win.h | 7 ------ shell/renderer/electron_renderer_client.cc | 6 ++--- shell/renderer/web_worker_observer.cc | 4 ++-- 11 files changed, 32 insertions(+), 108 deletions(-) diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 82713b7d15288..98344e65d95ac 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -402,8 +402,8 @@ void ElectronBrowserMainParts::ToolkitInitialized() { int ElectronBrowserMainParts::PreMainMessageLoopRun() { // Run user's main script before most things get initialized, so we can have // a chance to setup everything. - node_bindings_->PrepareMessageLoop(); - node_bindings_->RunMessageLoop(); + node_bindings_->PrepareEmbedThread(); + node_bindings_->StartPolling(); // url::Add*Scheme are not threadsafe, this helps prevent data races. url::LockSchemeRegistries(); diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index c83253dc9210b..15560da0cb71b 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -584,7 +584,16 @@ void NodeBindings::LoadEnvironment(node::Environment* env) { gin_helper::EmitEvent(env->isolate(), env->process_object(), "loaded"); } -void NodeBindings::PrepareMessageLoop() { +void NodeBindings::PrepareEmbedThread() { + // 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. + // More background can be found at: + // https://github.com/microsoft/vscode/issues/142786#issuecomment-1061673400 + if (initialized_) + return; + // 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); @@ -594,7 +603,15 @@ void NodeBindings::PrepareMessageLoop() { uv_thread_create(&embed_thread_, EmbedThreadRunner, this); } -void NodeBindings::RunMessageLoop() { +void NodeBindings::StartPolling() { + // 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; + // The MessageLoop should have been created, remember the one in main thread. task_runner_ = base::ThreadTaskRunnerHandle::Get(); diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index 204cf12d5cc6c..54bed07a39aab 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -92,11 +92,11 @@ class NodeBindings { // Load node.js in the environment. void LoadEnvironment(node::Environment* env); - // Prepare for message loop integration. - virtual void PrepareMessageLoop(); + // Prepare embed thread for message loop integration. + void PrepareEmbedThread(); - // Do message loop integration. - virtual void RunMessageLoop(); + // Notify embed thread to start polling after environment is loaded. + void StartPolling(); // Gets/sets the per isolate data. void set_isolate_data(node::IsolateData* isolate_data) { @@ -144,6 +144,9 @@ class NodeBindings { // Thread to poll uv events. static void EmbedThreadRunner(void* arg); + // Indicates whether polling thread has been created. + bool initialized_ = false; + // Whether the libuv loop has ended. bool embed_closed_ = false; diff --git a/shell/common/node_bindings_linux.cc b/shell/common/node_bindings_linux.cc index 395dcfc28b480..5fc157da00e58 100644 --- a/shell/common/node_bindings_linux.cc +++ b/shell/common/node_bindings_linux.cc @@ -17,30 +17,6 @@ NodeBindingsLinux::NodeBindingsLinux(BrowserEnvironment browser_env) epoll_ctl(epoll_, EPOLL_CTL_ADD, backend_fd, &ev); } -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; - - NodeBindings::RunMessageLoop(); -} - void NodeBindingsLinux::PollEvents() { int timeout = uv_backend_timeout(uv_loop_); diff --git a/shell/common/node_bindings_linux.h b/shell/common/node_bindings_linux.h index 4499f1c754fe1..db8a8ed32ad58 100644 --- a/shell/common/node_bindings_linux.h +++ b/shell/common/node_bindings_linux.h @@ -13,19 +13,12 @@ namespace electron { class NodeBindingsLinux : public NodeBindings { public: explicit NodeBindingsLinux(BrowserEnvironment browser_env); - ~NodeBindingsLinux() override; - - void PrepareMessageLoop() override; - void RunMessageLoop() override; private: void PollEvents() override; // 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 cfc37e5f50135..fe9b0d6986196 100644 --- a/shell/common/node_bindings_mac.cc +++ b/shell/common/node_bindings_mac.cc @@ -17,30 +17,6 @@ namespace electron { NodeBindingsMac::NodeBindingsMac(BrowserEnvironment browser_env) : NodeBindings(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; - - NodeBindings::RunMessageLoop(); -} - void NodeBindingsMac::PollEvents() { struct timeval tv; int timeout = uv_backend_timeout(uv_loop_); diff --git a/shell/common/node_bindings_mac.h b/shell/common/node_bindings_mac.h index 911287a65fd37..cae9540edbe7c 100644 --- a/shell/common/node_bindings_mac.h +++ b/shell/common/node_bindings_mac.h @@ -13,16 +13,9 @@ namespace electron { class NodeBindingsMac : public NodeBindings { public: explicit NodeBindingsMac(BrowserEnvironment browser_env); - ~NodeBindingsMac() override; - - void PrepareMessageLoop() override; - void RunMessageLoop() override; private: 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 1410925f195c5..9b2319cfdc86b 100644 --- a/shell/common/node_bindings_win.cc +++ b/shell/common/node_bindings_win.cc @@ -27,31 +27,6 @@ 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 59d7469b0ff75..a0dcd3378f909 100644 --- a/shell/common/node_bindings_win.h +++ b/shell/common/node_bindings_win.h @@ -13,16 +13,9 @@ namespace electron { class NodeBindingsWin : public NodeBindings { public: 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 08276425938f3..1c819d13c445b 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -93,9 +93,7 @@ void ElectronRendererClient::DidCreateScriptContext( if (!node_integration_initialized_) { node_integration_initialized_ = true; node_bindings_->Initialize(); - node_bindings_->PrepareMessageLoop(); - } else { - node_bindings_->PrepareMessageLoop(); + node_bindings_->PrepareEmbedThread(); } // Setup node tracing controller. @@ -131,7 +129,7 @@ void ElectronRendererClient::DidCreateScriptContext( node_bindings_->set_uv_env(env); // Give the node loop a run to make sure everything is ready. - node_bindings_->RunMessageLoop(); + node_bindings_->StartPolling(); } } diff --git a/shell/renderer/web_worker_observer.cc b/shell/renderer/web_worker_observer.cc index ca929bf9e4bb9..ea5f60daba426 100644 --- a/shell/renderer/web_worker_observer.cc +++ b/shell/renderer/web_worker_observer.cc @@ -56,7 +56,7 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation( isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); // Start the embed thread. - node_bindings_->PrepareMessageLoop(); + node_bindings_->PrepareEmbedThread(); // Setup node tracing controller. if (!node::tracing::TraceEventHelper::GetAgent()) @@ -78,7 +78,7 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation( node_bindings_->set_uv_env(env); // Give the node loop a run to make sure everything is ready. - node_bindings_->RunMessageLoop(); + node_bindings_->StartPolling(); } void WebWorkerObserver::ContextWillDestroy(v8::Local<v8::Context> context) { From aac546368faab9f140d52b4c5fb329c75a9ddca7 Mon Sep 17 00:00:00 2001 From: Shelley Vohr <shelley.vohr@gmail.com> Date: Wed, 30 Mar 2022 12:51:13 +0200 Subject: [PATCH 203/811] test: re-enable `test-child-process-stdio-overlapped` (#33502) --- .circleci/build_config.yml | 11 +++++++++++ patches/node/build_add_gn_build_files.patch | 13 +++++++++++-- script/node-disabled-tests.json | 1 - 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index f25a498be8d2c..0424b3e2d8290 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -674,6 +674,7 @@ step-persist-data-for-tests: &step-persist-data-for-tests - src/out/Default/chromedriver.zip - src/out/Default/shell_browser_ui_unittests - src/out/Default/gen/node_headers + - src/out/Default/overlapped-checker - src/out/ffmpeg/ffmpeg.zip - src/electron - src/third_party/electron_node @@ -811,6 +812,13 @@ step-mksnapshot-build: &step-mksnapshot-build (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S) fi +step-nodejs-build-test-executable: &step-nodejs-build-test-executable + run: + name: Build Node.js Test Executables + command: | + cd src + ninja -C out/Default third_party/electron_node:overlapped-checker + step-hunspell-build: &step-hunspell-build run: name: hunspell build @@ -1433,6 +1441,9 @@ commands: # Node.js headers - *step-nodejs-headers-build + # Node.js test executable + - *step-nodejs-build-test-executable + - *step-show-goma-stats # mksnapshot diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index d18f8e519d5a4..fbf050490c493 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP. diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..bd5788caa61305fd9af8f9d7f8f1937a224fda83 +index 0000000000000000000000000000000000000000..4afca42d22ee702af50da92aa08c1de897891424 --- /dev/null +++ b/BUILD.gn -@@ -0,0 +1,394 @@ +@@ -0,0 +1,403 @@ +import("//electron/build/asar.gni") +import("//v8/gni/v8.gni") + @@ -192,6 +192,15 @@ index 0000000000000000000000000000000000000000..bd5788caa61305fd9af8f9d7f8f1937a + } +} + ++executable("overlapped-checker") { ++ sources = [] ++ if (is_win) { ++ sources += [ "test/overlapped-checker/main_win.c" ] ++ } else { ++ sources += [ "test/overlapped-checker/main_unix.c" ] ++ } ++} ++ +component("node_lib") { + deps = [ + ":node_js2c", diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 52128823432f0..bfaf96bf9415d 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -4,7 +4,6 @@ "async-hooks/test-crypto-randomBytes", "parallel/test-bootstrap-modules", "parallel/test-child-process-fork-exec-path", - "parallel/test-child-process-stdio-overlapped", "parallel/test-cli-node-print-help", "parallel/test-cluster-bind-privileged-port", "parallel/test-cluster-shared-handle-bind-privileged-port", From f13f07023fca537cf8eeecc23c6f533e7665b7f0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 06:01:28 -0700 Subject: [PATCH 204/811] Bump v20.0.0-nightly.20220330 --- 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 e078e2e369954..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -19.0.0-nightly.20220329 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 34f8e5b0b6a40..3ef503b0bc981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "19.0.0-nightly.20220329", + "version": "20.0.0-nightly.20220330", "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 194e1b56579c3..5746c1f414b34 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 19,0,0,20220329 - PRODUCTVERSION 19,0,0,20220329 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "19.0.0" + VALUE "FileVersion", "20.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", "19.0.0" + VALUE "ProductVersion", "20.0.0" VALUE "SquirrelAwareVersion", "1" END END From a508dce1bfe000ad25a6d6320f12cd41ee1a3fd7 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt <jkleinsc@electronjs.org> Date: Wed, 30 Mar 2022 09:50:26 -0400 Subject: [PATCH 205/811] ci: save Windows artifacts at end of job in case they fail (#33510) --- appveyor.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7b413faee5c78..a449f76827eb3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -177,16 +177,7 @@ build_script: - ninja -C out/Default third_party/electron_node:headers - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - - appveyor PushArtifact out/Default/windows_toolchain_profile.json - - appveyor PushArtifact out/Default/dist.zip - - appveyor PushArtifact out/Default/shell_browser_ui_unittests.exe - - appveyor PushArtifact out/Default/chromedriver.zip - - appveyor PushArtifact out/ffmpeg/ffmpeg.zip - 7z a node_headers.zip out\Default\gen\node_headers - - appveyor PushArtifact node_headers.zip - - appveyor PushArtifact out/Default/mksnapshot.zip - - appveyor PushArtifact out/Default/hunspell_dictionaries.zip - - appveyor PushArtifact out/Default/electron.lib - ps: >- if ($env:GN_CONFIG -eq 'release') { # Needed for msdia140.dll on 64-bit windows @@ -201,7 +192,6 @@ build_script: # It's useful to have pdb files when debugging testing builds that are # built on CI. 7z a pdb.zip out\Default\*.pdb - appveyor-retry appveyor PushArtifact pdb.zip } - python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest test_script: @@ -230,7 +220,6 @@ 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: >- @@ -246,4 +235,19 @@ deploy_script: 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 ) + - cd .. + - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) + - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) + - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe) + - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip) + - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip) + - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip) + - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip) + - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip) + - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib) + - ps: >- + if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) { + appveyor-retry appveyor PushArtifact pdb.zip + } + + - if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log ) From 929fc8bea5dd8f5fa64723cc0a805319e3340bb8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao <zcbenz@gmail.com> Date: Thu, 31 Mar 2022 02:17:34 +0900 Subject: [PATCH 206/811] test: make test apps' name prefixed with electron-test- (#33511) --- spec-main/api-app-spec.ts | 8 ++++---- spec-main/api-session-spec.ts | 2 +- .../context-bridge-mutability/package.json | 4 ++-- .../api/safe-storage/decrypt-app/package.json | 2 +- .../api/safe-storage/encrypt-app/package.json | 2 +- .../apps/background-color-transparent/package.json | 2 +- spec-main/fixtures/apps/xwindow-icon/package.json | 4 ++-- .../auto-update/check-with-headers/package.json | 4 ++-- spec-main/fixtures/auto-update/check/package.json | 4 ++-- .../fixtures/auto-update/update-json/package.json | 4 ++-- spec-main/fixtures/auto-update/update/package.json | 4 ++-- spec/fixtures/api/cookie-app/package.json | 2 +- spec/fixtures/api/electron-module-app/.gitignore | 1 - spec/fixtures/api/electron-module-app/index.html | 14 -------------- .../node_modules/electron/index.js | 0 .../node_modules/electron/package.json | 4 ---- .../electron-module-app/node_modules/foo/index.js | 1 - .../node_modules/foo/package.json | 4 ---- spec/fixtures/api/mixed-sandbox-app/package.json | 2 +- spec/fixtures/api/quit-app/package.json | 2 +- spec/fixtures/api/relaunch/package.json | 2 +- spec/fixtures/api/singleton-data/package.json | 2 +- spec/fixtures/api/singleton/package.json | 2 +- 23 files changed, 26 insertions(+), 50 deletions(-) delete mode 100644 spec/fixtures/api/electron-module-app/.gitignore delete mode 100644 spec/fixtures/api/electron-module-app/index.html delete mode 100644 spec/fixtures/api/electron-module-app/node_modules/electron/index.js delete mode 100644 spec/fixtures/api/electron-module-app/node_modules/electron/package.json delete mode 100644 spec/fixtures/api/electron-module-app/node_modules/foo/index.js delete mode 100644 spec/fixtures/api/electron-module-app/node_modules/foo/package.json diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index 4de2ca2a0dd0a..718223229572b 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -90,9 +90,9 @@ describe('app module', () => { it('overrides the name', () => { expect(app.name).to.equal('Electron Test Main'); - app.name = 'test-name'; + app.name = 'electron-test-name'; - expect(app.name).to.equal('test-name'); + expect(app.name).to.equal('electron-test-name'); app.name = 'Electron Test Main'; }); }); @@ -104,9 +104,9 @@ describe('app module', () => { it('overrides the name', () => { expect(app.getName()).to.equal('Electron Test Main'); - app.setName('test-name'); + app.setName('electron-test-name'); - expect(app.getName()).to.equal('test-name'); + expect(app.getName()).to.equal('electron-test-name'); app.setName('Electron Test Main'); }); }); diff --git a/spec-main/api-session-spec.ts b/spec-main/api-session-spec.ts index f504d0db6d464..53a637bf86f60 100644 --- a/spec-main/api-session-spec.ts +++ b/spec-main/api-session-spec.ts @@ -1130,7 +1130,7 @@ describe('session module', () => { 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')); + session.defaultSession.setCodeCachePath(path.join(app.getPath('userData'), 'electron-test-code-cache')); }).to.not.throw(); }); }); diff --git a/spec-main/fixtures/api/context-bridge/context-bridge-mutability/package.json b/spec-main/fixtures/api/context-bridge/context-bridge-mutability/package.json index d1fc13838e5fe..91b9749095be8 100644 --- a/spec-main/fixtures/api/context-bridge/context-bridge-mutability/package.json +++ b/spec-main/fixtures/api/context-bridge/context-bridge-mutability/package.json @@ -1,4 +1,4 @@ { - "name": "context-bridge-mutability", + "name": "electron-test-context-bridge-mutability", "main": "main.js" -} \ No newline at end of file +} diff --git a/spec-main/fixtures/api/safe-storage/decrypt-app/package.json b/spec-main/fixtures/api/safe-storage/decrypt-app/package.json index cb5d6ffc41906..f4e7a5ad938a1 100644 --- a/spec-main/fixtures/api/safe-storage/decrypt-app/package.json +++ b/spec-main/fixtures/api/safe-storage/decrypt-app/package.json @@ -1,4 +1,4 @@ { - "name": "electron-safe-storage", + "name": "electron-test-safe-storage", "main": "main.js" } diff --git a/spec-main/fixtures/api/safe-storage/encrypt-app/package.json b/spec-main/fixtures/api/safe-storage/encrypt-app/package.json index 2fa2fabcd1e84..1b14cccc1d787 100644 --- a/spec-main/fixtures/api/safe-storage/encrypt-app/package.json +++ b/spec-main/fixtures/api/safe-storage/encrypt-app/package.json @@ -1,4 +1,4 @@ { - "name": "electron-safe-storage", + "name": "electron-test-safe-storage", "main": "main.js" } diff --git a/spec-main/fixtures/apps/background-color-transparent/package.json b/spec-main/fixtures/apps/background-color-transparent/package.json index 0ea4852f44c3f..6b8e31a17749e 100644 --- a/spec-main/fixtures/apps/background-color-transparent/package.json +++ b/spec-main/fixtures/apps/background-color-transparent/package.json @@ -1,4 +1,4 @@ { - "name": "background-color-transparent", + "name": "electron-test-background-color-transparent", "main": "main.js" } diff --git a/spec-main/fixtures/apps/xwindow-icon/package.json b/spec-main/fixtures/apps/xwindow-icon/package.json index 595e59b0f0f46..9e9503d422d03 100644 --- a/spec-main/fixtures/apps/xwindow-icon/package.json +++ b/spec-main/fixtures/apps/xwindow-icon/package.json @@ -1,4 +1,4 @@ { - "name": "electron-xwindow-icon", + "name": "electron-test-xwindow-icon", "main": "main.js" - } \ No newline at end of file + } diff --git a/spec-main/fixtures/auto-update/check-with-headers/package.json b/spec-main/fixtures/auto-update/check-with-headers/package.json index 05b06e42b92f0..b5362baed5a4c 100644 --- a/spec-main/fixtures/auto-update/check-with-headers/package.json +++ b/spec-main/fixtures/auto-update/check-with-headers/package.json @@ -1,5 +1,5 @@ { - "name": "electron-test-initial-app", + "name": "electron-test-check-with-headers", "version": "1.0.0", "main": "./index.js" -} \ No newline at end of file +} diff --git a/spec-main/fixtures/auto-update/check/package.json b/spec-main/fixtures/auto-update/check/package.json index 05b06e42b92f0..d127bfd349293 100644 --- a/spec-main/fixtures/auto-update/check/package.json +++ b/spec-main/fixtures/auto-update/check/package.json @@ -1,5 +1,5 @@ { - "name": "electron-test-initial-app", + "name": "electron-test-check", "version": "1.0.0", "main": "./index.js" -} \ No newline at end of file +} diff --git a/spec-main/fixtures/auto-update/update-json/package.json b/spec-main/fixtures/auto-update/update-json/package.json index 5edc5dc51ce71..ef434f0b40912 100644 --- a/spec-main/fixtures/auto-update/update-json/package.json +++ b/spec-main/fixtures/auto-update/update-json/package.json @@ -1,5 +1,5 @@ { - "name": "initial-app", + "name": "electron-test-update-json", "version": "1.0.0", "main": "./index.js" -} \ No newline at end of file +} diff --git a/spec-main/fixtures/auto-update/update/package.json b/spec-main/fixtures/auto-update/update/package.json index 5edc5dc51ce71..c9bb15fe643a5 100644 --- a/spec-main/fixtures/auto-update/update/package.json +++ b/spec-main/fixtures/auto-update/update/package.json @@ -1,5 +1,5 @@ { - "name": "initial-app", + "name": "electron-test-update", "version": "1.0.0", "main": "./index.js" -} \ No newline at end of file +} diff --git a/spec/fixtures/api/cookie-app/package.json b/spec/fixtures/api/cookie-app/package.json index bd21c272f5e2b..6b2951e75ac1b 100644 --- a/spec/fixtures/api/cookie-app/package.json +++ b/spec/fixtures/api/cookie-app/package.json @@ -1,4 +1,4 @@ { - "name": "electron-cookie-app", + "name": "electron-test-cookie-app", "main": "main.js" } diff --git a/spec/fixtures/api/electron-module-app/.gitignore b/spec/fixtures/api/electron-module-app/.gitignore deleted file mode 100644 index 736e8ae58ad87..0000000000000 --- a/spec/fixtures/api/electron-module-app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!node_modules \ No newline at end of file diff --git a/spec/fixtures/api/electron-module-app/index.html b/spec/fixtures/api/electron-module-app/index.html deleted file mode 100644 index 02bfee958747c..0000000000000 --- a/spec/fixtures/api/electron-module-app/index.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title> - - - - - - diff --git a/spec/fixtures/api/electron-module-app/node_modules/electron/index.js b/spec/fixtures/api/electron-module-app/node_modules/electron/index.js deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/spec/fixtures/api/electron-module-app/node_modules/electron/package.json b/spec/fixtures/api/electron-module-app/node_modules/electron/package.json deleted file mode 100644 index 07e3804ebb16e..0000000000000 --- a/spec/fixtures/api/electron-module-app/node_modules/electron/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "electron", - "main": "index.js" -} diff --git a/spec/fixtures/api/electron-module-app/node_modules/foo/index.js b/spec/fixtures/api/electron-module-app/node_modules/foo/index.js deleted file mode 100644 index 41f3ba446f69d..0000000000000 --- a/spec/fixtures/api/electron-module-app/node_modules/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.bar = function () {}; diff --git a/spec/fixtures/api/electron-module-app/node_modules/foo/package.json b/spec/fixtures/api/electron-module-app/node_modules/foo/package.json deleted file mode 100644 index 596ac286ecadc..0000000000000 --- a/spec/fixtures/api/electron-module-app/node_modules/foo/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "foo", - "main": "index.js" -} diff --git a/spec/fixtures/api/mixed-sandbox-app/package.json b/spec/fixtures/api/mixed-sandbox-app/package.json index c5b70811e60c5..e7c1a4105eedc 100644 --- a/spec/fixtures/api/mixed-sandbox-app/package.json +++ b/spec/fixtures/api/mixed-sandbox-app/package.json @@ -1,5 +1,5 @@ { - "name": "electron-app-mixed-sandbox", + "name": "electron-test-mixed-sandbox", "main": "main.js" } diff --git a/spec/fixtures/api/quit-app/package.json b/spec/fixtures/api/quit-app/package.json index fbdee7f90f955..5ca705eee7141 100644 --- a/spec/fixtures/api/quit-app/package.json +++ b/spec/fixtures/api/quit-app/package.json @@ -1,4 +1,4 @@ { - "name": "electron-quit-app", + "name": "electron-test-quit-app", "main": "main.js" } diff --git a/spec/fixtures/api/relaunch/package.json b/spec/fixtures/api/relaunch/package.json index dbaabc84896d2..93edb1ae8aeb5 100644 --- a/spec/fixtures/api/relaunch/package.json +++ b/spec/fixtures/api/relaunch/package.json @@ -1,5 +1,5 @@ { - "name": "electron-app-relaunch", + "name": "electron-test-relaunch", "main": "main.js" } diff --git a/spec/fixtures/api/singleton-data/package.json b/spec/fixtures/api/singleton-data/package.json index 3c20945331c14..a1498100b0fea 100644 --- a/spec/fixtures/api/singleton-data/package.json +++ b/spec/fixtures/api/singleton-data/package.json @@ -1,5 +1,5 @@ { - "name": "electron-app-singleton-data", + "name": "electron-test-singleton-data", "main": "main.js" } diff --git a/spec/fixtures/api/singleton/package.json b/spec/fixtures/api/singleton/package.json index ebf7c8f4892e2..42299dda77359 100644 --- a/spec/fixtures/api/singleton/package.json +++ b/spec/fixtures/api/singleton/package.json @@ -1,5 +1,5 @@ { - "name": "electron-app-singleton", + "name": "electron-test-singleton", "main": "main.js" } From b711860d21da111270c3c59945a037d6d04eec83 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 14:08:58 -0400 Subject: [PATCH 207/811] chore: bump chromium to 102.0.4971.0 (main) (#33454) * chore: bump chromium in DEPS to 102.0.4965.0 * chore: 3-way merge of chromium/printing.patch * chore: update patch shear in chromium/picture-in-picture.patch * chore: update patches * 3101519: Window Placement: Prototype fullscreen companion window support Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3101519 build: add popup_preventer.cc, .h to our library. It's needed because FullscreenController, we were already using, started aggregating a PopupPreventer in 3101519. * chore: bump chromium in DEPS to 102.0.4967.0 * Revert "3101519: Window Placement: Prototype fullscreen companion window support" This reverts commit fc215cb99c464e939882ed3f5cf8e9874a8e3311. Adding popup_preventer might not be the right solution; there are cascading dependencies. * 3551449: Add service-based usage for system print settings Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3551449 chore: fix code shear in patches/chromium/printing.patch * chore: update patches * chore: bump chromium in DEPS to 102.0.4969.0 * chore: update patches * chore: bump chromium in DEPS to 102.0.4971.0 * chore: update fix_patch_out_permissions_checks_in_exclusive_access.patch Refs https://chromium-review.googlesource.com/c/chromium/src/+/3101519 PopupunderPreventer is not useful in //electron since the window attributes are controlled by the user via setWindowOpenHandler. * chore: update patches * Add FirstPartySetsHandler as a interface class in content API. https://chromium-review.googlesource.com/c/chromium/src/+/3503410 * Create a new MediaStreamRequestType for GetOpenDevice https://chromium-review.googlesource.com/c/chromium/src/+/3541939 * Support site isolation for tags in WebViewRendererState. https://chromium-review.googlesource.com/c/chromium/src/+/3537735 * ci: update xcode version Refs https://chromium-review.googlesource.com/c/chromium/src/+/3544199 https://developer.apple.com/documentation/screencapturekit/capturing_screen_content_in_macos Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 --- .circleci/build_config.yml | 22 ++-- DEPS | 2 +- .../add_didinstallconditionalfeatures.patch | 10 +- ..._scheduler_throttling_per_renderview.patch | 10 +- ..._secondary_label_via_simplemenumodel.patch | 2 +- patches/chromium/blink_local_frame.patch | 6 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 22 ++-- patches/chromium/can_create_window.patch | 30 ++--- ..._v8_initialization_isolate_callbacks.patch | 2 +- ...screationoverridden_with_full_params.patch | 12 +- ...esources_not_chrome_for_spellchecker.patch | 4 +- patches/chromium/dcheck.patch | 4 +- .../disable_color_correct_rendering.patch | 6 +- ...ll_getwebframe_-_view_when_get_blink.patch | 2 +- .../extend_apply_webpreferences.patch | 2 +- ...screen_rendering_with_viz_compositor.patch | 10 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- ...rmissions_checks_in_exclusive_access.patch | 82 +++++++++++- ..._properly_honor_printing_page_ranges.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- .../load_v8_snapshot_in_browser_process.patch | 2 +- .../chromium/notification_provenance.patch | 2 +- patches/chromium/picture-in-picture.patch | 36 +++--- patches/chromium/printing.patch | 120 ++++++++++-------- ...r_changes_to_the_webcontentsobserver.patch | 4 +- patches/chromium/resource_file_conflict.patch | 6 +- .../support_mixed_sandbox_with_zygote.patch | 2 +- patches/chromium/web_contents.patch | 6 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 8 +- ...feat_add_hook_to_notify_script_ready.patch | 4 +- patches/v8/build_gn.patch | 6 +- ...export_private_v8_symbols_on_windows.patch | 2 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- shell/browser/api/electron_api_web_request.cc | 4 +- shell/browser/electron_browser_client.cc | 6 +- .../media/media_stream_devices_controller.cc | 7 + .../net/proxying_url_loader_factory.cc | 11 +- .../browser/net/proxying_url_loader_factory.h | 4 - shell/browser/net/proxying_websocket.cc | 1 - .../net/system_network_context_manager.cc | 4 - 46 files changed, 289 insertions(+), 216 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 0424b3e2d8290..9d8c587022e1c 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -59,7 +59,7 @@ executors: description: "xcode version" default: "12.4.0" type: enum - enum: ["12.4.0", "13.2.1"] + enum: ["12.4.0", "13.3.0"] macos: xcode: << parameters.xcode >> @@ -1923,7 +1923,7 @@ jobs: osx-testing-x64: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large <<: *env-testing-build @@ -1940,7 +1940,7 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-machine-mac <<: *env-testing-build @@ -1949,7 +1949,7 @@ jobs: osx-publish-x64-skip-checkout: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1970,7 +1970,7 @@ jobs: osx-publish-arm64-skip-checkout: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1992,7 +1992,7 @@ jobs: osx-testing-arm64: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large <<: *env-testing-build @@ -2011,7 +2011,7 @@ jobs: mas-testing-x64: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large <<: *env-mas @@ -2029,7 +2029,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-machine-mac <<: *env-mas @@ -2039,7 +2039,7 @@ jobs: mas-publish-x64-skip-checkout: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large-release <<: *env-mas @@ -2060,7 +2060,7 @@ jobs: mas-publish-arm64-skip-checkout: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large-release <<: *env-mas-apple-silicon @@ -2082,7 +2082,7 @@ jobs: mas-testing-arm64: executor: name: macos - xcode: "13.2.1" + xcode: "13.3.0" environment: <<: *env-mac-large <<: *env-testing-build diff --git a/DEPS b/DEPS index 00113fcca6410..087a1ca200ee2 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '102.0.4962.3', + '102.0.4971.0', 'node_version': 'v16.14.2', 'nan_version': diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 18a816de672d4..b5fd394b36e15 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 19c936be477f944d62e85cec81359a71bbcfa45d..b02bb1cd67488f996b6142058c52c34dfe523fff 100644 +index d55a1b4f71224a2156eb5f3b0b32f41643b3dc28..f41c8f3d74f72d6e2220af527500749ef7409d77 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -132,6 +132,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -131,6 +131,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 19c936be477f944d62e85cec81359a71bbcfa45d..b02bb1cd67488f996b6142058c52c34d int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index c9296960c76e34646bf7cb3195b80c0cbc483b58..bc8bdba3facba81c572d43b85881ec02ad7d2f00 100644 +index e0d4faf86b7afe7f29da5e5c8babc78a40e72ae1..1fbf6abed9c7d1bbec4478d022e1763ea8bfed8e 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4423,6 +4423,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4444,6 +4444,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -92,7 +92,7 @@ index bca4cbb2b2ba84fe58b5cfeaf190add5803e27c9..b6c9dd3a2a1c9b6667c563d5da86ccb4 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 e06c96c068139e829af7bd99ebb111507b2bddb0..a98bc22fc5c96ad1fd2071ea1c9e1aab2fb4d5ff 100644 +index b690ada2d46146b6da38cbb2c688f249ae558464..b03774140883c5bb7de6358f3df95ab8774b9dc7 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 @@ -275,6 +275,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( 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 04504a209f10a..e6dcf47aac97b 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 84044606fb0644b2b6053c72a9750bae3729f666..995c5dfc49a392669f73d85a92fbdb54cf0e11ca 100644 +index 8ee02135efb64c57d0779faa96640aa8e7775b58..66007d67da1230740eb00e31b220ddb02fbf37d9 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -649,6 +649,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -650,6 +650,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -85,10 +85,10 @@ index 560b72dfbc70172bc668229b29fe0c9da139f320..13ec73b9d627259625d64f5b97838033 // 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 daab024ee0e2010e177eabeb7e0fb964c631dd17..06d8ca44fb1dc3748d81b5c5a407dfdf7183f845 100644 +index dc63c0ba0cc8625ed5efb961a1c7f1d07fc72f5d..13a16ae577130d7520b47eb046b504ccd6796979 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3666,6 +3666,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3669,6 +3669,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index daab024ee0e2010e177eabeb7e0fb964c631dd17..06d8ca44fb1dc3748d81b5c5a407dfdf void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3677,7 +3684,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3680,7 +3687,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( diff --git a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch index 8ce5997c5cb9f..1b4e797564bb2 100644 --- a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch +++ b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch @@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976 diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc -index 746dffb1defec9d776f681d41325a65b02cbdd0f..05a7f20f10e3ff514aa3b3b5386980ddfcc586eb 100644 +index a787411f89e2d95e2fa636a7cc6723bdd227e563..f8c67d10957c26fbcd21fa1fe05507efd78f1c29 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc @@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId( diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 6ed95034fa73c..8acc606a3dbef 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,10 +49,10 @@ index da12f2f47f97628f1adeabc8900ffd16132afd7e..61d373f78520a063c7f86bde6869af9d // 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 1efaff0e92061bc97dcbf3105f6b6c1dcefff17c..ec2e19c3ccf60f01b73259e1e6eff405ebf15f07 100644 +index ae445a52314d8581909f05a06442954f39b6b6d0..857715ca74b0f3a50953095d15237292e2a05510 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -543,10 +543,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 1efaff0e92061bc97dcbf3105f6b6c1dcefff17c..ec2e19c3ccf60f01b73259e1e6eff405 if (!Client()) return false; -@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -592,6 +588,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index f096f681035eb..6c074efcaf841 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 083a46a96bf969a075ef05cfe4837c4cce784191..22f18293e65035cc3b9af322520b102eb6b24a76 100644 +index 0736e7021761e6019e1b52448d21ffdb73b964fc..571b553e9aaa98739851d0ff312eefe9f6a75596 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -80,6 +80,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 d6d7b7c762219..435d66c466712 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 a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015..95a7e70eee0303471702b81c68f46a0fea2b6f0e 100644 +index 1f86073736f849e797e029678bc212ce96ba0bd9..b8abc10e48bdff0f4e6c3f8e1c4927bc6e0c2f79 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015..95a7e70eee0303471702b81c68f46a0f "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 5bbb64d83e2024feeb7a2eae45f6b8e937fc927c..20004fb890e726d11dc672894cdba4645b0a3606 100644 +index a99ce094addf69f21f3c42690defc445eff8fa05..797c8add1af6df1142179388ef1b7a5bf977d527 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4508,7 +4508,7 @@ static_library("browser") { +@@ -4518,7 +4518,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 5bbb64d83e2024feeb7a2eae45f6b8e937fc927c..20004fb890e726d11dc672894cdba464 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 3d7606b8d7d5f1ec61c9c00be0cc530967985e4b..044b52e00d8b334e90a9f1126b5bc3df916a1af3 100644 +index 4f088ea7cfbb7aaa3ed15607608dd9cafc6a2981..8df44262c079c96a1a81167a769d426aab23bef0 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5907,7 +5907,6 @@ test("unit_tests") { +@@ -5943,7 +5943,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 3d7606b8d7d5f1ec61c9c00be0cc530967985e4b..044b52e00d8b334e90a9f1126b5bc3df "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5930,6 +5929,10 @@ test("unit_tests") { +@@ -5966,6 +5965,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 3d7606b8d7d5f1ec61c9c00be0cc530967985e4b..044b52e00d8b334e90a9f1126b5bc3df ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6619,7 +6622,6 @@ test("unit_tests") { +@@ -6656,7 +6659,6 @@ test("unit_tests") { } deps += [ @@ -76,10 +76,10 @@ index 3d7606b8d7d5f1ec61c9c00be0cc530967985e4b..044b52e00d8b334e90a9f1126b5bc3df "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6664,6 +6666,11 @@ test("unit_tests") { - "//ui/native_theme:test_support", - "//ui/webui/resources/js/browser_command:mojo_bindings", - ] +@@ -6704,6 +6706,11 @@ test("unit_tests") { + if (is_chromeos) { + deps += [ "//ui/chromeos" ] + } + + if (!is_electron_build) { + deps += [ "//chrome:packed_resources_integrity_hash" ] diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 21f6a27357742..5ccade1f90045 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 dc75ab59ff7af972c950a9be682ebd9cddce2627..a969bbaaecb4b589808413d40299b68f3bc1fd3e 100644 +index be7895586d64b0f8e7f122561d86f49479400a2b..5ad53ce87d8757b18e5ecedbd7ec9aec54bea165 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6880,6 +6880,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6908,6 +6908,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 dc75ab59ff7af972c950a9be682ebd9cddce2627..a969bbaaecb4b589808413d40299b68f &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2afbf96abef912bf483d08f6c011aa4a2e515e25..92dcf2308842ce8922426b0cafdd5a3e83f4bd52 100644 +index 88266830511440e51e47166c66f80e9956bcef5a..3fa51ecee644055db44bd4dd54c27ec224ff46d6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3931,6 +3931,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3937,6 +3937,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 2afbf96abef912bf483d08f6c011aa4a2e515e25..92dcf2308842ce8922426b0cafdd5a3e new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3975,12 +3983,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3981,12 +3989,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index 2afbf96abef912bf483d08f6c011aa4a2e515e25..92dcf2308842ce8922426b0cafdd5a3e 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 afc0dc34e4a1f6c06e96d7fa09922e8aaf4bab28..f3d13fc719324e064f70077deb5d95cb9e467820 100644 +index ec594f27e94bf0b95967c4d816c9b1e159e4a08d..de908becd59392db284c60f61d97f8b2210aa888 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -550,6 +550,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index afc0dc34e4a1f6c06e96d7fa09922e8aaf4bab28..f3d13fc719324e064f70077deb5d95cb // 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 d832c0c37554dafad0c44c78f6dc9233015b152f..654abc174a237a90225ad7be7f1180e929b9829b 100644 +index fbf6817479cace0ca06065eef3aa70aae2a0ebe1..cef6a18df7cfb8528ea07e808c3e539726ea815d 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -576,6 +576,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 d832c0c37554dafad0c44c78f6dc9233015b152f..654abc174a237a90225ad7be7f1180e9 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 e142bc65c2a0fe06a1cf59621c424170dc2d641c..8573ea54135e363f83bd786db3483d1c539e4bb1 100644 +index a0f2f002b51c6061fe509d13b2286faaec721936..1b7e71e12d01929b8bfacf8c7c8950922bdd3d59 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -169,6 +169,7 @@ class NetworkService; +@@ -170,6 +170,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index e142bc65c2a0fe06a1cf59621c424170dc2d641c..8573ea54135e363f83bd786db3483d1c } // namespace network namespace sandbox { -@@ -958,6 +959,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -959,6 +960,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -124,7 +124,7 @@ index f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 9c70cc90402dd1541b2b58b3be2fa7ff215f8f57..a998c64237a7ffd6583a33cd54fe3229196300a6 100644 +index 85335ff06c87ea3986360fad18df6cf01a4a7cca..eeafde1fa6067804665954525eafdd482d8eb3f3 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 9c70cc90402dd1541b2b58b3be2fa7ff215f8f57..a998c64237a7ffd6583a33cd54fe3229 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/media_stream_request.h" -@@ -339,6 +340,13 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -338,6 +339,13 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -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 c18012a217bfc492ac2cdef5776bb23099df57ae..b96bd45cfee98c8177b3ac5979273d1f9ba47388 100644 +index dcacde03e5889d7347aadb2cfde10da767c9f9ca..3ccb2700c97d1297b8482e1b7b324cfa4002e21e 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2069,6 +2069,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2068,6 +2068,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 00838845586bb..574913f05552a 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,7 +9,7 @@ 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 5040ec838c64ffa8aa58ba43f51df649443b2f81..7a7a87d00fa392b7bd07267d9059664d5d472252 100644 +index 66dddc124ca48024cb9539529b787f6e9aa1fd5c..fd6dc712df185724ae88a40e643a26126e54d712 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -446,8 +446,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 04ad43d0a65ff..2b80fd29fa5ac 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 ace0c593debb46c9238e5708634fc6088a1bc715..31d5c0f00ae43706f16fc8615761e96eab31f1f3 100644 +index 70ee9049e3cb73f55bed81c3e08037df2f4c9e07..8d230826aaf867d9046a6b9ac93a60f4750e52be 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1770,12 +1770,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 d69e028b34ab4407abcdea3ece93db39926c587e..a82b571fdabe90771bc8f8ed4ae40df3085592c7 100644 +index cc6afdef869470136c2cec392911742a289f6339..2033877b86eddbc9baac6a603587e631021f6819 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3879,8 +3879,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3885,8 +3885,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -274,10 +274,10 @@ index 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index a998c64237a7ffd6583a33cd54fe3229196300a6..4f57227a9033f905be13bc5166d0324d495a6531 100644 +index eeafde1fa6067804665954525eafdd482d8eb3f3..b17f371aa489a5b61c28fbcd316b19815f072df9 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -318,8 +318,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate { 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 5c092bf9ad23d..99d292f285fb0 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 5f43b35aab6c2f277f0d021b378bee55f97572aa..5bbb64d83e2024feeb7a2eae45f6b8e937fc927c 100644 +index 72c3a67361eaecbe7349db00bbd3b7c1deaced69..a99ce094addf69f21f3c42690defc445eff8fa05 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7126,6 +7126,7 @@ static_library("browser") { +@@ -7135,6 +7135,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 0af9aeccfd053..4832704e4e759 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 7a6503d4a4ad33290d97078336c18d81839a8675..0f162b8e681ebb67c5f3b23a40fe3b6ec97cec49 100644 +index a4d74f8e59673d4734ef338235c027bd1c77e92e..6969d1c69ee215055bd49a2bf830416c9e8b62c8 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 -@@ -506,8 +506,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( +@@ -515,8 +515,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 24227afe87461..4d0d3ef337593 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -80,7 +80,7 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 553c3be2562e836e2ce6d6f44997cebf3cba7466..fbe38d97a8d1861ecfb5ccb583d050a28b9ab108 100644 +index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc9c51c6d3 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -86,6 +86,9 @@ @@ -228,7 +228,7 @@ index 553c3be2562e836e2ce6d6f44997cebf3cba7466..fbe38d97a8d1861ecfb5ccb583d050a2 + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 90c7ace352fe909e3f521403c2a7fbf030ccc31e..f011183e21921f38ce5062079e8430a030159bc1 100644 +index 8b32bf5455183ff7bb6295d7922e76a6593b8ee0..041ffe9d26ef3401179eb57917f5585497500689 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -240,7 +240,7 @@ index 90c7ace352fe909e3f521403c2a7fbf030ccc31e..f011183e21921f38ce5062079e8430a0 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 d8939c1936830b101d6bb4079cd99e6015b481c4..366f801cbe84a28ef462037a26da47c9f65057b4 100644 +index ca056c66af681548ba01bd07db7dadc5ce2a5280..f5025422ebdb9fe35ee5e4e1ed647bc05028d4a8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -197,6 +197,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 d8cdef4d187c5..2b2569457cc46 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,7 +11,7 @@ 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 bc8bdba3facba81c572d43b85881ec02ad7d2f00..3b12ab113f7c159beb74a09f95335977b4ee2b4f 100644 +index 1fbf6abed9c7d1bbec4478d022e1763ea8bfed8e..e0d7367135abb08f9f303cc528a55d8ba026fa56 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -2367,7 +2367,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 1a14cd39962aa..854e5de029ce8 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 06d8ca44fb1dc3748d81b5c5a407dfdf7183f845..85e1772fbcbb190e32dd30996541cc2e9d19d057 100644 +index 13a16ae577130d7520b47eb046b504ccd6796979..6987c81cd9f6b774ec15605c0ea64ca34ba84d22 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 @@ 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 f8f64ec23fbe9..4c6b697e3b604 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -573,10 +573,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index b30b9460889b9bb3862f4e28b5f1292a118f2a09..d8f1f921d3e6e74c99d6a22c902f81dfc5bb646e 100644 +index 2696c864d5e32e4b87834ced1035a7b1742639b4..ff663b4e75399898daaa3e77339deec03b43a28a 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -81,6 +81,7 @@ class DisplayPrivate; +@@ -82,6 +82,7 @@ class DisplayPrivate; class ExternalBeginFrameController; } // namespace mojom class ContextProvider; @@ -584,7 +584,7 @@ index b30b9460889b9bb3862f4e28b5f1292a118f2a09..d8f1f921d3e6e74c99d6a22c902f81df class HostFrameSinkManager; class LocalSurfaceId; class RasterContextProvider; -@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -138,6 +139,16 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -601,7 +601,7 @@ index b30b9460889b9bb3862f4e28b5f1292a118f2a09..d8f1f921d3e6e74c99d6a22c902f81df // 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 -@@ -178,6 +189,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -179,6 +190,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -611,7 +611,7 @@ index b30b9460889b9bb3862f4e28b5f1292a118f2a09..d8f1f921d3e6e74c99d6a22c902f81df // 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 -@@ -466,6 +480,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -469,6 +483,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; 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 a17c7119f3e7b..832bba5787c3e 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.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 2e370bf7fd61d75677cfc84798ba543a48f3bc19..fc8f471745c8daf30679df1ffb994febe62cfbea 100644 +index 22f7a86817fe4a2dc39913db349e81d93eef4874..c9509d84e25fd88d6ef13933099d582561fe5660 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -855,26 +855,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -858,26 +858,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -48,7 +48,7 @@ index 2e370bf7fd61d75677cfc84798ba543a48f3bc19..fc8f471745c8daf30679df1ffb994feb } /** -@@ -982,30 +968,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -985,30 +971,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { fileName = fileName + '.pdf'; } 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 dfbc1343d6826..4ac4782be9141 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,67 @@ 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 8d6f8aedab475c1a553949bfcba3753ebed87778..e379e4995b0812be5970cf9741a00e4f99dea3f1 100644 +index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d54a5b39da 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -@@ -384,13 +384,9 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -16,12 +16,16 @@ + #include "build/build_config.h" + #include "chrome/browser/app_mode/app_mode_utils.h" + #include "chrome/browser/profiles/profile.h" ++#if 0 + #include "chrome/browser/ui/blocked_content/popunder_preventer.h" ++#endif + #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" + #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" + #include "chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.h" ++#if 0 + #include "chrome/browser/ui/status_bubble.h" + #include "chrome/browser/ui/tabs/tab_strip_model.h" ++#endif + #include "chrome/common/chrome_switches.h" + #include "content/public/browser/navigation_details.h" + #include "content/public/browser/navigation_entry.h" +@@ -161,6 +165,7 @@ void FullscreenController::EnterFullscreenModeForTab( + return; + } + ++#if 0 + if (base::FeatureList::IsEnabled( + blink::features::kWindowPlacementFullscreenCompanionWindow)) { + if (!popunder_preventer_) +@@ -168,6 +173,7 @@ void FullscreenController::EnterFullscreenModeForTab( + else + popunder_preventer_->WillActivateWebContents(web_contents); + } ++#endif + + SetTabWithExclusiveAccess(web_contents); + requesting_origin_ = +@@ -203,7 +209,9 @@ void FullscreenController::EnterFullscreenModeForTab( + } + + void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { ++#if 0 + popunder_preventer_.reset(); ++#endif + + if (MaybeToggleFullscreenWithinTab(web_contents, false)) { + // During tab capture of fullscreen-within-tab views, the browser window +@@ -248,11 +256,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { + void FullscreenController::FullscreenTabOpeningPopup( + content::WebContents* opener, + content::WebContents* popup) { ++#if 0 + DCHECK(base::FeatureList::IsEnabled( + blink::features::kWindowPlacementFullscreenCompanionWindow)); + DCHECK_EQ(exclusive_access_tab(), opener); + DCHECK(popunder_preventer_); + popunder_preventer_->AddPotentialPopunder(popup); ++#endif + } + + void FullscreenController::OnTabDeactivated( +@@ -402,13 +412,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 +90,7 @@ index 8d6f8aedab475c1a553949bfcba3753ebed87778..e379e4995b0812be5970cf9741a00e4f #endif toggled_into_fullscreen_ = true; -@@ -403,6 +399,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -421,6 +427,7 @@ void FullscreenController::EnterFullscreenModeInternal( url = extension_caused_fullscreen_; } @@ -41,7 +98,7 @@ index 8d6f8aedab475c1a553949bfcba3753ebed87778..e379e4995b0812be5970cf9741a00e4f 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. -@@ -415,6 +412,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -434,6 +441,7 @@ void FullscreenController::EnterFullscreenModeInternal( display_id = display::kInvalidDisplayId; } } @@ -49,3 +106,20 @@ index 8d6f8aedab475c1a553949bfcba3753ebed87778..e379e4995b0812be5970cf9741a00e4f if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); +diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h +index 7bd40f52ef5f6b04a7ea114ec4d18c8a98ec6d42..fb04fed5cc1e2e255c9e67c180fababe1fbb3fe0 100644 +--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h ++++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h +@@ -222,10 +222,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { + // Used in testing to set the state to tab fullscreen. + bool is_tab_fullscreen_for_testing_ = false; + ++#if 0 + // Tracks related popups that lost activation or were shown without activation + // during content fullscreen sessions. This also activates the popups when + // fullscreen exits, to prevent sites from creating persisent popunders. + std::unique_ptr popunder_preventer_; ++#endif + + base::ObserverList observer_list_; + diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index fb162f70ab70e..6afb86bfb4a19 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -62,10 +62,10 @@ index 9e351c7e80a135adf0ebe011763f5164e51981bb..b9fcb4d2a8c7a22ebc7cd8434636454e PMPrintSettings print_settings = static_cast([print_info_.get() PMPrintSettings]); diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc -index ba604d33cc0601276320f3f81f20e98cb2811f74..1da667c66b75ab44727c5029c02d44379f924007 100644 +index b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5bc88b0c2d 100644 --- a/printing/printing_context_system_dialog_win.cc +++ b/printing/printing_context_system_dialog_win.cc -@@ -53,14 +53,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( +@@ -75,14 +75,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( PRINTPAGERANGE ranges[32]; dialog_options.nStartPage = START_PAGE_GENERAL; if (max_pages) { diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 80c56304eadfc..9ed4dada269e3 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 6ecce70efe2d63259f8de512de276a49da1ee9c0..3068a27d60c109156d91dee68715d00aaf5f972d 100644 +index 9208dc75b4e3d969fbb0bb13de64d2b129de9509..b5779d43456c5e356497f2cb671fcb9b3492b47f 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3167,6 +3167,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3170,6 +3170,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 6ecce70efe2d63259f8de512de276a49da1ee9c0..3068a27d60c109156d91dee68715d00a } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 8573ea54135e363f83bd786db3483d1c539e4bb1..11036e52affafe46bab3146184b8d89696d4163c 100644 +index 1b7e71e12d01929b8bfacf8c7c8950922bdd3d59..ca5a03653611843a8eac90e1be86ca4aa40ecce2 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -276,6 +276,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -277,6 +277,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index ea0050fc48222..c8d8f95b97aec 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 22896db086972ff3865df9cbb4d904f1e00b7321..8e23293f8cd7f0a4203b3d5fdae24aa5e26fc2ec 100644 +index 862a5fa7d1f388c9e6cda18416fb5d9ae56cca4b..2da5d367dacd557bcca79412ed77fd74d37241f4 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -955,6 +955,11 @@ +@@ -950,6 +950,11 @@ "includes": [4960], }, 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 13e3eec7f04d0..84f03a08c570c 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 8cf820d7d1f5d9e85156a18e9ec573dbeb63d41a..a7d6ea676aaba90220761fa7ecc4569012806581 100755 +index 90f738057d3040b5421d51592097c7c30106a94f..3cb2f0880bb36f19fc9b55f2351f891088e8c304 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index d8a9cd23bbe73..bfb6ba3121608 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 7074141f95253587ae3ca156118ac6b10dd60e26..0476d00de005060c991cd6fa9ccd323ef5d56ea3 100644 +index ce5f2904c283643558375a84453073f7ea8aba3e..a17bf60c79fdd2511a46796b80879ed7926c706d 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -248,11 +248,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index ff03cd3658ee0..f9c04cc3c1735 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -131,7 +131,7 @@ 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 cc5f7c8d616ec9a433da428f180483da60736a9d..fb25a7c19f20ca690963c5a15bd09224687b5f57 100644 +index a188b1282e7ceca3fe24cb2d82c644bf0c21bc6f..f0b6fa61bb24d5b5fc4cf9cb8fc2f635f515f3f6 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -2083,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index ff258785cd530..f5b2e1333c446 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -22,7 +22,7 @@ index 7bc8d118f87b91baf1c3bd1d34374996ab1d3638..2d2c1c86f311b07f0c2b09d5a4c082cc #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.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 7d0e39968bf34cdc99549cb48f6bf0a11c182565..f21c1672abf34dc9d19cd39c5d09083a60ef6978 100644 +index d566dbf99ea1164c6a8407026a9839218a6ba1fb..239cd53d70c547c79214988a82efdc8c472d553c 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 @@ @@ -35,7 +35,7 @@ index 7d0e39968bf34cdc99549cb48f6bf0a11c182565..f21c1672abf34dc9d19cd39c5d09083a #include "ui/base/cursor/cursor.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index d3400d7b02edc9cffba4cb53ec601b6e4cfea3b2..8e620ad6172a650ea96f80c0b44035932471d88b 100644 +index a3d9c0f03c8ade2553bad5721d4e15e6fd658074..b3b043cbf9144013bf7903121575b31b348ea87e 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 @@ @@ -150,10 +150,10 @@ index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca875113 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 +index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866a42237e6 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, +@@ -56,7 +56,6 @@ class DocumentOverlayWindowViews : public OverlayWindowViews, bool IsVisible() const override; void OnNativeWidgetMove() override; void OnNativeWidgetDestroyed() override; @@ -162,13 +162,13 @@ index 86d385842501d28b5eb42f841822294eb597e6ed..43c19dfa6ec6b48f8694636cc184dd61 // 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 26f8f5ffa444d874b229b5e8debf087e4469dfd1..10149e812a43e3d5c92701e9b2ae8d68ed8395c7 100644 +index 75bfe0f7a4d759f677cad5c365fa7f98121d54de..cb251381f1c77ad01d4906132f3d68865aaace10 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc +++ b/chrome/browser/ui/views/overlay/hang_up_button.cc -@@ -5,7 +5,7 @@ - #include "chrome/browser/ui/views/overlay/hang_up_button.h" +@@ -6,7 +6,7 @@ #include "chrome/browser/ui/color/chrome_color_id.h" + #include "chrome/browser/ui/views/overlay/constants.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" @@ -205,13 +205,13 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3 #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index bcd3b2e1038786b660a4b91fbc20d9d8b4afffb4..a953c9d0ee0b49d6cc096e3eb236296b57cbc6c0 100644 +index cb1621a9deefcec601d7537e2cc2fbd24e5f7f64..2d74ab12e1eaf77a6f9dde13e894172d6835e061 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 @@ - +@@ -7,7 +7,7 @@ #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/ui/color/chrome_color_id.h" + #include "chrome/browser/ui/views/overlay/constants.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" @@ -244,26 +244,26 @@ index 51c7db1bfbd3c03b9cb2786c8c7482b33e3aca0b..2890f7420d2fd258f84019963eab6c96 #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 46ec4441ddb227325b319359f9d33a80aa856d85..57957d72310c0a232c78489fba5a07cdf475dc53 100644 +index 20b82ff4dcf7fef3315b2b47bb480446509c6541..244a50e57b6c12680405c92f0ecbdbdb8bcfcb4f 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 @@ - #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" +@@ -6,7 +6,7 @@ #include "chrome/browser/ui/color/chrome_color_id.h" + #include "chrome/browser/ui/views/overlay/constants.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #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/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -index 59b9a5442185bfb9efd8ed571ec63d56e3bc3326..34d58bf54019e0b8001c29cb301861d045c60214 100644 +index 1a1edb6321490fdbf5cd347cb3d2cb9a6a5b1080..1e959cf1c8fe356ab4427e4bf4f8da1028f4575f 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 @@ - #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" +@@ -6,7 +6,7 @@ #include "chrome/browser/ui/color/chrome_color_id.h" + #include "chrome/browser/ui/views/overlay/constants.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" @@ -283,7 +283,7 @@ index 5e136488b37887e9523ac04a9ff4ccdfaf96c104..24899f4c2b6fe66b96a6728bf747f1aa #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 b2e281840f48592eb773c16042fb6b56a0fa132b..d5156bab0c81ca508733a8d3ba95f052ff6d83e6 100644 +index 6d2744b673ecb31464d4aa9b0d11177892c030f4..f9ea66415b85ce385be429ead5e04c8a96dc31c4 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 @@ @@ -319,7 +319,7 @@ index b2e281840f48592eb773c16042fb6b56a0fa132b..d5156bab0c81ca508733a8d3ba95f052 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -148,7 +150,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -167,7 +169,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 6aae32dba1e9f..5b18830b6f0ed 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -69,7 +69,7 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 27305997182f0a669291d2f36dd6b0b98c43f314..cbb83e1f5661852d84468ec9d342af1b2d05ae45 100644 +index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..a5950a9d4c823e3df145c365bb499c0163fe3e77 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -88,7 +88,7 @@ index 27305997182f0a669291d2f36dd6b0b98c43f314..cbb83e1f5661852d84468ec9d342af1b #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -234,16 +234,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -229,16 +229,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -114,10 +114,10 @@ index 27305997182f0a669291d2f36dd6b0b98c43f314..cbb83e1f5661852d84468ec9d342af1b #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 52a13c0c47f7f3f18c4f552806add67291ce8726..765bde402fec094b51faea68e67d3782bbc06564 100644 +index 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b899e5972 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -226,7 +226,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -305,7 +305,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -127,7 +127,7 @@ index 52a13c0c47f7f3f18c4f552806add67291ce8726..765bde402fec094b51faea68e67d3782 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521e01702ac 100644 +index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..abd7e5e5832919cbd06b3b337f54d79d284a4247 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -151,7 +151,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -86,6 +87,8 @@ using PrintSettingsCallback = +@@ -88,6 +89,8 @@ using PrintSettingsCallback = base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { @@ -160,7 +160,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -94,6 +97,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -96,6 +99,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -168,7 +168,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -191,7 +195,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -193,7 +197,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -179,7 +179,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -244,6 +250,7 @@ void ScriptedPrintReplyOnIO( +@@ -246,6 +252,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -187,7 +187,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -253,8 +260,9 @@ void ScriptedPrintReplyOnIO( +@@ -255,8 +262,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -198,7 +198,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -292,12 +300,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -295,12 +303,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -213,7 +213,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -305,7 +315,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -308,7 +318,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -225,8 +225,8 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -328,7 +341,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { - // go in `ReleasePrintJob()`. +@@ -334,7 +347,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { + #endif SetPrintingRFH(rfh); - GetPrintRenderFrame(rfh)->PrintRequestedPages(); @@ -236,7 +236,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -471,7 +486,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -487,7 +502,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -245,8 +245,8 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 + bool canceled) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - if (!content::RenderProcessHost::FromID(process_id)) { -@@ -479,16 +495,19 @@ void PrintViewManagerBase::ScriptedPrintReply( + #if BUILDFLAG(ENABLE_OOP_PRINTING) +@@ -500,16 +516,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -270,22 +270,22 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 } void PrintViewManagerBase::NavigationStopped() { -@@ -602,12 +621,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -625,11 +644,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +#if 0 // Printing is always enabled. ++ if (!printing_enabled_.GetValue()) { GetDefaultPrintSettingsReply(std::move(callback), mojom::PrintParams::New()); return; } -- +#endif - content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); - auto callback_wrapper = - base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply, -@@ -624,18 +644,20 @@ void PrintViewManagerBase::UpdatePrintSettings( + #if BUILDFLAG(ENABLE_OOP_PRINTING) + if (printing::features::kEnableOopPrintDriversJobPrint.Get() && + !service_manager_client_id_.has_value()) { +@@ -656,18 +678,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -307,7 +307,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -645,6 +667,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -677,6 +701,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -315,7 +315,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -670,7 +693,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -702,14 +727,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -323,8 +323,16 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 + std::move(callback).Run(CreateEmptyPrintPagesParamsPtr(), false); return; } - auto callback_wrapper = base::BindOnce( -@@ -691,7 +714,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { + #if BUILDFLAG(ENABLE_OOP_PRINTING) + if (printing::features::kEnableOopPrintDriversJobPrint.Get() && + !service_manager_client_id_.has_value()) { + // Renderer process has requested settings outside of the expected setup. +- std::move(callback).Run(CreateEmptyPrintPagesParamsPtr()); ++ std::move(callback).Run(CreateEmptyPrintPagesParamsPtr(), false); + return; + } + #endif +@@ -732,7 +757,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -332,7 +340,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 #endif ReleasePrinterQuery(); -@@ -706,6 +728,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -747,6 +771,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -344,7 +352,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -716,10 +743,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -757,10 +786,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -357,7 +365,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 } void PrintViewManagerBase::DidStartLoading() { -@@ -779,6 +808,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -820,6 +851,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -369,7 +377,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -840,7 +874,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -881,7 +917,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -381,9 +389,9 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 if (!weak_this) return false; -@@ -915,6 +952,13 @@ void PrintViewManagerBase::ReleasePrintJob() { - content::RenderFrameHost* rfh = printing_rfh_; - printing_rfh_ = nullptr; +@@ -963,6 +1002,13 @@ void PrintViewManagerBase::ReleasePrintJob() { + UnregisterSystemPrintClient(); + #endif + if (!callback_.is_null()) { + std::string cb_str = ""; @@ -395,7 +403,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 if (!print_job_) return; -@@ -964,7 +1008,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1012,7 +1058,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -405,7 +413,7 @@ index 1f37c11047d47bb2d65975fa69f33d822206dd08..d13ee6a81cd7edc5be99f595515ca521 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 2661776307f773ac8f2c62529ec86349b045ee8f..cb41b271adbb02517a5e1ad222d0320000437dfb 100644 +index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61ddde6cd552 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 { @@ -437,7 +445,7 @@ index 2661776307f773ac8f2c62529ec86349b045ee8f..cb41b271adbb02517a5e1ad222d03200 // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -193,7 +199,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -207,7 +213,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -447,7 +455,7 @@ index 2661776307f773ac8f2c62529ec86349b045ee8f..cb41b271adbb02517a5e1ad222d03200 // 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 -@@ -248,9 +255,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -262,9 +269,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -539,10 +547,10 @@ index 66810a2a5f0c77ba107c71d2abaef8692bda0fea..cd6103af4571f82f11652a3c7ecf0e53 void PdfPrintManager::ShowInvalidPrinterSettingsError() { diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 5afad24754e12554368a6619466ca025edc26180..e2e786692bd877d3b8bf7c31829496afa99ed539 100644 +index 6cd585d597315940be144506b9bb819137a7981e..8ea9c38a46460edd237f003ddd7362240a02887e 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -274,7 +274,7 @@ interface PrintPreviewUI { +@@ -275,7 +275,7 @@ interface PrintPreviewUI { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. @@ -551,7 +559,7 @@ index 5afad24754e12554368a6619466ca025edc26180..e2e786692bd877d3b8bf7c31829496af // 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 { +@@ -342,7 +342,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] @@ -561,7 +569,7 @@ index 5afad24754e12554368a6619466ca025edc26180..e2e786692bd877d3b8bf7c31829496af // 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 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d0801b43a8ea 100644 +index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd056957255b74f0a2 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -40,6 +40,7 @@ @@ -610,7 +618,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1387,6 +1390,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1389,6 +1392,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -618,8 +626,8 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 + print_preview_context_.InitWithFrame(frame); print_preview_context_.OnPrintPreview(); - if (print_preview_context_.IsForArc()) { -@@ -1924,7 +1929,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { + #if BUILDFLAG(IS_CHROMEOS_ASH) +@@ -1941,7 +1946,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -629,7 +637,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 // Check if |this| is still valid. if (!weak_this) return; -@@ -1939,7 +1945,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1956,7 +1962,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -640,7 +648,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1947,7 +1955,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1964,7 +1972,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -649,7 +657,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1966,8 +1974,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1983,8 +1991,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -666,7 +674,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 // Check if |this| is still valid. if (!self) return; -@@ -2215,36 +2230,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2232,36 +2247,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -724,13 +732,13 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 + uint32_t* number_of_pages, + const base::DictionaryValue& settings) { DCHECK(frame); - bool fit_to_paper_size = !IsPrintingNodeOrPdfFrame(frame, node); + bool fit_to_paper_size = !IsPrintingPdfFrame(frame, node); - if (!InitPrintSettings(fit_to_paper_size)) { + if (!InitPrintSettings(fit_to_paper_size, settings)) { notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2389,7 +2419,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2405,7 +2435,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -739,7 +747,7 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2634,18 +2664,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2656,18 +2686,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { @@ -760,10 +768,10 @@ index 066521576d021cbd3e68057f68199c23a8a30437..72777428d2456191875806bc3c57d080 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 2b703118bf94a82262adc293368dcfcdb67807ff..a07f307ff48f3ce5409354a5ba8d54b43325da73 100644 +index 023594185e3aa9c79e8c5179c40ce867a5bb80e9..312cf5d4dbdb130dee3a07f970c9d92d6cd2cdbf 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -254,7 +254,7 @@ class PrintRenderFrameHelper +@@ -256,7 +256,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -772,7 +780,7 @@ index 2b703118bf94a82262adc293368dcfcdb67807ff..a07f307ff48f3ce5409354a5ba8d54b4 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; void SetPrintPreviewUI( -@@ -321,7 +321,9 @@ class PrintRenderFrameHelper +@@ -323,7 +323,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -783,7 +791,7 @@ index 2b703118bf94a82262adc293368dcfcdb67807ff..a07f307ff48f3ce5409354a5ba8d54b4 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -330,12 +332,14 @@ class PrintRenderFrameHelper +@@ -332,12 +334,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. 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 a4aa00e1ae186..e0d3249452e81 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -43,10 +43,10 @@ index ed56e947fa137cbaddaa12503ae983d7acd4463f..e1d77416991bac0178935b1bd255947d void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 92dcf2308842ce8922426b0cafdd5a3e83f4bd52..d69e028b34ab4407abcdea3ece93db39926c587e 100644 +index 3fa51ecee644055db44bd4dd54c27ec224ff46d6..cc6afdef869470136c2cec392911742a289f6339 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4494,6 +4494,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4500,6 +4500,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 536be6ee276a4..f37fd4c085d93 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 6a696e816a185f8492674fcaf1cbbf7e2faabf99..a6e0a53d4ebbd585114bc0cda2e2d1caaab4a015 100644 +index f1e0552dedf377238e9cd9d24a5ebea77ed83717..1f86073736f849e797e029678bc212ce96ba0bd9 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1545,7 +1545,7 @@ if (is_chrome_branded && !is_android) { +@@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 6a696e816a185f8492674fcaf1cbbf7e2faabf99..a6e0a53d4ebbd585114bc0cda2e2d1ca chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1574,6 +1574,12 @@ if (!is_android) { +@@ -1576,6 +1576,12 @@ if (!is_android) { } } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index b40543e80b56a..ea511b50b2598 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ 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 fb25a7c19f20ca690963c5a15bd09224687b5f57..d8939c1936830b101d6bb4079cd99e6015b481c4 100644 +index f0b6fa61bb24d5b5fc4cf9cb8fc2f635f515f3f6..ca056c66af681548ba01bd07db7dadc5ce2a5280 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1786,9 +1786,15 @@ bool RenderProcessHostImpl::Init() { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 0eea1a2d4de6d..44905e57c8ee5 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 a82b571fdabe90771bc8f8ed4ae40df3085592c7..1942d3446225411bdce80628e219641b3089d4a3 100644 +index 2033877b86eddbc9baac6a603587e631021f6819..7f4679943fa1d7b2585552a811098d97cada3070 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3045,6 +3045,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3051,6 +3051,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index a82b571fdabe90771bc8f8ed4ae40df3085592c7..1942d3446225411bdce80628e219641b WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3055,6 +3062,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3061,6 +3068,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 45933f1ae2cd9..365473fa3413c 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -24,10 +24,10 @@ index 4095ee0ef25226180acb35d320630f971305528e..a0aff5ad93e7644211a2c15553b3d098 //////////////////////////////////////////////////////////////////////////////// diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 6455404fdccab1fffceef4b8d291c137d3a448c4..483b0b5b689da03f0d7e43576fa73275197f5a95 100644 +index dab3703cc4469802bae9e4d45c3e7d0f0857f577..ecd8af37c681ae5c97060af00bbeb8ebddb72b26 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -385,9 +385,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { +@@ -388,9 +388,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 4eb68495cc7ec..8bb0068ff0b9f 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 a969bbaaecb4b589808413d40299b68f3bc1fd3e..6e5d3ae228b98295bd95bad3cc58215a13c20106 100644 +index 5ad53ce87d8757b18e5ecedbd7ec9aec54bea165..37f181f16cd2520de1cbec678e02061b165fed62 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6267,6 +6267,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6293,6 +6293,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 0ba771e680e52..420a464c14cc5 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -55,10 +55,10 @@ index 8cbfe0a939e97de8dd8d4b5e4d741fb46e94fd45..2bc2ef61890a4c189613ae8a3f61c746 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 ced2c8e433d5b807bd4f1aa44c6af53e93261c23..53b1ebb708e2332e38090d1adba88dbe850bf02d 100644 +index b68c90f1f1dd23b8b938936a092b01ffa41f0f28..60aa2e562901d9ff7b915c105acaf49851c959ba 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -716,6 +716,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -714,6 +714,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index ced2c8e433d5b807bd4f1aa44c6af53e93261c23..53b1ebb708e2332e38090d1adba88dbe 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 2406a8b438de5f01f5354e08bcfc8810238b1bea..e7a60f6cae0fabeac6a5adec633ad5f45d43ef33 100644 +index 68c38d2045c7c23650bd56717081bb001a4e690e..e0e08d4bdf9521ed5c1940d31665d1b675119f0d 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -731,6 +731,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -732,6 +732,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 6608ad6735fa2..be38035e76cb7 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 @@ -65,10 +65,10 @@ index 2bc2ef61890a4c189613ae8a3f61c746ffc5d310..36661d62ec1e6f7966b0789326fcbefa 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 53b1ebb708e2332e38090d1adba88dbe850bf02d..8e86b79cf98c5e2429d0ec54b27eb950c6ce6303 100644 +index 60aa2e562901d9ff7b915c105acaf49851c959ba..bec02889875ef8f6e422d99c8a161898b36610c5 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -716,6 +716,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -714,6 +714,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 6cc87c66110b0..3a023b20e5aff 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 8a09944249fb0c9ee77c49ed018d6e145265df6b..0fdbf62eae3e5bc2d3b16a2084a59ba9c394446f 100644 +index e4ea82d914cf99a9368c94da2cc35bd3214d8c23..c4de87b38433bed1a14ce5c3a482023de909ec47 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,7 +605,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 8a09944249fb0c9ee77c49ed018d6e145265df6b..0fdbf62eae3e5bc2d3b16a2084a59ba9 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5818,7 +5818,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5821,7 +5821,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 8a09944249fb0c9ee77c49ed018d6e145265df6b..0fdbf62eae3e5bc2d3b16a2084a59ba9 deps = [ ":v8_libbase", -@@ -5856,6 +5856,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5859,6 +5859,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] 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 6fff7c78b7faf..e54954fdfc3a9 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,7 +12,7 @@ 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 2262d19f0f9ced2c9e69862252d94ecb885c839f..2e5dcdd037f29cf51b2ff5d325a43036c8713f33 100644 +index d465e67c094b01ee128b9cecfb5ee999f4a1d8d1..f30fec3bc5c1901f96ff168da422aad1fa7ecd08 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,6 +605,10 @@ config("internal_config") { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 1cbc270ca4e70..a38ff09275019 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 1e3950ab2292ce6a3e6a4e469d8327da28f2d899..5e9b17acc59590147d8b3e2d74f62050e6b5a7ec 100644 +index 316f870e31f33c990793fdfe7ecb69bb120bb024..5db324b2bf0169657fc6e9dc3b15fa3ccaeac9c4 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -911,7 +911,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -927,7 +927,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 d1c6b34213e4c..2a9d03c693efa 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 0fdbf62eae3e5bc2d3b16a2084a59ba9c394446f..2262d19f0f9ced2c9e69862252d94ecb885c839f 100644 +index c4de87b38433bed1a14ce5c3a482023de909ec47..d465e67c094b01ee128b9cecfb5ee999f4a1d8d1 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5830,7 +5830,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5833,7 +5833,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_web_request.cc b/shell/browser/api/electron_api_web_request.cc index b8b5e05a96a6c..fb1b8ebcdafa8 100644 --- a/shell/browser/api/electron_api_web_request.cc +++ b/shell/browser/api/electron_api_web_request.cc @@ -164,8 +164,8 @@ void ToDictionary(gin_helper::Dictionary* details, HttpResponseHeadersToV8(info->response_headers.get())); } - auto* render_frame_host = - content::RenderFrameHost::FromID(info->render_process_id, info->frame_id); + auto* render_frame_host = content::RenderFrameHost::FromID( + info->render_process_id, info->frame_routing_id); if (render_frame_host) { details->SetGetter("frame", render_frame_host); auto* web_contents = diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index a11af4a0182e3..143b7e5ed0457 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1478,10 +1478,8 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory( new ProxyingURLLoaderFactory( web_request.get(), protocol_registry->intercept_handlers(), render_process_id, - frame_host ? frame_host->GetRoutingID() : MSG_ROUTING_NONE, - frame_host ? frame_host->GetRenderViewHost()->GetRoutingID() - : MSG_ROUTING_NONE, - &next_id_, std::move(navigation_ui_data), std::move(navigation_id), + frame_host ? frame_host->GetRoutingID() : MSG_ROUTING_NONE, &next_id_, + std::move(navigation_ui_data), std::move(navigation_id), std::move(proxied_receiver), std::move(target_factory_remote), std::move(header_client_receiver), type); diff --git a/shell/browser/media/media_stream_devices_controller.cc b/shell/browser/media/media_stream_devices_controller.cc index 771e4ba43ee7c..38a4e03153b80 100644 --- a/shell/browser/media/media_stream_devices_controller.cc +++ b/shell/browser/media/media_stream_devices_controller.cc @@ -152,6 +152,13 @@ void MediaStreamDevicesController::Accept() { NOTREACHED(); break; } + case blink::MEDIA_GET_OPEN_DEVICE: { + // Transferred tracks, that use blink::MEDIA_GET_OPEN_DEVICE type, do + // not need to get permissions for MediaStreamDevice as those are + // controlled by the original context. + NOTREACHED(); + break; + } } } diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index d079c7b286ff9..3cb8a384fdad4 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -38,7 +38,6 @@ ProxyingURLLoaderFactory::InProgressRequest::FollowRedirectParams:: ProxyingURLLoaderFactory::InProgressRequest::InProgressRequest( ProxyingURLLoaderFactory* factory, uint64_t web_request_id, - int32_t view_routing_id, int32_t frame_routing_id, int32_t network_service_request_id, uint32_t options, @@ -51,7 +50,6 @@ ProxyingURLLoaderFactory::InProgressRequest::InProgressRequest( original_initiator_(request.request_initiator), request_id_(web_request_id), network_service_request_id_(network_service_request_id), - view_routing_id_(view_routing_id), frame_routing_id_(frame_routing_id), options_(options), traffic_annotation_(traffic_annotation), @@ -120,7 +118,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::UpdateRequestInfo() { request_id_, factory_->render_process_id_, frame_routing_id_, factory_->navigation_ui_data_ ? factory_->navigation_ui_data_->DeepCopy() : nullptr, - view_routing_id_, request_for_info, false, + request_for_info, false, !(options_ & network::mojom::kURLLoadOptionSynchronous), factory_->IsForServiceWorkerScript(), factory_->navigation_id_, ukm::kInvalidSourceIdObj)); @@ -757,7 +755,6 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory( const HandlersMap& intercepted_handlers, int render_process_id, int frame_routing_id, - int view_routing_id, uint64_t* request_id_generator, std::unique_ptr navigation_ui_data, absl::optional navigation_id, @@ -770,7 +767,6 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory( intercepted_handlers_(intercepted_handlers), render_process_id_(render_process_id), frame_routing_id_(frame_routing_id), - view_routing_id_(view_routing_id), request_id_generator_(request_id_generator), navigation_ui_data_(std::move(navigation_ui_data)), navigation_id_(std::move(navigation_id)), @@ -866,9 +862,8 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart( auto result = requests_.emplace( web_request_id, std::make_unique( - this, web_request_id, view_routing_id_, frame_routing_id_, request_id, - options, request, traffic_annotation, std::move(loader), - std::move(client))); + this, web_request_id, frame_routing_id_, request_id, options, request, + traffic_annotation, std::move(loader), std::move(client))); result.first->second->Restart(); } diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index 10b6d561cd695..f4456a0ee0f67 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/shell/browser/net/proxying_url_loader_factory.h @@ -54,7 +54,6 @@ class ProxyingURLLoaderFactory InProgressRequest( ProxyingURLLoaderFactory* factory, uint64_t web_request_id, - int32_t view_routing_id, int32_t frame_routing_id, int32_t network_service_request_id, uint32_t options, @@ -136,7 +135,6 @@ class ProxyingURLLoaderFactory const absl::optional original_initiator_; const uint64_t request_id_ = 0; const int32_t network_service_request_id_ = 0; - const int32_t view_routing_id_ = MSG_ROUTING_NONE; const int32_t frame_routing_id_ = MSG_ROUTING_NONE; const uint32_t options_ = 0; const net::MutableNetworkTrafficAnnotationTag traffic_annotation_; @@ -195,7 +193,6 @@ class ProxyingURLLoaderFactory const HandlersMap& intercepted_handlers, int render_process_id, int frame_routing_id, - int view_routing_id, uint64_t* request_id_generator, std::unique_ptr navigation_ui_data, absl::optional navigation_id, @@ -260,7 +257,6 @@ class ProxyingURLLoaderFactory const int render_process_id_; const int frame_routing_id_; - const int view_routing_id_; uint64_t* request_id_generator_; // managed by ElectronBrowserClient std::unique_ptr navigation_ui_data_; absl::optional navigation_id_; diff --git a/shell/browser/net/proxying_websocket.cc b/shell/browser/net/proxying_websocket.cc index 3d051e4d9f2da..0ed8edb01aeba 100644 --- a/shell/browser/net/proxying_websocket.cc +++ b/shell/browser/net/proxying_websocket.cc @@ -40,7 +40,6 @@ ProxyingWebSocket::ProxyingWebSocket( process_id, render_frame_id, nullptr, - MSG_ROUTING_NONE, request, /*is_download=*/false, /*is_async=*/true, diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index de3989ad88678..d1f474d59ead7 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -288,10 +288,6 @@ 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 afe0116d59f5abfb20d44af9525fb048809f5d73 Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 31 Mar 2022 03:55:38 +0900 Subject: [PATCH 208/811] fix: build when pdf component is disabled (#33513) --- BUILD.gn | 6 +- chromium_src/BUILD.gn | 19 +++--- shell/app/electron_content_client.cc | 12 ++-- shell/browser/electron_api_ipc_handler_impl.h | 1 + shell/browser/electron_browser_client.cc | 11 ++-- ...ectron_web_contents_utility_handler_impl.h | 1 + shell/common/electron_constants.cc | 3 +- shell/common/electron_constants.h | 4 +- shell/renderer/renderer_client_base.cc | 61 ++++++++++--------- 9 files changed, 58 insertions(+), 60 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b8a6396c4f4e8..ffd38ce3a8c29 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -363,10 +363,6 @@ source_set("electron_lib") { "//components/network_session_configurator/common", "//components/omnibox/browser:buildflags", "//components/os_crypt", - "//components/pdf/browser", - "//components/pdf/browser:interceptors", - "//components/pdf/common", - "//components/pdf/renderer", "//components/pref_registry", "//components/prefs", "//components/security_state/content", @@ -700,6 +696,8 @@ source_set("electron_lib") { deps += [ "//chrome/browser/resources/pdf:resources", "//components/pdf/browser", + "//components/pdf/browser:interceptors", + "//components/pdf/common", "//components/pdf/renderer", "//pdf", ] diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 7db91d633a5d0..6c3ff516dcb5f 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -307,6 +307,10 @@ static_library("chrome") { "//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc", "//chrome/browser/plugins/pdf_iframe_navigation_throttle.h", ] + deps += [ + "//components/pdf/browser", + "//components/pdf/renderer", + ] } } @@ -334,15 +338,6 @@ source_set("plugins") { "//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc", "//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h", ] - deps += [ - "//media:media_buildflags", - "//ppapi/buildflags", - "//ppapi/proxy:ipc", - "//services/device/public/mojom", - ] - if (enable_pdf_viewer) { - deps += [ "//components/pdf/browser" ] - } # renderer side sources += [ @@ -351,16 +346,16 @@ source_set("plugins") { "//chrome/renderer/pepper/pepper_shared_memory_message_filter.cc", "//chrome/renderer/pepper/pepper_shared_memory_message_filter.h", ] - if (enable_pdf_viewer) { - deps += [ "//components/pdf/renderer" ] - } + deps += [ "//components/strings", "//media:media_buildflags", + "//ppapi/buildflags", "//ppapi/host", "//ppapi/proxy", "//ppapi/proxy:ipc", "//ppapi/shared_impl", + "//services/device/public/mojom", "//skia", ] } diff --git a/shell/app/electron_content_client.cc b/shell/app/electron_content_client.cc index 598e7bf9d739f..b755232a2b53b 100644 --- a/shell/app/electron_content_client.cc +++ b/shell/app/electron_content_client.cc @@ -35,7 +35,8 @@ #endif // defined(WIDEVINE_CDM_AVAILABLE) #if BUILDFLAG(ENABLE_PDF_VIEWER) -#include "components/pdf/renderer/internal_plugin_renderer_helpers.h" +#include "chrome/common/pdf_util.h" +#include "components/pdf/common/internal_plugin_helpers.h" #include "pdf/pdf.h" // nogncheck #include "shell/common/electron_constants.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) @@ -111,11 +112,11 @@ void ComputeBuiltInPlugins(std::vector* plugins) { content::PepperPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; - pdf_info.name = "Chromium PDF Viewer"; + pdf_info.name = kPDFInternalPluginName; pdf_info.description = "Portable Document Format"; // This isn't a real file path; it's just used as a unique identifier. pdf_info.path = base::FilePath(kPdfPluginPath); - content::WebPluginMimeType pdf_mime_type(kPdfPluginMimeType, "pdf", + content::WebPluginMimeType pdf_mime_type(pdf::kInternalPluginMimeType, "pdf", "Portable Document Format"); pdf_info.mime_types.push_back(pdf_mime_type); plugins->push_back(pdf_info); @@ -126,12 +127,11 @@ void ComputeBuiltInPlugins(std::vector* plugins) { // here. content::WebPluginInfo info; info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN; - info.name = u"Chromium PDF Viewer"; + info.name = base::ASCIIToUTF16(kPDFExtensionPluginName); // This isn't a real file path; it's just used as a unique identifier. info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId); info.background_color = content::WebPluginInfo::kDefaultBackgroundColor; - info.mime_types.emplace_back("application/pdf", "pdf", - "Portable Document Format"); + info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format"); content::PluginService::GetInstance()->RefreshPlugins(); content::PluginService::GetInstance()->RegisterInternalPlugin(info, true); #endif // BUILDFLAG(ENABLE_PDF_VIEWER) diff --git a/shell/browser/electron_api_ipc_handler_impl.h b/shell/browser/electron_api_ipc_handler_impl.h index 7cddf88bedc4a..222f42bed1be6 100644 --- a/shell/browser/electron_api_ipc_handler_impl.h +++ b/shell/browser/electron_api_ipc_handler_impl.h @@ -11,6 +11,7 @@ #include "base/memory/weak_ptr.h" #include "content/public/browser/web_contents_observer.h" #include "electron/shell/common/api/api.mojom.h" +#include "mojo/public/cpp/bindings/associated_receiver.h" #include "shell/browser/api/electron_api_web_contents.h" namespace content { diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 143b7e5ed0457..e317682535ac0 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -27,16 +27,11 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h" -#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version.h" #include "components/net_log/chrome_net_log.h" #include "components/network_hints/common/network_hints.mojom.h" -#include "components/pdf/browser/pdf_navigation_throttle.h" -#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" -#include "components/pdf/common/internal_plugin_helpers.h" #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck #include "content/browser/site_instance_impl.h" // nogncheck #include "content/public/browser/browser_main_runner.h" @@ -52,6 +47,7 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/tts_controller.h" #include "content/public/browser/tts_platform.h" +#include "content/public/browser/url_loader_request_interceptor.h" #include "content/public/common/content_descriptors.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" @@ -212,7 +208,12 @@ #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) +#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h" +#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" // nogncheck +#include "components/pdf/browser/pdf_navigation_throttle.h" +#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" #include "components/pdf/browser/pdf_web_contents_helper.h" // nogncheck +#include "components/pdf/common/internal_plugin_helpers.h" #endif using content::BrowserThread; diff --git a/shell/browser/electron_web_contents_utility_handler_impl.h b/shell/browser/electron_web_contents_utility_handler_impl.h index 30a9baa40f835..819c818fcae54 100644 --- a/shell/browser/electron_web_contents_utility_handler_impl.h +++ b/shell/browser/electron_web_contents_utility_handler_impl.h @@ -11,6 +11,7 @@ #include "base/memory/weak_ptr.h" #include "content/public/browser/web_contents_observer.h" #include "electron/shell/common/api/api.mojom.h" +#include "mojo/public/cpp/bindings/associated_receiver.h" #include "shell/browser/api/electron_api_web_contents.h" namespace content { diff --git a/shell/common/electron_constants.cc b/shell/common/electron_constants.cc index 5d53425a3fc52..3d6eda0e9eea8 100644 --- a/shell/common/electron_constants.cc +++ b/shell/common/electron_constants.cc @@ -30,7 +30,8 @@ const char kRunAsNode[] = "ELECTRON_RUN_AS_NODE"; #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) -const char kPdfPluginMimeType[] = "application/x-google-chrome-pdf"; +const char kPDFExtensionPluginName[] = "Chromium PDF Viewer"; +const char kPDFInternalPluginName[] = "Chromium PDF Plugin"; const base::FilePath::CharType kPdfPluginPath[] = FILE_PATH_LITERAL("internal-pdf-viewer"); #endif // BUILDFLAG(ENABLE_PDF_VIEWER) diff --git a/shell/common/electron_constants.h b/shell/common/electron_constants.h index b91b70e683632..4218b3e47ffc7 100644 --- a/shell/common/electron_constants.h +++ b/shell/common/electron_constants.h @@ -30,8 +30,8 @@ extern const char kRunAsNode[]; #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) -// The MIME type used for the PDF plugin. -extern const char kPdfPluginMimeType[]; +extern const char kPDFExtensionPluginName[]; +extern const char kPDFInternalPluginName[]; extern const base::FilePath::CharType kPdfPluginPath[]; #endif // BUILDFLAG(ENABLE_PDF_VIEWER) diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index 7b932f7f7576c..0302f37f7ccf3 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -12,9 +12,7 @@ #include "base/command_line.h" #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" -#include "chrome/common/pdf_util.h" #include "components/network_hints/renderer/web_prescient_networking_impl.h" -#include "components/pdf/renderer/pdf_internal_plugin_delegate.h" #include "content/common/buildflags.h" #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" @@ -68,6 +66,9 @@ #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) +#include "chrome/common/pdf_util.h" +#include "components/pdf/common/internal_plugin_helpers.h" +#include "components/pdf/renderer/pdf_internal_plugin_delegate.h" #include "shell/common/electron_constants.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) @@ -111,6 +112,25 @@ std::vector ParseSchemesCLISwitch(base::CommandLine* command_line, base::SPLIT_WANT_NONEMPTY); } +#if BUILDFLAG(ENABLE_PDF_VIEWER) +class ChromePdfInternalPluginDelegate final + : public pdf::PdfInternalPluginDelegate { + public: + ChromePdfInternalPluginDelegate() = default; + ChromePdfInternalPluginDelegate(const ChromePdfInternalPluginDelegate&) = + delete; + ChromePdfInternalPluginDelegate& operator=( + const ChromePdfInternalPluginDelegate&) = delete; + ~ChromePdfInternalPluginDelegate() override = default; + + // `pdf::PdfInternalPluginDelegate`: + bool IsAllowedOrigin(const url::Origin& origin) const override { + return origin.scheme() == extensions::kExtensionScheme && + origin.host() == extension_misc::kPdfExtensionId; + } +}; +#endif // BUILDFLAG(ENABLE_PDF_VIEWER) + // static RendererClientBase* g_renderer_client_base = nullptr; @@ -311,29 +331,12 @@ void RendererClientBase::DidClearWindowObject( render_frame->GetWebFrame()->ExecuteScript(blink::WebScriptSource("void 0")); } -class ChromePdfInternalPluginDelegate final - : public pdf::PdfInternalPluginDelegate { - public: - ChromePdfInternalPluginDelegate() = default; - ChromePdfInternalPluginDelegate(const ChromePdfInternalPluginDelegate&) = - delete; - ChromePdfInternalPluginDelegate& operator=( - const ChromePdfInternalPluginDelegate&) = delete; - ~ChromePdfInternalPluginDelegate() override = default; - - // `pdf::PdfInternalPluginDelegate`: - bool IsAllowedOrigin(const url::Origin& origin) const override { - return origin.scheme() == extensions::kExtensionScheme && - origin.host() == extension_misc::kPdfExtensionId; - } -}; - bool RendererClientBase::OverrideCreatePlugin( content::RenderFrame* render_frame, const blink::WebPluginParams& params, blink::WebPlugin** plugin) { #if BUILDFLAG(ENABLE_PDF_VIEWER) - if (params.mime_type.Utf8() == kPdfPluginMimeType) { + if (params.mime_type.Utf8() == pdf::kInternalPluginMimeType) { *plugin = pdf::CreateInternalPlugin( std::move(params), render_frame, std::make_unique()); @@ -342,7 +345,6 @@ bool RendererClientBase::OverrideCreatePlugin( #endif // BUILDFLAG(ENABLE_PDF_VIEWER) if (params.mime_type.Utf8() == content::kBrowserPluginMimeType || - params.mime_type.Utf8() == kPdfPluginMimeType || render_frame->GetBlinkPreferences().enable_plugins) return false; @@ -371,7 +373,7 @@ bool RendererClientBase::IsPluginHandledExternally( #if BUILDFLAG(ENABLE_PDF_VIEWER) DCHECK(plugin_element.HasHTMLTagName("object") || plugin_element.HasHTMLTagName("embed")); - if (mime_type == "application/x-google-chrome-pdf") { + if (mime_type == pdf::kInternalPluginMimeType) { if (IsPdfInternalPluginAllowedOrigin( render_frame->GetWebFrame()->GetSecurityOrigin())) { return true; @@ -379,11 +381,10 @@ bool RendererClientBase::IsPluginHandledExternally( content::WebPluginInfo info; info.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS; - const char16_t kPDFExtensionPluginName[] = u"Chromium PDF Viewer"; - info.name = kPDFExtensionPluginName; - info.path = base::FilePath::FromUTF8Unsafe("internal-pdf-viewer"); + info.name = base::ASCIIToUTF16(kPDFInternalPluginName); + info.path = base::FilePath(kPdfPluginPath); info.background_color = content::WebPluginInfo::kDefaultBackgroundColor; - info.mime_types.emplace_back("application/x-google-chrome-pdf", "pdf", + info.mime_types.emplace_back(pdf::kInternalPluginMimeType, "pdf", "Portable Document Format"); return extensions::MimeHandlerViewContainerManager::Get( content::RenderFrame::FromWebFrame( @@ -396,12 +397,10 @@ bool RendererClientBase::IsPluginHandledExternally( // electron_content_client.cc / ComputeBuiltInPlugins. content::WebPluginInfo info; info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN; - const char16_t kPDFExtensionPluginName[] = u"Chromium PDF Viewer"; - info.name = kPDFExtensionPluginName; + info.name = base::ASCIIToUTF16(kPDFExtensionPluginName); info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId); info.background_color = content::WebPluginInfo::kDefaultBackgroundColor; - info.mime_types.emplace_back("application/pdf", "pdf", - "Portable Document Format"); + info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format"); return extensions::MimeHandlerViewContainerManager::Get( content::RenderFrame::FromWebFrame( plugin_element.GetDocument().GetFrame()), @@ -415,6 +414,7 @@ bool RendererClientBase::IsPluginHandledExternally( v8::Local RendererClientBase::GetScriptableObject( const blink::WebElement& plugin_element, v8::Isolate* isolate) { +#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) // If there is a MimeHandlerView that can provide the scriptable object then // MaybeCreateMimeHandlerView must have been called before and a container // manager should exist. @@ -424,6 +424,7 @@ v8::Local RendererClientBase::GetScriptableObject( false /* create_if_does_not_exist */); if (container_manager) return container_manager->GetScriptableObject(plugin_element, isolate); +#endif return v8::Local(); } From 8c8642634dd8a1027ee9a4e2f41c97727ab66da1 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 31 Mar 2022 00:29:02 +0200 Subject: [PATCH 209/811] fix: don't unmaximize on macOS if user set max bounds (#33480) --- shell/browser/native_window_mac.h | 2 ++ shell/browser/native_window_mac.mm | 14 +++++++++++++- spec-main/api-browser-window-spec.ts | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index 2728414379237..ae1e845c8a182 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -267,6 +267,8 @@ class NativeWindowMac : public NativeWindow, // Maximizable window state; necessary for persistence through redraws. bool maximizable_ = true; + bool user_set_bounds_maximized_ = false; + // Simple (pre-Lion) Fullscreen Settings bool always_simple_fullscreen_ = false; bool is_simple_fullscreen_ = false; diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 04cca2461f5bc..7ed794206322e 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -622,7 +622,18 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } void NativeWindowMac::Unmaximize() { - if (!IsMaximized()) + // Bail if the last user set bounds were the same size as the window + // screen (e.g. the user set the window to maximized via setBounds) + // + // Per docs during zoom: + // > If there’s no saved user state because there has been no previous + // > zoom,the size and location of the window don’t change. + // + // However, in classic Apple fashion, this is not the case in practice, + // and the frame inexplicably becomes very tiny. We should prevent + // zoom from being called if the window is being unmaximized and its + // unmaximized window bounds are themselves functionally maximized. + if (!IsMaximized() || user_set_bounds_maximized_) return; [window_ zoom:nil]; @@ -724,6 +735,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { cocoa_bounds.origin.y = NSHeight([screen frame]) - size.height() - bounds.y(); [window_ setFrame:cocoa_bounds display:YES animate:animate]; + user_set_bounds_maximized_ = IsMaximized() ? true : false; } gfx::Rect NativeWindowMac::GetBounds() { diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 4c9f451a5952d..d783cde6b8883 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3634,6 +3634,22 @@ describe('BrowserWindow module', () => { expectBoundsEqual(w.getSize(), initialSize); expectBoundsEqual(w.getPosition(), initialPosition); }); + + ifit(process.platform === 'darwin')('should not change size or position of a window which is functionally maximized', async () => { + const { workArea } = screen.getPrimaryDisplay(); + + const bounds = { + x: workArea.x, + y: workArea.y, + width: workArea.width, + height: workArea.height + }; + + const w = new BrowserWindow(bounds); + w.unmaximize(); + await delay(1000); + expectBoundsEqual(w.getBounds(), bounds); + }); }); describe('setFullScreen(false)', () => { From cbd06cd25e767ad2e0ead3a0454e198999efd56a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 31 Mar 2022 09:33:38 +0900 Subject: [PATCH 210/811] docs: remove "cache" from app.getPath (#33509) --- docs/api/app.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/api/app.md b/docs/api/app.md index b01b218b181cf..5970bf58e57cf 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -637,7 +637,6 @@ Returns `string` - The current application directory. * `~/Library/Application Support` on macOS * `userData` The directory for storing your app's configuration files, which by default it is the `appData` directory appended with your app's name. - * `cache` * `temp` Temporary directory. * `exe` The current executable file. * `module` The `libchromiumcontent` library. From 7612df768741e8dd7e5f949b6215448c43d49bc0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 06:01:00 -0700 Subject: [PATCH 211/811] Bump v20.0.0-nightly.20220331 --- 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 b0d7db7463dd8..5e2990d348610 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220331 \ No newline at end of file diff --git a/package.json b/package.json index 3ef503b0bc981..6f79cc2a082cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220331", "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 5746c1f414b34..840b481fe1c77 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220331 + PRODUCTVERSION 20,0,0,20220331 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9722ca78b2e2ad4462250ca05f52ef287abeb578 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:14:36 -0700 Subject: [PATCH 212/811] Revert "Bump v20.0.0-nightly.20220331" This reverts commit 7612df768741e8dd7e5f949b6215448c43d49bc0. --- 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 5e2990d348610..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220331 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 6f79cc2a082cd..3ef503b0bc981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220331", + "version": "20.0.0-nightly.20220330", "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 840b481fe1c77..5746c1f414b34 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 20,0,0,20220331 - PRODUCTVERSION 20,0,0,20220331 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1864edd2874162fc2554ae70fd526955903fac84 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 06:02:12 -0700 Subject: [PATCH 213/811] Bump v20.0.0-nightly.20220401 --- 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 b0d7db7463dd8..76305da68e582 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220401 \ No newline at end of file diff --git a/package.json b/package.json index 3ef503b0bc981..1b5d395d2bc5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220401", "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 5746c1f414b34..e7183f4f4db7c 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220401 + PRODUCTVERSION 20,0,0,20220401 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9207c2aa685a8eec69a83673ed0d2dee2b095281 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 09:52:10 -0700 Subject: [PATCH 214/811] Revert "Bump v20.0.0-nightly.20220401" This reverts commit 1864edd2874162fc2554ae70fd526955903fac84. --- 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 76305da68e582..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220401 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 1b5d395d2bc5b..3ef503b0bc981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220401", + "version": "20.0.0-nightly.20220330", "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 e7183f4f4db7c..5746c1f414b34 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 20,0,0,20220401 - PRODUCTVERSION 20,0,0,20220401 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 78a3752adef43fa78c6c6b0805d9d1e10d147949 Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Mon, 4 Apr 2022 03:39:55 +0200 Subject: [PATCH 215/811] fix: create `userData` on requestSingleInstanceLock() if needed (#33559) * test: use custom userData folder for requestSingleInstanceLock() * update test * prefix test folder path * fix: create userDataDir on requestSingleInstanceLock() if needed * Trigger Build --- shell/browser/api/electron_api_app.cc | 2 ++ spec-main/api-app-spec.ts | 7 +++++++ spec/fixtures/api/singleton-userdata/main.js | 12 ++++++++++++ spec/fixtures/api/singleton-userdata/package.json | 4 ++++ 4 files changed, 25 insertions(+) create mode 100644 spec/fixtures/api/singleton-userdata/main.js create mode 100644 spec/fixtures/api/singleton-userdata/package.json diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 73db1e756f885..e3a88a28b0872 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1148,6 +1148,8 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) { base::FilePath user_dir; base::PathService::Get(chrome::DIR_USER_DATA, &user_dir); + // The user_dir may not have been created yet. + base::CreateDirectoryAndGetError(user_dir, nullptr); auto cb = base::BindRepeating(&App::OnSecondInstance, base::Unretained(this)); auto wrapped_cb = base::BindRepeating(NotificationCallbackWrapper, cb); diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index 718223229572b..0389b70931a07 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -228,6 +228,13 @@ describe('app module', () => { expect(code1).to.equal(0); }); + it('returns true when setting non-existent user data folder', async function () { + const appPath = path.join(fixturesPath, 'api', 'singleton-userdata'); + const instance = cp.spawn(process.execPath, [appPath]); + const [code] = await emittedOnce(instance, 'exit'); + expect(code).to.equal(0); + }); + async function testArgumentPassing (testArgs: SingleInstanceLockTestArgs) { const appPath = path.join(fixturesPath, 'api', 'singleton-data'); const first = cp.spawn(process.execPath, [appPath, ...testArgs.args]); diff --git a/spec/fixtures/api/singleton-userdata/main.js b/spec/fixtures/api/singleton-userdata/main.js new file mode 100644 index 0000000000000..98f6841b4282a --- /dev/null +++ b/spec/fixtures/api/singleton-userdata/main.js @@ -0,0 +1,12 @@ +const { app } = require('electron'); +const fs = require('fs'); +const path = require('path'); + +// non-existent user data folder should not break requestSingleInstanceLock() +// ref: https://github.com/electron/electron/issues/33547 +const userDataFolder = path.join(app.getPath('home'), 'electron-test-singleton-userdata'); +fs.rmSync(userDataFolder, { force: true, recursive: true }); +app.setPath('userData', userDataFolder); + +const gotTheLock = app.requestSingleInstanceLock(); +app.exit(gotTheLock ? 0 : 1); diff --git a/spec/fixtures/api/singleton-userdata/package.json b/spec/fixtures/api/singleton-userdata/package.json new file mode 100644 index 0000000000000..1269c0a67d5dd --- /dev/null +++ b/spec/fixtures/api/singleton-userdata/package.json @@ -0,0 +1,4 @@ +{ + "name": "electron-test-singleton-userdata", + "main": "main.js" +} From 0ac6d745368492440fc39c6f12b465388851f73e Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 4 Apr 2022 02:00:45 -0700 Subject: [PATCH 216/811] docs: mark platform-specific functionality for BrowserWindow (#33512) --- docs/api/browser-window.md | 123 ++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 57 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 0903009ef503a..b5973c715c1af 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -164,14 +164,14 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `maxWidth` Integer (optional) - Window's maximum width. Default is no limit. * `maxHeight` Integer (optional) - Window's maximum height. Default is no limit. * `resizable` boolean (optional) - Whether window is resizable. Default is `true`. - * `movable` boolean (optional) - Whether window is movable. This is not implemented - on Linux. Default is `true`. - * `minimizable` boolean (optional) - Whether window is minimizable. This is not - implemented on Linux. Default is `true`. - * `maximizable` boolean (optional) - Whether window is maximizable. This is not - implemented on Linux. Default is `true`. - * `closable` boolean (optional) - Whether window is closable. This is not implemented - on Linux. Default is `true`. + * `movable` boolean (optional) _macOS_ _Windows_ - Whether window is + movable. This is not implemented on Linux. Default is `true`. + * `minimizable` boolean (optional) _macOS_ _Windows_ - Whether window is + minimizable. This is not implemented on Linux. Default is `true`. + * `maximizable` boolean (optional) _macOS_ _Windows_ - Whether window is + maximizable. This is not implemented on Linux. Default is `true`. + * `closable` boolean (optional) _macOS_ _Windows_ - Whether window is + closable. This is not implemented on Linux. Default is `true`. * `focusable` boolean (optional) - Whether the window can be focused. Default is `true`. On Windows setting `focusable: false` also implies setting `skipTaskbar: true`. On Linux setting `focusable: false` makes the window @@ -185,7 +185,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `fullscreenable` boolean (optional) - Whether the window can be put into fullscreen mode. On macOS, also whether the maximize/zoom button should toggle full screen mode or maximize window. Default is `true`. - * `simpleFullscreen` boolean (optional) - Use pre-Lion fullscreen on macOS. Default is `false`. + * `simpleFullscreen` boolean (optional) _macOS_ - Use pre-Lion fullscreen on + macOS. Default is `false`. * `skipTaskbar` boolean (optional) _macOS_ _Windows_ - Whether to show the window in taskbar. Default is `false`. * `kiosk` boolean (optional) - Whether the window is in kiosk mode. Default is `false`. @@ -201,27 +202,30 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `parent` BrowserWindow (optional) - Specify parent window. Default is `null`. * `modal` boolean (optional) - Whether this is a modal window. This only works when the window is a child window. Default is `false`. - * `acceptFirstMouse` boolean (optional) - Whether clicking an inactive window will also - click through to the web contents. Default is `false` on macOS. This option is not - configurable on other platforms. + * `acceptFirstMouse` boolean (optional) _macOS_ - Whether clicking an + inactive window will also click through to the web contents. Default is + `false` on macOS. This option is not configurable on other platforms. * `disableAutoHideCursor` boolean (optional) - Whether to hide cursor when typing. Default is `false`. * `autoHideMenuBar` boolean (optional) - Auto hide the menu bar unless the `Alt` key is pressed. Default is `false`. - * `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`. + * `enableLargerThanScreen` boolean (optional) _macOS_ - 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) - 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. + * `opacity` number (optional) _macOS_ _Windows_ - 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. * `darkTheme` boolean (optional) - Forces using dark theme for the window, only works on some GTK+3 desktop environments. Default is `false`. * `transparent` boolean (optional) - Makes the window [transparent](../tutorial/window-customization.md#create-transparent-windows). Default is `false`. On Windows, does not work unless the window is frameless. * `type` string (optional) - The type of window, default is normal window. See more about this below. - * `visualEffectState` string (optional) - Specify how the material appearance should reflect window activity state on macOS. Must be used with the `vibrancy` property. Possible values are: + * `visualEffectState` string (optional) _macOS_ - Specify how the material + appearance should reflect window activity state on macOS. Must be used + with the `vibrancy` property. Possible values are: * `followWindow` - The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default. * `active` - The backdrop should always appear active. * `inactive` - The backdrop should always appear inactive. @@ -229,36 +233,41 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. Default is `default`. Possible values are: * `default` - Results in the standard title bar for macOS or Windows respectively. * `hidden` - Results in a hidden title bar and a full size content window. On macOS, the window still has the standard window controls (“traffic lights”) in the top left. On Windows, when combined with `titleBarOverlay: true` it will activate the Window Controls Overlay (see `titleBarOverlay` for more information), otherwise no window controls will be shown. - * `hiddenInset` - Only on macOS, results in a hidden title bar with an alternative look - where the traffic light buttons are slightly more inset from the window edge. - * `customButtonsOnHover` - Only on macOS, results in a hidden title bar and a full size - content window, the traffic light buttons will display when being hovered - over in the top left of the window. **Note:** This option is currently - experimental. - * `trafficLightPosition` [Point](structures/point.md) (optional) - Set a - custom position for the traffic light buttons in frameless windows. - * `roundedCorners` boolean (optional) - Whether frameless window should have - rounded corners on macOS. Default is `true`. - * `fullscreenWindowTitle` boolean (optional) _Deprecated_ - Shows the title in - the title bar in full screen mode on macOS for `hiddenInset` titleBarStyle. - Default is `false`. + * `hiddenInset` _macOS_ - Only on macOS, results in a hidden title bar + with an alternative look where the traffic light buttons are slightly + more inset from the window edge. + * `customButtonsOnHover` _macOS_ - Only on macOS, results in a hidden + title bar and a full size content window, the traffic light buttons will + display when being hovered over in the top left of the window. + **Note:** This option is currently experimental. + * `trafficLightPosition` [Point](structures/point.md) (optional) _macOS_ - + Set a custom position for the traffic light buttons in frameless windows. + * `roundedCorners` boolean (optional) _macOS_ - Whether frameless window + should have rounded corners on macOS. Default is `true`. + * `fullscreenWindowTitle` boolean (optional) _macOS_ _Deprecated_ - Shows + the title in the title bar in full screen mode on macOS for `hiddenInset` + titleBarStyle. Default is `false`. * `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard window frame. Setting it to `false` will remove window shadow and window animations. Default is `true`. - * `vibrancy` string (optional) - Add a type of vibrancy effect to the window, only on - macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`, - `menu`, `popover`, `sidebar`, `medium-light`, `ultra-dark`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`, `under-window`, or `under-page`. Please note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` are deprecated and have been removed in macOS Catalina (10.15). - * `zoomToPageWidth` boolean (optional) - Controls the behavior on macOS when - option-clicking the green stoplight button on the toolbar or by clicking the - Window > Zoom menu item. If `true`, the window will grow to the preferred - width of the web page when zoomed, `false` will cause it to zoom to the - width of the screen. This will also affect the behavior when calling - `maximize()` directly. Default is `false`. - * `tabbingIdentifier` string (optional) - Tab group name, allows opening the - window as a native tab on macOS 10.12+. Windows with the same tabbing - identifier will be grouped together. This also adds a native new tab button - to your window's tab bar and allows your `app` and window to receive the - `new-window-for-tab` event. + * `vibrancy` string (optional) _macOS_ - Add a type of vibrancy effect to + the window, only on macOS. Can be `appearance-based`, `light`, `dark`, + `titlebar`, `selection`, `menu`, `popover`, `sidebar`, `medium-light`, + `ultra-dark`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, + `tooltip`, `content`, `under-window`, or `under-page`. Please note that + `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` are + deprecated and have been removed in macOS Catalina (10.15). + * `zoomToPageWidth` boolean (optional) _macOS_ - Controls the behavior on + macOS when option-clicking the green stoplight button on the toolbar or by + clicking the Window > Zoom menu item. If `true`, the window will grow to + the preferred width of the web page when zoomed, `false` will cause it to + zoom to the width of the screen. This will also affect the behavior when + calling `maximize()` directly. Default is `false`. + * `tabbingIdentifier` string (optional) _macOS_ - Tab group name, allows + opening the window as a native tab on macOS 10.12+. Windows with the same + tabbing identifier will be grouped together. This also adds a native new + tab button to your window's tab bar and allows your `app` and window to + receive the `new-window-for-tab` event. * `webPreferences` Object (optional) - Settings of web page's features. * `devTools` boolean (optional) - Whether to enable DevTools. If it is set to `false`, can not use `BrowserWindow.webContents.openDevTools()` to open DevTools. Default is `true`. * `nodeIntegration` boolean (optional) - Whether node integration is enabled. @@ -310,8 +319,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `plugins` boolean (optional) - Whether plugins should be enabled. Default is `false`. * `experimentalFeatures` boolean (optional) - Enables Chromium's experimental features. Default is `false`. - * `scrollBounce` boolean (optional) - Enables scroll bounce (rubber banding) effect on - macOS. Default is `false`. + * `scrollBounce` boolean (optional) _macOS_ - Enables scroll bounce + (rubber banding) effect on macOS. Default is `false`. * `enableBlinkFeatures` string (optional) - A list of feature strings separated by `,`, like `CSSVariables,KeyboardEventKey` to enable. The full list of supported feature strings can be found in the [RuntimeEnabledFeatures.json5][runtime-enabled-features] @@ -774,7 +783,7 @@ A `boolean` property that determines whether the window is in fullscreen mode. A `boolean` property that determines whether the window is focusable. -#### `win.visibleOnAllWorkspaces` +#### `win.visibleOnAllWorkspaces` _macOS_ _Linux_ A `boolean` property that determines whether the window is visible on all workspaces. @@ -811,13 +820,13 @@ A `string` property that determines the title of the native window. **Note:** The title of the web page can be different from the title of the native window. -#### `win.minimizable` +#### `win.minimizable` _macOS_ _Windows_ A `boolean` property that determines whether the window can be manually minimized by user. On Linux the setter is a no-op, although the getter returns `true`. -#### `win.maximizable` +#### `win.maximizable` _macOS_ _Windows_ A `boolean` property that determines whether the window can be manually maximized by user. @@ -832,13 +841,13 @@ maximizes the window. A `boolean` property that determines whether the window can be manually resized by user. -#### `win.closable` +#### `win.closable` _macOS_ _Windows_ A `boolean` property that determines whether the window can be manually closed by user. On Linux the setter is a no-op, although the getter returns `true`. -#### `win.movable` +#### `win.movable` _macOS_ _Windows_ A `boolean` property that determines Whether the window can be moved by user. @@ -1635,7 +1644,7 @@ Changes window icon. Sets whether the window traffic light buttons should be visible. -#### `win.setAutoHideMenuBar(hide)` +#### `win.setAutoHideMenuBar(hide)` _Windows_ _Linux_ * `hide` boolean @@ -1644,7 +1653,7 @@ menu bar will only show when users press the single `Alt` key. If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't hide it immediately. -#### `win.isMenuBarAutoHide()` +#### `win.isMenuBarAutoHide()` _Windows_ _Linux_ Returns `boolean` - Whether menu bar automatically hides itself. @@ -1654,11 +1663,11 @@ Returns `boolean` - Whether menu bar automatically hides itself. Sets whether the menu bar should be visible. If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key. -#### `win.isMenuBarVisible()` +#### `win.isMenuBarVisible()` _Windows_ _Linux_ Returns `boolean` - Whether the menu bar is visible. -#### `win.setVisibleOnAllWorkspaces(visible[, options])` +#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_ * `visible` boolean * `options` Object (optional) @@ -1676,7 +1685,7 @@ Sets whether the window should be visible on all workspaces. **Note:** This API does nothing on Windows. -#### `win.isVisibleOnAllWorkspaces()` +#### `win.isVisibleOnAllWorkspaces()` _macOS_ _Linux_ Returns `boolean` - Whether the window is visible on all workspaces. From 204b53e7b8cb13080b10eccf69afe17bd0893bee Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 02:32:57 -0700 Subject: [PATCH 217/811] build: upload to AZ as well as S3 (#33573) * build: upload to AZ aswell as S3 * fix: provide env to azput --- package.json | 3 +- script/lib/azput.js | 48 +++++ script/lib/util.py | 21 +- script/release/release.js | 92 ++++---- script/release/uploaders/upload-index-json.py | 8 +- .../uploaders/upload-node-checksums.py | 8 +- .../release/uploaders/upload-node-headers.py | 30 ++- script/release/uploaders/upload-symbols.py | 11 +- script/release/uploaders/upload.py | 14 +- yarn.lock | 203 +++++++++++++++++- 10 files changed, 345 insertions(+), 93 deletions(-) create mode 100644 script/lib/azput.js diff --git a/package.json b/package.json index 3ef503b0bc981..e976065ea1d06 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { + "@azure/storage-blob": "^12.9.0", "@electron/docs-parser": "^0.12.4", "@electron/typescript-definitions": "^8.9.5", "@octokit/auth-app": "^2.10.0", @@ -141,4 +142,4 @@ "node script/gen-hunspell-filenames.js" ] } -} \ No newline at end of file +} diff --git a/script/lib/azput.js b/script/lib/azput.js new file mode 100644 index 0000000000000..0e6a75cd2ad8f --- /dev/null +++ b/script/lib/azput.js @@ -0,0 +1,48 @@ +/* eslint-disable camelcase */ +const { BlobServiceClient } = require('@azure/storage-blob'); +const fs = require('fs'); +const path = require('path'); + +const blobServiceClient = BlobServiceClient.fromConnectionString(process.env.ELECTRON_ARTIFACTS_BLOB_STORAGE); + +const args = require('minimist')(process.argv.slice(2)); + +let { prefix = '/', key_prefix = '', _: files } = args; +if (prefix && !prefix.endsWith(path.sep)) prefix = path.resolve(prefix) + path.sep; + +function filenameToKey (file) { + file = path.resolve(file); + if (file.startsWith(prefix)) file = file.substr(prefix.length - 1); + return key_prefix + (path.sep === '\\' ? file.replace(/\\/g, '/') : file); +} + +let anErrorOccurred = false; +function next (done) { + const file = files.shift(); + if (!file) return done(); + let key = filenameToKey(file); + // TODO: When we drop s3put, migrate the key to not include atom-shell in the callsites + key = key.replace('atom-shell/dist/', 'headers/dist/'); + key = key.replace('atom-shell/symbols/', 'symbols/'); + key = key.replace('atom-shell/tmp/', 'checksums-scratchpad/'); + key = key.replace('electron-artifacts/', 'release-builds/'); + + const [containerName, ...keyPath] = key.split('/'); + const blobKey = keyPath.join('/'); + console.log(`Uploading '${file}' to container '${containerName}' with key '${blobKey}'...`); + + const containerClient = blobServiceClient.getContainerClient(containerName); + const blockBlobClient = containerClient.getBlockBlobClient(blobKey); + blockBlobClient.uploadFile(file) + .then((uploadBlobResponse) => { + console.log(`Upload block blob ${blobKey} successfully: https://artifacts.electronjs.org/${key}`, uploadBlobResponse.requestId); + }) + .catch((err) => { + console.error(err); + anErrorOccurred = true; + }) + .then(() => next(done)); +} +next(() => { + process.exit(anErrorOccurred ? 1 : 0); +}); diff --git a/script/lib/util.py b/script/lib/util.py index 93b364c6a23e0..c7f448331a7cd 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -15,7 +15,7 @@ from urllib2 import urlopen import zipfile -from lib.config import is_verbose_mode +from lib.config import is_verbose_mode, s3_config ELECTRON_DIR = os.path.abspath( os.path.dirname(os.path.dirname(os.path.dirname(__file__))) @@ -155,7 +155,14 @@ def get_electron_version(): with open(version_file) as f: return 'v' + f.read().strip() -def s3put(bucket, access_key, secret_key, prefix, key_prefix, files): +def store_artifact(prefix, key_prefix, files): + # Legacy S3 Bucket + s3put(prefix, key_prefix, files) + # New AZ Storage + azput(prefix, key_prefix, files) + +def s3put(prefix, key_prefix, files): + bucket, access_key, secret_key = s3_config() env = os.environ.copy() env['AWS_ACCESS_KEY_ID'] = access_key env['AWS_SECRET_ACCESS_KEY'] = secret_key @@ -169,6 +176,16 @@ def s3put(bucket, access_key, secret_key, prefix, key_prefix, files): ] + files, env) print(output) +def azput(prefix, key_prefix, files): + env = os.environ.copy() + output = execute([ + 'node', + os.path.join(os.path.dirname(__file__), 'azput.js'), + '--prefix', prefix, + '--key_prefix', key_prefix, + ] + files, env) + print(output) + def get_out_dir(): out_dir = 'Debug' override = os.environ.get('ELECTRON_OUT_DIR') diff --git a/script/release/release.js b/script/release/release.js index 3527f39ce2bd3..21ebbc0836aec 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -17,8 +17,8 @@ const pkgVersion = `v${pkg.version}`; const path = require('path'); const temp = require('temp').track(); const { URL } = require('url'); +const { BlobServiceClient } = require('@azure/storage-blob'); const { Octokit } = require('@octokit/rest'); -const AWS = require('aws-sdk'); require('colors'); const pass = '✓'.green; @@ -80,6 +80,8 @@ async function validateReleaseAssets (release, validatingRelease) { } const s3RemoteFiles = s3RemoteFilesForVersion(release.tag_name); await verifyShasumsForRemoteFiles(s3RemoteFiles, true); + const azRemoteFiles = azRemoteFilesForVersion(release.tag_name); + await verifyShasumsForRemoteFiles(s3RemoteFiles, true); } } @@ -181,26 +183,36 @@ function assetsForVersion (version, validatingRelease) { return patterns; } +const cloudStoreFilePaths = (version) => [ + `iojs-${version}-headers.tar.gz`, + `iojs-${version}.tar.gz`, + `node-${version}.tar.gz`, + 'node.lib', + 'x64/node.lib', + 'win-x64/iojs.lib', + 'win-x86/iojs.lib', + 'win-arm64/iojs.lib', + 'win-x64/node.lib', + 'win-x86/node.lib', + 'win-arm64/node.lib', + 'arm64/node.lib', + 'SHASUMS.txt', + 'SHASUMS256.txt' +]; + function s3RemoteFilesForVersion (version) { const bucket = 'https://gh-contractor-zcbenz.s3.amazonaws.com/'; const versionPrefix = `${bucket}atom-shell/dist/${version}/`; - const filePaths = [ - `iojs-${version}-headers.tar.gz`, - `iojs-${version}.tar.gz`, - `node-${version}.tar.gz`, - 'node.lib', - 'x64/node.lib', - 'win-x64/iojs.lib', - 'win-x86/iojs.lib', - 'win-arm64/iojs.lib', - 'win-x64/node.lib', - 'win-x86/node.lib', - 'win-arm64/node.lib', - 'arm64/node.lib', - 'SHASUMS.txt', - 'SHASUMS256.txt' - ]; - return filePaths.map((filePath) => ({ + return cloudStoreFilePaths(version).map((filePath) => ({ + file: filePath, + url: `${versionPrefix}${filePath}` + })); +} + +function azRemoteFilesForVersion (version) { + const azCDN = 'https://artifacts.electronjs.org/headers/'; + const versionPrefix = `${azCDN}dist/${version}/`; + return cloudStoreFilePaths(version).map((filePath) => ({ file: filePath, url: `${versionPrefix}${filePath}` })); @@ -221,49 +233,39 @@ function runScript (scriptName, scriptArgs, cwd) { } function uploadNodeShasums () { - console.log('Uploading Node SHASUMS file to S3.'); + console.log('Uploading Node SHASUMS file to artifacts.electronjs.org.'); const scriptPath = path.join(ELECTRON_DIR, 'script', 'release', 'uploaders', 'upload-node-checksums.py'); runScript(scriptPath, ['-v', pkgVersion]); - console.log(`${pass} Done uploading Node SHASUMS file to S3.`); + console.log(`${pass} Done uploading Node SHASUMS file to artifacts.electronjs.org.`); } function uploadIndexJson () { - console.log('Uploading index.json to S3.'); + console.log('Uploading index.json to artifacts.electronjs.org.'); const scriptPath = path.join(ELECTRON_DIR, 'script', 'release', 'uploaders', 'upload-index-json.py'); runScript(scriptPath, [pkgVersion]); - console.log(`${pass} Done uploading index.json to S3.`); + console.log(`${pass} Done uploading index.json to artifacts.electronjs.org.`); } async function mergeShasums (pkgVersion) { - // Download individual checksum files for Electron zip files from S3, + // Download individual checksum files for Electron zip files from artifact storage, // concatenate them, and upload to GitHub. - const bucket = process.env.ELECTRON_S3_BUCKET; - const accessKeyId = process.env.ELECTRON_S3_ACCESS_KEY; - const secretAccessKey = process.env.ELECTRON_S3_SECRET_KEY; - if (!bucket || !accessKeyId || !secretAccessKey) { - throw new Error('Please set the $ELECTRON_S3_BUCKET, $ELECTRON_S3_ACCESS_KEY, and $ELECTRON_S3_SECRET_KEY environment variables'); + const connectionString = process.env.ELECTRON_ARTIFACTS_BLOB_STORAGE; + if (!connectionString) { + throw new Error('Please set the $ELECTRON_ARTIFACTS_BLOB_STORAGE environment variable'); } - const s3 = new AWS.S3({ - apiVersion: '2006-03-01', - accessKeyId, - secretAccessKey, - region: 'us-west-2' + const blobServiceClient = BlobServiceClient.fromConnectionString(connectionString); + const containerClient = blobServiceClient.getContainerClient('checksums-scratchpad'); + const blobsIter = containerClient.listBlobsFlat({ + prefix: `${pkgVersion}/` }); - const objects = await s3.listObjectsV2({ - Bucket: bucket, - Prefix: `atom-shell/tmp/${pkgVersion}/`, - Delimiter: '/' - }).promise(); const shasums = []; - for (const obj of objects.Contents) { - if (obj.Key.endsWith('.sha256sum')) { - const data = await s3.getObject({ - Bucket: bucket, - Key: obj.Key - }).promise(); - shasums.push(data.Body.toString('ascii').trim()); + for await (const blob of blobsIter) { + if (blob.name.endsWith('.sha256sum')) { + const blobClient = containerClient.getBlockBlobClient(blob.name); + const response = await blobClient.downloadToBuffer(); + shasums.push(response.toString('ascii').trim()); } } return shasums.join('\n'); diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index 4b2c4973aa39d..41880d5667dae 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -9,8 +9,8 @@ sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) -from lib.config import s3_config -from lib.util import s3put, scoped_cwd, safe_mkdir, get_out_dir, ELECTRON_DIR +from lib.util import store_artifact, scoped_cwd, safe_mkdir, get_out_dir, \ + ELECTRON_DIR OUT_DIR = get_out_dir() @@ -59,9 +59,7 @@ def main(): with open(index_json, "w") as f: f.write(new_content) - bucket, access_key, secret_key = s3_config() - s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist', - [index_json]) + store_artifact(OUT_DIR, 'atom-shell/dist', [index_json]) if __name__ == '__main__': diff --git a/script/release/uploaders/upload-node-checksums.py b/script/release/uploaders/upload-node-checksums.py index 41d509f2a6f72..dfa8ef3595ad7 100755 --- a/script/release/uploaders/upload-node-checksums.py +++ b/script/release/uploaders/upload-node-checksums.py @@ -10,8 +10,7 @@ sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) -from lib.config import s3_config -from lib.util import download, rm_rf, s3put, safe_mkdir +from lib.util import download, rm_rf, store_artifact, safe_mkdir DIST_URL = 'https://electronjs.org/headers/' @@ -30,9 +29,8 @@ def main(): ] if args.target_dir is None: - bucket, access_key, secret_key = s3_config() - s3put(bucket, access_key, secret_key, directory, - 'atom-shell/dist/{0}'.format(args.version), checksums) + store_artifact(directory, 'atom-shell/dist/{0}'.format(args.version), + checksums) else: copy_files(checksums, args.target_dir) diff --git a/script/release/uploaders/upload-node-headers.py b/script/release/uploaders/upload-node-headers.py index 0f81504fe117c..862eea96e8b02 100755 --- a/script/release/uploaders/upload-node-headers.py +++ b/script/release/uploaders/upload-node-headers.py @@ -9,8 +9,9 @@ sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) -from lib.config import PLATFORM, get_target_arch, s3_config -from lib.util import safe_mkdir, scoped_cwd, s3put, get_out_dir, get_dist_dir +from lib.config import PLATFORM, get_target_arch +from lib.util import safe_mkdir, scoped_cwd, store_artifact, get_out_dir, \ + get_dist_dir DIST_DIR = get_dist_dir() OUT_DIR = get_out_dir() @@ -26,9 +27,8 @@ def main(): args = parse_args() - # Upload node's headers to S3. - bucket, access_key, secret_key = s3_config() - upload_node(bucket, access_key, secret_key, args.version) + # Upload node's headers to artifact storage. + upload_node(args.version) def parse_args(): @@ -38,17 +38,17 @@ def parse_args(): return parser.parse_args() -def upload_node(bucket, access_key, secret_key, version): +def upload_node(version): with scoped_cwd(GEN_DIR): generated_tar = os.path.join(GEN_DIR, 'node_headers.tar.gz') for header_tar in HEADER_TAR_NAMES: versioned_header_tar = header_tar.format(version) shutil.copy2(generated_tar, os.path.join(GEN_DIR, versioned_header_tar)) - s3put(bucket, access_key, secret_key, GEN_DIR, - 'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz')) - s3put(bucket, access_key, secret_key, GEN_DIR, - 'atom-shell/dist/{0}'.format(version), glob.glob('iojs-*.tar.gz')) + store_artifact(GEN_DIR, 'atom-shell/dist/{0}'.format(version), + glob.glob('node-*.tar.gz')) + store_artifact(GEN_DIR, 'atom-shell/dist/{0}'.format(version), + glob.glob('iojs-*.tar.gz')) if PLATFORM == 'win32': if get_target_arch() == 'ia32': @@ -73,16 +73,14 @@ def upload_node(bucket, access_key, secret_key, version): shutil.copy2(electron_lib, v4_node_lib) # Upload the node.lib. - s3put(bucket, access_key, secret_key, DIST_DIR, - 'atom-shell/dist/{0}'.format(version), [node_lib]) + store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), [node_lib]) # Upload the iojs.lib. - s3put(bucket, access_key, secret_key, DIST_DIR, - 'atom-shell/dist/{0}'.format(version), [iojs_lib]) + store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), [iojs_lib]) # Upload the v4 node.lib. - s3put(bucket, access_key, secret_key, DIST_DIR, - 'atom-shell/dist/{0}'.format(version), [v4_node_lib]) + store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), + [v4_node_lib]) if __name__ == '__main__': diff --git a/script/release/uploaders/upload-symbols.py b/script/release/uploaders/upload-symbols.py index 25952bc05d1c9..3e877e64772db 100755 --- a/script/release/uploaders/upload-symbols.py +++ b/script/release/uploaders/upload-symbols.py @@ -14,8 +14,8 @@ def is_fs_case_sensitive(): sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) -from lib.config import PLATFORM, s3_config -from lib.util import get_electron_branding, execute, s3put, \ +from lib.config import PLATFORM +from lib.util import get_electron_branding, execute, store_artifact, \ get_out_dir, ELECTRON_DIR RELEASE_DIR = get_out_dir() @@ -76,16 +76,15 @@ def main(): for f in files: assert os.path.exists(f) - bucket, access_key, secret_key = s3_config() - upload_symbols(bucket, access_key, secret_key, files) + upload_symbols(files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) -def upload_symbols(bucket, access_key, secret_key, files): - s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', +def upload_symbols(files): + store_artifact(SYMBOLS_DIR, 'atom-shell/symbols', files) diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 88fbcc2423770..51302d677e76a 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -16,10 +16,10 @@ os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) from zipfile import ZipFile -from lib.config import PLATFORM, get_target_arch,s3_config, \ +from lib.config import PLATFORM, get_target_arch, \ get_zip_name, enable_verbose_mode, get_platform_key from lib.util import get_electron_branding, execute, get_electron_version, \ - s3put, get_electron_exec, get_out_dir, \ + store_artifact, get_electron_exec, get_out_dir, \ SRC_DIR, ELECTRON_DIR, TS_NODE @@ -342,14 +342,10 @@ def upload_electron(release, file_path, args): # if upload_to_s3 is set, skip github upload. if args.upload_to_s3: - bucket, access_key, secret_key = s3_config() key_prefix = 'electron-artifacts/{0}_{1}'.format(args.version, args.upload_timestamp) - s3put(bucket, access_key, secret_key, os.path.dirname(file_path), - key_prefix, [file_path]) + store_artifact(os.path.dirname(file_path), key_prefix, [file_path]) upload_sha256_checksum(args.version, file_path, key_prefix) - s3url = 'https://gh-contractor-zcbenz.s3.amazonaws.com' - print('{0} uploaded to {1}/{2}/{0}'.format(filename, s3url, key_prefix)) return # Upload the file. @@ -369,7 +365,6 @@ def upload_io_to_github(release, filename, filepath, version): def upload_sha256_checksum(version, file_path, key_prefix=None): - bucket, access_key, secret_key = s3_config() checksum_path = '{}.sha256sum'.format(file_path) if key_prefix is None: key_prefix = 'atom-shell/tmp/{0}'.format(version) @@ -380,8 +375,7 @@ def upload_sha256_checksum(version, file_path, key_prefix=None): filename = os.path.basename(file_path) with open(checksum_path, 'w') as checksum: checksum.write('{} *{}'.format(sha256.hexdigest(), filename)) - s3put(bucket, access_key, secret_key, os.path.dirname(checksum_path), - key_prefix, [checksum_path]) + store_artifact(os.path.dirname(checksum_path), key_prefix, [checksum_path]) def get_release(version): diff --git a/yarn.lock b/yarn.lock index 39af7f570db85..ca7df59b03cf9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,94 @@ # yarn lockfile v1 +"@azure/abort-controller@^1.0.0": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.0.4.tgz#fd3c4d46c8ed67aace42498c8e2270960250eafd" + integrity sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw== + dependencies: + tslib "^2.0.0" + +"@azure/core-asynciterator-polyfill@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz#0dd3849fb8d97f062a39db0e5cadc9ffaf861fec" + integrity sha512-3rkP4LnnlWawl0LZptJOdXNrT/fHp2eQMadoasa6afspXdpGrtPZuAQc2PD0cpgyuoXtUWyC3tv7xfntjGS5Dw== + +"@azure/core-auth@^1.3.0": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.3.2.tgz#6a2c248576c26df365f6c7881ca04b7f6d08e3d0" + integrity sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA== + dependencies: + "@azure/abort-controller" "^1.0.0" + tslib "^2.2.0" + +"@azure/core-http@^2.0.0": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-2.2.4.tgz#df5a5b4138dbbc4299879f2fc6f257d0a5f0401e" + integrity sha512-QmmJmexXKtPyc3/rsZR/YTLDvMatzbzAypJmLzvlfxgz/SkgnqV/D4f6F2LsK6tBj1qhyp8BoXiOebiej0zz3A== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-asynciterator-polyfill" "^1.0.0" + "@azure/core-auth" "^1.3.0" + "@azure/core-tracing" "1.0.0-preview.13" + "@azure/logger" "^1.0.0" + "@types/node-fetch" "^2.5.0" + "@types/tunnel" "^0.0.3" + form-data "^4.0.0" + node-fetch "^2.6.7" + process "^0.11.10" + tough-cookie "^4.0.0" + tslib "^2.2.0" + tunnel "^0.0.6" + uuid "^8.3.0" + xml2js "^0.4.19" + +"@azure/core-lro@^2.2.0": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.2.4.tgz#42fbf4ae98093c59005206a4437ddcd057c57ca1" + integrity sha512-e1I2v2CZM0mQo8+RSix0x091Av493e4bnT22ds2fcQGslTHzM2oTbswkB65nP4iEpCxBrFxOSDPKExmTmjCVtQ== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-tracing" "1.0.0-preview.13" + "@azure/logger" "^1.0.0" + tslib "^2.2.0" + +"@azure/core-paging@^1.1.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.2.1.tgz#1b884f563b6e49971e9a922da3c7a20931867b54" + integrity sha512-UtH5iMlYsvg+nQYIl4UHlvvSrsBjOlRF4fs0j7mxd3rWdAStrKYrh2durOpHs5C9yZbVhsVDaisoyaf/lL1EVA== + dependencies: + "@azure/core-asynciterator-polyfill" "^1.0.0" + tslib "^2.2.0" + +"@azure/core-tracing@1.0.0-preview.13": + version "1.0.0-preview.13" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz#55883d40ae2042f6f1e12b17dd0c0d34c536d644" + integrity sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ== + dependencies: + "@opentelemetry/api" "^1.0.1" + tslib "^2.2.0" + +"@azure/logger@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.3.tgz#6e36704aa51be7d4a1bae24731ea580836293c96" + integrity sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g== + dependencies: + tslib "^2.2.0" + +"@azure/storage-blob@^12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.9.0.tgz#4cbd8b4c7a47dd064867430db892f4ef2d8f17ab" + integrity sha512-ank38FdCLfJ+EoeMzCz3hkYJuZAd63ARvDKkxZYRDb+beBYf+/+gx8jNTqkq/hfyUl4dJQ/a7tECU0Y0F98CHg== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-http" "^2.0.0" + "@azure/core-lro" "^2.2.0" + "@azure/core-paging" "^1.1.1" + "@azure/core-tracing" "1.0.0-preview.13" + "@azure/logger" "^1.0.0" + events "^3.0.0" + tslib "^2.2.0" + "@babel/code-frame@^7.0.0": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" @@ -181,6 +269,11 @@ dependencies: "@types/node" ">= 8" +"@opentelemetry/api@^1.0.1": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.0.4.tgz#a167e46c10d05a07ab299fc518793b0cff8f6924" + integrity sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog== + "@primer/octicons@^10.0.0": version "10.0.0" resolved "https://registry.yarnpkg.com/@primer/octicons/-/octicons-10.0.0.tgz#81e94ed32545dfd3472c8625a5b345f3ea4c153d" @@ -431,6 +524,14 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@types/node-fetch@^2.5.0": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" + integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + "@types/node@*": version "12.6.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.1.tgz#d5544f6de0aae03eefbb63d5120f6c8be0691946" @@ -554,6 +655,13 @@ dependencies: "@types/node" "*" +"@types/tunnel@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.3.tgz#f109e730b072b3136347561fc558c9358bb8c6e9" + integrity sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA== + dependencies: + "@types/node" "*" + "@types/uglify-js@*": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082" @@ -1108,6 +1216,11 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" @@ -1685,6 +1798,13 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== +combined-stream@^1.0.8: + 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" + commander@^2.20.0, commander@^2.9.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" @@ -2027,6 +2147,11 @@ deglob@^4.0.1: run-parallel "^1.1.2" uniq "^1.0.1" +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= + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -2980,6 +3105,24 @@ for-in@^1.0.2: resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + format@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" @@ -4768,6 +4911,18 @@ mime-db@1.40.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" @@ -4946,7 +5101,7 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch@^2.3.0: +node-fetch@^2.3.0, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -5630,6 +5785,11 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= +psl@^1.1.33: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + public-encrypt@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" @@ -5677,7 +5837,7 @@ punycode@^1.2.4: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0: +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== @@ -7354,6 +7514,15 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -7404,6 +7573,11 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== +tslib@^2.0.0, tslib@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -7416,6 +7590,11 @@ tty-browserify@0.0.0: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= +tunnel@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -7645,7 +7824,7 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0: +universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== @@ -7754,6 +7933,11 @@ uuid@3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +uuid@^8.3.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3, v8-compile-cache@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" @@ -8024,6 +8208,19 @@ xml2js@0.4.19: sax ">=0.6.0" xmlbuilder "~9.0.1" +xml2js@^0.4.19: + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + xmlbuilder@~4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" From f287b0b3826c2e895ae7662df5e7721d55c213ac Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 06:03:57 -0700 Subject: [PATCH 218/811] Bump v20.0.0-nightly.20220404 --- 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 b0d7db7463dd8..096948707b216 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220404 \ No newline at end of file diff --git a/package.json b/package.json index e976065ea1d06..7167ce0e065b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220404", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 5746c1f414b34..9d5255ed33325 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220404 + PRODUCTVERSION 20,0,0,20220404 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e28bde99476e640142396a36c1c562d377214509 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 07:31:00 -0700 Subject: [PATCH 219/811] Revert "Bump v20.0.0-nightly.20220404" This reverts commit f287b0b3826c2e895ae7662df5e7721d55c213ac. --- 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 096948707b216..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220404 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 7167ce0e065b8..e976065ea1d06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220404", + "version": "20.0.0-nightly.20220330", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 9d5255ed33325..5746c1f414b34 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 20,0,0,20220404 - PRODUCTVERSION 20,0,0,20220404 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c2449c421cf5aae37134757baf4ce62d0a177a2d Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 15:43:36 -0700 Subject: [PATCH 220/811] build: enable RDP for release builds --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a449f76827eb3..2897c134cd3df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables # Uncomment these lines to enable RDP -#on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +on_finish: + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) version: 1.0.{build} build_cloud: electron-16-core From 18db9c551dc20c13177aed33b20edeb567fe2cec Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 15:43:57 -0700 Subject: [PATCH 221/811] Revert "build: enable RDP for release builds" This reverts commit c2449c421cf5aae37134757baf4ce62d0a177a2d. --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2897c134cd3df..a449f76827eb3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables # Uncomment these lines to enable RDP -on_finish: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +#on_finish: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) version: 1.0.{build} build_cloud: electron-16-core From 09251fe24c586d7d6620e6f1e48d7ddee3440b5d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:44:35 -0700 Subject: [PATCH 222/811] Bump v20.0.0-nightly.20220404 --- 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 b0d7db7463dd8..096948707b216 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220404 \ No newline at end of file diff --git a/package.json b/package.json index e976065ea1d06..7167ce0e065b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220404", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 5746c1f414b34..9d5255ed33325 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220404 + PRODUCTVERSION 20,0,0,20220404 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 58386fbf4384f7a9221312241364a39e11fc8b38 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:44:53 -0700 Subject: [PATCH 223/811] Revert "Bump v20.0.0-nightly.20220404" This reverts commit 5985e6fd76a552b9647eb81c0fbaf9f609b11935. --- 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 096948707b216..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220404 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 7167ce0e065b8..e976065ea1d06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220404", + "version": "20.0.0-nightly.20220330", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 9d5255ed33325..5746c1f414b34 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 20,0,0,20220404 - PRODUCTVERSION 20,0,0,20220404 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From fcd7dbfa5c1950ea4215b2b5ddd0a8942fb37ed9 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 15:45:05 -0700 Subject: [PATCH 224/811] build: enable RDP for release builds --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a449f76827eb3..2897c134cd3df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables # Uncomment these lines to enable RDP -#on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +on_finish: + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) version: 1.0.{build} build_cloud: electron-16-core From bff1a37791888204e43a0c848087a6a9f7cc31d1 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:46:28 -0700 Subject: [PATCH 225/811] Bump v20.0.0-nightly.20220404 --- 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 b0d7db7463dd8..096948707b216 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220404 \ No newline at end of file diff --git a/package.json b/package.json index e976065ea1d06..7167ce0e065b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220404", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 5746c1f414b34..9d5255ed33325 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220404 + PRODUCTVERSION 20,0,0,20220404 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 128560c4ac50789f13fa98bc2d7dbb5e20efb811 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:49:20 -0700 Subject: [PATCH 226/811] Revert "Bump v20.0.0-nightly.20220404" This reverts commit bff1a37791888204e43a0c848087a6a9f7cc31d1. --- 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 096948707b216..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220404 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 7167ce0e065b8..e976065ea1d06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220404", + "version": "20.0.0-nightly.20220330", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 9d5255ed33325..5746c1f414b34 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 20,0,0,20220404 - PRODUCTVERSION 20,0,0,20220404 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d309558f649736085f67bba7609498222ddc7182 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 15:49:15 -0700 Subject: [PATCH 227/811] build: enable RDP for release builds --- appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2897c134cd3df..bd6b0c3db4465 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,10 +23,6 @@ # https://www.appveyor.com/docs/build-configuration/#secure-variables # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables -# Uncomment these lines to enable RDP -on_finish: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - version: 1.0.{build} build_cloud: electron-16-core image: vs2019bt-16.6.2 @@ -235,6 +231,8 @@ deploy_script: 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: + # Uncomment this lines to enable RDP + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - cd .. - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) From df34d20a219ec7fc47b211990cf5239399e18de9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:50:33 -0700 Subject: [PATCH 228/811] Bump v20.0.0-nightly.20220404 --- 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 b0d7db7463dd8..096948707b216 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220404 \ No newline at end of file diff --git a/package.json b/package.json index e976065ea1d06..7167ce0e065b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220404", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 5746c1f414b34..9d5255ed33325 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220404 + PRODUCTVERSION 20,0,0,20220404 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From dce6c23b335d1032e40e24a0f09cf230f76cd457 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 16:25:10 -0700 Subject: [PATCH 229/811] Revert "build: enable RDP for release builds" This reverts commit d309558f649736085f67bba7609498222ddc7182. --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bd6b0c3db4465..2897c134cd3df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,6 +23,10 @@ # https://www.appveyor.com/docs/build-configuration/#secure-variables # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables +# Uncomment these lines to enable RDP +on_finish: + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + version: 1.0.{build} build_cloud: electron-16-core image: vs2019bt-16.6.2 @@ -231,8 +235,6 @@ deploy_script: 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: - # Uncomment this lines to enable RDP - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - cd .. - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) From 1ada5d7ddf794195e3ce9da1017e1ebd24cf5811 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 16:25:19 -0700 Subject: [PATCH 230/811] Revert "Revert "build: enable RDP for release builds"" This reverts commit dce6c23b335d1032e40e24a0f09cf230f76cd457. --- appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2897c134cd3df..bd6b0c3db4465 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,10 +23,6 @@ # https://www.appveyor.com/docs/build-configuration/#secure-variables # https://www.appveyor.com/docs/build-configuration/#custom-environment-variables -# Uncomment these lines to enable RDP -on_finish: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - version: 1.0.{build} build_cloud: electron-16-core image: vs2019bt-16.6.2 @@ -235,6 +231,8 @@ deploy_script: 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: + # Uncomment this lines to enable RDP + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - cd .. - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) From 477aa389e650d3dd2c3658b349f9a550201e6abb Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 16:25:32 -0700 Subject: [PATCH 231/811] build: disable RDP --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index bd6b0c3db4465..55bdb38d5d864 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -232,7 +232,7 @@ deploy_script: } on_finish: # Uncomment this lines to enable RDP - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - cd .. - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) From a72acfc5355a9e5737be3543b65d2d03f1246e30 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 17:01:12 -0700 Subject: [PATCH 232/811] fix: revert "fix: some frameless windows showing a frame on Windows (#32692)" (#33599) This reverts commit 7c701367c0820691e2a0f8f1cfd1fb3470071704. --- shell/browser/native_window_views.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index f542365e290df..03501b7b73f52 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -340,14 +340,15 @@ 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_ && thick_frame_) + if (resizable_) frame_style |= WS_THICKFRAME; if (minimizable_) frame_style |= WS_MINIMIZEBOX; if (maximizable_) frame_style |= WS_MAXIMIZEBOX; - if (!thick_frame_ || !has_frame()) - frame_style &= ~WS_CAPTION; + // We should not show a frame for transparent window. + if (!thick_frame_) + frame_style &= ~(WS_THICKFRAME | WS_CAPTION); ::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style); } From fcbdaab5e3c395a844ef75f0aa766dd20b1d90e9 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 4 Apr 2022 20:22:36 -0700 Subject: [PATCH 233/811] fix: add missing translation string for ax tree (#33614) --- electron_strings.grdp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electron_strings.grdp b/electron_strings.grdp index bf5dcf652558d..5068141716d7a 100644 --- a/electron_strings.grdp +++ b/electron_strings.grdp @@ -145,4 +145,16 @@ Unknown Device ($11234:abcd) + + + + Unlabeled graphic + + + + + Unlabeled image + + + From cc3743bd43197db26411fd84a6d67fdff487c81d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 5 Apr 2022 18:09:12 +0200 Subject: [PATCH 234/811] fix: remove usage of private pid API on MAS (#33594) --- patches/chromium/mas_no_private_api.patch | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index dd209431cba87..8054716d63c78 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -6,6 +6,33 @@ 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/base/process/process_info_mac.cc b/base/process/process_info_mac.cc +index 368405f29313d51a6eee16517b634c6d0ea95281..2553a7fbf1e8b4dea796dec3b3e906d265d3ad76 100644 +--- a/base/process/process_info_mac.cc ++++ b/base/process/process_info_mac.cc +@@ -5,18 +5,22 @@ + #include + #include + ++#ifndef MAS_BUILD + extern "C" { + pid_t responsibility_get_pid_responsible_for_pid(pid_t) + API_AVAILABLE(macosx(10.12)); + } ++#endif + + namespace base { + + bool IsProcessSelfResponsible() { ++#ifndef MAS_BUILD + if (__builtin_available(macOS 10.14, *)) { + const pid_t pid = getpid(); + return responsibility_get_pid_responsible_for_pid(pid) == pid; + } ++#endif + return true; + } + 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 927ab3104d9bb2b6a773d5b7a78b0da81f870b91 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 09:17:12 -0700 Subject: [PATCH 235/811] Revert "Bump v20.0.0-nightly.20220404" This reverts commit df34d20a219ec7fc47b211990cf5239399e18de9. --- 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 096948707b216..b0d7db7463dd8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220404 \ No newline at end of file +20.0.0-nightly.20220330 \ No newline at end of file diff --git a/package.json b/package.json index 7167ce0e065b8..e976065ea1d06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220404", + "version": "20.0.0-nightly.20220330", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 9d5255ed33325..5746c1f414b34 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 20,0,0,20220404 - PRODUCTVERSION 20,0,0,20220404 + FILEVERSION 20,0,0,20220330 + PRODUCTVERSION 20,0,0,20220330 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4615fc53ca3af6de585de1c25ff623169cbba5d8 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 5 Apr 2022 09:25:07 -0700 Subject: [PATCH 236/811] chore: fix typo in NotifyWindowRequestPreferredWidth method name (#33568) --- shell/browser/native_window.cc | 2 +- shell/browser/native_window.h | 2 +- shell/browser/ui/cocoa/electron_ns_window_delegate.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 1ca962fa92746..989d816c17c8a 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -479,7 +479,7 @@ void NativeWindow::SetWindowControlsOverlayRect(const gfx::Rect& overlay_rect) { overlay_rect_ = overlay_rect; } -void NativeWindow::NotifyWindowRequestPreferredWith(int* width) { +void NativeWindow::NotifyWindowRequestPreferredWidth(int* width) { for (NativeWindowObserver& observer : observers_) observer.RequestPreferredWidth(width); } diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 762552656a5df..febc36213fd04 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -269,7 +269,7 @@ class NativeWindow : public base::SupportsUserData, // Public API used by platform-dependent delegates and observers to send UI // related notifications. - void NotifyWindowRequestPreferredWith(int* width); + void NotifyWindowRequestPreferredWidth(int* width); void NotifyWindowCloseButtonClicked(); void NotifyWindowClosed(); void NotifyWindowEndSession(); diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 1723f5c6d55ea..f9b7a1170d1de 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -75,7 +75,7 @@ - (NSRect)windowWillUseStandardFrame:(NSWindow*)window // Get preferred width from observers. Usually the page width. int preferred_width = 0; - shell_->NotifyWindowRequestPreferredWith(&preferred_width); + shell_->NotifyWindowRequestPreferredWidth(&preferred_width); // Never shrink from the current size on zoom. NSRect window_frame = [window frame]; From f95e565884999ddc2609742b2ba60e368e5a46e7 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 6 Apr 2022 13:40:52 +0200 Subject: [PATCH 237/811] chore: combine some smaller MAS patches (#33595) * chore: combine some smaller MAS patches * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/.patches | 7 +- patches/chromium/mas-audiodeviceduck.patch | 35 --- patches/chromium/mas-cfisobjc.patch | 44 ---- .../mas_avoid_usage_of_abort_report_np.patch | 35 --- ...as_avoid_usage_of_private_macos_apis.patch | 233 ++++++++++++++++++ ...mas_avoid_usage_of_pthread_fchdir_np.patch | 66 ----- ..._usage_of_setapplicationisdaemon_and.patch | 50 ---- .../mas_gate_private_enterprise_APIs.patch | 36 --- 8 files changed, 234 insertions(+), 272 deletions(-) delete mode 100644 patches/chromium/mas-audiodeviceduck.patch delete mode 100644 patches/chromium/mas-cfisobjc.patch delete mode 100644 patches/chromium/mas_avoid_usage_of_abort_report_np.patch create mode 100644 patches/chromium/mas_avoid_usage_of_private_macos_apis.patch delete mode 100644 patches/chromium/mas_avoid_usage_of_pthread_fchdir_np.patch delete mode 100644 patches/chromium/mas_avoid_usage_of_setapplicationisdaemon_and.patch delete mode 100644 patches/chromium/mas_gate_private_enterprise_APIs.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 901b355c9245a..1487c1a4cc111 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -21,15 +21,11 @@ resource_file_conflict.patch scroll_bounce_flag.patch mas_blink_no_private_api.patch mas_no_private_api.patch -mas-cfisobjc.patch mas-cgdisplayusesforcetogray.patch -mas-audiodeviceduck.patch mas_disable_remote_layer.patch mas_disable_remote_accessibility.patch mas_disable_custom_window_frame.patch -mas_avoid_usage_of_abort_report_np.patch -mas_avoid_usage_of_pthread_fchdir_np.patch -mas_avoid_usage_of_setapplicationisdaemon_and.patch +mas_avoid_usage_of_private_macos_apis.patch mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch chrome_key_systems.patch add_didinstallconditionalfeatures.patch @@ -103,7 +99,6 @@ chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch process_singleton.patch fix_expose_decrementcapturercount_in_web_contents_impl.patch add_ui_scopedcliboardwriter_writeunsaferawdata.patch -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-audiodeviceduck.patch b/patches/chromium/mas-audiodeviceduck.patch deleted file mode 100644 index 765e3e06f0711..0000000000000 --- a/patches/chromium/mas-audiodeviceduck.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Thu, 20 Sep 2018 17:49:31 -0700 -Subject: mas: avoid usage of AudioDeviceDuck - -Removes usage of the AudioDeviceDuck private API. - -diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc -index e28d37435da00153e34132f49ce8f6b240e70a65..77ce459d969022b7c5a4d1e57bb1f7e6fa7a9898 100644 ---- a/media/audio/mac/audio_low_latency_input_mac.cc -+++ b/media/audio/mac/audio_low_latency_input_mac.cc -@@ -34,19 +34,23 @@ - - namespace { - extern "C" { -+#ifndef MAS_BUILD - // See: - // https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h?rev=228264 - OSStatus AudioDeviceDuck(AudioDeviceID inDevice, - Float32 inDuckedLevel, - const AudioTimeStamp* __nullable inStartTime, - Float32 inRampDuration) __attribute__((weak_import)); -+#endif - } - - void UndoDucking(AudioDeviceID output_device_id) { -+#ifndef MAS_BUILD - if (AudioDeviceDuck != nullptr) { - // Ramp the volume back up over half a second. - AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5); - } -+#endif - } - - } // namespace diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch deleted file mode 100644 index 7efd6508d3fcc..0000000000000 --- a/patches/chromium/mas-cfisobjc.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Thu, 20 Sep 2018 17:49:20 -0700 -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 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644 ---- a/base/mac/foundation_util.mm -+++ b/base/mac/foundation_util.mm -@@ -30,12 +30,6 @@ - #if !BUILDFLAG(IS_IOS) - CFTypeID SecACLGetTypeID(); - CFTypeID SecTrustedApplicationGetTypeID(); --// The NSFont/CTFont toll-free bridging is broken before 10.15. --// http://www.openradar.me/15341349 rdar://15341349 --// --// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the --// minimum OS for Chromium, remove this SPI declaration. --Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj); - #endif - } // extern "C" - -@@ -316,8 +310,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { - const_cast(reinterpret_cast(cf_val)); - DCHECK(!cf_val || - CTFontGetTypeID() == CFGetTypeID(cf_val) || -- (_CFIsObjC(CTFontGetTypeID(), cf_val) && -- [ns_val isKindOfClass:[NSFont class]])); -+ ([ns_val isKindOfClass:[NSFont class]])); - return ns_val; - } - -@@ -388,9 +381,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { - return (CTFontRef)(cf_val); - } - -- if (!_CFIsObjC(CTFontGetTypeID(), cf_val)) -- return NULL; -- - id ns_val = reinterpret_cast(const_cast(cf_val)); - if ([ns_val isKindOfClass:[NSFont class]]) { - return (CTFontRef)(cf_val); diff --git a/patches/chromium/mas_avoid_usage_of_abort_report_np.patch b/patches/chromium/mas_avoid_usage_of_abort_report_np.patch deleted file mode 100644 index 5c3f9a8b72719..0000000000000 --- a/patches/chromium/mas_avoid_usage_of_abort_report_np.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 4 Mar 2019 14:43:36 -0800 -Subject: mas: avoid usage of abort_report_np - -Disable usage of the private API abort_report_np in MAS builds. - -diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc -index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e3a9f81d4 100644 ---- a/sandbox/mac/sandbox_logging.cc -+++ b/sandbox/mac/sandbox_logging.cc -@@ -32,9 +32,11 @@ - } - #endif - -+#if !defined(MAS_BUILD) - extern "C" { - void abort_report_np(const char*, ...); - } -+#endif - - namespace sandbox { - -@@ -104,9 +106,11 @@ void SendAslLog(Level level, const char* message) { - asl_set(asl_message.get(), ASL_KEY_MSG, message); - asl_send(asl_client.get(), asl_message.get()); - -+#if !defined(MAS_BUILD) - if (level == Level::FATAL) { - abort_report_np(message); - } -+#endif - } - - // |error| is strerror(errno) when a P* logging function is called. Pass diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch new file mode 100644 index 0000000000000..03d4ca35e86d8 --- /dev/null +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -0,0 +1,233 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Mon, 4 Mar 2019 14:43:36 -0800 +Subject: mas: avoid usage of private macOS APIs + +Disable usage of the following private APIs in MAS builds: +* abort_report_np +* pthread_fchdir_np +* pthread_chdir_np +* SetApplicationIsDaemon +* _LSSetApplicationLaunchServicesServerConnectionStatus +* AreDeviceAndUserJoinedToDomain +* _CFIsObjC +* AudioDeviceDuck + +diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm +index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9a6d0bacc 100644 +--- a/base/enterprise_util_mac.mm ++++ b/base/enterprise_util_mac.mm +@@ -168,6 +168,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() { + DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { + static DeviceUserDomainJoinState state = [] { + DeviceUserDomainJoinState state{false, false}; ++#if defined(MAS_BUILD) ++ return state; ++ }(); ++ ++ return state; ++} ++#else + + @autoreleasepool { + ODSession* session = [ODSession defaultSession]; +@@ -274,5 +281,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { + + return state; + } ++#endif + + } // namespace base +diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm +index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644 +--- a/base/mac/foundation_util.mm ++++ b/base/mac/foundation_util.mm +@@ -30,12 +30,6 @@ + #if !BUILDFLAG(IS_IOS) + CFTypeID SecACLGetTypeID(); + CFTypeID SecTrustedApplicationGetTypeID(); +-// The NSFont/CTFont toll-free bridging is broken before 10.15. +-// http://www.openradar.me/15341349 rdar://15341349 +-// +-// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the +-// minimum OS for Chromium, remove this SPI declaration. +-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj); + #endif + } // extern "C" + +@@ -316,8 +310,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { + const_cast(reinterpret_cast(cf_val)); + DCHECK(!cf_val || + CTFontGetTypeID() == CFGetTypeID(cf_val) || +- (_CFIsObjC(CTFontGetTypeID(), cf_val) && +- [ns_val isKindOfClass:[NSFont class]])); ++ ([ns_val isKindOfClass:[NSFont class]])); + return ns_val; + } + +@@ -388,9 +381,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { + return (CTFontRef)(cf_val); + } + +- if (!_CFIsObjC(CTFontGetTypeID(), cf_val)) +- return NULL; +- + id ns_val = reinterpret_cast(const_cast(cf_val)); + if ([ns_val isKindOfClass:[NSFont class]]) { + return (CTFontRef)(cf_val); +diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc +index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644 +--- a/base/process/launch_mac.cc ++++ b/base/process/launch_mac.cc +@@ -26,8 +26,10 @@ extern "C" { + // descriptor. libpthread only exposes a syscall wrapper starting in + // macOS 10.12, but the system call dates back to macOS 10.5. On older OSes, + // the syscall is issued directly. ++#if !defined(MAS_BUILD) + int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12)); + int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12)); ++#endif + + int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) + API_AVAILABLE(macosx(10.14)); +@@ -96,21 +98,29 @@ class PosixSpawnFileActions { + }; + + int ChangeCurrentThreadDirectory(const char* path) { ++ #if defined(MAS_BUILD) ++ return syscall(SYS___pthread_chdir, path); ++ #else + if (__builtin_available(macOS 10.12, *)) { + return pthread_chdir_np(path); + } else { + return syscall(SYS___pthread_chdir, path); + } ++ #endif + } + + // The recommended way to unset a per-thread cwd is to set a new value to an + // invalid file descriptor, per libpthread-218.1.3/private/private.h. + int ResetCurrentThreadDirectory() { ++ #if defined(MAS_BUILD) ++ return syscall(SYS___pthread_fchdir, -1); ++ #else + if (__builtin_available(macOS 10.12, *)) { + return pthread_fchdir_np(-1); + } else { + return syscall(SYS___pthread_fchdir, -1); + } ++ #endif + } + + struct GetAppOutputOptions { +@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, + file_actions.Inherit(STDERR_FILENO); + } + ++#if 0 + if (options.disclaim_responsibility) { + if (__builtin_available(macOS 10.14, *)) { + DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1)); + } + } ++#endif + + std::vector argv_cstr; + argv_cstr.reserve(argv.size() + 1); +diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc +index e28d37435da00153e34132f49ce8f6b240e70a65..77ce459d969022b7c5a4d1e57bb1f7e6fa7a9898 100644 +--- a/media/audio/mac/audio_low_latency_input_mac.cc ++++ b/media/audio/mac/audio_low_latency_input_mac.cc +@@ -34,19 +34,23 @@ + + namespace { + extern "C" { ++#ifndef MAS_BUILD + // See: + // https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h?rev=228264 + OSStatus AudioDeviceDuck(AudioDeviceID inDevice, + Float32 inDuckedLevel, + const AudioTimeStamp* __nullable inStartTime, + Float32 inRampDuration) __attribute__((weak_import)); ++#endif + } + + void UndoDucking(AudioDeviceID output_device_id) { ++#ifndef MAS_BUILD + if (AudioDeviceDuck != nullptr) { + // Ramp the volume back up over half a second. + AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5); + } ++#endif + } + + } // namespace +diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc +index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e3a9f81d4 100644 +--- a/sandbox/mac/sandbox_logging.cc ++++ b/sandbox/mac/sandbox_logging.cc +@@ -32,9 +32,11 @@ + } + #endif + ++#if !defined(MAS_BUILD) + extern "C" { + void abort_report_np(const char*, ...); + } ++#endif + + namespace sandbox { + +@@ -104,9 +106,11 @@ void SendAslLog(Level level, const char* message) { + asl_set(asl_message.get(), ASL_KEY_MSG, message); + asl_send(asl_client.get(), asl_message.get()); + ++#if !defined(MAS_BUILD) + if (level == Level::FATAL) { + abort_report_np(message); + } ++#endif + } + + // |error| is strerror(errno) when a P* logging function is called. Pass +diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc +index 9f5261425162791668c2d15b7ffba091f831d652..c37f3dc05cb8372c7a6c4caef7a280b6f2f48e98 100644 +--- a/sandbox/mac/system_services.cc ++++ b/sandbox/mac/system_services.cc +@@ -9,6 +9,7 @@ + + #include "base/mac/mac_logging.h" + ++#if !defined(MAS_BUILD) + extern "C" { + OSStatus SetApplicationIsDaemon(Boolean isDaemon); + void _LSSetApplicationLaunchServicesServerConnectionStatus( +@@ -19,10 +20,12 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus( + // https://github.com/WebKit/webkit/commit/8da694b0b3febcc262653d01a45e946ce91845ed. + void _CSCheckFixDisable() API_AVAILABLE(macosx(10.15)); + } // extern "C" ++#endif + + namespace sandbox { + + void DisableLaunchServices() { ++ #if !defined(MAS_BUILD) + // Allow the process to continue without a LaunchServices ASN. The + // INIT_Process function in HIServices will abort if it cannot connect to + // launchservicesd to get an ASN. By setting this flag, HIServices skips +@@ -36,12 +39,15 @@ void DisableLaunchServices() { + 0, ^bool(CFDictionaryRef options) { + return false; + }); ++ #endif + } + + void DisableCoreServicesCheckFix() { ++#if !defined(MAS_BUILD) + if (__builtin_available(macOS 10.15, *)) { + _CSCheckFixDisable(); + } ++#endif + } + + } // namespace sandbox diff --git a/patches/chromium/mas_avoid_usage_of_pthread_fchdir_np.patch b/patches/chromium/mas_avoid_usage_of_pthread_fchdir_np.patch deleted file mode 100644 index 5ea6286df620b..0000000000000 --- a/patches/chromium/mas_avoid_usage_of_pthread_fchdir_np.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 4 Mar 2019 14:46:48 -0800 -Subject: mas: avoid usage of pthread_fchdir_np - -Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds. - -diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644 ---- a/base/process/launch_mac.cc -+++ b/base/process/launch_mac.cc -@@ -26,8 +26,10 @@ extern "C" { - // descriptor. libpthread only exposes a syscall wrapper starting in - // macOS 10.12, but the system call dates back to macOS 10.5. On older OSes, - // the syscall is issued directly. -+#if !defined(MAS_BUILD) - int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12)); - int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12)); -+#endif - - int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) - API_AVAILABLE(macosx(10.14)); -@@ -96,21 +98,29 @@ class PosixSpawnFileActions { - }; - - int ChangeCurrentThreadDirectory(const char* path) { -+ #if defined(MAS_BUILD) -+ return syscall(SYS___pthread_chdir, path); -+ #else - if (__builtin_available(macOS 10.12, *)) { - return pthread_chdir_np(path); - } else { - return syscall(SYS___pthread_chdir, path); - } -+ #endif - } - - // The recommended way to unset a per-thread cwd is to set a new value to an - // invalid file descriptor, per libpthread-218.1.3/private/private.h. - int ResetCurrentThreadDirectory() { -+ #if defined(MAS_BUILD) -+ return syscall(SYS___pthread_fchdir, -1); -+ #else - if (__builtin_available(macOS 10.12, *)) { - return pthread_fchdir_np(-1); - } else { - return syscall(SYS___pthread_fchdir, -1); - } -+ #endif - } - - struct GetAppOutputOptions { -@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, - file_actions.Inherit(STDERR_FILENO); - } - -+#if 0 - if (options.disclaim_responsibility) { - if (__builtin_available(macOS 10.14, *)) { - DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1)); - } - } -+#endif - - std::vector argv_cstr; - argv_cstr.reserve(argv.size() + 1); diff --git a/patches/chromium/mas_avoid_usage_of_setapplicationisdaemon_and.patch b/patches/chromium/mas_avoid_usage_of_setapplicationisdaemon_and.patch deleted file mode 100644 index a6d15502298b1..0000000000000 --- a/patches/chromium/mas_avoid_usage_of_setapplicationisdaemon_and.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 4 Mar 2019 14:51:45 -0800 -Subject: mas: avoid usage of SetApplicationIsDaemon and - _LSSetApplicationLaunchServicesServerConnectionStatus - -Disable usage of SetApplicationIsDaemon and -_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds - -diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc -index 9f5261425162791668c2d15b7ffba091f831d652..c37f3dc05cb8372c7a6c4caef7a280b6f2f48e98 100644 ---- a/sandbox/mac/system_services.cc -+++ b/sandbox/mac/system_services.cc -@@ -9,6 +9,7 @@ - - #include "base/mac/mac_logging.h" - -+#if !defined(MAS_BUILD) - extern "C" { - OSStatus SetApplicationIsDaemon(Boolean isDaemon); - void _LSSetApplicationLaunchServicesServerConnectionStatus( -@@ -19,10 +20,12 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus( - // https://github.com/WebKit/webkit/commit/8da694b0b3febcc262653d01a45e946ce91845ed. - void _CSCheckFixDisable() API_AVAILABLE(macosx(10.15)); - } // extern "C" -+#endif - - namespace sandbox { - - void DisableLaunchServices() { -+ #if !defined(MAS_BUILD) - // Allow the process to continue without a LaunchServices ASN. The - // INIT_Process function in HIServices will abort if it cannot connect to - // launchservicesd to get an ASN. By setting this flag, HIServices skips -@@ -36,12 +39,15 @@ void DisableLaunchServices() { - 0, ^bool(CFDictionaryRef options) { - return false; - }); -+ #endif - } - - void DisableCoreServicesCheckFix() { -+#if !defined(MAS_BUILD) - if (__builtin_available(macOS 10.15, *)) { - _CSCheckFixDisable(); - } -+#endif - } - - } // namespace sandbox diff --git a/patches/chromium/mas_gate_private_enterprise_APIs.patch b/patches/chromium/mas_gate_private_enterprise_APIs.patch deleted file mode 100644 index 306a8c3792401..0000000000000 --- a/patches/chromium/mas_gate_private_enterprise_APIs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 19 Oct 2021 16:56:25 -0700 -Subject: fix: mas gate private enterprise APIs - -Beginning in Electron 15.2.0, Chromium moved several formerly public -APIs into the AreDeviceAndUserJoinedToDomain method. Using these APIs -in a MAS build will result in rejection from the Apple Store. This -patch gates those APIs to non-MAS builds to comply with Apple -Store requirements, and returns the default state for MAS builds. - -diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm -index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9a6d0bacc 100644 ---- a/base/enterprise_util_mac.mm -+++ b/base/enterprise_util_mac.mm -@@ -168,6 +168,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() { - DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { - static DeviceUserDomainJoinState state = [] { - DeviceUserDomainJoinState state{false, false}; -+#if defined(MAS_BUILD) -+ return state; -+ }(); -+ -+ return state; -+} -+#else - - @autoreleasepool { - ODSession* session = [ODSession defaultSession]; -@@ -274,5 +281,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { - - return state; - } -+#endif - - } // namespace base From a05d9be44fdb5be9e1570d0516df77578cf8b23e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 06:01:36 -0700 Subject: [PATCH 238/811] Bump v20.0.0-nightly.20220406 --- 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 b0d7db7463dd8..115929710e8f0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220330 \ No newline at end of file +20.0.0-nightly.20220406 \ No newline at end of file diff --git a/package.json b/package.json index e976065ea1d06..82c7988249e35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220330", + "version": "20.0.0-nightly.20220406", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -142,4 +142,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 5746c1f414b34..c51befca22115 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 20,0,0,20220330 - PRODUCTVERSION 20,0,0,20220330 + FILEVERSION 20,0,0,20220406 + PRODUCTVERSION 20,0,0,20220406 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0168aede8e597bd91b1a7cad732301c6df48f532 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 6 Apr 2022 09:34:35 -0700 Subject: [PATCH 239/811] chore: use //chrome resources directly (#33626) --- BUILD.gn | 1 + electron_paks.gni | 12 +- electron_resources.grd | 7 - electron_strings.grdp | 160 ----------------- patches/chromium/.patches | 2 - ..._depend_on_packed_resource_integrity.patch | 2 +- ...esources_not_chrome_for_spellchecker.patch | 58 ------ patches/chromium/desktop_media_list.patch | 11 +- ...fix_use_electron_generated_resources.patch | 53 ------ patches/chromium/picture-in-picture.patch | 169 +----------------- patches/chromium/printing.patch | 8 +- shell/browser/electron_browser_client.cc | 1 - .../extensions/electron_extension_system.cc | 2 +- shell/browser/file_select_helper.cc | 2 +- shell/browser/hid/hid_chooser_context.cc | 2 +- 15 files changed, 27 insertions(+), 463 deletions(-) delete mode 100644 electron_strings.grdp delete mode 100644 patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch delete mode 100644 patches/chromium/fix_use_electron_generated_resources.patch diff --git a/BUILD.gn b/BUILD.gn index ffd38ce3a8c29..7b32da03ec35f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -351,6 +351,7 @@ source_set("electron_lib") { "shell/common/api:mojo", "//base:base_static", "//base/allocator:buildflags", + "//chrome:strings", "//chrome/app:command_ids", "//chrome/app/resources:platform_locale_settings", "//components/autofill/core/common:features", diff --git a/electron_paks.gni b/electron_paks.gni index 0140e358710f6..2b089fa53b940 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -54,6 +54,8 @@ template("electron_extra_paks") { ]) output = "${invoker.output_dir}/resources.pak" sources = [ + "$root_gen_dir/chrome/browser_resources.pak", + "$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/chrome/dev_ui_browser_resources.pak", "$root_gen_dir/components/components_resources.pak", "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak", @@ -70,6 +72,8 @@ template("electron_extra_paks") { ] deps = [ "//chrome/browser:dev_ui_browser_resources", + "//chrome/browser:resources", + "//chrome/common:resources", "//components/resources", "//content:content_resources", "//content:dev_ui_content_resources", @@ -173,17 +177,23 @@ template("electron_paks") { } source_patterns = [ + "${root_gen_dir}/chrome/locale_settings_", "${root_gen_dir}/chrome/platform_locale_settings_", + "${root_gen_dir}/chrome/generated_resources_", + "${root_gen_dir}/components/strings/components_locale_settings_", "${root_gen_dir}/components/strings/components_strings_", - "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", "${root_gen_dir}/services/strings/services_strings_", + "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", "${root_gen_dir}/ui/strings/app_locale_settings_", "${root_gen_dir}/ui/strings/ax_strings_", "${root_gen_dir}/ui/strings/ui_strings_", ] deps = [ + "//chrome/app:generated_resources", + "//chrome/app/resources:locale_settings", "//chrome/app/resources:platform_locale_settings", + "//components/strings:components_locale_settings", "//components/strings:components_strings", "//device/bluetooth/strings", "//services/strings", diff --git a/electron_resources.grd b/electron_resources.grd index 08eb971b39249..8e492ad82347d 100644 --- a/electron_resources.grd +++ b/electron_resources.grd @@ -11,15 +11,8 @@ - - - - - - diff --git a/electron_strings.grdp b/electron_strings.grdp deleted file mode 100644 index 5068141716d7a..0000000000000 --- a/electron_strings.grdp +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Close - - - Minimize - - - Maximize - - - Restore - - - - - Printing Service - - - The selected printer is not available or not installed correctly. <br> Check your printer or try selecting another printer. - - - Untitled Document - - - - - Entire Screen - - - {SCREEN_INDEX, plural, =1{Screen #} other{Screen #}} - - - - - Image Files - - - Audio Files - - - Video Files - - - Custom Files - - - download - - - - - - Picture in Picture - - - - - Picture in picture - - - - Pause - - - Play - - - Play from the beginning - - - Back to video player - - - Mute - - - Unmute - - - Skip Ad - - - Mute microphone - - - Unmute microphone - - - Turn on camera - - - Turn off camera - - - Hang up - - - Close - - - Resize - - - Toggle video to play or pause - - - Toggle mute - - - Next track - - - Previous track - - - en-US - - - en-US,en - - - - Windows Utilities - - - - More actions - - - - $199+ - - - {MAX_UNREAD_NOTIFICATIONS, plural, =1 {More than 1 unread notification} other {More than # unread notifications}} - - - Unread Notifications - - - {UNREAD_NOTIFICATIONS, plural, =1 {1 Unread Notification} other {# Unread Notifications}} - - - Unknown Device ($11234:abcd) - - - - Unlabeled graphic - - - - - Unlabeled image - - - - diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 1487c1a4cc111..cd928849ccf21 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -54,7 +54,6 @@ feat_add_set_theme_source_to_allow_apps_to.patch add_webmessageportconverter_entangleandinjectmessageportchannel.patch ignore_rc_check.patch remove_usage_of_incognito_apis_in_the_spellchecker.patch -chore_use_electron_resources_not_chrome_for_spellchecker.patch allow_disabling_blink_scheduler_throttling_per_renderview.patch hack_plugin_response_interceptor_to_point_to_electron.patch feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -77,7 +76,6 @@ skip_atk_toolchain_check.patch worker_feat_add_hook_to_notify_script_ready.patch chore_provide_iswebcontentscreationoverridden_with_full_params.patch fix_properly_honor_printing_page_ranges.patch -fix_use_electron_generated_resources.patch chore_expose_v8_initialization_isolate_callbacks.patch export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch fix_export_zlib_symbols.patch 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 435d66c466712..27b5422532cc3 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 @@ -33,7 +33,7 @@ index 1f86073736f849e797e029678bc212ce96ba0bd9..b8abc10e48bdff0f4e6c3f8e1c4927bc "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index a99ce094addf69f21f3c42690defc445eff8fa05..797c8add1af6df1142179388ef1b7a5bf977d527 100644 +index 72c3a67361eaecbe7349db00bbd3b7c1deaced69..16c923640286837e93f0e7dddefc1d91740238c8 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -4518,7 +4518,7 @@ static_library("browser") { 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 deleted file mode 100644 index 99d292f285fb0..0000000000000 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Wed, 23 Oct 2019 14:17:18 -0700 -Subject: chore: use electron resources not chrome for spellchecker - -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 72c3a67361eaecbe7349db00bbd3b7c1deaced69..a99ce094addf69f21f3c42690defc445eff8fa05 100644 ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -7135,6 +7135,7 @@ static_library("browser") { - deps += [ - "//components/spellcheck/browser", - "//components/spellcheck/common", -+ "//electron:resources", - ] - - if (!is_android) { -diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc -index 7c3b6a69acb16186add5d467dbc22360d90d46d4..703e2ce60f4f35f9c71e8b503ffd62f9ea8f365a 100644 ---- a/chrome/browser/spellchecker/spellcheck_factory.cc -+++ b/chrome/browser/spellchecker/spellcheck_factory.cc -@@ -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" -+#include "electron/grit/electron_resources.h" - #include "components/keyed_service/content/browser_context_dependency_manager.h" - #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 fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0dfaad727 100644 ---- a/components/language/core/browser/BUILD.gn -+++ b/components/language/core/browser/BUILD.gn -@@ -30,6 +30,7 @@ static_library("browser") { - "//components/pref_registry", - "//components/prefs", - "//components/strings", -+ "//electron:resources", - "//ui/base", - ] - } -diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc -index 26f86d67c32b2a022698ae5ea5509912d2ccfacb..d48844d49308d67ee7bfa823335c7443173badbe 100644 ---- a/components/language/core/browser/language_prefs.cc -+++ b/components/language/core/browser/language_prefs.cc -@@ -22,7 +22,7 @@ - #include "components/pref_registry/pref_registry_syncable.h" - #include "components/prefs/pref_service.h" - #include "components/prefs/scoped_user_pref_update.h" --#include "components/strings/grit/components_locale_settings.h" -+#include "electron/grit/electron_resources.h" - #include "ui/base/l10n/l10n_util.h" - - namespace language { diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 4db38bb6a59dd..dc25d3074782c 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,18 +82,9 @@ 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 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..2026b926eee56f6b235963b23ab86b2743eaed90 100644 +index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc6657b943bdd 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -18,7 +18,7 @@ - #include "build/build_config.h" - #include "build/chromeos_buildflags.h" - #include "chrome/browser/media/webrtc/desktop_media_list.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "content/public/browser/browser_task_traits.h" - #include "content/public/browser/browser_thread.h" - #include "content/public/common/content_features.h" @@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { #endif // BUILDFLAG(IS_WIN) diff --git a/patches/chromium/fix_use_electron_generated_resources.patch b/patches/chromium/fix_use_electron_generated_resources.patch deleted file mode 100644 index 686e94326c210..0000000000000 --- a/patches/chromium/fix_use_electron_generated_resources.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Thu, 24 Sep 2020 11:10:41 -0700 -Subject: fix: use electron generated resources - -This patch fixes a few instances where we need to use Electron generated -resources for IDS strings, or the IDs will be wrong and cause DCHECKS -as they will loaded as empty strings. - -* IDS_UTILITY_PROCESS_UTILITY_WIN_NAME on Windows -* IDR_PDF_MANIFEST on Linux -* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows - -diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index ccb9d3fb018b4153cfebad8b87579dd5005398e9..5ee9583dddcceed80c7a6e0fa6a0365dbd6c9a6a 100644 ---- a/chrome/browser/pdf/pdf_extension_util.cc -+++ b/chrome/browser/pdf/pdf_extension_util.cc -@@ -11,8 +11,7 @@ - #include "build/chromeos_buildflags.h" - #include "chrome/browser/browser_process.h" - #include "chrome/common/chrome_content_client.h" --#include "chrome/grit/browser_resources.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "components/strings/grit/components_strings.h" - #include "components/zoom/page_zoom_constants.h" - #include "ui/base/l10n/l10n_util.h" -diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc -index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644 ---- a/chrome/browser/printing/printing_service.cc -+++ b/chrome/browser/printing/printing_service.cc -@@ -5,7 +5,7 @@ - #include "chrome/browser/printing/printing_service.h" - - #include "base/no_destructor.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "chrome/services/printing/public/mojom/printing_service.mojom.h" - #include "content/public/browser/service_process_host.h" - -diff --git a/chrome/browser/win/icon_reader_service.cc b/chrome/browser/win/icon_reader_service.cc -index d5497a7e26cdb66c7c074bc509e2bfec7d7875cd..62d2f555253eef903bd04ff1a0ad37d1470309e0 100644 ---- a/chrome/browser/win/icon_reader_service.cc -+++ b/chrome/browser/win/icon_reader_service.cc -@@ -4,7 +4,7 @@ - - #include "chrome/browser/win/icon_reader_service.h" - --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "chrome/services/util_win/public/mojom/util_read_icon.mojom.h" - #include "content/public/browser/service_process_host.h" - diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index f5b2e1333c446..b22235fd4e639 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -8,50 +8,11 @@ chrome's generated resources for our own. This updates the #include so that we 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 7bc8d118f87b91baf1c3bd1d34374996ab1d3638..2d2c1c86f311b07f0c2b09d5a4c082cc5599600c 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 @@ - #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" - - #include "chrome/browser/ui/color/chrome_color_id.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "ui/base/l10n/l10n_util.h" - #include "ui/base/metadata/metadata_impl_macros.h" - #include "ui/base/models/image_model.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 d566dbf99ea1164c6a8407026a9839218a6ba1fb..239cd53d70c547c79214988a82efdc8c472d553c 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 @@ - #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" - - #include "chrome/browser/ui/color/chrome_color_id.h" --#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" -diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index a3d9c0f03c8ade2553bad5721d4e15e6fd658074..b3b043cbf9144013bf7903121575b31b348ea87e 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 @@ - - #include "build/chromeos_buildflags.h" - #include "chrome/browser/ui/color/chrome_color_id.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "ui/base/l10n/l10n_util.h" - #include "ui/base/metadata/metadata_impl_macros.h" - #include "ui/base/models/image_model.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 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca8751134eaf3c33 100644 +index 3309906bcae27ba89d73ce4fba49843a10cd31f6..987917a440480130d35f34f85c27ff7c27632fd9 100644 --- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc -@@ -15,24 +15,28 @@ +@@ -15,15 +15,19 @@ #include "base/timer/timer.h" #include "build/build_config.h" #include "chrome/app/vector_icons/vector_icons.h" @@ -71,16 +32,6 @@ index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca875113 #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/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 +61,7 @@ #include "ui/aura/window.h" #endif @@ -161,24 +112,11 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866 // 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 75bfe0f7a4d759f677cad5c365fa7f98121d54de..cb251381f1c77ad01d4906132f3d68865aaace10 100644 ---- a/chrome/browser/ui/views/overlay/hang_up_button.cc -+++ b/chrome/browser/ui/views/overlay/hang_up_button.cc -@@ -6,7 +6,7 @@ - - #include "chrome/browser/ui/color/chrome_color_id.h" - #include "chrome/browser/ui/views/overlay/constants.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c36ad14705 100644 +index 850b34e3b40f7ff1848c66158976db079e0853bd..74178fd4752e9c469d50ccafda61157acd9edd56 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc -@@ -14,13 +14,15 @@ +@@ -14,9 +14,11 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" @@ -186,15 +124,10 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3 #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" --#include "chrome/grit/generated_resources.h" +#endif + #include "chrome/grit/generated_resources.h" #include "components/vector_icons/vector_icons.h" #include "content/public/browser/picture_in_picture_window_controller.h" - #include "content/public/browser/web_contents.h" -+#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 @@ -204,86 +137,8 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index cb1621a9deefcec601d7537e2cc2fbd24e5f7f64..2d74ab12e1eaf77a6f9dde13e894172d6835e061 100644 ---- a/chrome/browser/ui/views/overlay/playback_image_button.cc -+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc -@@ -7,7 +7,7 @@ - #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/color/chrome_color_id.h" - #include "chrome/browser/ui/views/overlay/constants.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc -index 8bf217b9b0c2bd22d6940c24c58eccb9865c5286..91f061a1243135db475371dda00c2fe054f4e8e3 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 @@ - - #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/color/chrome_color_id.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #include "ui/base/hit_test.h" - #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 51c7db1bfbd3c03b9cb2786c8c7482b33e3aca0b..2890f7420d2fd258f84019963eab6c9606e228db 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 @@ - #include "chrome/browser/ui/views/overlay/skip_ad_label_button.h" - - #include "chrome/browser/ui/color/chrome_color_id.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc -index 20b82ff4dcf7fef3315b2b47bb480446509c6541..244a50e57b6c12680405c92f0ecbdbdb8bcfcb4f 100644 ---- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc -+++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc -@@ -6,7 +6,7 @@ - - #include "chrome/browser/ui/color/chrome_color_id.h" - #include "chrome/browser/ui/views/overlay/constants.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -index 1a1edb6321490fdbf5cd347cb3d2cb9a6a5b1080..1e959cf1c8fe356ab4427e4bf4f8da1028f4575f 100644 ---- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -+++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -@@ -6,7 +6,7 @@ - - #include "chrome/browser/ui/color/chrome_color_id.h" - #include "chrome/browser/ui/views/overlay/constants.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc -index 5e136488b37887e9523ac04a9ff4ccdfaf96c104..24899f4c2b6fe66b96a6728bf747f1aad66f20a9 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 @@ - - #include "chrome/app/vector_icons/vector_icons.h" - #include "chrome/browser/ui/color/chrome_color_id.h" --#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" - #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 6d2744b673ecb31464d4aa9b0d11177892c030f4..f9ea66415b85ce385be429ead5e04c8a96dc31c4 100644 +index 6d2744b673ecb31464d4aa9b0d11177892c030f4..1dd75ec581ecd67e04a8f1cf1e43bce70eaa9380 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 @@ @@ -298,18 +153,6 @@ index 6d2744b673ecb31464d4aa9b0d11177892c030f4..f9ea66415b85ce385be429ead5e04c8a #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" -@@ -29,10 +31,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" @@ -56,7 +58,7 @@ #include "ui/aura/window.h" #endif diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 5b18830b6f0ed..877c4e12eaa0d 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -69,7 +69,7 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..a5950a9d4c823e3df145c365bb499c0163fe3e77 100644 +index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..3a42aa2a6cde698a75349e573a34b1328fc9c11c 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -84,7 +84,7 @@ index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..a5950a9d4c823e3df145c365bb499c01 #include "content/public/browser/global_routing_id.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" -+#include "electron/grit/electron_resources.h" ++#include "chrome/grit/generated_resources.h" #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" @@ -127,7 +127,7 @@ index 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..abd7e5e5832919cbd06b3b337f54d79d284a4247 100644 +index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a89f5489f 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -147,7 +147,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..abd7e5e5832919cbd06b3b337f54d79d #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" -+#include "electron/grit/electron_resources.h" ++#include "chrome/grit/generated_resources.h" #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index e317682535ac0..6db8fbec2119b 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -54,7 +54,6 @@ #include "content/public/common/url_constants.h" #include "crypto/crypto_buildflags.h" #include "electron/buildflags/buildflags.h" -#include "electron/grit/electron_resources.h" #include "electron/shell/common/api/api.mojom.h" #include "extensions/browser/api/messaging/messaging_api_message_filter.h" #include "mojo/public/cpp/bindings/binder_map.h" diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 20c2cf546ea52..2d757a3e99401 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -15,6 +15,7 @@ #include "base/path_service.h" #include "base/task/post_task.h" #include "chrome/common/chrome_paths.h" +#include "chrome/grit/browser_resources.h" #include "components/value_store/value_store_factory_impl.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" @@ -23,7 +24,6 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "electron/buildflags/buildflags.h" -#include "electron/grit/electron_resources.h" #include "extensions/browser/api/app_runtime/app_runtime_api.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/info_map.h" diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index 6980915f6358b..dbd8b341fb673 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -22,6 +22,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/platform_util.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" @@ -31,7 +32,6 @@ #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" diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index a743048f336f8..ca793e6ff22dc 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -13,10 +13,10 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" +#include "chrome/grit/generated_resources.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/prefs/pref_service.h" #include "content/public/browser/device_service.h" -#include "electron/grit/electron_resources.h" #include "services/device/public/cpp/hid/hid_blocklist.h" #include "services/device/public/cpp/hid/hid_switches.h" #include "shell/browser/web_contents_permission_helper.h" From 68d6d8d45164571a9b209945119dce586c3f749d Mon Sep 17 00:00:00 2001 From: Inclusive Coding Bot <102100353+inclusive-coding-bot@users.noreply.github.com> Date: Wed, 6 Apr 2022 17:19:32 -0400 Subject: [PATCH 240/811] chore: switch to gender neutral terms (#33532) * Switch to gender neutral terms * Update docs/api/web-contents.md Co-authored-by: Milan Burda * Update docs/api/webview-tag.md Co-authored-by: Milan Burda * Update script/release/uploaders/upload.py Co-authored-by: John Kleinschmidt * Update docs/tutorial/in-app-purchases.md Co-authored-by: Milan Burda Co-authored-by: inclusive-coding-bot Co-authored-by: Milan Burda Co-authored-by: John Kleinschmidt --- docs/tutorial/in-app-purchases.md | 2 +- script/release/uploaders/upload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/in-app-purchases.md b/docs/tutorial/in-app-purchases.md index ced192ba296cc..d913df54827a2 100644 --- a/docs/tutorial/in-app-purchases.md +++ b/docs/tutorial/in-app-purchases.md @@ -116,7 +116,7 @@ inAppPurchase.getProducts(PRODUCT_IDS).then(products => { console.log(`The price of ${product.localizedTitle} is ${product.formattedPrice}.`) }) - // Ask the user which product he/she wants to purchase. + // Ask the user which product they want to purchase. const selectedProduct = products[0] const selectedQuantity = 1 diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 51302d677e76a..014d7c53749b4 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -228,7 +228,7 @@ def purify_extra_data(mm, offset, length, compressed_size=0): ZIP64_EXTRA_HEADER = 0x0001 zip64_extra_struct = Struct(" Date: Thu, 7 Apr 2022 16:39:51 +0900 Subject: [PATCH 241/811] docs: recommend setting e.returnValue (#33628) --- 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 b5973c715c1af..44de118440190 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -473,7 +473,7 @@ window.onbeforeunload = (e) => { // a non-void value will silently cancel the close. // It is recommended to use the dialog API to let the user confirm closing the // application. - e.returnValue = false // equivalent to `return false` but not recommended + e.returnValue = false } ``` From ba8e7b96387871d9b21f2dce4bab47ee3945d3b7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 06:02:15 -0700 Subject: [PATCH 242/811] Bump v20.0.0-nightly.20220407 --- 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 115929710e8f0..ccee8db1431af 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220406 \ No newline at end of file +20.0.0-nightly.20220407 \ No newline at end of file diff --git a/package.json b/package.json index 82c7988249e35..284f80be8acbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220406", + "version": "20.0.0-nightly.20220407", "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 c51befca22115..718b11216c2ff 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 20,0,0,20220406 - PRODUCTVERSION 20,0,0,20220406 + FILEVERSION 20,0,0,20220407 + PRODUCTVERSION 20,0,0,20220407 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7fb1c8faadd7a371316a6ca9986d021d333e70c3 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 08:59:17 -0700 Subject: [PATCH 243/811] Revert "Bump v20.0.0-nightly.20220407" This reverts commit ba8e7b96387871d9b21f2dce4bab47ee3945d3b7. --- 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 ccee8db1431af..115929710e8f0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220407 \ No newline at end of file +20.0.0-nightly.20220406 \ No newline at end of file diff --git a/package.json b/package.json index 284f80be8acbd..82c7988249e35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220407", + "version": "20.0.0-nightly.20220406", "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 718b11216c2ff..c51befca22115 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 20,0,0,20220407 - PRODUCTVERSION 20,0,0,20220407 + FILEVERSION 20,0,0,20220406 + PRODUCTVERSION 20,0,0,20220406 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4d4682c0e38cd49add16310278726e48de9db2f5 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 7 Apr 2022 20:07:39 +0200 Subject: [PATCH 244/811] fix: report more detailed errors in shell.openExternal() on Windows (#33620) --- shell/common/platform_util_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index eb1da7228470e..7df712d8f049e 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -251,7 +251,8 @@ std::string OpenExternalOnWorkerThread( ShellExecuteW(nullptr, L"open", escaped_url.c_str(), nullptr, working_dir.empty() ? nullptr : working_dir.c_str(), SW_SHOWNORMAL)) <= 32) { - return "Failed to open"; + return "Failed to open: " + + logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode()); } return ""; } From 94c2a7671ca07e74d36d621d046c0f2f6d2f04f3 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 8 Apr 2022 07:17:51 -0400 Subject: [PATCH 245/811] build: temporarily disable 32-bit Windows symbol generation (#33653) * build: temporarily disable 32-bit Windows symbol generation * fix: modify upload.py * chore: fix comment Co-authored-by: VerteDinde --- appveyor.yml | 5 +++-- script/release/release.js | 3 ++- script/release/uploaders/upload.py | 14 ++++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 55bdb38d5d864..8839a999a9659 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -174,14 +174,15 @@ build_script: - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - 7z a node_headers.zip out\Default\gen\node_headers + # Temporarily disable symbol generation on 32-bit Windows due to failures - ps: >- - if ($env:GN_CONFIG -eq 'release') { + if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { # Needed for msdia140.dll on 64-bit windows $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" ninja -C out/Default electron:electron_symbols } - ps: >- - if ($env:GN_CONFIG -eq 'release') { + if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { python electron\script\zip-symbols.py appveyor-retry appveyor PushArtifact out/Default/symbols.zip } else { diff --git a/script/release/release.js b/script/release/release.js index 21ebbc0836aec..97873ec38c370 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -134,7 +134,8 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, `electron-${version}-win32-ia32-pdb.zip`, - `electron-${version}-win32-ia32-symbols.zip`, + // TODO(jkleinsc) Symbol generation on 32-bit Windows is temporarily disabled due to failures + // `electron-${version}-win32-ia32-symbols.zip`, `electron-${version}-win32-ia32.zip`, `electron-${version}-win32-x64-pdb.zip`, `electron-${version}-win32-x64-symbols.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 014d7c53749b4..c3f860603624a 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -76,9 +76,10 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip) upload_electron(release, electron_zip, args) if get_target_arch() != 'mips64el': - symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) - upload_electron(release, symbols_zip, args) + if get_target_arch() != 'ia32' and PLATFORM != 'win32': + symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) + upload_electron(release, symbols_zip, args) if PLATFORM == 'darwin': if get_platform_key() == 'darwin' and get_target_arch() == 'x64': api_path = os.path.join(ELECTRON_DIR, 'electron-api.json') @@ -95,9 +96,10 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip) upload_electron(release, dsym_snaphot_zip, args) elif PLATFORM == 'win32': - pdb_zip = os.path.join(OUT_DIR, PDB_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) - upload_electron(release, pdb_zip, args) + if get_target_arch() != 'ia32': + pdb_zip = os.path.join(OUT_DIR, PDB_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) + upload_electron(release, pdb_zip, args) elif PLATFORM == 'linux': debug_zip = os.path.join(OUT_DIR, DEBUG_NAME) shutil.copy2(os.path.join(OUT_DIR, 'debug.zip'), debug_zip) From f711fe6b5701196e5d803c04aab44bc62b392f8e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 06:04:36 -0700 Subject: [PATCH 246/811] Bump v20.0.0-nightly.20220408 --- 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 115929710e8f0..679f6445b9f41 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220406 \ No newline at end of file +20.0.0-nightly.20220408 \ No newline at end of file diff --git a/package.json b/package.json index 82c7988249e35..8fcf838246431 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220406", + "version": "20.0.0-nightly.20220408", "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 c51befca22115..1fed0bf28ad2d 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 20,0,0,20220406 - PRODUCTVERSION 20,0,0,20220406 + FILEVERSION 20,0,0,20220408 + PRODUCTVERSION 20,0,0,20220408 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9d6e6c45c1d66615f4f5ac879d499f752074ad91 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 06:01:10 -0700 Subject: [PATCH 247/811] Bump v20.0.0-nightly.20220411 --- 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 679f6445b9f41..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220408 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 8fcf838246431..36f71a3f636eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220408", + "version": "20.0.0-nightly.20220411", "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 1fed0bf28ad2d..c61fbb8edac8a 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 20,0,0,20220408 - PRODUCTVERSION 20,0,0,20220408 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 41c1a7e3185819d31154735e553e2e2cfd3459c6 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 11 Apr 2022 11:02:01 -0700 Subject: [PATCH 248/811] chore: modify uploaded assets for win-ia32 (#33699) * chore: filter correct symbol files * chore: upload correct assets --- appveyor.yml | 8 +++++--- script/release/release.js | 2 +- script/release/uploaders/upload.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8839a999a9659..2d364a4057cbd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -182,9 +182,11 @@ build_script: ninja -C out/Default electron:electron_symbols } - ps: >- - if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { - python electron\script\zip-symbols.py - appveyor-retry appveyor PushArtifact out/Default/symbols.zip + if ($env:GN_CONFIG -eq 'release') { + if ($env:TARGET_ARCH -ne 'ia32') { + python electron\script\zip-symbols.py + appveyor-retry appveyor PushArtifact out/Default/symbols.zip + } } else { # It's useful to have pdb files when debugging testing builds that are # built on CI. diff --git a/script/release/release.js b/script/release/release.js index 97873ec38c370..f43cbf9a03560 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -133,8 +133,8 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-mas-arm64-dsym-snapshot.zip`, `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, - `electron-${version}-win32-ia32-pdb.zip`, // TODO(jkleinsc) Symbol generation on 32-bit Windows is temporarily disabled due to failures + // `electron-${version}-win32-ia32-pdb.zip`, // `electron-${version}-win32-ia32-symbols.zip`, `electron-${version}-win32-ia32.zip`, `electron-${version}-win32-x64-pdb.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index c3f860603624a..f255ad50acb0d 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -76,7 +76,7 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip) upload_electron(release, electron_zip, args) if get_target_arch() != 'mips64el': - if get_target_arch() != 'ia32' and PLATFORM != 'win32': + if (get_target_arch() != 'ia32' or PLATFORM != 'win32'): symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) upload_electron(release, symbols_zip, args) From 68723061174433f16e0b64a2f04f31179ab5027d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:03:28 -0700 Subject: [PATCH 249/811] Revert "Bump v20.0.0-nightly.20220411" This reverts commit 9d6e6c45c1d66615f4f5ac879d499f752074ad91. --- 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 dba45c6149e4d..679f6445b9f41 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220408 \ No newline at end of file diff --git a/package.json b/package.json index 36f71a3f636eb..8fcf838246431 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220408", "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 c61fbb8edac8a..1fed0bf28ad2d 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220408 + PRODUCTVERSION 20,0,0,20220408 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 8e2310db31a9c0b1b3ef3b15f41ab8cbaaa1fa66 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:08:17 -0700 Subject: [PATCH 250/811] Bump v20.0.0-nightly.20220411 --- 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 679f6445b9f41..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220408 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 8fcf838246431..36f71a3f636eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220408", + "version": "20.0.0-nightly.20220411", "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 1fed0bf28ad2d..c61fbb8edac8a 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 20,0,0,20220408 - PRODUCTVERSION 20,0,0,20220408 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 207d4e5823582c5c8a2e1cf155eb7d3d903b430c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:22:06 -0700 Subject: [PATCH 251/811] Revert "Bump v20.0.0-nightly.20220411" This reverts commit 8e2310db31a9c0b1b3ef3b15f41ab8cbaaa1fa66. --- 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 dba45c6149e4d..679f6445b9f41 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220408 \ No newline at end of file diff --git a/package.json b/package.json index 36f71a3f636eb..8fcf838246431 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220408", "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 c61fbb8edac8a..1fed0bf28ad2d 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220408 + PRODUCTVERSION 20,0,0,20220408 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a7a5e7fcfd4c2ca920764635cd1025829bf58350 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:23:37 -0700 Subject: [PATCH 252/811] Bump v20.0.0-nightly.20220411 --- 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 679f6445b9f41..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220408 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 8fcf838246431..36f71a3f636eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220408", + "version": "20.0.0-nightly.20220411", "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 1fed0bf28ad2d..c61fbb8edac8a 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 20,0,0,20220408 - PRODUCTVERSION 20,0,0,20220408 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From caddc83cfe1be3837d060467835e4a705d9d0cb4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 11 Apr 2022 22:51:10 +0200 Subject: [PATCH 253/811] feat: implement chrome.tabs.reload (#33560) --- docs/api/extensions.md | 1 + shell/browser/extensions/api/tabs/tabs_api.cc | 30 +++++++++++++++++-- shell/browser/extensions/api/tabs/tabs_api.h | 10 +++++++ shell/common/extensions/api/tabs.json | 21 +++++++++++++ 4 files changed, 59 insertions(+), 3 deletions(-) diff --git a/docs/api/extensions.md b/docs/api/extensions.md index afaff0ef63487..c8fbb015a1f74 100644 --- a/docs/api/extensions.md +++ b/docs/api/extensions.md @@ -99,6 +99,7 @@ Only `chrome.storage.local` is supported; `chrome.storage.sync` and The following methods of `chrome.tabs` are supported: - `chrome.tabs.sendMessage` +- `chrome.tabs.reload` - `chrome.tabs.executeScript` - `chrome.tabs.update` (partial support) - supported properties: `url`, `muted`. diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index 8fa5783e33701..7bc0a0b5e486b 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -182,6 +182,30 @@ bool TabsExecuteScriptFunction::ShouldRemoveCSS() const { return false; } +ExtensionFunction::ResponseAction TabsReloadFunction::Run() { + std::unique_ptr params( + tabs::Reload::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params.get()); + + bool bypass_cache = false; + if (params->reload_properties.get() && + params->reload_properties->bypass_cache.get()) { + bypass_cache = *params->reload_properties->bypass_cache; + } + + int tab_id = params->tab_id ? *params->tab_id : -1; + auto* contents = electron::api::WebContents::FromID(tab_id); + if (!contents) + return RespondNow(Error("No such tab")); + + contents->web_contents()->GetController().Reload( + bypass_cache ? content::ReloadType::BYPASSING_CACHE + : content::ReloadType::NORMAL, + true); + + return RespondNow(NoArguments()); +} + ExtensionFunction::ResponseAction TabsGetFunction::Run() { std::unique_ptr params(tabs::Get::Params::Create(args())); EXTENSION_FUNCTION_VALIDATE(params.get()); @@ -262,17 +286,17 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() { auto* zoom_controller = contents->GetZoomController(); WebContentsZoomController::ZoomMode zoom_mode = contents->GetZoomController()->zoom_mode(); - api::tabs::ZoomSettings zoom_settings; + tabs::ZoomSettings zoom_settings; ZoomModeToZoomSettings(zoom_mode, &zoom_settings); zoom_settings.default_zoom_factor = std::make_unique( blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())); return RespondNow( - ArgumentList(api::tabs::GetZoomSettings::Results::Create(zoom_settings))); + ArgumentList(tabs::GetZoomSettings::Results::Create(zoom_settings))); } ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() { - using api::tabs::ZoomSettings; + using tabs::ZoomSettings; std::unique_ptr params( tabs::SetZoomSettings::Params::Create(args())); diff --git a/shell/browser/extensions/api/tabs/tabs_api.h b/shell/browser/extensions/api/tabs/tabs_api.h index f6078610d130e..eb3a86612e7f3 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.h +++ b/shell/browser/extensions/api/tabs/tabs_api.h @@ -46,9 +46,19 @@ class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) }; +class TabsReloadFunction : public ExtensionFunction { + ~TabsReloadFunction() override {} + + ResponseAction Run() override; + + DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD) +}; + class TabsGetFunction : public ExtensionFunction { ~TabsGetFunction() override {} + ResponseAction Run() override; + DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET) }; diff --git a/shell/common/extensions/api/tabs.json b/shell/common/extensions/api/tabs.json index 36276d2f40561..14d83b015a805 100644 --- a/shell/common/extensions/api/tabs.json +++ b/shell/common/extensions/api/tabs.json @@ -120,6 +120,27 @@ } ], "functions": [ + { + "name": "reload", + "type": "function", + "description": "Reload a tab.", + "parameters": [ + {"type": "integer", "name": "tabId", "minimum": 0, "optional": true, "description": "The ID of the tab to reload; defaults to the selected tab of the current window."}, + { + "type": "object", + "name": "reloadProperties", + "optional": true, + "properties": { + "bypassCache": { + "type": "boolean", + "optional": true, + "description": "Whether using any local cache. Default is false." + } + } + }, + {"type": "function", "name": "callback", "optional": true, "parameters": []} + ] + }, { "name": "get", "type": "function", From c9fd255093fc9d9204db8d50b8795a696f76f611 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Mon, 11 Apr 2022 16:05:21 -0700 Subject: [PATCH 254/811] build: use python3 to lint (#33627) --- docs/development/build-instructions-linux.md | 16 +------- docs/development/build-instructions-macos.md | 43 +++----------------- docs/development/coding-style.md | 2 +- package.json | 8 ++-- script/check-relative-doc-links.py | 4 +- 5 files changed, 13 insertions(+), 60 deletions(-) diff --git a/docs/development/build-instructions-linux.md b/docs/development/build-instructions-linux.md index 6d70af4f47d27..3bdd96863ceba 100644 --- a/docs/development/build-instructions-linux.md +++ b/docs/development/build-instructions-linux.md @@ -7,21 +7,7 @@ Follow the guidelines below for building **Electron itself** on Linux, for the p ## Prerequisites * At least 25GB disk space and 8GB RAM. -* Python 2.7.x. Some distributions like CentOS 6.x still use Python 2.6.x - so you may need to check your Python version with `python -V`. - - Please also ensure that your system and Python version support at least TLS 1.2. - For a quick test, run the following script: - - ```sh - $ npx @electron/check-python-tls - ``` - - If the script returns that your configuration is using an outdated security - protocol, use your system's package manager to update Python to the latest - version in the 2.7.x branch. Alternatively, visit https://www.python.org/downloads/ - for detailed instructions. - +* Python >= 3.7. * Node.js. There are various ways to install Node. You can download source code from [nodejs.org](https://nodejs.org) and compile it. Doing so permits installing Node on your own home directory as a standard user. diff --git a/docs/development/build-instructions-macos.md b/docs/development/build-instructions-macos.md index 0461e78095b56..fb4ef30497727 100644 --- a/docs/development/build-instructions-macos.md +++ b/docs/development/build-instructions-macos.md @@ -6,45 +6,12 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p ## Prerequisites -* macOS >= 10.11.6 -* [Xcode](https://developer.apple.com/technologies/tools/) >= 9.0.0 +* macOS >= 11.6.0 +* [Xcode](https://developer.apple.com/technologies/tools/). The exact version + needed depends on what branch you are building, but the latest version of + Xcode is generally a good bet for building `main`. * [node.js](https://nodejs.org) (external) -* Python 2.7 with support for TLS 1.2 - -## Python - -Please also ensure that your system and Python version support at least TLS 1.2. -This depends on both your version of macOS and Python. For a quick test, run: - -```sh -$ npx @electron/check-python-tls -``` - -If the script returns that your configuration is using an outdated security -protocol, you can either update macOS to High Sierra or install a new version -of Python 2.7.x. To upgrade Python, use [Homebrew](https://brew.sh/): - -```sh -$ brew install python@2 && brew link python@2 --force -``` - -If you are using Python as provided by Homebrew, you also need to install -the following Python modules: - -* [pyobjc](https://pypi.org/project/pyobjc/#description) - -You can use `pip` to install it: - -```sh -$ pip install pyobjc -``` - -## macOS SDK - -If you're developing Electron and don't plan to redistribute your -custom Electron build, you may skip this section. - -Official Electron builds are built with [Xcode 12.2](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip), and the macOS 11.0 SDK. Building with a newer SDK works too, but the releases currently use the 11.0 SDK. +* Python >= 3.7 ## Building Electron diff --git a/docs/development/coding-style.md b/docs/development/coding-style.md index ac12d0597947a..e7e66a357d9cf 100644 --- a/docs/development/coding-style.md +++ b/docs/development/coding-style.md @@ -28,7 +28,7 @@ For C++ and Python, we follow Chromium's [Coding Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md). There is also a script `script/cpplint.py` to check whether all files conform. -The Python version we are using now is Python 2.7. +The Python version we are using now is Python 3.9. The C++ code uses a lot of Chromium's abstractions and types, so it's recommended to get acquainted with them. A good place to start is diff --git a/package.json b/package.json index 36f71a3f636eb..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -79,14 +79,14 @@ "generate-version-json": "node script/generate-version-json.js", "lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs", "lint:js": "node ./script/lint.js --js", - "lint:clang-format": "python script/run-clang-format.py -r -c shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", + "lint:clang-format": "python3 script/run-clang-format.py -r -c shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", "lint:clang-tidy": "ts-node ./script/run-clang-tidy.ts", "lint:cpp": "node ./script/lint.js --cc", "lint:objc": "node ./script/lint.js --objc", "lint:py": "node ./script/lint.js --py", "lint:gn": "node ./script/lint.js --gn", "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links && npm run lint:markdownlint", - "lint:docs-relative-links": "python ./script/check-relative-doc-links.py", + "lint:docs-relative-links": "python3 ./script/check-relative-doc-links.py", "lint:markdownlint": "markdownlint \"*.md\" \"docs/**/*.md\"", "lint:js-in-markdown": "standard-markdown docs", "create-api-json": "electron-docs-parser --dir=./", @@ -117,14 +117,14 @@ "ts-node script/gen-filenames.ts" ], "*.{cc,mm,c,h}": [ - "python script/run-clang-format.py -r -c --fix" + "python3 script/run-clang-format.py -r -c --fix" ], "*.md": [ "npm run lint:docs" ], "*.{gn,gni}": [ "npm run gn-check", - "python script/run-gn-format.py" + "python3 script/run-gn-format.py" ], "*.py": [ "node script/lint.js --py --fix --only --" diff --git a/script/check-relative-doc-links.py b/script/check-relative-doc-links.py index 7839d73122d21..7779a1c24eeda 100755 --- a/script/check-relative-doc-links.py +++ b/script/check-relative-doc-links.py @@ -41,7 +41,7 @@ def getBrokenLinks(filepath): brokenLinks = [] try: - f = open(filepath, 'r') + f = open(filepath, 'r', encoding="utf-8") lines = f.readlines() except KeyboardInterrupt: print('Keyboard interruption while parsing. Please try again.') @@ -77,7 +77,7 @@ def getBrokenLinks(filepath): tempFile = os.path.join(currentDir, sections[0]) if os.path.isfile(tempFile): try: - newFile = open(tempFile, 'r') + newFile = open(tempFile, 'r', encoding="utf-8") newLines = newFile.readlines() except KeyboardInterrupt: print('Keyboard interruption while parsing. Please try again.') From e8ed9cb4b507e120de8b396b1d8d88e554b7d395 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 12 Apr 2022 12:00:42 +0200 Subject: [PATCH 255/811] test: re-enable disabled ScriptOrModule specs (#33702) --- spec-main/api-web-contents-spec.ts | 3 +-- spec-main/chromium-spec.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 3d04494a50d1a..c2f6151fd2d4f 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -1857,8 +1857,7 @@ describe('webContents module', () => { } }); - // TODO(codebytere): Re-enable after Chromium fixes upstream v8_scriptormodule_legacy_lifetime crash. - xdescribe('using a large document', () => { + describe('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 80920d99b631c..31d7bb7599625 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -238,8 +238,7 @@ describe('web security', () => { await p; }); - // TODO(codebytere): Re-enable after Chromium fixes upstream v8_scriptormodule_legacy_lifetime crash. - xit('bypasses CORB when web security is disabled', async () => { + it('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 59dd17f2cf0c816a718336d03667e42ca81ca187 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 13:19:14 +0200 Subject: [PATCH 256/811] chore: bump chromium to 102.0.4989.0 (main) (#33557) * chore: bump chromium in DEPS to 102.0.4975.0 * chore: bump chromium in DEPS to 102.0.4977.0 * chore: update patches * Remove parameter of OnGpuProcessCrashed() https://chromium-review.googlesource.com/c/chromium/src/+/3543396 * hid: Add exclusionFilters option to requestDevice https://chromium-review.googlesource.com/c/chromium/src/+/3478175 * chore: bump chromium in DEPS to 102.0.4979.0 * chore: bump chromium in DEPS to 102.0.4981.0 * chore: update patches * Deny notification/push permission for documents in non-standard StoragePartitions https://chromium-review.googlesource.com/c/chromium/src/+/3257305 * Improve FrameTreeNode tracking in URLLoaderNetworkContext https://chromium-review.googlesource.com/c/chromium/src/+/3341866 * fixup! Remove parameter of OnGpuProcessCrashed() * chore: fix lint * Reland "Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome" https://chromium-review.googlesource.com/c/chromium/src/+/3554236 * chore: bump chromium in DEPS to 102.0.4983.0 * Ensure EyeDropperView does not access a destroyed window https://chromium-review.googlesource.com/c/chromium/src/+/3561542 * ci: don't delete dawn .git directory 83901: Adds a generated file with the dawn git hash encoded at build time. | https://dawn-review.googlesource.com/c/dawn/+/83901 * ci: update Windows toolchain 3550827: New toolchain for Windows 10 20348 SDK | https://chromium-review.googlesource.com/c/chromium/src/+/3550827 * chore: bump chromium in DEPS to 102.0.4985.0 * chore: update patches * chore: bump chromium in DEPS to 102.0.4987.0 * chore: update patches * 3563432: codehealth: remove uses of DictionaryValue in cbui/webui https://chromium-review.googlesource.com/c/chromium/src/+/3563432 * chore: update patches after rebase * Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome https://chromium-review.googlesource.com/c/chromium/src/+/3554236 * 3565724: Preserve "proper method names" as-is in error.stack. https://chromium-review.googlesource.com/c/v8/v8/+/3565724 * chore: bump chromium in DEPS to 102.0.4989.0 * chore: update patches * fixup ci: don't delete dawn .git directory for Windows * 3560843: Remove multi-parameter version of gfx::Rect[F]::Inset() https://chromium-review.googlesource.com/c/chromium/src/+/3560843 * 3572711: Remove unused IDS_PDF_TOOLTIP_ROTATE_CW resource. https://chromium-review.googlesource.com/c/chromium/src/+/3572711 * 3572926: Reland "[Sysroot] Switch to Debian Bullseye stable" https://chromium-review.googlesource.com/c/chromium/src/+/3572926 * build: fixup sysroots with electron specific dependencies * fixup Remove multi-parameter version of gfx::Rect[F]::Inset() * fixup 3565724: Preserve "proper method names" as-is in error.stack. * fixup Remove multi-parameter version of gfx::Rect[F]::Inset() * test: add spec for navigator.hid.requestDevice({ exclusionFilters: [...] } * fixup 3565724: Preserve "proper method names" as-is in error.stack. * ci: use python3 to get the windows toolchain profile 3525960: Explicitly run everything with python3 | https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960 * chore: add diagnostic logging * fix: try calling process.crash() * chore: remove logging Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- .circleci/build_config.yml | 6 +- DEPS | 2 +- appveyor.yml | 10 +- chromium_src/BUILD.gn | 3 + lib/browser/api/app.ts | 6 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 20 +- ..._scheduler_throttling_per_renderview.patch | 24 +- ..._windows_to_have_different_web_prefs.patch | 20 +- patches/chromium/blink_local_frame.patch | 6 +- ..._depend_on_packed_resource_integrity.patch | 16 +- .../build_libc_as_static_library.patch | 4 +- patches/chromium/can_create_window.patch | 38 +- ...screationoverridden_with_full_params.patch | 12 +- patches/chromium/desktop_media_list.patch | 4 +- patches/chromium/disable-redraw-lock.patch | 2 +- .../disable_color_correct_rendering.patch | 36 +- patches/chromium/disable_hidden.patch | 12 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 16 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 4 +- ...locator_for_usage_outside_of_the_gin.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 12 +- .../extend_apply_webpreferences.patch | 8 +- ...g_the_base_spellchecker_download_url.patch | 8 +- ...to_add_observers_on_created_hunspell.patch | 6 +- ...screen_rendering_with_viz_compositor.patch | 10 +- ..._raw_response_headers_from_urlloader.patch | 10 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...ete_SerialPortManager_on_main_thread.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 20 +- ...out_profile_refs_in_accessibility_ui.patch | 24 +- ..._properly_honor_printing_page_ranges.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 6 +- ...gpu_notify_when_dxdiag_request_fails.patch | 12 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...as_avoid_usage_of_private_macos_apis.patch | 2 +- .../mas_disable_remote_accessibility.patch | 10 +- .../chromium/mas_disable_remote_layer.patch | 8 +- patches/chromium/mas_no_private_api.patch | 4 +- ...emote_certificate_verification_logic.patch | 26 +- .../chromium/notification_provenance.patch | 66 +-- patches/chromium/picture-in-picture.patch | 2 +- ...utofill_colors_to_the_color_pipeline.patch | 12 +- patches/chromium/printing.patch | 80 ++-- ...r_changes_to_the_webcontentsobserver.patch | 12 +- ...store_base_adaptcallbackforrepeating.patch | 4 +- .../render_widget_host_view_base.patch | 6 +- patches/chromium/resource_file_conflict.patch | 2 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 2 +- patches/chromium/sysroot.patch | 4 +- ...andboxed_ppapi_processes_skip_zygote.patch | 4 +- patches/chromium/web_contents.patch | 10 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 8 +- ...feat_add_hook_to_notify_script_ready.patch | 8 +- patches/node/.patches | 1 + ...er_method_names_as-is_in_error_stack.patch | 432 ++++++++++++++++++ patches/v8/build_gn.patch | 6 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 2 +- patches/v8/expose_mksnapshot.patch | 4 +- ...dcheck_for_node_stream_array_buffers.patch | 2 +- script/sysroots.json | 59 ++- shell/browser/api/electron_api_app.cc | 5 +- shell/browser/api/electron_api_app.h | 2 +- shell/browser/electron_browser_context.cc | 2 - shell/browser/electron_permission_manager.cc | 9 + shell/browser/electron_permission_manager.h | 5 + .../resources_private_api.cc | 1 - ...on_component_extension_resource_manager.cc | 4 +- shell/browser/hid/electron_hid_delegate.cc | 8 +- shell/browser/hid/electron_hid_delegate.h | 2 + shell/browser/hid/hid_chooser_controller.cc | 91 ++-- shell/browser/hid/hid_chooser_controller.h | 14 +- ...electron_desktop_window_tree_host_linux.cc | 2 +- shell/browser/ui/views/autofill_popup_view.cc | 2 +- .../ui/views/client_frame_view_linux.cc | 3 +- shell/browser/ui/views/win_caption_button.cc | 6 +- shell/browser/ui/views/win_frame_view.cc | 6 +- .../electron_desktop_window_tree_host_win.cc | 2 +- spec-main/chromium-spec.ts | 40 ++ .../quit-on-crashed-event/index.js | 3 +- spec/static/main.js | 10 +- 90 files changed, 973 insertions(+), 443 deletions(-) create mode 100644 patches/node/fix_preserve_proper_method_names_as-is_in_error_stack.patch diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 9d8c587022e1c..6b075c4c68b38 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -431,9 +431,11 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac background: true # On macOS delete all .git directories under src/ expect for -# third_party/angle/ because of build time generation of file +# third_party/angle/ and third_party/dawn/ because of build time generation of files # gen/angle/commit.h depends on third_party/angle/.git/HEAD # https://chromium-review.googlesource.com/c/angle/angle/+/2074924 +# and dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD +# https://dawn-review.googlesource.com/c/dawn/+/83901 # TODO: maybe better to always leave out */.git/HEAD file for all targets ? step-delete-git-directories: &step-delete-git-directories run: @@ -441,7 +443,7 @@ step-delete-git-directories: &step-delete-git-directories command: | if [ "`uname`" == "Darwin" ]; then cd src - ( find . -type d -name ".git" -not -path "./third_party/angle/*" ) | xargs rm -rf + ( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" ) | xargs rm -rf fi # On macOS the yarn install command during gclient sync was run on a linux diff --git a/DEPS b/DEPS index 087a1ca200ee2..191d6b86c7db5 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '102.0.4971.0', + '102.0.4989.0', 'node_version': 'v16.14.2', 'nan_version': diff --git a/appveyor.yml b/appveyor.yml index 2d364a4057cbd..d716dad15c70c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,7 +25,7 @@ version: 1.0.{build} build_cloud: electron-16-core -image: vs2019bt-16.6.2 +image: vs2019bt-16.16.11 environment: GIT_CACHE_PATH: C:\Users\electron\libcc_cache ELECTRON_OUT_DIR: Default @@ -150,6 +150,12 @@ build_script: if ($LASTEXITCODE -ne 0) { Write-warning "Failed to add third_party\angle\.git; continuing anyway" } + # build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD + # https://dawn-review.googlesource.com/c/dawn/+/83901 + $(7z a $zipfile src\third_party\dawn\.git) + if ($LASTEXITCODE -ne 0) { + Write-warning "Failed to add third_party\dawn\.git; continuing anyway" + } } - cd src - set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn @@ -172,7 +178,7 @@ build_script: - ninja -C out/Default electron:electron_chromedriver_zip - ninja -C out/Default third_party/electron_node:headers - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - - python electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json + - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - 7z a node_headers.zip out\Default\gen\node_headers # Temporarily disable symbol generation on 32-bit Windows due to failures - ps: >- diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 6c3ff516dcb5f..006e7373f2a68 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -69,6 +69,7 @@ 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/native_window_tracker.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", @@ -119,6 +120,8 @@ static_library("chrome") { if (use_aura) { sources += [ "//chrome/browser/platform_util_aura.cc", + "//chrome/browser/ui/aura/native_window_tracker_aura.cc", + "//chrome/browser/ui/aura/native_window_tracker_aura.h", "//chrome/browser/ui/views/eye_dropper/eye_dropper_view_aura.cc", ] } diff --git a/lib/browser/api/app.ts b/lib/browser/api/app.ts index f952dcd0194b3..346b48c9fc4ba 100644 --- a/lib/browser/api/app.ts +++ b/lib/browser/api/app.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; -import { Menu } from 'electron/main'; +import { Menu, deprecate } from 'electron/main'; const bindings = process._linkedBinding('electron_browser_app'); const commandLine = process._linkedBinding('electron_common_command_line'); @@ -111,3 +111,7 @@ for (const name of events) { webContents.emit(name, event, ...args); }); } + +// Deprecation. +deprecate.event(app, 'gpu-process-crashed', 'child-process-gone'); +deprecate.event(app, 'renderer-process-crashed', 'render-process-gone'); diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 14d1535fe63f8..2440aa84adfbf 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 9f840287967b50ec1db3a9d27973429ab231a486..731a279e395a8762a25a115665bff99be428de3d 100644 +index 660c5f35c6095b23cc483c8eb1c119c215dc681d..961c0d7f7a9fe5f9e130998aeb0c872c571b710e 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -240,6 +240,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 9f840287967b50ec1db3a9d27973429ab231a486..731a279e395a8762a25a115665bff99b // 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 -@@ -345,7 +349,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -346,7 +350,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 b5fd394b36e15..be61078f2626f 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 d55a1b4f71224a2156eb5f3b0b32f41643b3dc28..f41c8f3d74f72d6e2220af527500749ef7409d77 100644 +index eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93356b2862 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -131,6 +131,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -132,6 +132,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 d55a1b4f71224a2156eb5f3b0b32f41643b3dc28..f41c8f3d74f72d6e2220af527500749e int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index e0d4faf86b7afe7f29da5e5c8babc78a40e72ae1..1fbf6abed9c7d1bbec4478d022e1763ea8bfed8e 100644 +index 448e5e6eab9e3bb98569a1d60619732173a396d2..88ba5eb82133a665cd5f9bdc52746c605c95509f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4444,6 +4444,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4465,6 +4465,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index e0d4faf86b7afe7f29da5e5c8babc78a40e72ae1..1fbf6abed9c7d1bbec4478d022e1763e int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 7be2fd1e02917537805a271f16f5f248f1c4fc45..ce0fc928448b597fb6401b77730700407ce406da 100644 +index d8ffccc148622d4eb0388e03c78ff1def4290701..5a3162cc88e5a48b04fbbb74a5c2ba4b7dd8a5d3 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -595,6 +595,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -599,6 +599,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -67,10 +67,10 @@ index 5adee94f81c0e98db976ac1c6c55fb5eab8c2e65..9d3e43f4394ad9a4377b47a001c4baf4 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 aa4b510137d60e6fb924f4f1a6554fe06c19ad75..816b6260020a6cbb6880b0eed197743ccd9002f5 100644 +index a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b094153778e18b 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 -@@ -205,6 +205,7 @@ void LocalWindowProxy::Initialize() { +@@ -207,6 +207,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -110,10 +110,10 @@ index b690ada2d46146b6da38cbb2c688f249ae558464..b03774140883c5bb7de6358f3df95ab8 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 6658e44e65f8236927f283e3f65f007ae97ac81f..f384dcc4efd6c56c3e3e212c7e597f13bc9dae57 100644 +index 420d82ed07017deba3298c5454666c09240dd23d..15407fb95dcf25875eb76a41fe1834c1f0a53528 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 -@@ -79,6 +79,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { +@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override; 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 e6dcf47aac97b..b0d67115605e2 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 8ee02135efb64c57d0779faa96640aa8e7775b58..66007d67da1230740eb00e31b220ddb02fbf37d9 100644 +index 32df5050f5a66c4b4f0981d3777a3b5a4fac9629..d8d9982bc6bd6e472677707b326a5dafa9b7fcf5 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -650,6 +650,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -660,6 +660,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -48,10 +48,10 @@ index a6fe708878eb9afba9a68e0be71ba2c0b2a84d7d..5cc81ceb44d0a8baee3ebcc63aa4137b // 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 4e8d36420d6edc1725a840e1b9f123041d21abe4..dd198cb7bf02e509833c6b4c7d8e5d65d20d46dc 100644 +index fd145f0aa562d6b63fb1d3a8a9241ae1aa1ce7a0..54d30fb9db8b48b94abdb815c487f618f9bb6525 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, +@@ -151,6 +151,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, static WindowOpenDisposition NavigationPolicyToDisposition( blink::WebNavigationPolicy policy); @@ -73,10 +73,10 @@ index befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 560b72dfbc70172bc668229b29fe0c9da139f320..13ec73b9d627259625d64f5b97838033db89745c 100644 +index a1427a6a95583ae853284b97cab77d577172e60e..4645764213c82e73532f7c61ed03f919f8241393 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -369,6 +369,7 @@ class WebView { +@@ -364,6 +364,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -85,10 +85,10 @@ index 560b72dfbc70172bc668229b29fe0c9da139f320..13ec73b9d627259625d64f5b97838033 // 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 dc63c0ba0cc8625ed5efb961a1c7f1d07fc72f5d..13a16ae577130d7520b47eb046b504ccd6796979 100644 +index 0dc6c707cdbe14aec69f72575941c16a50ac2ce4..177e463358c3e8e94044f2ccc8eb2cf4a8ce7525 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3669,6 +3669,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3693,6 +3693,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index dc63c0ba0cc8625ed5efb961a1c7f1d07fc72f5d..13a16ae577130d7520b47eb046b504cc void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3680,7 +3687,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3704,7 +3711,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index dc63c0ba0cc8625ed5efb961a1c7f1d07fc72f5d..13a16ae577130d7520b47eb046b504cc 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 5107ef421138e136b20b25b7bbcc1f0bb246bb66..043266205142e59f88c4c2f2ae6b58bb009f2d9c 100644 +index 08a54c62b7f4eeb6a8b0e0cb192723e1aecad915..1eeb122ac5db86c53d328a308dc2b7a4a5ca9fed 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, +@@ -419,6 +419,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index 5107ef421138e136b20b25b7bbcc1f0bb246bb66..043266205142e59f88c4c2f2ae6b58bb void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -857,6 +858,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 eac065943d3a7..4d55e26c12764 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 effc18673a7f832352f427c9f4fb8b276fc28ad6..96b67b56002f88e0f4e2af9997aa6a78a1accd96 100644 +index a422f50719e4c6a4fc96364d0370272695aab15f..eb310c01b11ccd2d8aeb8065dd4aa5e252b16f7c 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() +@@ -141,6 +141,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 effc18673a7f832352f427c9f4fb8b276fc28ad6..96b67b56002f88e0f4e2af9997aa6a78 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 a62792e0d484dc133f1df34a2c67dde838db203c..ef77424fc6778b047ac98700a5e18a3b6b161aba 100644 +index e37be0929c0fc05f0e8e8bbe702cb6e2b6a4ac18..36a8ca7796a3e021df869ebacd7d76ed4d63e59d 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( -@@ -150,6 +154,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index a62792e0d484dc133f1df34a2c67dde838db203c..ef77424fc6778b047ac98700a5e18a3b 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 27d0bcc02a57b1a8f8f8e25df7af383d0e9a8c00..1cb920f4d0b01df012bc9b60eb3d9caa555d4e9e 100644 +index d682f3bf81da362cc6721817189ae0222ebad087..e1cf124e87b507a841044096d8325a4043fe2d1e 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 27d0bcc02a57b1a8f8f8e25df7af383d0e9a8c00..1cb920f4d0b01df012bc9b60eb3d9caa #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" -@@ -159,6 +160,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -156,6 +157,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index 27d0bcc02a57b1a8f8f8e25df7af383d0e9a8c00..1cb920f4d0b01df012bc9b60eb3d9caa // 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 0f5ed102b071001acc566b258946b359d33f5d45..aac80b973e4622d2207b92fcd2537342a60c6909 100644 +index d09fed37e7a57e4f7399277dd116e306233019e4..87008b486c25918f5737880b97ca37d003434fac 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 0f5ed102b071001acc566b258946b359d33f5d45..aac80b973e4622d2207b92fcd2537342 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -436,6 +437,60 @@ 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 ae445a52314d8581909f05a06442954f39b6b6d0..857715ca74b0f3a50953095d15237292e2a05510 100644 +index cf424b45c60ee6cd8fcb5bced73332ffd4b60c2d..17d59201aa0e4f077536ec29a3c59bd4e1d831a7 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -543,10 +543,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -542,10 +542,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index ae445a52314d8581909f05a06442954f39b6b6d0..857715ca74b0f3a50953095d15237292 if (!Client()) return false; -@@ -592,6 +588,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -591,6 +587,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); 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 27b5422532cc3..4c64f9bb9664d 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 1f86073736f849e797e029678bc212ce96ba0bd9..b8abc10e48bdff0f4e6c3f8e1c4927bc6e0c2f79 100644 +index ff2e479125f1a6d7cbb52e4f674cb836d4f6596c..f334b0b4fd4a6550c3b2baba870c5997f24db1ab 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 1f86073736f849e797e029678bc212ce96ba0bd9..b8abc10e48bdff0f4e6c3f8e1c4927bc "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 72c3a67361eaecbe7349db00bbd3b7c1deaced69..16c923640286837e93f0e7dddefc1d91740238c8 100644 +index 158bfba2bc80925c49821453df63664a571ad571..e0a7d98c75c9692ce13ff3f2fb97852e91ead91f 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4518,7 +4518,7 @@ static_library("browser") { +@@ -4539,7 +4539,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 72c3a67361eaecbe7349db00bbd3b7c1deaced69..16c923640286837e93f0e7dddefc1d91 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 4f088ea7cfbb7aaa3ed15607608dd9cafc6a2981..8df44262c079c96a1a81167a769d426aab23bef0 100644 +index f04d3f3303eace8a7ef6b996197c4ff58aca8c37..15b5311dcf2e43a8703b714e688da683392e9b36 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5943,7 +5943,6 @@ test("unit_tests") { +@@ -5984,7 +5984,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 4f088ea7cfbb7aaa3ed15607608dd9cafc6a2981..8df44262c079c96a1a81167a769d426a "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5966,6 +5965,10 @@ test("unit_tests") { +@@ -6007,6 +6006,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 4f088ea7cfbb7aaa3ed15607608dd9cafc6a2981..8df44262c079c96a1a81167a769d426a ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6656,7 +6659,6 @@ test("unit_tests") { +@@ -6695,7 +6698,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 4f088ea7cfbb7aaa3ed15607608dd9cafc6a2981..8df44262c079c96a1a81167a769d426a "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6704,6 +6706,11 @@ test("unit_tests") { +@@ -6743,6 +6745,11 @@ test("unit_tests") { if (is_chromeos) { deps += [ "//ui/chromeos" ] } diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 67ef2bf3d247c..15419321d710c 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 dec348e235b1306cec50e0602fb910f21eaed925..0545e0ce5490df51088ca7a4cacd968e69fa0d09 100644 +index a53cc9066a3485ff6829e3c410eb523de7d074d6..9697e2dc2d0892fc7f1007d62488c2f2f24ec92f 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { @@ -30,7 +30,7 @@ index dec348e235b1306cec50e0602fb910f21eaed925..0545e0ce5490df51088ca7a4cacd968e + "//electron:libcxx_objects_zip", "//third_party/catapult/devil:devil", ] - if (is_linux && !is_chromeos) { + if (is_linux) { diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn index 40f1285f14c0843405e0ee51879b8742285a006d..5be895d3e36df53a5960006a1513f1322400fd23 100644 --- a/buildtools/third_party/libc++abi/BUILD.gn diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 5ccade1f90045..978b5c4c8e288 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 be7895586d64b0f8e7f122561d86f49479400a2b..5ad53ce87d8757b18e5ecedbd7ec9aec54bea165 100644 +index c9f0b4a30f8df2ba2a12914b447cede52ed1ff85..a5d6618aac35f01e09a90bdafa9f60c8140b088c 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6908,6 +6908,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6937,6 +6937,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 be7895586d64b0f8e7f122561d86f49479400a2b..5ad53ce87d8757b18e5ecedbd7ec9aec &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 88266830511440e51e47166c66f80e9956bcef5a..3fa51ecee644055db44bd4dd54c27ec224ff46d6 100644 +index 6261962f55f065d4edc0641ce8927143468add8a..cf37734d313470c27d2d40bd90cb199234a1e99e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3937,6 +3937,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3943,6 +3943,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 88266830511440e51e47166c66f80e9956bcef5a..3fa51ecee644055db44bd4dd54c27ec2 new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3981,12 +3989,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3987,12 +3995,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 88266830511440e51e47166c66f80e9956bcef5a..3fa51ecee644055db44bd4dd54c27ec2 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 ec594f27e94bf0b95967c4d816c9b1e159e4a08d..de908becd59392db284c60f61d97f8b2210aa888 100644 +index 28144893598e6b4caa18cd23fea1da3ca1f406b1..8b83eb8c342499ec7a677cd849f0e3c17d955a38 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -550,6 +550,10 @@ struct CreateNewWindowParams { +@@ -569,6 +569,10 @@ struct CreateNewWindowParams { // Governs how downloads are handled if `target_url` results in a download. blink.mojom.NavigationDownloadPolicy download_policy; @@ -68,10 +68,10 @@ index ec594f27e94bf0b95967c4d816c9b1e159e4a08d..de908becd59392db284c60f61d97f8b2 // 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 fbf6817479cace0ca06065eef3aa70aae2a0ebe1..cef6a18df7cfb8528ea07e808c3e539726ea815d 100644 +index 2a51c8c4d4cd21c0dc106dbb3b2e4e940a47319b..79479dd5fc7e0a9c27e75b85e1380c38f32f6fe7 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -577,6 +577,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -578,6 +578,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index fbf6817479cace0ca06065eef3aa70aae2a0ebe1..cef6a18df7cfb8528ea07e808c3e5397 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 a0f2f002b51c6061fe509d13b2286faaec721936..1b7e71e12d01929b8bfacf8c7c8950922bdd3d59 100644 +index d6ad990189520f7fc15e04c1c4bd03588d3ee81e..6aa01e2f4e8227f0c1cb78b88009728efccdd998 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -170,6 +170,7 @@ class NetworkService; +@@ -164,6 +164,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index a0f2f002b51c6061fe509d13b2286faaec721936..1b7e71e12d01929b8bfacf8c7c895092 } // namespace network namespace sandbox { -@@ -959,6 +960,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -953,6 +954,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -150,10 +150,10 @@ index 85335ff06c87ea3986360fad18df6cf01a4a7cca..eeafde1fa6067804665954525eafdd48 // 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 9bdeb8745b3dd6d329f0403ca8c4a6f5de1d59c6..11815bca2741002dd8595af026ef402bc2af999e 100644 +index f7fbc40e8df8b996d6079f2e691771529ca42497..5580f245477b713d0f1f92ca9d15de847c4f8c92 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -32,6 +32,7 @@ +@@ -33,6 +33,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 9bdeb8745b3dd6d329f0403ca8c4a6f5de1d59c6..11815bca2741002dd8595af026ef402b #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" -@@ -291,6 +292,10 @@ WebView* RenderViewImpl::CreateView( +@@ -295,6 +296,10 @@ WebView* RenderViewImpl::CreateView( params->impression = blink::ConvertWebImpressionToImpression(*impression); } @@ -220,14 +220,14 @@ 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 dcacde03e5889d7347aadb2cfde10da767c9f9ca..3ccb2700c97d1297b8482e1b7b324cfa4002e21e 100644 +index 00af75f5295251fb19c874d2b7d877c4a53f7f12..c0042534907dfca1789b8dde2ffa11956d3e029e 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2068,6 +2068,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2076,6 +2076,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, incumbent_window); + window_features.raw_features = features; - FrameLoadRequest frame_request(incumbent_window, - ResourceRequest(completed_url)); + // In fenced frames, we should always use `noopener`. + if (GetFrame()->IsInFencedFrameTree()) { diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 2b80fd29fa5ac..2b88e17531304 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -63,10 +63,10 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc -index 593cbe8038789e3b071ec9f5c243be6f0be629f0..18e5ade28bb966b35a6f69b2543768ac482d4730 100644 +index 46e5ec4d834e9478db523a5a078218104c161a57..e584921a6d575740fc0331a8bac05904558efc15 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc -@@ -79,10 +79,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( +@@ -83,10 +83,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -80,10 +80,10 @@ index 593cbe8038789e3b071ec9f5c243be6f0be629f0..18e5ade28bb966b35a6f69b2543768ac /*from_user_gesture=*/true); return true; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h -index e1adc822d8086b6c1b103a107923247cbb0aa7f2..2d2d65fa78d8fdccbe44aa1bf9b297e7038781c5 100644 +index f0333177f885000fb22818ffa30a0c4ad520a161..03e82957f9d7bf009dcbf5fcd43718c9d2ac9bb8 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, +@@ -47,8 +47,7 @@ class AshWebViewImpl : public ash::AshWebView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 cc6afdef869470136c2cec392911742a289f6339..2033877b86eddbc9baac6a603587e631021f6819 100644 +index 63b01c486f56499bbc2acff0b5abdbf24b0ce676..aeb111257740cd8c73e88c9b15d1f95fd49240c4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3885,8 +3885,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3891,8 +3891,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index dc25d3074782c..1d1ec74f873d3 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -41,10 +41,10 @@ index ac1e7854dc9ae629a499fac7626ec456e18c7867..087da9bbfb9081b94ca8ea8d245871dc int DesktopMediaListBase::GetSourceCount() const { diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h -index 9c77a2d5872cc340b7a237b896afea1dd3be2503..d06869ff78ec0d48e97c3aeb7ac86d4aa9d9b1ba 100644 +index 1150cf5fd95cb19d926a9af6d65472b680f53859..0fc3455f4966dd2047329adc308526dadcc64f1b 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h -@@ -38,7 +38,7 @@ class DesktopMediaListBase : public DesktopMediaList { +@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList { void SetThumbnailSize(const gfx::Size& thumbnail_size) override; void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override; void StartUpdating(DesktopMediaListObserver* observer) override; diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 90badb12ad13f..a102ba88e4f8d 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 bb79a55d46730a4a127ee6483a7a25ecdc2aea5b..b14fa0f41166a904991ec920cec2f45c3b71c953 100644 +index 2b69f4767e9073ea5f12acddf842c7f1dc82e2c1..a2f053c3e2588451458682aa6e86da52a591e1e7 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; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 4d0d3ef337593..297cb3869dcbe 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 a7636e4535d0c4303c4022620b2fc7d18870f6da..5de5f020da02f30b28bf02701e9fd1662424c914 100644 +index 14e13169de8b5e808e3284792237bef9939b1e00..7628a96dc8b2c9e8128cd462138d3487304c6e10 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1900,6 +1900,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1894,6 +1894,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -47,7 +47,7 @@ index f6094a5defe12c34564020b0779626b3e5bff99e..a068a9ba33d3f8c8cdc74ae63ab5e16c // 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 d8e2bd1e55a52e86dda5c1b69c425b49e16538bd..80e2c77066f24e99a1894faadbf1d030a188ffa9 100644 +index 8b0b5eda59c863efb6f4c67636810871677894c5..eea098eab3c2a5c36fab1a71d888e562e8f93da5 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 { @@ -80,10 +80,10 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc9c51c6d3 100644 +index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb06c19c4d6 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc -@@ -86,6 +86,9 @@ +@@ -87,6 +87,9 @@ using gpu::gles2::GLES2Interface; @@ -93,7 +93,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc namespace viz { namespace { -@@ -683,8 +686,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -685,8 +688,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -105,7 +105,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1674,7 +1678,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1676,7 +1680,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, params->use_color_matrix, tint_gl_composited_content_, params->apply_shader_based_rounded_corner && ShouldApplyRoundedCorner(params->quad)), @@ -115,7 +115,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2147,7 +2152,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2149,7 +2154,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -125,7 +125,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); SkColor4f color_f = SkColor4f::FromColor(color); -@@ -2155,7 +2161,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2157,7 +2163,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, // Apply color transform if the color space or source and target do not match. if (quad_color_space != CurrentRenderPassColorSpace()) { const gfx::ColorTransform* color_transform = @@ -134,7 +134,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB); color_transform->Transform(&col, 1); color_f.fR = col.x(); -@@ -2377,7 +2383,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -2379,7 +2385,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -144,7 +144,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2476,7 +2483,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2478,7 +2485,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -154,7 +154,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2586,7 +2594,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2588,7 +2596,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, // The source color space should never be RGB. DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); @@ -164,7 +164,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc #if BUILDFLAG(IS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match -@@ -2767,7 +2776,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2769,7 +2778,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, ShouldApplyRoundedCorner(quad)), @@ -174,7 +174,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2838,8 +2848,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2840,8 +2850,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -185,7 +185,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc /*adjust_src_white_level=*/draw_cache_.is_video_frame, locked_quad.hdr_metadata()); -@@ -3696,7 +3706,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3698,7 +3708,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) { @@ -228,7 +228,7 @@ index 23eed6772dd7edd77378f3bf4cff9d6bb5274894..69056d1121eb833393aba362d71c52cc + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 8b32bf5455183ff7bb6295d7922e76a6593b8ee0..041ffe9d26ef3401179eb57917f5585497500689 100644 +index 8cd9a960ca1de81857af60daa91596c1dbb17786..7455afe4d81eac31fe3792a4459834a7f968918c 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -240,7 +240,7 @@ index 8b32bf5455183ff7bb6295d7922e76a6593b8ee0..041ffe9d26ef3401179eb57917f55854 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 ca056c66af681548ba01bd07db7dadc5ce2a5280..f5025422ebdb9fe35ee5e4e1ed647bc05028d4a8 100644 +index 927e182bbba7a3700fd20c8c964da7cc162c4210..f099940c5b8fd92c04401cfbd231c04cb413d286 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -197,6 +197,7 @@ @@ -251,7 +251,7 @@ index ca056c66af681548ba01bd07db7dadc5ce2a5280..f5025422ebdb9fe35ee5e4e1ed647bc0 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3212,6 +3213,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3213,6 +3214,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 e9e9af547fe6f..8b054f701425d 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 63f51521afa85f53073df2e3747eba95e80de09d..ed56e947fa137cbaddaa12503ae983d7acd4463f 100644 +index 04bba6457636018af2f76f0e218076e993f47467..7e421c72e3cb9abd9c3dc6542afed08f3910df93 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -808,6 +808,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index 63f51521afa85f53073df2e3747eba95e80de09d..ed56e947fa137cbaddaa12503ae983d7 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 5e2e1fe4482fdde0df1a02ae9ae6d68431dac4d8..3ae005ae898ee0dd8befa7699b469fc379b5a1d1 100644 +index cb2dd8695096c4eda0b4c1782fa9ebd7a05e2b7b..22ba56a675f28abd9857e3c6d4b9908c568df016 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -880,6 +880,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -877,6 +877,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl SiteInstanceGroup* GetSiteInstanceGroup(); @@ -34,10 +34,10 @@ index 5e2e1fe4482fdde0df1a02ae9ae6d68431dac4d8..3ae005ae898ee0dd8befa7699b469fc3 // |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 b39dd8d70aa590677f7d3e95412c0709f0fbbc81..558fd14566a4b953b5140b59ad614b70e1855bc5 100644 +index 907de04692ff86a3b287c5e66d4811ed1b31858e..035a168a8520ff28a832a79903dc3efdff596c05 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -618,7 +618,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); 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 8665613a56588..4b690a546db81 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 @@ -19,10 +19,10 @@ index d871ceecd76e21b23c500643363ced2ca87e8013..e0a26a90ee38342aefdbdd76e9c56a93 using PCScan = internal::PCScan; const auto invocation_mode = flags & PurgeFlags::kAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index d1b71673ca79ea0f2293cda46564ceb8a018f4e5..ca70bb8fdf7fec2e0d5e2b3bf0ece86def72e21b 100644 +index d51b37c8a2df11f71fa6056193100d00883db43d..b44002788cf4d4f5d754dd35dd193be233e6ebcb 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc -@@ -43,6 +43,7 @@ +@@ -44,6 +44,7 @@ #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) @@ -30,7 +30,7 @@ index d1b71673ca79ea0f2293cda46564ceb8a018f4e5..ca70bb8fdf7fec2e0d5e2b3bf0ece86d #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -76,7 +77,7 @@ void* ThreadFunc(void* params) { +@@ -77,7 +78,7 @@ void* ThreadFunc(void* params) { base::DisallowSingleton(); #if !BUILDFLAG(IS_NACL) @@ -39,7 +39,7 @@ index d1b71673ca79ea0f2293cda46564ceb8a018f4e5..ca70bb8fdf7fec2e0d5e2b3bf0ece86d internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -102,7 +103,7 @@ void* ThreadFunc(void* params) { +@@ -103,7 +104,7 @@ void* ThreadFunc(void* params) { PlatformThread::CurrentHandle().platform_handle(), PlatformThread::CurrentId()); @@ -49,10 +49,10 @@ index d1b71673ca79ea0f2293cda46564ceb8a018f4e5..ca70bb8fdf7fec2e0d5e2b3bf0ece86d #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index c965c9764ad38a8b52b727ca98fe41f00ab6707d..7d44c4e63b2b4ccf595b5e2a0212fb6c4eb2b5bd 100644 +index 8542c0d0d49511298cca800a59796b1e4271a3d8..1d0eeff5800f2ccf3f1fb6b1356c8cd067cfd945 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc -@@ -29,6 +29,7 @@ +@@ -30,6 +30,7 @@ #include #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) @@ -60,7 +60,7 @@ index c965c9764ad38a8b52b727ca98fe41f00ab6707d..7d44c4e63b2b4ccf595b5e2a0212fb6c #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -105,7 +106,7 @@ DWORD __stdcall ThreadFunc(void* params) { +@@ -113,7 +114,7 @@ DWORD __stdcall ThreadFunc(void* params) { FALSE, DUPLICATE_SAME_ACCESS); @@ -69,7 +69,7 @@ index c965c9764ad38a8b52b727ca98fe41f00ab6707d..7d44c4e63b2b4ccf595b5e2a0212fb6c internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -125,7 +126,7 @@ DWORD __stdcall ThreadFunc(void* params) { +@@ -133,7 +134,7 @@ DWORD __stdcall ThreadFunc(void* params) { PlatformThread::CurrentId()); } 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 2b2569457cc46..197e3b15b0834 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 1fbf6abed9c7d1bbec4478d022e1763ea8bfed8e..e0d7367135abb08f9f303cc528a55d8ba026fa56 100644 +index 88ba5eb82133a665cd5f9bdc52746c605c95509f..ceefc966e0b8f79e00d108de78f56f868f08ee67 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2367,7 +2367,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2377,7 +2377,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index b038130828869..b69182027c9db 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 a1de50d6b0f699d0651c369cafafdd5bb542242d..65b9f5e5f81e8ef8b591ef2e027e095df11c0d7b 100644 +index ece3dfbee04cf941689e4f21f5176db010fda564..9fd052c00a484cd1acd2031fda79e6307fd01b60 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,7 +19,7 @@ index a1de50d6b0f699d0651c369cafafdd5bb542242d..65b9f5e5f81e8ef8b591ef2e027e095d aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index b14fa0f41166a904991ec920cec2f45c3b71c953..37bb1e9788a251b3f2c79b5272d4a44c22b707b3 100644 +index a2f053c3e2588451458682aa6e86da52a591e1e7..9e38d55d7156986e48ed6dcb3522d77358bfdb75 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -936,8 +936,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { 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 cad261c043f60..aa6aa6d8e388e 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 78b8a28eadf392422b55e441634e3161c8c1694c..af3ed7813d9ed5fb294b67a0da1237140b40abbf 100644 +index 952023235d9f1905b64195f625dbb3b1af97f908..3d8b4cc17584e7ae8be0b77a073a0453bcd5b3ef 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc -@@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() { +@@ -366,6 +366,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 d04ad170f9062..6e3c56031e7f0 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 4c8982a8ae3ae23fbeef244cd23b43c889d3fa94..13b48d5acadf5dcfb40a829751b089c1c29f9450 100644 +index 98268925da14d61256f8dee3aa899f17ce7acaf6..1abdc204e278383818dc073f96c90e91ec1f3fb9 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1350,6 +1350,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1404,6 +1404,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 4c8982a8ae3ae23fbeef244cd23b43c889d3fa94..13b48d5acadf5dcfb40a829751b089c1 // 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 eed05c05d1da28284af6ae0cef45dbbb47254058..f32671202010fa57901a09723feecacc72dbd5f9 100644 +index 58671094857cdfe5d853c8a284d51bc1b8a09660..7af71839aa1bc970370a91cd35f3cbefe06e67e5 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -283,6 +283,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -302,6 +302,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 eed05c05d1da28284af6ae0cef45dbbb47254058..f32671202010fa57901a09723feecacc 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 c929eb10af5b8856debdc0d665eac767e9730714..c20bd2a2d6b989386ce7ef97e43f677e2c5291fa 100644 +index b52e5a2230e96d55d7886bde331a505c58dd093a..757dd77b06cba44e832e86e729e44b1e9a427c49 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1089,6 +1089,9 @@ interface NetworkContext { +@@ -1087,6 +1087,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 854e5de029ce8..1ffad5f73b38c 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,18 +12,18 @@ 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 13a16ae577130d7520b47eb046b504ccd6796979..6987c81cd9f6b774ec15605c0ea64ca34ba84d22 100644 +index 177e463358c3e8e94044f2ccc8eb2cf4a8ce7525..7efdb7a0cf2db85fadd0db0b6665bdf492f8f5bc 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 @@ - #include "third_party/blink/renderer/core/timing/dom_window_performance.h" +@@ -160,6 +160,7 @@ #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" + #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" +#include "third_party/blink/renderer/platform/graphics/color.h" #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" -@@ -1774,6 +1775,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1780,6 +1781,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 ae711b32caf32..563ac340dc186 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,10 +9,10 @@ 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 c1821235df8abd9c0991efeb1d82f8b6075e48e7..a35fc3aa63e6d57ef78ee4690f761060b074ec85 100644 +index ff5ee1d7a0f4e333498bf25acbbf49d1ce53b7a1..e98084036c04e9910779670497b1a431d4fee48a 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -@@ -52,6 +52,9 @@ namespace { +@@ -51,6 +51,9 @@ namespace { base::LazyInstance::Leaky g_download_url_for_testing = LAZY_INSTANCE_INITIALIZER; @@ -22,7 +22,7 @@ index c1821235df8abd9c0991efeb1d82f8b6075e48e7..a35fc3aa63e6d57ef78ee4690f761060 // Close the file. void CloseDictionary(base::File file) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -272,6 +275,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { +@@ -271,6 +274,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { g_download_url_for_testing.Get() = url; } @@ -33,7 +33,7 @@ index c1821235df8abd9c0991efeb1d82f8b6075e48e7..a35fc3aa63e6d57ef78ee4690f761060 GURL SpellcheckHunspellDictionary::GetDictionaryURL() { if (g_download_url_for_testing.Get() != GURL()) return g_download_url_for_testing.Get(); -@@ -279,6 +286,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { +@@ -278,6 +285,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII(); DCHECK(!bdict_file.empty()); 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 d3448ffcc3b40..a8d36d481d1db 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 80e5807fecbca3d3d3105522418c5f4b4d103f57..002204dbe0b9598b61141cab33b7befdfac077f8 100644 +index fb1ce87c18a72deb815b78b2f989fe0a8ebaf0bc..417e89f3ba808d9e599d391d57df0e481afb5522 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -469,6 +469,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -468,6 +468,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -20,7 +20,7 @@ index 80e5807fecbca3d3d3105522418c5f4b4d103f57..002204dbe0b9598b61141cab33b7befd hunspell_dictionaries_.back()->Load(); } -@@ -521,6 +524,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -520,6 +523,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } 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 4c6b697e3b604..77ff74d4b5934 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -573,10 +573,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 2696c864d5e32e4b87834ced1035a7b1742639b4..ff663b4e75399898daaa3e77339deec03b43a28a 100644 +index 80bff73a5886e8e79d7d91de5e27bc747fcfce02..8bc43d1359fa2551713992d6ccb73949743dde2e 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -82,6 +82,7 @@ class DisplayPrivate; +@@ -83,6 +83,7 @@ class DisplayPrivate; class ExternalBeginFrameController; } // namespace mojom class ContextProvider; @@ -584,7 +584,7 @@ index 2696c864d5e32e4b87834ced1035a7b1742639b4..ff663b4e75399898daaa3e77339deec0 class HostFrameSinkManager; class LocalSurfaceId; class RasterContextProvider; -@@ -138,6 +139,16 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -139,6 +140,16 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -601,7 +601,7 @@ index 2696c864d5e32e4b87834ced1035a7b1742639b4..ff663b4e75399898daaa3e77339deec0 // 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 -@@ -179,6 +190,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -180,6 +191,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -611,7 +611,7 @@ index 2696c864d5e32e4b87834ced1035a7b1742639b4..ff663b4e75399898daaa3e77339deec0 // 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 -@@ -469,6 +483,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -476,6 +490,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 f07fe207b2f52..9a069045d5097 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -53,7 +53,7 @@ index 1fcf54cac11c38352e14774cd08bcaa162443e9c..5356da11391d52a8f9aaa57a27616cee 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 1b8dbc0538d0af843e40edc41505d08f9034f97b..270822eb756090f8a74f34823009942ed21e8616 100644 +index 3a1c5bd943c110514e4da06491190476d6e6de38..6a80fb16242865d398bcbcd380893ccc9a3fe167 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h @@ -269,6 +269,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -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 1530c51f9090ce51de1f3bc495ca83590d6430ab..d053aa813ab53092dcefb81116ff850318f439c2 100644 +index 74365833e96d5a3c443e9160e1ada106026ada30..10bc715a2d0bd4cfe750ed222424dd4c7be37979 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -470,6 +470,7 @@ URLLoader::URLLoader( +@@ -469,6 +469,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index 1530c51f9090ce51de1f3bc495ca83590d6430ab..d053aa813ab53092dcefb81116ff8503 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -637,7 +638,7 @@ URLLoader::URLLoader( +@@ -636,7 +637,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 1530c51f9090ce51de1f3bc495ca83590d6430ab..d053aa813ab53092dcefb81116ff8503 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1408,6 +1409,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1407,6 +1408,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 498c91f8f91a2..a562bd5cd3b15 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 37bb1e9788a251b3f2c79b5272d4a44c22b707b3..29c3104308e9e64d0ab99bdfae00479f8e1bfaa1 100644 +index 9e38d55d7156986e48ed6dcb3522d77358bfdb75..01ff95be00b3911749f66a136b2b5a6c02156bd3 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3597,6 +3597,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3596,6 +3596,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_dont_delete_SerialPortManager_on_main_thread.patch b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch index cf2398b0c00ef..d1d1cd7380be1 100644 --- a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch +++ b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch @@ -50,10 +50,10 @@ 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 11a7b2902490986ba2462f92c3b3e5ae1b1a127f..32d591621c7206affab50ef061aa565527d5952f 100644 +index 1f18714dd0c79359173f8e9204b9314a92e3b2a8..068570dba8673d2b0af674f556465abda2ed16f5 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc -@@ -159,7 +159,7 @@ DeviceService::~DeviceService() { +@@ -158,7 +158,7 @@ DeviceService::~DeviceService() { // naturally sequenced after the last task on // |serial_port_manager_task_runner_| per ThreadPool shutdown semantics). // See crbug.com/1263149#c20 for details. 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 1bc8ed89784d0..e01dfbd4ead06 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ 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 55224f960151b0cae23b2a49d755eace630e9e3a..86ab5a5e5e3e881fdaf3528640f097493123da74 100644 +index 5766344e7ca539e4ac8526eaa651f0079a9f01b1..ca02c970d0e83b24503a5128c5cf088d9e348f3b 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1827,7 +1827,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, @@ -21,7 +21,7 @@ index 55224f960151b0cae23b2a49d755eace630e9e3a..86ab5a5e5e3e881fdaf3528640f09749 // 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 d159f44dc855fee799f7b97b59a2a4e64631e7b4..b583fb7ff191d5dfce4b8fee5f06e074b3a6ea4f 100644 +index 2f14f906b51ce73a69cd780d70ad6264285138ac..b14695646fe75d213b4affa60a6d775ce2474238 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -673,6 +673,10 @@ class WebContents : public PageNavigator, 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 4ac4782be9141..4fd3f5b2054b5 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 f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d54a5b39da 100644 +index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbbdd7f157b 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -16,12 +16,16 @@ @@ -34,7 +34,7 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 #include "chrome/common/chrome_switches.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" -@@ -161,6 +165,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -159,6 +163,7 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -42,15 +42,15 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 if (base::FeatureList::IsEnabled( blink::features::kWindowPlacementFullscreenCompanionWindow)) { if (!popunder_preventer_) -@@ -168,6 +173,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -166,6 +171,7 @@ void FullscreenController::EnterFullscreenModeForTab( else popunder_preventer_->WillActivateWebContents(web_contents); } +#endif - SetTabWithExclusiveAccess(web_contents); - requesting_origin_ = -@@ -203,7 +209,9 @@ void FullscreenController::EnterFullscreenModeForTab( + // Keep the current state. |SetTabWithExclusiveAccess| may change the return + // value of |IsWindowFullscreenForTabOrPending|. +@@ -218,7 +224,9 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -60,7 +60,7 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -248,11 +256,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -263,11 +271,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -74,7 +74,7 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 } void FullscreenController::OnTabDeactivated( -@@ -402,13 +412,9 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -417,13 +427,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. @@ -90,7 +90,7 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 #endif toggled_into_fullscreen_ = true; -@@ -421,6 +427,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -436,6 +442,7 @@ void FullscreenController::EnterFullscreenModeInternal( url = extension_caused_fullscreen_; } @@ -98,7 +98,7 @@ index f1b9597ea5070ac1847355833a751c72abc0e917..caa82d39fbab39ce7c90dcec401aa8d5 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. -@@ -434,6 +441,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -449,6 +456,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 929bc1574435b..6994d7d5bdc0c 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,10 +7,10 @@ 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 b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b90008d9b 100644 +index ee30fddfeb034d14ae05cb5957026f65f32a4fd4..aa38a6e0cc4c0ac57469bb67c85dae3b8ce19bc2 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc -@@ -20,7 +20,10 @@ +@@ -21,7 +21,10 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -21,7 +21,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" #include "chrome/grit/dev_ui_browser_resources.h" -@@ -49,9 +52,11 @@ +@@ -50,9 +53,11 @@ #include "ui/views/accessibility/view_accessibility.h" #if !BUILDFLAG(IS_ANDROID) @@ -33,7 +33,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b #include "ui/views/accessibility/widget_ax_tree_id_map.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" -@@ -163,7 +168,7 @@ std::unique_ptr BuildTargetDescriptor( +@@ -164,7 +169,7 @@ std::unique_ptr BuildTargetDescriptor( accessibility_mode); } @@ -42,7 +42,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b std::unique_ptr BuildTargetDescriptor(Browser* browser) { std::unique_ptr target_data( new base::DictionaryValue()); -@@ -202,7 +207,9 @@ void HandleAccessibilityRequestCallback( +@@ -203,7 +208,9 @@ void HandleAccessibilityRequestCallback( DCHECK(ShouldHandleAccessibilityRequestCallback(path)); base::DictionaryValue data; @@ -52,7 +52,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() -@@ -236,7 +243,7 @@ void HandleAccessibilityRequestCallback( +@@ -237,7 +244,7 @@ void HandleAccessibilityRequestCallback( data.SetBoolKey(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled()); @@ -61,7 +61,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b data.SetStringKey(kInternal, show_internal ? kOn : kOff); std::unique_ptr rvh_list(new base::ListValue()); -@@ -271,12 +278,12 @@ void HandleAccessibilityRequestCallback( +@@ -272,12 +279,12 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(rvh_list)); std::unique_ptr browser_list(new base::ListValue()); @@ -76,7 +76,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr widgets_list(new base::ListValue()); -@@ -493,8 +500,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { +@@ -494,8 +501,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { AllowJavascript(); if (flag_name_str == kInternal) { @@ -87,7 +87,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b return; } -@@ -601,10 +610,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -602,10 +611,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -101,7 +101,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b result->SetStringKey(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } -@@ -629,6 +640,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -630,6 +641,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -109,7 +109,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { std::unique_ptr result( -@@ -643,6 +655,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -644,6 +656,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -117,7 +117,7 @@ index b9fd875b26d64e84201605978f897b234b998f6f..20ac941733b0b1f9e14954fde1c17b7b #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr result(new base::DictionaryValue()); -@@ -759,5 +772,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -760,5 +773,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 6afb86bfb4a19..d67ab8eee59c7 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 b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5b } 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 aca31e17a90f95d6a4616fec5b33ce55cd136af0..e340cfae256797b7683fad8b32776a95889a8f46 100644 +index 804166d8844da5bd889f014e79d59d0cd75f5490..35ef412756a2c63394e5f2587b5bc73eadae4d60 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -240,6 +240,24 @@ void PrintDialogGtk::UpdateSettings( +@@ -239,6 +239,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 9ed4dada269e3..9b3efd6eefcaa 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 9208dc75b4e3d969fbb0bb13de64d2b129de9509..b5779d43456c5e356497f2cb671fcb9b3492b47f 100644 +index d3228eb29e921f63d74b7291814c7121f99bf8f8..739def8df363d8f33b194c7191a0016eefffcd9a 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3170,6 +3170,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3171,6 +3171,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 9208dc75b4e3d969fbb0bb13de64d2b129de9509..b5779d43456c5e356497f2cb671fcb9b } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 1b7e71e12d01929b8bfacf8c7c8950922bdd3d59..ca5a03653611843a8eac90e1be86ca4aa40ecce2 100644 +index 6aa01e2f4e8227f0c1cb78b88009728efccdd998..98830a0b12036025b69c74342329f95d74e2c623 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -277,6 +277,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -271,6 +271,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 e67cc4c13a9ed..c25fe7140292c 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b18 // 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 b123e69bf6a57b1a4041c79c1cddd0117ed3851c..a8a23ccd0837866c1cb0657e0b8713d484042f38 100644 +index 6996e07dd19c0fa29fe658c6cb33adc60969e63e..ee480cc557db3bfd4ff9428324151d071ad1f444 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -348,7 +348,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -351,7 +351,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, @@ -51,7 +51,7 @@ index b123e69bf6a57b1a4041c79c1cddd0117ed3851c..a8a23ccd0837866c1cb0657e0b8713d4 static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -358,7 +359,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -361,7 +362,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 385502d7e9df0..a5004a9488601 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,7 +12,7 @@ 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 b26a3c72aa63b81f8f4558b28b404faf138a897b..335dc385eb03bc9634387af44dfd1aa3bfa71cb6 100644 +index e9c3f3dee36a44d40844a88dbb899f593d03c907..c8dc226ce7c87fa84da5c99760f12538e367bbc9 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { @@ -28,7 +28,7 @@ index b26a3c72aa63b81f8f4558b28b404faf138a897b..335dc385eb03bc9634387af44dfd1aa3 void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index 4364da656ac02f2f717e713f37d29ce44c14242b..ba044aee23db495e1da69c5bc0a807e96783faa9 100644 +index 4ed951d5829e87431a1f9f84f0317978cb673e31..82f9a2f97e71848ece8d04effc083db94a45d495 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 4364da656ac02f2f717e713f37d29ce44c14242b..ba044aee23db495e1da69c5bc0a807e9 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 972bb4e8ba2d1470ed5f24c125551e3e627d79e4..d3b15d35eb458c00e470569904924c28c7a3957d 100644 +index 53402e4d706f58c26498015c1a5c33b4f7ceabc7..c14ce99ec72881133a5bf2bd90369ee0211f6ca1 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1211,6 +1211,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1215,6 +1215,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,10 +57,10 @@ index 972bb4e8ba2d1470ed5f24c125551e3e627d79e4..d3b15d35eb458c00e470569904924c28 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 81f6abb91a3fdefc1b0128f3224c7b82bfcbd0d2..99980e3528f4660bf1205e44326645d97e762cb9 100644 +index ac0afe687650da564187127dc7ea93a47acde719..237e3f00b1451be43949a797ef1b35885b958a5d 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 { +@@ -90,6 +90,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 c8d8f95b97aec..c3969f67ffd76 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 862a5fa7d1f388c9e6cda18416fb5d9ae56cca4b..2da5d367dacd557bcca79412ed77fd74d37241f4 100644 +index b036986b35dac88ab58d572a9e77bf0b1210411a..56f58636177cba954bdd24f8c43fc339a5e9b436 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -950,6 +950,11 @@ +@@ -954,6 +954,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index db6a2993b6c77..f9b02be672a7b 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index 27d6cc30cad2dffed0a2587fdd49199248e006e1..f6c0974ca21e6b83faf81e5d11add0eb534645d1 100644 +index b1180a85530a7dd65022e174fe335ede0c7c55ca..c12133d82b111d37c8bac92980c22e406125c8df 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") 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 84f03a08c570c..dff95cff6f340 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 90f738057d3040b5421d51592097c7c30106a94f..3cb2f0880bb36f19fc9b55f2351f891088e8c304 100755 +index a8f53aaae2f2dd7e5af3b50a3bf80671a6276581..ee128e30c394c755306a62412b06d15503ccd2f2 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index bfb6ba3121608..b44a477877ab9 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 ce5f2904c283643558375a84453073f7ea8aba3e..a17bf60c79fdd2511a46796b80879ed7926c706d 100644 +index 85a55e9bbb7403b031c512fa5e010cbb0487d9c6..31c83eab4781725540f57e1e66c6f7e7c0b85d8b 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -248,11 +248,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -247,11 +247,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/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 03d4ca35e86d8..81d1ad3dbb10e 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -135,7 +135,7 @@ index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd5 std::vector argv_cstr; argv_cstr.reserve(argv.size() + 1); diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc -index e28d37435da00153e34132f49ce8f6b240e70a65..77ce459d969022b7c5a4d1e57bb1f7e6fa7a9898 100644 +index 0e842caf7b6487d94978c7b68fb5b222e330581f..5eafcd163ee1a05203a5eb76592a449f5a84e71f 100644 --- a/media/audio/mac/audio_low_latency_input_mac.cc +++ b/media/audio/mac/audio_low_latency_input_mac.cc @@ -34,19 +34,23 @@ diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 8ac081f88cbfc..5dedbca657033 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -167,7 +167,7 @@ index 14fec4b1b39d995553b029ca7ec780ce29b27162..54a1142f17e2a63b86e1fab52ea90276 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index be753e5ea42cc8757b0e7f9a21aa12b40f1928f2..83f3ef36e17b484d838c9338ae6ad0073b42283c 100644 +index 244b208e6a7872ea4d25fcf74a78abc9248a9ac3..45bafcaaa10641ca3a8306a6685ee9ed730d1e02 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -319,6 +319,13 @@ component("base") { @@ -233,10 +233,10 @@ index d4051a7a8755c7b10d4df3746cb2857471f07c45..de04616893d1c97e3607eb5a4b942733 // 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 7ed5041b0625a98be269b4f4daeef33c3bc1f8b6..803d8bc43fa57c8e49d33d4be618d51a408ffe47 100644 +index c9294c5358401da716b6d8d2846e20e9a04f4e2d..c9a3cdee33e3aa8bfbfa9c6678c2828a94b90061 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -296,14 +296,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -297,14 +297,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 7ed5041b0625a98be269b4f4daeef33c3bc1f8b6..803d8bc43fa57c8e49d33d4be618d51a } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1287,6 +1295,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1288,6 +1296,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 7ed5041b0625a98be269b4f4daeef33c3bc1f8b6..803d8bc43fa57c8e49d33d4be618d51a remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1294,14 +1303,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1295,14 +1304,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 541ac9b7e977d..940e9864b669b 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -40,10 +40,10 @@ index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b 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 224542e2a70e980684d5d882af7fe3988c5ee96b..7a726eea86f21fe31077aaa447cccc05007d5eaa 100644 +index 767d3f6454ef3150354911ed683f5485bb83fbbb..f273b56276c1b277b307f6c4c061e08d12daea42 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -59,7 +59,7 @@ +@@ -60,7 +60,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -52,7 +52,7 @@ index 224542e2a70e980684d5d882af7fe3988c5ee96b..7a726eea86f21fe31077aaa447cccc05 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -68,6 +68,7 @@ +@@ -69,6 +69,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -60,7 +60,7 @@ index 224542e2a70e980684d5d882af7fe3988c5ee96b..7a726eea86f21fe31077aaa447cccc05 } template -@@ -148,7 +149,9 @@ +@@ -149,7 +150,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 8054716d63c78..8a03d6be4a747 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -183,10 +183,10 @@ index ebe37172d254e8441fe2b8c290bd5a59af38d754..6a131f5c41f3e43a1467efeec2ce63f6 "AudioToolbox.framework", "AudioUnit.framework", diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index ebdc6364312ee710d416318836c03aeec9bfb65c..aa9b50de7efaf0e1b64effea93204984c91790b5 100644 +index b8805f9174818ac086a5d6542c9962050f00aee8..5491b62a2e180b2f6e48e243e2ac78c3b1a16892 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -886,7 +886,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -887,7 +887,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 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 e3324296a3770..43c8aae94a345 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 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c889d3fa94 100644 +index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17ce7acaf6 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -127,6 +127,11 @@ @@ -22,7 +22,7 @@ index 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c8 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -434,6 +439,91 @@ bool GetFullDataFilePath( +@@ -435,6 +440,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c8 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -678,6 +768,13 @@ void NetworkContext::SetClient( +@@ -732,6 +822,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c8 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2242,6 +2339,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2298,6 +2395,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index 54b5a281161187f887032d9445f21c541b9691e5..4c8982a8ae3ae23fbeef244cd23b43c8 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 3fd4c43562aa5de00d8698096f154522420c8f24..eed05c05d1da28284af6ae0cef45dbbb47254058 100644 +index 53e3f293150e725cd1261f09a8f9bfcb5371a76c..58671094857cdfe5d853c8a284d51bc1b8a09660 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -105,6 +105,7 @@ class URLMatcher; +@@ -108,6 +108,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index 3fd4c43562aa5de00d8698096f154522420c8f24..eed05c05d1da28284af6ae0cef45dbbb class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -221,6 +222,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,9 +159,9 @@ index 3fd4c43562aa5de00d8698096f154522420c8f24..eed05c05d1da28284af6ae0cef45dbbb void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -796,6 +799,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext - CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; - #endif +@@ -827,6 +830,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext + std::vector dismount_closures_; + #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) + RemoteCertVerifier* remote_cert_verifier_ = nullptr; + @@ -169,10 +169,10 @@ index 3fd4c43562aa5de00d8698096f154522420c8f24..eed05c05d1da28284af6ae0cef45dbbb // 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 64199b44316ab4671941c734444d207591512d0a..c929eb10af5b8856debdc0d665eac767e9730714 100644 +index b2beaa762bfe88b56ac24d35646b6e6cbc630816..b52e5a2230e96d55d7886bde331a505c58dd093a 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -280,6 +280,17 @@ struct NetworkContextFilePaths { +@@ -281,6 +281,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index 64199b44316ab4671941c734444d207591512d0a..c929eb10af5b8856debdc0d665eac767 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -829,6 +840,9 @@ interface NetworkContext { +@@ -830,6 +841,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 f9c04cc3c1735..b4277e3d63f55 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index 225609e52130d4113c8ae667f3ffa565bbde5b73..b33d27ce4fc6222146255cf4c0e7342751c75c9b 100644 +index 83b33e3f521aa79942ba3446a8b161a4e4e23da1..24f409f673797b6e8bb1da680343ea1ddc083e4f 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( +@@ -195,6 +195,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -31,13 +31,13 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48 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 fd2c2d72ebc3cab0cc824bb091da32d4be635dd9..8bcd6a87c38413a5281d164e3c0fcfd23c3fa04b 100644 +index 32a61e73658d33dcd0fe1640094c8b79dde0be37..3c3650e0f8364a5c86bd11a6f11ca559a97f5900 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( - PlatformNotificationContextImpl* notification_context, +@@ -82,10 +82,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( BrowserContext* browser_context, scoped_refptr service_worker_context, + RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, @@ -46,8 +46,8 @@ index fd2c2d72ebc3cab0cc824bb091da32d4be635dd9..8bcd6a87c38413a5281d164e3c0fcfd2 + render_frame_host_(render_frame_host), browser_context_(browser_context), service_worker_context_(std::move(service_worker_context)), - origin_(origin), -@@ -147,7 +149,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( + render_process_host_id_(render_process_host->GetID()), +@@ -149,7 +151,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( notification_id, std::move(event_listener_remote)); browser_context_->GetPlatformNotificationService()->DisplayNotification( @@ -57,18 +57,18 @@ index fd2c2d72ebc3cab0cc824bb091da32d4be635dd9..8bcd6a87c38413a5281d164e3c0fcfd2 } diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h -index cb2b09912dbe426611e944316841ee2a9c2e373f..4d2603c29b2d89fa296b1aad40c2132a9c7498aa 100644 +index dc8de24c86f1769680ce7830844d35dfef7eb7e7..fcd99361fa8c895d6bd89bacb9fb94e76969e7b2 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 - PlatformNotificationContextImpl* notification_context, +@@ -42,6 +42,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl BrowserContext* browser_context, scoped_refptr service_worker_context, + RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, mojo::PendingReceiver receiver); -@@ -101,6 +102,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl +@@ -102,6 +103,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl // The notification context that owns this service instance. raw_ptr notification_context_; @@ -77,69 +77,69 @@ index cb2b09912dbe426611e944316841ee2a9c2e373f..4d2603c29b2d89fa296b1aad40c2132a 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 f0d5ea365cf09d2dc06de88fc03e4bf5ddfdf4a6..b68666813ab231a3d4233d3ed2f9655b18d8a280 100644 +index 7461d5079f9cb0f257fbb93248c98be9409d38e7..4ddb9e40f0441b378d73ac75d99ae64c90d32b58 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc -@@ -126,7 +126,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { - +@@ -129,7 +129,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { notification_service_ = std::make_unique( notification_context_.get(), &browser_context_, -- embedded_worker_helper_->context_wrapper(), -+ embedded_worker_helper_->context_wrapper(), nullptr, - url::Origin::Create(GURL(kTestOrigin)), + embedded_worker_helper_->context_wrapper(), &render_process_host_, +- url::Origin::Create(GURL(kTestOrigin)), ++ nullptr, url::Origin::Create(GURL(kTestOrigin)), /*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 5580c415a1e8a45327147861d7c71cebd1ecbd5a..d37711f83be7566ec5ad2078942aaca1948a77c5 100644 +index 1195296c6f925e6c4f52f61866cf4b7f824af4e9..d3142bef0856c5cd7f4822ee9dcaedaef74a12d3 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() { - } +@@ -282,13 +282,14 @@ void PlatformNotificationContextImpl::Shutdown() { void PlatformNotificationContextImpl::CreateService( + RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, mojo::PendingReceiver receiver) { DCHECK_CURRENTLY_ON(BrowserThread::UI); services_.push_back(std::make_unique( -- this, browser_context_, service_worker_context_, origin, document_url, -- std::move(receiver))); -+ this, browser_context_, service_worker_context_, render_frame_host, -+ origin, document_url, std::move(receiver))); + this, browser_context_, service_worker_context_, render_process_host, +- origin, document_url, std::move(receiver))); ++ render_frame_host, origin, document_url, std::move(receiver))); } void PlatformNotificationContextImpl::RemoveService( diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df61181bc55 100644 +index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b5c19f436 100644 --- a/content/browser/notifications/platform_notification_context_impl.h +++ b/content/browser/notifications/platform_notification_context_impl.h -@@ -47,6 +47,7 @@ class BrowserContext; - struct NotificationDatabaseData; +@@ -48,6 +48,7 @@ struct NotificationDatabaseData; class PlatformNotificationServiceProxy; + class RenderProcessHost; class ServiceWorkerContextWrapper; +class RenderFrameHost; // Implementation of the Web Notification storage context. The public methods // defined in this interface must only be called on the UI thread. -@@ -76,6 +77,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl - // Creates a BlinkNotificationServiceImpl that is owned by this context. +@@ -78,6 +79,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl // |document_url| is empty when originating from a worker. void CreateService( + RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, 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 a188b1282e7ceca3fe24cb2d82c644bf0c21bc6f..f0b6fa61bb24d5b5fc4cf9cb8fc2f635f515f3f6 100644 +index b769a06dc9443317a1073738c6fd38816ebeb186..20a697be32f7e27a9fa33d0225c94520aa5ebf2e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2083,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2083,7 +2083,8 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( -- origin, document_url, std::move(receiver)); -+ RenderFrameHost::FromID(GetID(), render_frame_id), origin, document_url, std::move(receiver)); +- this, origin, document_url, std::move(receiver)); ++ this, RenderFrameHost::FromID(GetID(), render_frame_id), ++ origin, document_url, std::move(receiver)); } void RenderProcessHostImpl::CreateWebSocketConnector( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index b22235fd4e639..4e2dbb1fe2106 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -138,7 +138,7 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..74178fd4752e9c469d50ccafda61157a #include "ui/aura/window.h" #include "ui/aura/window_tree_host.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 6d2744b673ecb31464d4aa9b0d11177892c030f4..1dd75ec581ecd67e04a8f1cf1e43bce70eaa9380 100644 +index c24fdd1360e582293a8b21b2f29dc6bc02b564c9..b9b2b4aa7d168cd7a83c36edbe4f7dc30565c921 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 @@ 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 e81c37f12f38f..8dc0b14a55140 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index d9db2d705c88e828383e81efd8f8c6d28e1520bb..7f0e1672af0fef134fc637324e366e9e8d985054 100644 +index d1a9c517a69bcc79a4b42f8eb8b6fcc3cea2f4da..04569140589c25d37bad2cd5ff979cfc6b1f3f43 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -122,6 +122,16 @@ +@@ -125,6 +125,16 @@ E_CPONLY(kColorOverlayScrollbarStrokeHoveredDark) \ E_CPONLY(kColorOverlayScrollbarStrokeHoveredLight) \ E_CPONLY(kColorProgressBar) \ @@ -28,7 +28,7 @@ index d9db2d705c88e828383e81efd8f8c6d28e1520bb..7f0e1672af0fef134fc637324e366e9e E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -174,6 +184,7 @@ +@@ -177,6 +187,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -37,10 +37,10 @@ index d9db2d705c88e828383e81efd8f8c6d28e1520bb..7f0e1672af0fef134fc637324e366e9e #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index a89f393da6c06ba21d5303a925dd9e907bde5e03..e0106610831ca36544161672f3663e54b2585228 100644 +index b404ef6063c3a6c542565de46458b7401f129963..ce6fca0516d91b8acfe5fe6bc89bc09ae03a17d6 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -138,6 +138,17 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -143,6 +143,17 @@ void AddUiColorMixer(ColorProvider* provider, SetAlpha(GetColorWithMaxContrast(kColorOverlayScrollbarFillHoveredLight), gfx::kGoogleGreyAlpha500); mixer[kColorProgressBar] = {kColorAccent}; @@ -58,7 +58,7 @@ index a89f393da6c06ba21d5303a925dd9e907bde5e03..e0106610831ca36544161672f3663e54 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -213,6 +224,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -218,6 +229,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 877c4e12eaa0d..09a9b9dd6df08 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -69,7 +69,7 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..3a42aa2a6cde698a75349e573a34b1328fc9c11c 100644 +index 5248f98e3d8e1469afe2ec87f696581cb0ff4687..4fe1faed3bb95407e2d25ea9c868bc0d615ba03c 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -88,7 +88,7 @@ index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..3a42aa2a6cde698a75349e573a34b132 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -229,16 +229,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -232,16 +232,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -127,7 +127,7 @@ index 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a89f5489f 100644 +index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774bf8b4b9b9 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -168,7 +168,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -193,7 +197,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -191,7 +195,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -179,7 +179,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -246,6 +252,7 @@ void ScriptedPrintReplyOnIO( +@@ -244,6 +250,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -187,7 +187,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -255,8 +262,9 @@ void ScriptedPrintReplyOnIO( +@@ -253,8 +260,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -198,7 +198,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -295,12 +303,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -292,12 +300,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -213,7 +213,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -308,7 +318,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -305,7 +315,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -225,7 +225,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -334,7 +347,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -331,7 +344,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -236,7 +236,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -487,7 +502,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -484,7 +499,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -246,7 +246,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -500,16 +516,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -497,16 +513,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -270,7 +270,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a } void PrintViewManagerBase::NavigationStopped() { -@@ -625,11 +644,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -622,11 +641,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -285,7 +285,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -656,18 +678,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -653,18 +675,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -307,7 +307,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -677,6 +701,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -674,6 +698,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -315,7 +315,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -702,14 +727,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -699,14 +724,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -332,7 +332,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a return; } #endif -@@ -732,7 +757,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { +@@ -729,7 +754,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -340,7 +340,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a #endif ReleasePrinterQuery(); -@@ -747,6 +771,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -744,6 +768,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -352,7 +352,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -757,10 +786,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -754,10 +783,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -365,7 +365,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a } void PrintViewManagerBase::DidStartLoading() { -@@ -820,6 +851,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -817,6 +848,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -377,7 +377,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -881,7 +917,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -878,7 +914,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -389,7 +389,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a if (!weak_this) return false; -@@ -963,6 +1002,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -960,6 +999,13 @@ void PrintViewManagerBase::ReleasePrintJob() { UnregisterSystemPrintClient(); #endif @@ -403,7 +403,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a if (!print_job_) return; -@@ -1012,7 +1058,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1009,7 +1055,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -569,7 +569,7 @@ index 6cd585d597315940be144506b9bb819137a7981e..8ea9c38a46460edd237f003ddd736224 // 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 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd056957255b74f0a2 100644 +index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8bdd9963fa 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -40,6 +40,7 @@ @@ -580,7 +580,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 #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" -@@ -1263,7 +1264,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1264,7 +1265,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -590,7 +590,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 if (!weak_this) return; -@@ -1294,7 +1296,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1295,7 +1297,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -599,7 +599,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1309,7 +1311,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1310,7 +1312,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -608,7 +608,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1340,7 +1342,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1341,7 +1343,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -618,7 +618,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1389,6 +1392,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1390,6 +1393,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -627,7 +627,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1941,7 +1946,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1942,7 +1947,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -637,7 +637,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 // Check if |this| is still valid. if (!weak_this) return; -@@ -1956,7 +1962,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1957,7 +1963,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -648,7 +648,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1964,7 +1972,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1965,7 +1973,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -657,7 +657,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1983,8 +1991,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1984,8 +1992,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -674,7 +674,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 // Check if |this| is still valid. if (!self) return; -@@ -2232,36 +2247,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2233,36 +2248,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -738,7 +738,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2405,7 +2435,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2406,7 +2436,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -747,7 +747,7 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2656,18 +2686,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2657,18 +2687,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { @@ -768,10 +768,10 @@ index 419a2daf45c123df7cd4e38614598278cb775cba..9b3fcc2e7cfbd70587845bbd05695725 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 023594185e3aa9c79e8c5179c40ce867a5bb80e9..312cf5d4dbdb130dee3a07f970c9d92d6cd2cdbf 100644 +index cd26f9ecf888c2a321890edd378ee0f8843a7f6c..958794f95fe8830b7e494340fbd53b0e92a498e3 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 +@@ -257,7 +257,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -780,7 +780,7 @@ index 023594185e3aa9c79e8c5179c40ce867a5bb80e9..312cf5d4dbdb130dee3a07f970c9d92d #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; void SetPrintPreviewUI( -@@ -323,7 +323,9 @@ class PrintRenderFrameHelper +@@ -324,7 +324,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -791,7 +791,7 @@ index 023594185e3aa9c79e8c5179c40ce867a5bb80e9..312cf5d4dbdb130dee3a07f970c9d92d // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -332,12 +334,14 @@ class PrintRenderFrameHelper +@@ -333,12 +335,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -809,7 +809,7 @@ index 023594185e3aa9c79e8c5179c40ce867a5bb80e9..312cf5d4dbdb130dee3a07f970c9d92d #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 3d8281c8af9a4339bdd492c67edafc4ec6efb09d..6f8b9d42e051579cf1d0774afa771a7e45d31ff2 100644 +index c4cdb402bc0aaa25b9118bad33a84b7f04cc94c4..8022f3599ec38d614272cde3109a7be2d9b2840e 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -120,7 +120,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { 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 e0d3249452e81..ab990b94d8742 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 ed56e947fa137cbaddaa12503ae983d7acd4463f..e1d77416991bac0178935b1bd255947d20db6210 100644 +index 7e421c72e3cb9abd9c3dc6542afed08f3910df93..218fe3eb6d6e2e4bce19776f25560aa7b81dfefa 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2073,6 +2073,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2067,6 +2067,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 ed56e947fa137cbaddaa12503ae983d7acd4463f..e1d77416991bac0178935b1bd255947d void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3fa51ecee644055db44bd4dd54c27ec224ff46d6..cc6afdef869470136c2cec392911742a289f6339 100644 +index cf37734d313470c27d2d40bd90cb199234a1e99e..63b01c486f56499bbc2acff0b5abdbf24b0ce676 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4500,6 +4500,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4506,6 +4506,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,7 +59,7 @@ index 3fa51ecee644055db44bd4dd54c27ec224ff46d6..cc6afdef869470136c2cec392911742a 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 fdb4a26de507f260466a7bc22c5cadc64190c342..55224f960151b0cae23b2a49d755eace630e9e3a 100644 +index 207633738a6bb358c796c8bb42aa5805b753f61b..5766344e7ca539e4ac8526eaa651f0079a9f01b1 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -961,6 +961,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, @@ -71,7 +71,7 @@ index fdb4a26de507f260466a7bc22c5cadc64190c342..55224f960151b0cae23b2a49d755eace 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 b68d706fe204c3e8d65b2bf523950840c0398db2..8852a8da29bc9b7f9b832ad392741751f46e3fd7 100644 +index 9ee3b74460c009c92fb811787250270ea13233b3..802d02e825d98f103f48e3134d6b9dd7e99aa2c5 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -13,6 +13,7 @@ diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index ddd75f00d4f9a..ae36800e4a5dc 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,10 +12,10 @@ 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 046130ff8cbc4945e94a4ee71ac6320b4f7c5369..c71c3e1720b3f4c7b7362d99957cd2479bf88a37 100644 +index 460442d9c0f894f78b29b33c027320511511dbcc..30068c219aa497892e10290be0fe5734ded8b23c 100644 --- a/base/callback_helpers.h +++ b/base/callback_helpers.h -@@ -94,6 +94,22 @@ class OnceCallbackHolder final { +@@ -95,6 +95,22 @@ class OnceCallbackHolder final { } // namespace internal diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 229cc895360e4..79d8bc6b449cb 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 6944f34edbfb7656c19883243ab2eb15f5ce51d9..0a2ddf31689b0d2ba2600a40067f9892b06033a7 100644 +index 7d6f0a7f7f65440b7827a2fe01d75998716b1bef..6aaa797b602f7fca7f78026311938c6c88efcfbd 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -662,6 +662,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -658,6 +658,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 6944f34edbfb7656c19883243ab2eb15f5ce51d9..0a2ddf31689b0d2ba2600a40067f9892 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 abdd3cf7d93ab9a1f80351d38ddcee52664414da..98da92a6d31103dfa0a48e278c3a15ee0533791e 100644 +index a5c773c9a78565230013b6219ec83621980defef..34b6650c766673274f0da3e539bf9a8e71c3d36e 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/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index f37fd4c085d93..6e7b9f068b951 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 f1e0552dedf377238e9cd9d24a5ebea77ed83717..1f86073736f849e797e029678bc212ce96ba0bd9 100644 +index 6b8f8778d17008582ab9edeae6d63dd1111182f3..ff2e479125f1a6d7cbb52e4f674cb836d4f6596c 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) { diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index c90a98511a533..ae352c1290d32 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 347526056c09a34c62512869b7c21b9e2b6ea0d7..dda90e2043eaba4dd951628f4876cad60a553b9b 100644 +index 6ee18591ecf3f73388384d82a6530a950ff580e7..c43e94bc7c53ec9573c2e0b869d93bfd73f7051a 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1339,7 +1339,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1313,7 +1313,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 ea511b50b2598..e10c15ba036d4 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ 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 f0b6fa61bb24d5b5fc4cf9cb8fc2f635f515f3f6..ca056c66af681548ba01bd07db7dadc5ce2a5280 100644 +index 20a697be32f7e27a9fa33d0225c94520aa5ebf2e..927e182bbba7a3700fd20c8c964da7cc162c4210 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1786,9 +1786,15 @@ bool RenderProcessHostImpl::Init() { diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index 13f063ddec35f..4dd9ad00ae567 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index ada6208644cb22c9f51c571f9509e335c0836163..86b55223fc21adf0e01cb276ebc613f6ea24f8b2 100755 +index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..1824d513f6296985b5a3758f7e052ed77dcf0e0f 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py @@ -41,9 +41,11 @@ except ImportError: @@ -24,7 +24,7 @@ index ada6208644cb22c9f51c571f9509e335c0836163..86b55223fc21adf0e01cb276ebc613f6 VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el') -@@ -105,7 +107,7 @@ def GetSysrootDict(target_platform, target_arch): +@@ -106,7 +108,7 @@ def GetSysrootDict(target_platform, target_arch): if target_arch not in VALID_ARCHS: raise Error('Unknown architecture: %s' % target_arch) diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index b3d8608dc3a5c..5ce4605f1e1ea 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,7 +6,7 @@ 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 a0d6f0353bb387e6eca9f2b13ab1d40996234110..8548abdfae14d630794abc1033f9b9eda59f771b 100644 +index 28e6c85b65b782c5b788b3e2283db070d4490c7a..87dc089b7c36d72d623c73cd5aba196f00a0d1f1 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc @@ -7,6 +7,7 @@ @@ -17,7 +17,7 @@ index a0d6f0353bb387e6eca9f2b13ab1d40996234110..8548abdfae14d630794abc1033f9b9ed #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" -@@ -63,6 +64,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( +@@ -53,6 +54,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 44905e57c8ee5..f71e73be0d009 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 2033877b86eddbc9baac6a603587e631021f6819..7f4679943fa1d7b2585552a811098d97cada3070 100644 +index aeb111257740cd8c73e88c9b15d1f95fd49240c4..d00640770b8648116cb83d3a565f4b2f3ca37f8c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3051,6 +3051,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3057,6 +3057,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, - params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); + params.main_frame_name, GetOpener(), primary_main_frame_policy); + if (params.view && params.delegate_view) { + view_.reset(params.view); @@ -26,7 +26,7 @@ index 2033877b86eddbc9baac6a603587e631021f6819..7f4679943fa1d7b2585552a811098d97 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3061,6 +3068,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3067,6 +3074,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -35,7 +35,7 @@ index 2033877b86eddbc9baac6a603587e631021f6819..7f4679943fa1d7b2585552a811098d97 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index cb672eb5276e8d3bb686f98405854f67970e72cb..d159f44dc855fee799f7b97b59a2a4e64631e7b4 100644 +index c062c66f596f513e46da04fc9ea5f5969e7ee632..2f14f906b51ce73a69cd780d70ad6264285138ac 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_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 8bb0068ff0b9f..55e05e7be1181 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 5ad53ce87d8757b18e5ecedbd7ec9aec54bea165..37f181f16cd2520de1cbec678e02061b165fed62 100644 +index a5d6618aac35f01e09a90bdafa9f60c8140b088c..9385e097701ef51ed375fcaa097cdbf14d7ef0c7 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6293,6 +6293,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6322,6 +6322,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 420a464c14cc5..4bd7a399681ec 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index eb8968c2a86102d0d3a21f07c394f1c360083c6c..025ef3f70a5ae34faf8c6013fbfba171 // 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 030fd7ed2ea675e42e7894b1d89e636f5f5b85a6..998fe8b45959b8cfd91a1ed4f75f5946adf61537 100644 +index dbde0706007b8f202fcca5fc05562979617b0183..2adea2c2edabf3c401e9dcd228f1d57c08066059 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -950,6 +950,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -949,6 +949,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,7 +43,7 @@ index 030fd7ed2ea675e42e7894b1d89e636f5f5b85a6..998fe8b45959b8cfd91a1ed4f75f5946 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 8cbfe0a939e97de8dd8d4b5e4d741fb46e94fd45..2bc2ef61890a4c189613ae8a3f61c746ffc5d310 100644 +index e7d0d3e7c08c2f6e83726e7fa2557847d148a0ed..c6e0a728150db2b5af41e12304c88d57e51faa43 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 { @@ -55,7 +55,7 @@ index 8cbfe0a939e97de8dd8d4b5e4d741fb46e94fd45..2bc2ef61890a4c189613ae8a3f61c746 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 b68c90f1f1dd23b8b938936a092b01ffa41f0f28..60aa2e562901d9ff7b915c105acaf49851c959ba 100644 +index 0825226fae036b1e5503b66dabe4bd92ad6ee9bb..3cbb1ed9ef65cb9044a76b0a1686f6ab019c87b5 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h @@ -714,6 +714,7 @@ class BLINK_PLATFORM_EXPORT Platform { 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 be38035e76cb7..11730d37c9627 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 025ef3f70a5ae34faf8c6013fbfba171c7f501ac..cea3f3dc05f91927f4ee8be5eec85ec2 // 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 998fe8b45959b8cfd91a1ed4f75f5946adf61537..30d22188daed7f0b451ae75655e12bac3c4f10ac 100644 +index 2adea2c2edabf3c401e9dcd228f1d57c08066059..7c76b39ea82dd600b72288cccc571660b653b150 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -962,6 +962,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -961,6 +961,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,7 +52,7 @@ index 998fe8b45959b8cfd91a1ed4f75f5946adf61537..30d22188daed7f0b451ae75655e12bac 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 2bc2ef61890a4c189613ae8a3f61c746ffc5d310..36661d62ec1e6f7966b0789326fcbefa5fc3db6e 100644 +index c6e0a728150db2b5af41e12304c88d57e51faa43..7fa7dab64506ddc60e27096412ea7e93608a3394 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 { @@ -65,7 +65,7 @@ index 2bc2ef61890a4c189613ae8a3f61c746ffc5d310..36661d62ec1e6f7966b0789326fcbefa 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 60aa2e562901d9ff7b915c105acaf49851c959ba..bec02889875ef8f6e422d99c8a161898b36610c5 100644 +index 3cbb1ed9ef65cb9044a76b0a1686f6ab019c87b5..c7694b4a89c16d02f946598bcf66aa3d241af83e 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h @@ -714,6 +714,8 @@ class BLINK_PLATFORM_EXPORT Platform { diff --git a/patches/node/.patches b/patches/node/.patches index 29ed54ec0eb16..b04c145d37cf8 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -42,3 +42,4 @@ 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 feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch +fix_preserve_proper_method_names_as-is_in_error_stack.patch diff --git a/patches/node/fix_preserve_proper_method_names_as-is_in_error_stack.patch b/patches/node/fix_preserve_proper_method_names_as-is_in_error_stack.patch new file mode 100644 index 0000000000000..e14acc34fa100 --- /dev/null +++ b/patches/node/fix_preserve_proper_method_names_as-is_in_error_stack.patch @@ -0,0 +1,432 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Thu, 7 Apr 2022 11:07:10 +0200 +Subject: fix: preserve "proper method names" as-is in error.stack + +Refs https://chromium-review.googlesource.com/c/v8/v8/+/3565724. + +This patch can be removed when Node.js updates to V8 10.2.60 or higher, +which includes the above CL. + +The above CL removes prepended Function. and Object. from +stack traces, and so we need to remove them from the comparison output. + +diff --git a/test/message/async_error_nexttick_main.out b/test/message/async_error_nexttick_main.out +index 8d11dea63d4191d4e492d42cad499e9e6f277bd4..9669e9b5102ff9ce8dfffbc45dadc60dab578458 100644 +--- a/test/message/async_error_nexttick_main.out ++++ b/test/message/async_error_nexttick_main.out +@@ -1,7 +1,7 @@ + Error: test + at one (*fixtures*async-error.js:4:9) + at two (*fixtures*async-error.js:17:9) +- at processTicksAndRejections (node:internal/process/task_queues:*:*) ++ at process.processTicksAndRejections (node:internal/process/task_queues:*:*) + at async three (*fixtures*async-error.js:20:3) + at async four (*fixtures*async-error.js:24:3) + at async main (*message*async_error_nexttick_main.js:7:5) +diff --git a/test/message/core_line_numbers.out b/test/message/core_line_numbers.out +index 97b017f66e2395ca90fc7562b9043579911ddc62..1d21462c8cf63ddbbf9e3b785b553a3104710132 100644 +--- a/test/message/core_line_numbers.out ++++ b/test/message/core_line_numbers.out +@@ -7,8 +7,8 @@ RangeError: Invalid input + at Object.decode (node:punycode:*:*) + at Object. (*test*message*core_line_numbers.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* +diff --git a/test/message/error_aggregateTwoErrors.out b/test/message/error_aggregateTwoErrors.out +index d1dc13eacc303cc52003bd5820e7eeec8d48822b..eb85c92e63c850bbf8fbbe2c1600e783e0cd6066 100644 +--- a/test/message/error_aggregateTwoErrors.out ++++ b/test/message/error_aggregateTwoErrors.out +@@ -4,9 +4,9 @@ throw aggregateTwoErrors(err, originalError); + AggregateError: original + at Object. (*test*message*error_aggregateTwoErrors.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* { + code: 'ERR0' +diff --git a/test/message/error_exit.out b/test/message/error_exit.out +index 2ef95b535dafe7b0a918b8d6a844e4c4a617818d..dc5e6e7d28cef3a23ca7ba2cfb1435cad55e2aeb 100644 +--- a/test/message/error_exit.out ++++ b/test/message/error_exit.out +@@ -9,9 +9,9 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + + at Object. (*test*message*error_exit.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* { + generatedMessage: true, +diff --git a/test/message/error_with_nul.out b/test/message/error_with_nul.out +index 7fbb33f08e8dc342b9efc899e66f5e3350e9489b..a359999420fa76bd09b401a732acb7dcdfaa2198 100644 +GIT binary patch +delta 13 +VcmdnUvXEuMi;3^+Czmts0st)*2A2Q; + +delta 31 +ncmZ3;vXN!N3wHmctkmQZy@@aCIo(S0l1no4^YkXCGwuQa$o~w9 + +diff --git a/test/message/events_unhandled_error_common_trace.out b/test/message/events_unhandled_error_common_trace.out +index 19e89869ba74fae3f447e299904939da5a683280..2bdbe3df1b4c7e13ba33f099ae89f88365e6b690 100644 +--- a/test/message/events_unhandled_error_common_trace.out ++++ b/test/message/events_unhandled_error_common_trace.out +@@ -7,9 +7,9 @@ Error: foo:bar + at foo (*events_unhandled_error_common_trace.js:*:*) + at Object. (*events_unhandled_error_common_trace.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* + Emitted 'error' event at: +diff --git a/test/message/events_unhandled_error_nexttick.out b/test/message/events_unhandled_error_nexttick.out +index 3e0d4697504e49eaae5ce1807a3794cccbcd6eec..87bb2fbb91a66e6dde9dfc61427682cba90f529c 100644 +--- a/test/message/events_unhandled_error_nexttick.out ++++ b/test/message/events_unhandled_error_nexttick.out +@@ -5,11 +5,11 @@ node:events:* + Error + at Object. (*events_unhandled_error_nexttick.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* + Emitted 'error' event at: + at *events_unhandled_error_nexttick.js:*:* +- at processTicksAndRejections (node:internal/process/task_queues:*:*) ++ at process.processTicksAndRejections (node:internal/process/task_queues:*:*) +diff --git a/test/message/events_unhandled_error_sameline.out b/test/message/events_unhandled_error_sameline.out +index c027275033941df96d6ab24c1647f110a0436d9a..872556a3b393e737adb4ed3b613f2c0cf20b1d2c 100644 +--- a/test/message/events_unhandled_error_sameline.out ++++ b/test/message/events_unhandled_error_sameline.out +@@ -5,9 +5,9 @@ node:events:* + Error + at Object. (*events_unhandled_error_sameline.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* + Emitted 'error' event at: +diff --git a/test/message/events_unhandled_error_subclass.out b/test/message/events_unhandled_error_subclass.out +index 5b8131970d50d50971184ccad0e2159c52fb0afd..073ab348a96f2e24efc2a661009287e4b7acda77 100644 +--- a/test/message/events_unhandled_error_subclass.out ++++ b/test/message/events_unhandled_error_subclass.out +@@ -5,9 +5,9 @@ node:events:* + Error + at Object. (*events_unhandled_error_subclass.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* + Emitted 'error' event on Foo instance at: +diff --git a/test/message/if-error-has-good-stack.out b/test/message/if-error-has-good-stack.out +index d87581cd7675346d51261efa4e0e28c57f9652eb..c5188137124d38f48989d6774a177795617b4974 100644 +--- a/test/message/if-error-has-good-stack.out ++++ b/test/message/if-error-has-good-stack.out +@@ -12,9 +12,9 @@ AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + at a (*if-error-has-good-stack.js:*:*) + at Object. (*if-error-has-good-stack.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* { + generatedMessage: false, +@@ -25,9 +25,9 @@ AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + at a (*if-error-has-good-stack.js:*:*) + at Object. (*if-error-has-good-stack.js:*:*) + at Module._compile (node:internal/modules/cjs/loader:*:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*:*) + at Module.load (node:internal/modules/cjs/loader:*:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) + at node:internal/main/run_main_module:*:* + expected: null, +diff --git a/test/message/nexttick_throw.out b/test/message/nexttick_throw.out +index 955bcda6a26da019c9954c80ef9db24ea3094bef..3180f9a7de5df66f30c9dcee697ddfbb97df3725 100644 +--- a/test/message/nexttick_throw.out ++++ b/test/message/nexttick_throw.out +@@ -4,4 +4,4 @@ + ^ + ReferenceError: undefined_reference_error_maker is not defined + at *test*message*nexttick_throw.js:*:* +- at processTicksAndRejections (node:internal/process/task_queues:*:*) ++ at process.processTicksAndRejections (node:internal/process/task_queues:*:*) +diff --git a/test/message/source_map_disabled_by_api.out b/test/message/source_map_disabled_by_api.out +index d2cca7da5297e3772ae1acf7b8901eada6c21112..bbe017b05a20edd736ea13e2b501f8d9fdc7d0e6 100644 +--- a/test/message/source_map_disabled_by_api.out ++++ b/test/message/source_map_disabled_by_api.out +@@ -5,9 +5,9 @@ Error: an error! + at functionA (*enclosing-call-site-min.js:1:26) + at Object. (*enclosing-call-site-min.js:1:199) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) + *enclosing-call-site.js:16 + throw new Error('an error!') +@@ -20,7 +20,7 @@ Error: an error! + at functionA (*enclosing-call-site.js:2:3) + at Object. (*enclosing-call-site.js:24:3) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) +diff --git a/test/message/source_map_enabled_by_api.out b/test/message/source_map_enabled_by_api.out +index 525ceccec12e4bdb8a08964ade461692ee99beca..e85ecee7f14a8ba1a599aeaf1d9f5f4855c42c5d 100644 +--- a/test/message/source_map_enabled_by_api.out ++++ b/test/message/source_map_enabled_by_api.out +@@ -9,9 +9,9 @@ Error: an error! + at functionA (*enclosing-call-site.js:2:3) + at Object. (*enclosing-call-site.js:24:3) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) + *enclosing-call-site-min.js:1 + var functionA=function(){functionB()};function functionB(){functionC()}var functionC=function(){functionD()},functionD=function(){if(0 (*enclosing-call-site-min.js:1:199) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) +diff --git a/test/message/source_map_enclosing_function.out b/test/message/source_map_enclosing_function.out +index 3eb76ecbbef31cd224e27001b825bce210f4e170..1babe95e398c61cdd3a4e1fd82fe418e4fbcd238 100644 +--- a/test/message/source_map_enclosing_function.out ++++ b/test/message/source_map_enclosing_function.out +@@ -9,7 +9,7 @@ Error: an error! + at functionA (*enclosing-call-site.js:2:3) + at Object. (*enclosing-call-site.js:24:3) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) +diff --git a/test/message/source_map_reference_error_tabs.out b/test/message/source_map_reference_error_tabs.out +index bce1b5f8911d4b34d3165d7a4bc5195cbe29211d..d56ef13b20bf9ca333e8806e3905059583c1f991 100644 +--- a/test/message/source_map_reference_error_tabs.out ++++ b/test/message/source_map_reference_error_tabs.out +@@ -6,9 +6,9 @@ ReferenceError: alert is not defined + at *tabs.coffee:26:2* + at *tabs.coffee:1:14* + at Module._compile (node:internal/modules/cjs/loader:* +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:* ++ at Module._extensions..js (node:internal/modules/cjs/loader:* + at Module.load (node:internal/modules/cjs/loader:* +- at Function.Module._load (node:internal/modules/cjs/loader:* ++ at Module._load (node:internal/modules/cjs/loader:* + at Module.require (node:internal/modules/cjs/loader:* + at require (node:internal/modules/cjs/helpers:* + at Object. (*source_map_reference_error_tabs.js:* +diff --git a/test/message/source_map_throw_catch.out b/test/message/source_map_throw_catch.out +index 95bba5eee3e9dc6415ab44b7c842fc05b5d5dec2..9a98aa59e767592c04153c2a6d349710d7f28a2e 100644 +--- a/test/message/source_map_throw_catch.out ++++ b/test/message/source_map_throw_catch.out +@@ -6,9 +6,9 @@ Error: an exception + at *typescript-throw.ts:18:11* + at *typescript-throw.ts:24:1* + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) + at require (node:internal/modules/cjs/helpers:*) + at Object. (*source_map_throw_catch.js:6:3) +diff --git a/test/message/source_map_throw_first_tick.out b/test/message/source_map_throw_first_tick.out +index efa97a1d9f56ddbaf87422fa14d1f14f07a33061..1d76129d0c3506824d22be17711b1351285af937 100644 +--- a/test/message/source_map_throw_first_tick.out ++++ b/test/message/source_map_throw_first_tick.out +@@ -6,9 +6,9 @@ Error: an exception + at *typescript-throw.ts:18:11* + at *typescript-throw.ts:24:1* + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) + at require (node:internal/modules/cjs/helpers:*) + at Object. (*source_map_throw_first_tick.js:5:1) +diff --git a/test/message/source_map_throw_icu.out b/test/message/source_map_throw_icu.out +index 78482d73ddf0376de2443321c426fc6c84a1c29a..c5f699f80a9be862772ae5af8884d85bec72ebe3 100644 +--- a/test/message/source_map_throw_icu.out ++++ b/test/message/source_map_throw_icu.out +@@ -6,9 +6,9 @@ Error: an error + at *icu.jsx:3:23* + at *icu.jsx:9:5* + at Module._compile (node:internal/modules/cjs/loader:* +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:* ++ at Module._extensions..js (node:internal/modules/cjs/loader:* + at Module.load (node:internal/modules/cjs/loader:* +- at Function.Module._load (node:internal/modules/cjs/loader:* ++ at Module._load (node:internal/modules/cjs/loader:* + at Module.require (node:internal/modules/cjs/loader:* + at require (node:internal/modules/cjs/helpers:* + at Object. (*source_map_throw_icu.js:* +diff --git a/test/message/source_map_throw_set_immediate.out b/test/message/source_map_throw_set_immediate.out +index c735e23cb955c5cb733ae766bd019848764b7ff1..21349d4c4598c0abac50b2b90e3bbf9b439257f5 100644 +--- a/test/message/source_map_throw_set_immediate.out ++++ b/test/message/source_map_throw_set_immediate.out +@@ -5,4 +5,4 @@ + Error: goodbye + at Hello *uglify-throw-original.js:5:9* + at *uglify-throw-original.js:9:3* +- at processImmediate (node:internal/timers:*) ++ at process.processImmediate (node:internal/timers:*) +diff --git a/test/message/timeout_throw.out b/test/message/timeout_throw.out +index 66e495eb84d0bda0c3f6b5f085aa2061f0e1b59a..968a5e4e4117713e4bf347e56ff84001ec86bb31 100644 +--- a/test/message/timeout_throw.out ++++ b/test/message/timeout_throw.out +@@ -4,4 +4,4 @@ + ReferenceError: undefined_reference_error_maker is not defined + at Timeout._onTimeout (*test*message*timeout_throw.js:*:*) + at listOnTimeout (node:internal/timers:*:*) +- at processTimers (node:internal/timers:*:*) ++ at process.processTimers (node:internal/timers:*:*) +diff --git a/test/message/undefined_reference_in_new_context.out b/test/message/undefined_reference_in_new_context.out +index 61dee9f6d4fba3696b91333c5fbdc20cf8e819fe..b06dc02a4861bd0eae89c682db0dce426b7409f3 100644 +--- a/test/message/undefined_reference_in_new_context.out ++++ b/test/message/undefined_reference_in_new_context.out +@@ -12,5 +12,5 @@ ReferenceError: foo is not defined + at Module._compile (node:internal/modules/cjs/loader:*) + at *..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*:*) ++ at Module._load (node:internal/modules/cjs/loader:*:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) +diff --git a/test/message/vm_display_runtime_error.out b/test/message/vm_display_runtime_error.out +index 8f1e9c37967f253071ad20c5a4f2b81f7b65b8cc..d7a39915f999101d4f2bfcc5f7bc9ba77eab8f0d 100644 +--- a/test/message/vm_display_runtime_error.out ++++ b/test/message/vm_display_runtime_error.out +@@ -9,9 +9,9 @@ Error: boo! + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_display_runtime_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* + test.vm:1 +@@ -24,8 +24,8 @@ Error: spooky! + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_display_runtime_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* +diff --git a/test/message/vm_display_syntax_error.out b/test/message/vm_display_syntax_error.out +index b0b70fcd75966825e0ff1893ff984a3e20edc926..ce82fb366e0375eeea8ced2320a3662584411160 100644 +--- a/test/message/vm_display_syntax_error.out ++++ b/test/message/vm_display_syntax_error.out +@@ -8,9 +8,9 @@ SyntaxError: Unexpected number + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_display_syntax_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* + test.vm:1 +@@ -22,8 +22,8 @@ SyntaxError: Unexpected number + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_display_syntax_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* +diff --git a/test/message/vm_dont_display_runtime_error.out b/test/message/vm_dont_display_runtime_error.out +index 2ff2e8355ab90c8d9d00aaa6bf743c4f3b7d0de0..72ef73d628e10f600e5e3e90691587f2f63b1a69 100644 +--- a/test/message/vm_dont_display_runtime_error.out ++++ b/test/message/vm_dont_display_runtime_error.out +@@ -10,8 +10,8 @@ Error: boo! + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_dont_display_runtime_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* +diff --git a/test/message/vm_dont_display_syntax_error.out b/test/message/vm_dont_display_syntax_error.out +index d46dce2993f863622d2764d816adda548e568121..2ce14fe4013df2aa37c0339880294ba804c4f0c3 100644 +--- a/test/message/vm_dont_display_syntax_error.out ++++ b/test/message/vm_dont_display_syntax_error.out +@@ -10,8 +10,8 @@ SyntaxError: Unexpected number + at Object.runInThisContext (node:vm:*) + at Object. (*test*message*vm_dont_display_syntax_error.js:*) + at Module._compile (node:internal/modules/cjs/loader:*) +- at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) ++ at Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) +- at Function.Module._load (node:internal/modules/cjs/loader:*) ++ at Module._load (node:internal/modules/cjs/loader:*) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*) + at node:internal/main/run_main_module:*:* diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 3a023b20e5aff..e0f0f0f0ab2ef 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index e4ea82d914cf99a9368c94da2cc35bd3214d8c23..c4de87b38433bed1a14ce5c3a482023de909ec47 100644 +index c5f46f1b0c565fa9f55f8ead1e9ef6dab9571e95..25df04a1e1fc0a2b4ba61d33384c33d076d471fa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,7 +605,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index e4ea82d914cf99a9368c94da2cc35bd3214d8c23..c4de87b38433bed1a14ce5c3a482023d defines += [ "BUILDING_V8_SHARED" ] } -@@ -5821,7 +5821,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5823,7 +5823,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index e4ea82d914cf99a9368c94da2cc35bd3214d8c23..c4de87b38433bed1a14ce5c3a482023d deps = [ ":v8_libbase", -@@ -5859,6 +5859,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5861,6 +5861,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index df2d1239081be..f47cb07374a30 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 e5a0e9fc7655bcc2359578e299b64952d6daa8a8..f15ccd03bc500b9a0095cb8581c6ffc143b29710 100644 +index ac85fb294df295d65236a5e9143337989d2bf6e6..f7004b9aed1ea8c33695be5eda01150ed626c37b 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9080,7 +9080,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9110,7 +9110,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index e5a0e9fc7655bcc2359578e299b64952d6daa8a8..f15ccd03bc500b9a0095cb8581c6ffc1 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index f0ba31671416f1d77d3b1a5ecb76a0dd3954c8c2..0436b896522b31904512694d20f883470a646a0f 100644 +index 73263505e22956f10eaac4482d8a9ddf191edc13..083b488e0391224da0d13d7d2b80b3696619d59d 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6151,9 +6151,9 @@ void Heap::TearDown() { +@@ -6161,9 +6161,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 e54954fdfc3a9..32f89f3419eab 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,7 +12,7 @@ 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 d465e67c094b01ee128b9cecfb5ee999f4a1d8d1..f30fec3bc5c1901f96ff168da422aad1fa7ecd08 100644 +index 29f753f4944541dd8dc11b4daff900cb45be42a8..21b85f6188b7b9cea577128d0957fc463dfe74ee 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -605,6 +605,10 @@ config("internal_config") { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 2a9d03c693efa..d149375c1a9b0 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 c4de87b38433bed1a14ce5c3a482023de909ec47..d465e67c094b01ee128b9cecfb5ee999f4a1d8d1 100644 +index 25df04a1e1fc0a2b4ba61d33384c33d076d471fa..29f753f4944541dd8dc11b4daff900cb45be42a8 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5833,7 +5833,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5835,7 +5835,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { 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 563444f217760..267c4b8797500 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 f2563ef61d3f5bc2d866f8c3366ca6c9ef8357a6..ed6180e28467df90ed8d91093ae9269a24e919db 100644 +index 7c6dec2b52514085a731f78a551370d54912b5e9..2e8332b9fa6a6a3f55e78f29f710afa02c268b99 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) { diff --git a/script/sysroots.json b/script/sysroots.json index aef0ad6713c80..2f2437ade3e0a 100644 --- a/script/sysroots.json +++ b/script/sysroots.json @@ -1,38 +1,37 @@ - { - "sid_amd64": { - "Sha1Sum": "7e008cea9eae822d80d55c67fbb5ef4204678e74", - "SysrootDir": "debian_sid_amd64-sysroot", - "Tarball": "debian_sid_amd64_sysroot.tar.xz" + "bullseye_amd64": { + "Sha1Sum": "202e5738f4fad834a43ad9978efc53ff710ee979", + "SysrootDir": "debian_bullseye_amd64-sysroot", + "Tarball": "debian_bullseye_amd64_sysroot.tar.xz" }, - "sid_arm": { - "Sha1Sum": "b6f4bb07817bea91b06514a9c1e3832df5a90dbf", - "SysrootDir": "debian_sid_arm-sysroot", - "Tarball": "debian_sid_arm_sysroot.tar.xz" + "bullseye_arm": { + "Sha1Sum": "683d994e5643dff423643eac59c1f62606d14f43", + "SysrootDir": "debian_bullseye_arm-sysroot", + "Tarball": "debian_bullseye_arm_sysroot.tar.xz" }, - "sid_arm64": { - "Sha1Sum": "5a56c1ef714154ea5003bcafb16f21b0f8dde023", - "SysrootDir": "debian_sid_arm64-sysroot", - "Tarball": "debian_sid_arm64_sysroot.tar.xz" + "bullseye_arm64": { + "Sha1Sum": "de38cc85d51a820c3307e1937f3c2d3cedcce988", + "SysrootDir": "debian_bullseye_arm64-sysroot", + "Tarball": "debian_bullseye_arm64_sysroot.tar.xz" }, - "sid_armel": { - "Sha1Sum": "84dfbda5b70e4056b5ec37d8dc95b9b890b2a2b5", - "SysrootDir": "debian_sid_armel-sysroot", - "Tarball": "debian_sid_armel_sysroot.tar.xz" + "bullseye_armel": { + "Sha1Sum": "db15aab39af3cfbc55a8ff0386943db1b78a1eab", + "SysrootDir": "debian_bullseye_armel-sysroot", + "Tarball": "debian_bullseye_armel_sysroot.tar.xz" }, - "sid_i386": { - "Sha1Sum": "b0f1f65ab3bd0232e7080bd3d89a9399f5ba07bc", - "SysrootDir": "debian_sid_i386-sysroot", - "Tarball": "debian_sid_i386_sysroot.tar.xz" + "bullseye_i386": { + "Sha1Sum": "41a75c881636adb765d4e40b06058f64df501ffe", + "SysrootDir": "debian_bullseye_i386-sysroot", + "Tarball": "debian_bullseye_i386_sysroot.tar.xz" }, - "sid_mips": { - "Sha1Sum": "72d808dad16f6bc605f0380649608b04435b0727", - "SysrootDir": "debian_sid_mips-sysroot", - "Tarball": "debian_sid_mips_sysroot.tar.xz" + "bullseye_mips": { + "Sha1Sum": "6d85967e8d6771e50180c289dae57ad06fd873cd", + "SysrootDir": "debian_bullseye_mips-sysroot", + "Tarball": "debian_bullseye_mips_sysroot.tar.xz" }, - "sid_mips64el": { - "Sha1Sum": "0ae3b93990a22fed1fa6974c0cf1fa0f9ad976b9", - "SysrootDir": "debian_sid_mips64el-sysroot", - "Tarball": "debian_sid_mips64el_sysroot.tar.xz" + "bullseye_mips64el": { + "Sha1Sum": "0774922d1269947f462bda38c82c4e5e819326ab", + "SysrootDir": "debian_bullseye_mips64el-sysroot", + "Tarball": "debian_bullseye_mips64el_sysroot.tar.xz" } -} \ No newline at end of file +} diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index e3a88a28b0872..3b04c8ee2ea2a 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -881,9 +881,8 @@ void App::OnGpuInfoUpdate() { Emit("gpu-info-update"); } -void App::OnGpuProcessCrashed(base::TerminationStatus status) { - Emit("gpu-process-crashed", - status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED); +void App::OnGpuProcessCrashed() { + Emit("gpu-process-crashed", true); } void App::BrowserChildProcessLaunchedAndConnected( diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 840c0cb66da34..ebf3cf247b67c 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -153,7 +153,7 @@ class App : public ElectronBrowserClient::Delegate, // content::GpuDataManagerObserver: void OnGpuInfoUpdate() override; - void OnGpuProcessCrashed(base::TerminationStatus status) override; + void OnGpuProcessCrashed() override; // content::BrowserChildProcessObserver: void BrowserChildProcessLaunchedAndConnected( diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index bdd2eb4d19c0c..eb640eb3517c2 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -348,8 +348,6 @@ ElectronBrowserContext::GetURLLoaderFactory() { params->disable_web_security = false; auto* storage_partition = GetDefaultStoragePartition(); - params->url_loader_network_observer = - storage_partition->CreateURLLoaderNetworkObserverForNavigationRequest(-1); storage_partition->GetNetworkContext()->CreateURLLoaderFactory( std::move(factory_receiver), std::move(params)); url_loader_factory_ = diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index cab9b82abe3a9..ad3ae6229fe0f 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -253,6 +253,7 @@ blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( ElectronPermissionManager::SubscriptionId ElectronPermissionManager::SubscribePermissionStatusChange( content::PermissionType permission, + content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, base::RepeatingCallback callback) { @@ -408,4 +409,12 @@ ElectronPermissionManager::GetPermissionStatusForCurrentDocument( content::PermissionUtil::GetLastCommittedOriginAsURL(render_frame_host)); } +blink::mojom::PermissionStatus +ElectronPermissionManager::GetPermissionStatusForWorker( + content::PermissionType permission, + content::RenderProcessHost* render_process_host, + const GURL& worker_origin) { + return GetPermissionStatus(permission, worker_origin, worker_origin); +} + } // namespace electron diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index e823b3c18833b..4afce85ad80cc 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -117,8 +117,13 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForWorker( + content::PermissionType permission, + content::RenderProcessHost* render_process_host, + const GURL& worker_origin) override; SubscriptionId SubscribePermissionStatusChange( content::PermissionType permission, + content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, base::RepeatingCallback callback) diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.cc b/shell/browser/extensions/api/resources_private/resources_private_api.cc index 48cb45dc2d0ac..d0a2ebfbd694b 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -47,7 +47,6 @@ void AddStringsForPdf(base::DictionaryValue* dict) { {"pageReload", IDS_PDF_PAGE_RELOAD_BUTTON}, {"bookmarks", IDS_PDF_BOOKMARKS}, {"labelPageNumber", IDS_PDF_LABEL_PAGE_NUMBER}, - {"tooltipRotateCW", IDS_PDF_TOOLTIP_ROTATE_CW}, {"tooltipDownload", IDS_PDF_TOOLTIP_DOWNLOAD}, {"tooltipPrint", IDS_PDF_TOOLTIP_PRINT}, {"tooltipFitToPage", IDS_PDF_TOOLTIP_FIT_PAGE}, diff --git a/shell/browser/extensions/electron_component_extension_resource_manager.cc b/shell/browser/extensions/electron_component_extension_resource_manager.cc index 85ce840ee88f5..40e37cdffa7d0 100644 --- a/shell/browser/extensions/electron_component_extension_resource_manager.cc +++ b/shell/browser/extensions/electron_component_extension_resource_manager.cc @@ -39,8 +39,8 @@ ElectronComponentExtensionResourceManager:: pdf_extension_util::AddAdditionalData(true, &pdf_strings); ui::TemplateReplacements pdf_viewer_replacements; - ui::TemplateReplacementsFromDictionaryValue( - base::Value::AsDictionaryValue(pdf_strings), &pdf_viewer_replacements); + ui::TemplateReplacementsFromDictionaryValue(pdf_strings.GetDict(), + &pdf_viewer_replacements); extension_template_replacements_[extension_misc::kPdfExtensionId] = std::move(pdf_viewer_replacements); #endif diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 69d7f5e921956..efad257969a74 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -36,6 +36,7 @@ ElectronHidDelegate::~ElectronHidDelegate() = default; std::unique_ptr ElectronHidDelegate::RunChooser( content::RenderFrameHost* render_frame_host, std::vector filters, + std::vector exclusion_filters, content::HidChooser::Callback callback) { electron::HidChooserContext* chooser_context = GetChooserContext(render_frame_host); @@ -47,7 +48,7 @@ std::unique_ptr ElectronHidDelegate::RunChooser( DeleteControllerForFrame(render_frame_host); } AddControllerForFrame(render_frame_host, std::move(filters), - std::move(callback)); + std::move(exclusion_filters), std::move(callback)); // Return a nullptr because the return value isn't used for anything, eg // there is no mechanism to cancel navigator.hid.requestDevice(). The return @@ -156,12 +157,13 @@ HidChooserController* ElectronHidDelegate::ControllerForFrame( HidChooserController* ElectronHidDelegate::AddControllerForFrame( content::RenderFrameHost* render_frame_host, std::vector filters, + std::vector exclusion_filters, content::HidChooser::Callback callback) { auto* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); auto controller = std::make_unique( - render_frame_host, std::move(filters), std::move(callback), web_contents, - weak_factory_.GetWeakPtr()); + render_frame_host, std::move(filters), std::move(exclusion_filters), + std::move(callback), web_contents, weak_factory_.GetWeakPtr()); controller_map_.insert( std::make_pair(render_frame_host, std::move(controller))); return ControllerForFrame(render_frame_host); diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index 1b243c6ac15ee..0305828750035 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/shell/browser/hid/electron_hid_delegate.h @@ -31,6 +31,7 @@ class ElectronHidDelegate : public content::HidDelegate, std::unique_ptr RunChooser( content::RenderFrameHost* render_frame_host, std::vector filters, + std::vector exclusion_filters, content::HidChooser::Callback callback) override; bool CanRequestDevicePermission( content::RenderFrameHost* render_frame_host) override; @@ -67,6 +68,7 @@ class ElectronHidDelegate : public content::HidDelegate, HidChooserController* AddControllerForFrame( content::RenderFrameHost* render_frame_host, std::vector filters, + std::vector exclusion_filters, content::HidChooser::Callback callback); base::ScopedObservationdevice_ids) { + if (filter->device_ids->is_vendor()) { + if (filter->device_ids->get_vendor() != device.vendor_id) + return false; + } else if (filter->device_ids->is_vendor_and_product()) { + const auto& vendor_and_product = + filter->device_ids->get_vendor_and_product(); + if (vendor_and_product->vendor != device.vendor_id) + return false; + if (vendor_and_product->product != device.product_id) + return false; + } + } + + if (filter->usage) { + if (filter->usage->is_page()) { + const uint16_t usage_page = filter->usage->get_page(); + auto find_it = + std::find_if(device.collections.begin(), device.collections.end(), + [=](const device::mojom::HidCollectionInfoPtr& c) { + return usage_page == c->usage->usage_page; + }); + if (find_it == device.collections.end()) + return false; + } else if (filter->usage->is_usage_and_page()) { + const auto& usage_and_page = filter->usage->get_usage_and_page(); + auto find_it = std::find_if( + device.collections.begin(), device.collections.end(), + [&usage_and_page](const device::mojom::HidCollectionInfoPtr& c) { + return usage_and_page->usage_page == c->usage->usage_page && + usage_and_page->usage == c->usage->usage; + }); + if (find_it == device.collections.end()) + return false; + } + } + return true; +} + } // namespace namespace gin { @@ -62,11 +103,13 @@ namespace electron { HidChooserController::HidChooserController( content::RenderFrameHost* render_frame_host, std::vector filters, + std::vector exclusion_filters, content::HidChooser::Callback callback, content::WebContents* web_contents, base::WeakPtr hid_delegate) : WebContentsObserver(web_contents), filters_(std::move(filters)), + exclusion_filters_(std::move(exclusion_filters)), callback_(std::move(callback)), origin_(content::WebContents::FromRenderFrameHost(render_frame_host) ->GetMainFrame() @@ -251,7 +294,7 @@ bool HidChooserController::DisplayDevice( return false; } - return FilterMatchesAny(device); + return FilterMatchesAny(device) && !IsExcluded(device); } bool HidChooserController::FilterMatchesAny( @@ -260,44 +303,18 @@ bool HidChooserController::FilterMatchesAny( return true; for (const auto& filter : filters_) { - if (filter->device_ids) { - if (filter->device_ids->is_vendor()) { - if (filter->device_ids->get_vendor() != device.vendor_id) - continue; - } else if (filter->device_ids->is_vendor_and_product()) { - const auto& vendor_and_product = - filter->device_ids->get_vendor_and_product(); - if (vendor_and_product->vendor != device.vendor_id) - continue; - if (vendor_and_product->product != device.product_id) - continue; - } - } + if (FilterMatch(filter, device)) + return true; + } - if (filter->usage) { - if (filter->usage->is_page()) { - const uint16_t usage_page = filter->usage->get_page(); - auto find_it = - std::find_if(device.collections.begin(), device.collections.end(), - [=](const device::mojom::HidCollectionInfoPtr& c) { - return usage_page == c->usage->usage_page; - }); - if (find_it == device.collections.end()) - continue; - } else if (filter->usage->is_usage_and_page()) { - const auto& usage_and_page = filter->usage->get_usage_and_page(); - auto find_it = std::find_if( - device.collections.begin(), device.collections.end(), - [&usage_and_page](const device::mojom::HidCollectionInfoPtr& c) { - return usage_and_page->usage_page == c->usage->usage_page && - usage_and_page->usage == c->usage->usage; - }); - if (find_it == device.collections.end()) - continue; - } - } + return false; +} - return true; +bool HidChooserController::IsExcluded( + const device::mojom::HidDeviceInfo& device) const { + for (const auto& exclusion_filter : exclusion_filters_) { + if (FilterMatch(exclusion_filter, device)) + return true; } return false; diff --git a/shell/browser/hid/hid_chooser_controller.h b/shell/browser/hid/hid_chooser_controller.h index ed5ef443a154d..dde678ff981fb 100644 --- a/shell/browser/hid/hid_chooser_controller.h +++ b/shell/browser/hid/hid_chooser_controller.h @@ -42,11 +42,13 @@ class HidChooserController // is closed, either by selecting an item or by dismissing the chooser dialog. // The callback is called with the selected device, or nullptr if no device is // selected. - HidChooserController(content::RenderFrameHost* render_frame_host, - std::vector filters, - content::HidChooser::Callback callback, - content::WebContents* web_contents, - base::WeakPtr hid_delegate); + HidChooserController( + content::RenderFrameHost* render_frame_host, + std::vector filters, + std::vector exclusion_filters, + content::HidChooser::Callback callback, + content::WebContents* web_contents, + base::WeakPtr hid_delegate); HidChooserController(HidChooserController&) = delete; HidChooserController& operator=(HidChooserController&) = delete; ~HidChooserController() override; @@ -68,6 +70,7 @@ class HidChooserController void OnGotDevices(std::vector devices); bool DisplayDevice(const device::mojom::HidDeviceInfo& device) const; bool FilterMatchesAny(const device::mojom::HidDeviceInfo& device) const; + bool IsExcluded(const device::mojom::HidDeviceInfo& device) const; // Add |device_info| to |device_map_|. The device is added to the chooser item // representing the physical device. If the chooser item does not yet exist, a @@ -88,6 +91,7 @@ class HidChooserController void OnDeviceChosen(gin::Arguments* args); std::vector filters_; + std::vector exclusion_filters_; content::HidChooser::Callback callback_; const url::Origin origin_; const int frame_tree_node_id_; diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc index 045e7d9dcff9e..17b85784c0de8 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc @@ -148,7 +148,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints( if (showing_frame) { insets = view->GetBorderDecorationInsets(); if (base::i18n::IsRTL()) { - insets.Set(insets.top(), insets.right(), insets.bottom(), insets.left()); + insets.set_left_right(insets.right(), insets.left()); } input_insets = view->GetInputInsets(); diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index fbe475d5b7e9d..ce651f28becf6 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -174,7 +174,7 @@ void AutofillPopupView::DrawAutofillEntry(gfx::Canvas* canvas, const int text_align = is_rtl ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT; gfx::Rect value_rect = entry_rect; - value_rect.Inset(kEndPadding, 0); + value_rect.Inset(gfx::Insets::VH(kEndPadding, 0)); int x_align_left = value_rect.x(); const int value_width = gfx::GetStringWidth( diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index b0d7210ff5db7..4455ddb3727a6 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -178,7 +178,8 @@ gfx::Rect ClientFrameViewLinux::GetBoundsForClientView() const { gfx::Rect client_bounds = bounds(); if (!frame_->IsFullscreen()) { client_bounds.Inset(GetBorderDecorationInsets()); - client_bounds.Inset(0, GetTitlebarBounds().height(), 0, 0); + client_bounds.Inset( + gfx::Insets::TLBR(0, GetTitlebarBounds().height(), 0, 0)); } return client_bounds; } diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index a3a52244ff206..46280ee4b1583 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -50,7 +50,7 @@ void WinCaptionButton::OnPaintBackground(gfx::Canvas* canvas) { const SkAlpha theme_alpha = SkColorGetA(bg_color); gfx::Rect bounds = GetContentsBounds(); - bounds.Inset(0, 0, 0, 0); + bounds.Inset(gfx::Insets::TLBR(0, 0, 0, 0)); canvas->FillRect(bounds, SkColorSetA(bg_color, theme_alpha)); @@ -145,7 +145,7 @@ void DrawRect(gfx::Canvas* canvas, const cc::PaintFlags& flags) { gfx::RectF rect_f(rect); float stroke_half_width = flags.getStrokeWidth() / 2; - rect_f.Inset(stroke_half_width, stroke_half_width); + rect_f.Inset(gfx::InsetsF::VH(stroke_half_width, stroke_half_width)); canvas->DrawRect(rect_f, flags); } @@ -197,7 +197,7 @@ void WinCaptionButton::PaintSymbol(gfx::Canvas* canvas) { case VIEW_ID_RESTORE_BUTTON: { // Bottom left ("in front") square. const int separation = std::floor(2 * scale); - symbol_rect.Inset(0, separation, separation, 0); + symbol_rect.Inset(gfx::Insets::TLBR(0, separation, separation, 0)); DrawRect(canvas, symbol_rect, flags); // Top right ("behind") square. diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index bf67ab5d82033..b5d56fa751481 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -132,7 +132,7 @@ int WinFrameView::NonClientHitTest(const gfx::Point& point) { // show the resize cursor when resizing is possible. The cost of which // is also maybe showing it over the portion of the DIP that isn't the // outermost pixel. - buttons.Inset(0, kCaptionButtonTopInset, 0, 0); + buttons.Inset(gfx::Insets::TLBR(0, kCaptionButtonTopInset, 0, 0)); if (buttons.Contains(point)) return HTNOWHERE; } @@ -143,8 +143,8 @@ int WinFrameView::NonClientHitTest(const gfx::Point& point) { // pixels at the end of the top and bottom edges trigger diagonal resizing. constexpr int kResizeCornerWidth = 16; int window_component = GetHTComponentForFrame( - point, gfx::Insets(top_border_thickness, 0, 0, 0), top_border_thickness, - kResizeCornerWidth - FrameBorderThickness(), + point, gfx::Insets::TLBR(top_border_thickness, 0, 0, 0), + top_border_thickness, kResizeCornerWidth - FrameBorderThickness(), frame()->widget_delegate()->CanResize()); if (window_component != HTNOWHERE) return window_component; 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 2e4e5bc9502e4..696798d9111aa 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 @@ -93,7 +93,7 @@ bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets( // monitors with different DPIs before changing this code. const int thickness = ::GetSystemMetrics(SM_CXSIZEFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER); - insets->Set(thickness, thickness, thickness, thickness); + *insets = gfx::Insets::TLBR(thickness, thickness, thickness, thickness); return true; } return false; diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 31d7bb7599625..ca93d5e0954bd 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -1995,4 +1995,44 @@ describe('navigator.hid', () => { expect(device).to.equal(''); } }); + + it('returns excludes a device when a exclusionFilter is specified', async () => { + const exclusionFilters = []; + let haveDevices = false; + let checkForExcludedDevice = false; + + w.webContents.session.on('select-hid-device', (event, details, callback) => { + if (details.deviceList.length > 0) { + details.deviceList.find((device) => { + if (device.name && device.name !== '' && device.serialNumber && device.serialNumber !== '') { + console.log('device is: ', device); + if (checkForExcludedDevice) { + const compareDevice = { + vendorId: device.vendorId, + productId: device.productId + }; + expect(compareDevice).to.not.equal(exclusionFilters[0], 'excluded device should not be returned'); + } else { + haveDevices = true; + exclusionFilters.push({ + vendorId: device.vendorId, + productId: device.productId + }); + return true; + } + } + }); + } + callback(); + }); + + await getDevices(); + if (haveDevices) { + // We have devices to exclude, so check if exculsionFilters work + checkForExcludedDevice = true; + await w.webContents.executeJavaScript(` + navigator.hid.requestDevice({filters: [], exclusionFilters: ${JSON.stringify(exclusionFilters)}}).then(device => device.toString()).catch(err => err.toString()); + `, true); + } + }); }); diff --git a/spec-main/fixtures/crash-cases/quit-on-crashed-event/index.js b/spec-main/fixtures/crash-cases/quit-on-crashed-event/index.js index a095bf69f490c..87ec0d6ada4f4 100644 --- a/spec-main/fixtures/crash-cases/quit-on-crashed-event/index.js +++ b/spec-main/fixtures/crash-cases/quit-on-crashed-event/index.js @@ -15,5 +15,6 @@ app.once('ready', async () => { process.exit(details.exitCode); } }); - await w.webContents.loadURL('chrome://checkcrash'); + await w.webContents.loadURL('about:blank'); + w.webContents.executeJavaScript('process.crash()'); }); diff --git a/spec/static/main.js b/spec/static/main.js index 675c90fb42a9f..d52fa1953a8c4 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -86,8 +86,14 @@ app.on('window-all-closed', function () { app.quit(); }); -app.on('gpu-process-crashed', (event, killed) => { - console.log(`GPU process crashed (killed=${killed})`); +app.on('child-process-gone', (event, details) => { + if (details.type === 'GPU' && details.reason !== 'clean-exit') { + if (details.reason === 'crashed') { + console.log('GPU process crashed'); + } else { + console.log(`GPU process exited with code ${details.exitCode}`); + } + } }); app.on('renderer-process-crashed', (event, contents, killed) => { From c0d442364aaaf3e6ad4d1b93a9fce32f23675f43 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 12 Apr 2022 04:21:55 -0700 Subject: [PATCH 257/811] build: explicitly run scripts with python3 (#33720) * build: explicitly run scripts with python3 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- build/js2c.py | 2 +- build/npm-run.py | 2 +- build/strip_framework.py | 2 +- build/zip.py | 2 +- build/zip_libcxx.py | 2 +- patches/node/build_add_gn_build_files.patch | 8 ++++---- patches/squirrel.mac/build_add_gn_config.patch | 4 ++-- script/add-debug-link.py | 2 +- script/apply_all_patches.py | 2 +- script/check-relative-doc-links.py | 2 +- script/copy-debug-symbols.py | 2 +- script/dbus_mock.py | 2 +- script/export_all_patches.py | 2 +- script/generate-config-gypi.py | 2 +- script/generate-zip-manifest.py | 2 +- script/git-export-patches | 2 +- script/git-import-patches | 2 +- script/lib/config.py | 2 +- script/lib/git.py | 2 +- script/lib/patches.py | 2 +- script/lib/util.py | 2 +- script/native-tests.py | 2 +- script/patches-mtime-cache.py | 2 +- script/release/uploaders/upload-index-json.py | 2 +- script/release/uploaders/upload-node-checksums.py | 2 +- script/release/uploaders/upload-node-headers.py | 2 +- script/release/uploaders/upload-symbols.py | 2 +- script/release/uploaders/upload.py | 2 +- script/run-clang-format.py | 2 +- script/strip-binaries.py | 2 +- script/verify-chromedriver.py | 2 +- script/verify-ffmpeg.py | 2 +- script/verify-mksnapshot.py | 2 +- script/zip-symbols.py | 2 +- script/zip_manifests/check-zip-manifest.py | 2 +- 35 files changed, 39 insertions(+), 39 deletions(-) diff --git a/build/js2c.py b/build/js2c.py index 0f7178baf0e08..7024e7391d5bf 100755 --- a/build/js2c.py +++ b/build/js2c.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import subprocess diff --git a/build/npm-run.py b/build/npm-run.py index bd0c9097bf113..49a6abac65d07 100644 --- a/build/npm-run.py +++ b/build/npm-run.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os import subprocess diff --git a/build/strip_framework.py b/build/strip_framework.py index 1ba173dfc1c18..73cf424dde488 100755 --- a/build/strip_framework.py +++ b/build/strip_framework.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import subprocess import sys diff --git a/build/zip.py b/build/zip.py index 19fe514cd9d30..bfaf27c08b24b 100644 --- a/build/zip.py +++ b/build/zip.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os import subprocess diff --git a/build/zip_libcxx.py b/build/zip_libcxx.py index 5eec83d2261b9..daa94fc8fb8a5 100644 --- a/build/zip_libcxx.py +++ b/build/zip_libcxx.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os import subprocess diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index fbf050490c493..de7fc0acfc4d5 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1811,11 +1811,11 @@ index 41081f82714169f3bf388c3a8c2d9aa78e21a3f4..48c0d2655789a0528dfea0a60f756aac // which the Node binary being built supports. diff --git a/tools/generate_gn_filenames_json.py b/tools/generate_gn_filenames_json.py new file mode 100755 -index 0000000000000000000000000000000000000000..8f884a41f57630ac432eb85ebfc9b8bc82cddaca +index 0000000000000000000000000000000000000000..87621ba1d7f1c80aadb81461824b0c2edab1de22 --- /dev/null +++ b/tools/generate_gn_filenames_json.py @@ -0,0 +1,75 @@ -+#!/usr/bin/env python ++#!/usr/bin/env python3 +import json +import os +import sys @@ -1892,11 +1892,11 @@ index 0000000000000000000000000000000000000000..8f884a41f57630ac432eb85ebfc9b8bc + f.write('\n') diff --git a/tools/generate_node_version_header.py b/tools/generate_node_version_header.py new file mode 100755 -index 0000000000000000000000000000000000000000..3088ae4bdf814ae255c9805ebd393b2eee17e941 +index 0000000000000000000000000000000000000000..2a92eccfa582df361f2a889c0d9b32c1059baa7d --- /dev/null +++ b/tools/generate_node_version_header.py @@ -0,0 +1,25 @@ -+#!/usr/bin/env python ++#!/usr/bin/env python3 +import re +import sys + diff --git a/patches/squirrel.mac/build_add_gn_config.patch b/patches/squirrel.mac/build_add_gn_config.patch index 1df38e3aaa3fa..4f6e3a0db339a 100644 --- a/patches/squirrel.mac/build_add_gn_config.patch +++ b/patches/squirrel.mac/build_add_gn_config.patch @@ -511,11 +511,11 @@ index 0000000000000000000000000000000000000000..bdfaf95f3eca65b3e0831db1b66f651d +} diff --git a/build/xcrun.py b/build/xcrun.py new file mode 100644 -index 0000000000000000000000000000000000000000..18ac587f80441106405d00fafd9ee1f25b147772 +index 0000000000000000000000000000000000000000..a7aeeb7d3e187bd91ef12ed860d1e37eaea31fc1 --- /dev/null +++ b/build/xcrun.py @@ -0,0 +1,14 @@ -+#!/usr/bin/env python ++#!/usr/bin/env python3 +from __future__ import print_function +import os +import subprocess diff --git a/script/add-debug-link.py b/script/add-debug-link.py index 201d726d8240e..167c9e2d93545 100755 --- a/script/add-debug-link.py +++ b/script/add-debug-link.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse import os diff --git a/script/apply_all_patches.py b/script/apply_all_patches.py index d3e21bd2e86fd..c2e83bea7798a 100755 --- a/script/apply_all_patches.py +++ b/script/apply_all_patches.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import json diff --git a/script/check-relative-doc-links.py b/script/check-relative-doc-links.py index 7779a1c24eeda..f297253b6dd0e 100755 --- a/script/check-relative-doc-links.py +++ b/script/check-relative-doc-links.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os diff --git a/script/copy-debug-symbols.py b/script/copy-debug-symbols.py index 159387fadb60e..0ceff1a0e2e3f 100755 --- a/script/copy-debug-symbols.py +++ b/script/copy-debug-symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse import os diff --git a/script/dbus_mock.py b/script/dbus_mock.py index f7246452a8b54..c3b4932a74bf3 100644 --- a/script/dbus_mock.py +++ b/script/dbus_mock.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import subprocess diff --git a/script/export_all_patches.py b/script/export_all_patches.py index f62c3b102830c..49d56d856be53 100644 --- a/script/export_all_patches.py +++ b/script/export_all_patches.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import json diff --git a/script/generate-config-gypi.py b/script/generate-config-gypi.py index fee183951d87f..b7885da41c87b 100755 --- a/script/generate-config-gypi.py +++ b/script/generate-config-gypi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import ast diff --git a/script/generate-zip-manifest.py b/script/generate-zip-manifest.py index c82e239d3d983..c7b6558f012f9 100755 --- a/script/generate-zip-manifest.py +++ b/script/generate-zip-manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import zipfile import sys diff --git a/script/git-export-patches b/script/git-export-patches index bb76b29513b53..b8d9943be4617 100755 --- a/script/git-export-patches +++ b/script/git-export-patches @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import sys diff --git a/script/git-import-patches b/script/git-import-patches index 053682f982d33..d1bdb4ef1b126 100755 --- a/script/git-import-patches +++ b/script/git-import-patches @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import sys diff --git a/script/lib/config.py b/script/lib/config.py index 43f076f735bdf..b523475cf81e0 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os diff --git a/script/lib/git.py b/script/lib/git.py index 3ea4808f8af37..aa3adb16158c1 100644 --- a/script/lib/git.py +++ b/script/lib/git.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Git helper functions. diff --git a/script/lib/patches.py b/script/lib/patches.py index 8910dd4126685..99fd12df5e40a 100644 --- a/script/lib/patches.py +++ b/script/lib/patches.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import codecs import os diff --git a/script/lib/util.py b/script/lib/util.py index c7f448331a7cd..2dc6c45777e0d 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import contextlib diff --git a/script/native-tests.py b/script/native-tests.py index f6dea2a8d216b..7a577bc75f434 100755 --- a/script/native-tests.py +++ b/script/native-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/script/patches-mtime-cache.py b/script/patches-mtime-cache.py index 800d3b03cbb83..b173b0bc7fcf9 100644 --- a/script/patches-mtime-cache.py +++ b/script/patches-mtime-cache.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index 41880d5667dae..2b09e55b88133 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import json diff --git a/script/release/uploaders/upload-node-checksums.py b/script/release/uploaders/upload-node-checksums.py index dfa8ef3595ad7..7df8bc1468c8f 100755 --- a/script/release/uploaders/upload-node-checksums.py +++ b/script/release/uploaders/upload-node-checksums.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import hashlib diff --git a/script/release/uploaders/upload-node-headers.py b/script/release/uploaders/upload-node-headers.py index 862eea96e8b02..77b72ae1d61a2 100755 --- a/script/release/uploaders/upload-node-headers.py +++ b/script/release/uploaders/upload-node-headers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import glob diff --git a/script/release/uploaders/upload-symbols.py b/script/release/uploaders/upload-symbols.py index 3e877e64772db..402cb4b2d31c1 100755 --- a/script/release/uploaders/upload-symbols.py +++ b/script/release/uploaders/upload-symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import glob import os diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index f255ad50acb0d..25078bbcc6302 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse diff --git a/script/run-clang-format.py b/script/run-clang-format.py index a8d43e08ba83b..4d2e4b0641c0c 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A wrapper script around clang-format, suitable for linting multiple files and to use for continuous integration. This is an alternative API for the clang-format command line. diff --git a/script/strip-binaries.py b/script/strip-binaries.py index 73fbc7ffad0c5..625218c5b6810 100755 --- a/script/strip-binaries.py +++ b/script/strip-binaries.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse import os diff --git a/script/verify-chromedriver.py b/script/verify-chromedriver.py index b754641dda65e..5244bb5c57b73 100644 --- a/script/verify-chromedriver.py +++ b/script/verify-chromedriver.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/script/verify-ffmpeg.py b/script/verify-ffmpeg.py index ee7de30fbc1b4..0ee4ffe3093f4 100755 --- a/script/verify-ffmpeg.py +++ b/script/verify-ffmpeg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse import os diff --git a/script/verify-mksnapshot.py b/script/verify-mksnapshot.py index 8e9d632c8e68a..47d0a4fa32842 100755 --- a/script/verify-mksnapshot.py +++ b/script/verify-mksnapshot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse import glob diff --git a/script/zip-symbols.py b/script/zip-symbols.py index 23521e823053f..c87c8a1e6b788 100755 --- a/script/zip-symbols.py +++ b/script/zip-symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse diff --git a/script/zip_manifests/check-zip-manifest.py b/script/zip_manifests/check-zip-manifest.py index 39a6e94e16989..4f5594b2c98f3 100755 --- a/script/zip_manifests/check-zip-manifest.py +++ b/script/zip_manifests/check-zip-manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import zipfile import sys From 1c53fc43311f4056bfad0b90c43690d9d757b6ef Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 06:00:49 -0700 Subject: [PATCH 258/811] Bump v20.0.0-nightly.20220412 --- 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 dba45c6149e4d..7b0cc745e7233 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220412 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..2fcbb9042d5cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220412", "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 c61fbb8edac8a..4bf9083adcf9f 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220412 + PRODUCTVERSION 20,0,0,20220412 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0287c3f51167853dd4405ad1c8ee8136e109a069 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 07:52:41 -0700 Subject: [PATCH 259/811] Revert "Bump v20.0.0-nightly.20220412" This reverts commit 1c53fc43311f4056bfad0b90c43690d9d757b6ef. --- 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 7b0cc745e7233..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220412 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 2fcbb9042d5cc..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220412", + "version": "20.0.0-nightly.20220411", "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 4bf9083adcf9f..c61fbb8edac8a 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 20,0,0,20220412 - PRODUCTVERSION 20,0,0,20220412 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 56ab3d73c6f9b2716281b53de3dfcbbbcc1f2188 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 08:05:06 -0700 Subject: [PATCH 260/811] Bump v20.0.0-nightly.20220412 --- 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 dba45c6149e4d..7b0cc745e7233 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220412 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..2fcbb9042d5cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220412", "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 c61fbb8edac8a..4bf9083adcf9f 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220412 + PRODUCTVERSION 20,0,0,20220412 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 48edb2c7070a1e28787c6b72a304d40971ab390a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 12:06:19 -0700 Subject: [PATCH 261/811] Revert "Bump v20.0.0-nightly.20220412" This reverts commit 56ab3d73c6f9b2716281b53de3dfcbbbcc1f2188. --- 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 7b0cc745e7233..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220412 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 2fcbb9042d5cc..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220412", + "version": "20.0.0-nightly.20220411", "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 4bf9083adcf9f..c61fbb8edac8a 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 20,0,0,20220412 - PRODUCTVERSION 20,0,0,20220412 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3057ff01201cd552ab8f7052bd2810f1bf4b4e3c Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 12 Apr 2022 21:47:15 +0200 Subject: [PATCH 262/811] docs: note safeStorage.isEncryptionAvailable() needs ready event (#33724) --- docs/api/safe-storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/safe-storage.md b/docs/api/safe-storage.md index d0a76ec87a996..e96c18bbf0795 100644 --- a/docs/api/safe-storage.md +++ b/docs/api/safe-storage.md @@ -20,7 +20,7 @@ Returns `boolean` - Whether encryption is available. On Linux, returns true if the secret key is available. On MacOS, returns true if Keychain is available. -On Windows, returns true with no other preconditions. +On Windows, returns true once the app has emitted the `ready` event. ### `safeStorage.encryptString(plainText)` From 2ca46058cd3f532d49ea3b031ebc78a87e3232ad Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 12 Apr 2022 14:07:40 -0700 Subject: [PATCH 263/811] build: migrate urllib to python3 (#33737) --- script/release/uploaders/upload-index-json.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index 2b09e55b88133..a96ffbc556a5c 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -4,7 +4,7 @@ import json import os import sys -import urllib2 +from urllib.request import Request, urlopen sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) @@ -28,12 +28,12 @@ def is_json(myjson): def get_content(retry_count = 5): try: - request = urllib2.Request( + request = Request( BASE_URL + version, headers={"Authorization" : authToken} ) - proposed_content = urllib2.urlopen( + proposed_content = urlopen( request ).read() From c5b93eaf179eb5e44091788c72ac517c96a2329d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 14:10:26 -0700 Subject: [PATCH 264/811] Bump v20.0.0-nightly.20220412 --- 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 dba45c6149e4d..7b0cc745e7233 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220412 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..2fcbb9042d5cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220412", "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 c61fbb8edac8a..4bf9083adcf9f 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220412 + PRODUCTVERSION 20,0,0,20220412 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b8c0ef97136799f1980da59a4a891143748f472e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:13:49 -0700 Subject: [PATCH 265/811] Revert "Bump v20.0.0-nightly.20220412" This reverts commit c5b93eaf179eb5e44091788c72ac517c96a2329d. --- 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 7b0cc745e7233..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220412 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 2fcbb9042d5cc..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220412", + "version": "20.0.0-nightly.20220411", "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 4bf9083adcf9f..c61fbb8edac8a 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 20,0,0,20220412 - PRODUCTVERSION 20,0,0,20220412 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7038d2d418569232fe197ff06a380d6d3076d808 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:14:58 -0700 Subject: [PATCH 266/811] Bump v20.0.0-nightly.20220412 --- 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 dba45c6149e4d..7b0cc745e7233 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220412 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..2fcbb9042d5cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220412", "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 c61fbb8edac8a..4bf9083adcf9f 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220412 + PRODUCTVERSION 20,0,0,20220412 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d804cd5de2312300f28d1bf649114cde14d76e3a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 12 Apr 2022 16:23:07 -0700 Subject: [PATCH 267/811] build: add comment for enable_cet_shadow_stack (#33747) --- build/args/all.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/args/all.gn b/build/args/all.gn index 1e31472914a6d..b0e8dda791c52 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -34,4 +34,7 @@ is_cfi = false # Make application name configurable at runtime for cookie crypto allow_runtime_configurable_key_storage = true +# CET shadow stack is incompatible with v8, until v8 is CET compliant +# enabling this flag causes main process crashes where CET is enabled +# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=357 enable_cet_shadow_stack = false From bfa5b2104494f4f1f1ea78e697ad85ae4ba74654 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 12 Apr 2022 21:00:03 -0700 Subject: [PATCH 268/811] docs: note reason for is_cfi = false (#33749) --- build/args/all.gn | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/args/all.gn b/build/args/all.gn index b0e8dda791c52..b0400b0951ee8 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -29,8 +29,6 @@ dawn_enable_vulkan_validation_layers = false # See https://chromium-review.googlesource.com/c/chromium/src/+/2774898. enable_pseudolocales = false -is_cfi = false - # Make application name configurable at runtime for cookie crypto allow_runtime_configurable_key_storage = true @@ -38,3 +36,9 @@ allow_runtime_configurable_key_storage = true # enabling this flag causes main process crashes where CET is enabled # Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=357 enable_cet_shadow_stack = false + +# For similar reasons, disable CFI, which is not well supported in V8. +# Chromium doesn't have any problems with this because they do not run +# V8 in the browser process. +# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281 +is_cfi = false From a9c52926c066b8c61a5e85c663c8d417c0ee3d7f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 21:25:04 -0700 Subject: [PATCH 269/811] Revert "Bump v20.0.0-nightly.20220412" This reverts commit 7038d2d418569232fe197ff06a380d6d3076d808. --- 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 7b0cc745e7233..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220412 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 2fcbb9042d5cc..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220412", + "version": "20.0.0-nightly.20220411", "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 4bf9083adcf9f..c61fbb8edac8a 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 20,0,0,20220412 - PRODUCTVERSION 20,0,0,20220412 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From de2f48b40ff32cf22ba2272bb2fa435e3c059b58 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 21:26:21 -0700 Subject: [PATCH 270/811] Bump v20.0.0-nightly.20220412 --- 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 dba45c6149e4d..7b0cc745e7233 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220412 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..2fcbb9042d5cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220412", "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 c61fbb8edac8a..4bf9083adcf9f 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220412 + PRODUCTVERSION 20,0,0,20220412 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4c4e02318fc651cd0a96ff79b8d146f02701a6b2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 23:49:32 -0700 Subject: [PATCH 271/811] Revert "Bump v20.0.0-nightly.20220412" This reverts commit de2f48b40ff32cf22ba2272bb2fa435e3c059b58. --- 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 7b0cc745e7233..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220412 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index 2fcbb9042d5cc..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220412", + "version": "20.0.0-nightly.20220411", "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 4bf9083adcf9f..c61fbb8edac8a 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 20,0,0,20220412 - PRODUCTVERSION 20,0,0,20220412 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 341b7bdf4ab7dd1a10471f57bf6f558985ff4cc0 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Apr 2022 10:46:05 +0200 Subject: [PATCH 272/811] fix: #ARGB to #RGBA conversion (#33707) * fix: argb to rgba conversion * chore: remove logging import * refactor: color_str -> converted_color_str --- shell/common/color_util.cc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/shell/common/color_util.cc b/shell/common/color_util.cc index afa4c7f7a40bc..73bbc162cca97 100644 --- a/shell/common/color_util.cc +++ b/shell/common/color_util.cc @@ -16,7 +16,7 @@ namespace { -bool IsHexFormat(const std::string& str) { +bool IsHexFormatWithAlpha(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) @@ -35,20 +35,17 @@ namespace electron { 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]); - } + std::string converted_color_str; + if (IsHexFormatWithAlpha(color_string)) { + std::string temp = color_string; + int len = color_string.length() == 5 ? 1 : 2; + converted_color_str = temp.erase(1, len) + color_string.substr(1, len); + } else { + converted_color_str = color_string; } SkColor color; - if (!content::ParseCssColorString(color_str, &color)) + if (!content::ParseCssColorString(converted_color_str, &color)) color = SK_ColorWHITE; return color; From bfbba9dad6b9a0c4ae25dfab65cc9ecfcea86745 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Apr 2022 19:55:57 +0200 Subject: [PATCH 273/811] chore: add missing GN dep (#33758) --- chromium_src/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 006e7373f2a68..fc0f33ed2e17a 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -360,6 +360,7 @@ source_set("plugins") { "//ppapi/shared_impl", "//services/device/public/mojom", "//skia", + "//storage/browser", ] } From b66667b84350d25119d934cc7b683e3b88464908 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Apr 2022 22:02:33 +0200 Subject: [PATCH 274/811] feat: allow `null` when subscribing notification (#33641) * feat: allow null when subscribing notification * docs: document null event --- docs/api/system-preferences.md | 12 +++++-- .../api/electron_api_system_preferences.h | 8 ++--- .../electron_api_system_preferences_mac.mm | 29 +++++++++++----- spec-main/api-system-preferences-spec.ts | 33 +++++++++++++++++++ 4 files changed, 67 insertions(+), 15 deletions(-) diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index 154e5750f093d..6c0a6a388fb46 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -84,7 +84,7 @@ that contains the user information dictionary sent along with the notification. ### `systemPreferences.subscribeNotification(event, callback)` _macOS_ -* `event` string +* `event` string | null * `callback` Function * `event` string * `userInfo` Record @@ -109,9 +109,11 @@ example values of `event` are: * `AppleColorPreferencesChangedNotification` * `AppleShowScrollBarsSettingChanged` +If `event` is null, the `NSDistributedNotificationCenter` doesn’t use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information. + ### `systemPreferences.subscribeLocalNotification(event, callback)` _macOS_ -* `event` string +* `event` string | null * `callback` Function * `event` string * `userInfo` Record @@ -122,9 +124,11 @@ Returns `number` - The ID of this subscription Same as `subscribeNotification`, but uses `NSNotificationCenter` for local defaults. This is necessary for events such as `NSUserDefaultsDidChangeNotification`. +If `event` is null, the `NSNotificationCenter` doesn’t use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information. + ### `systemPreferences.subscribeWorkspaceNotification(event, callback)` _macOS_ -* `event` string +* `event` string | null * `callback` Function * `event` string * `userInfo` Record @@ -135,6 +139,8 @@ Returns `number` - The ID of this subscription Same as `subscribeNotification`, but uses `NSWorkspace.sharedWorkspace.notificationCenter`. This is necessary for events such as `NSWorkspaceDidActivateApplicationNotification`. +If `event` is null, the `NSWorkspaceNotificationCenter` doesn’t use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information. + ### `systemPreferences.unsubscribeNotification(id)` _macOS_ * `id` Integer diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index 592df523a3fea..d35dd5b947bea 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -76,17 +76,17 @@ class SystemPreferences void PostNotification(const std::string& name, base::DictionaryValue user_info, gin::Arguments* args); - int SubscribeNotification(const std::string& name, + int SubscribeNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeNotification(int id); void PostLocalNotification(const std::string& name, base::DictionaryValue user_info); - int SubscribeLocalNotification(const std::string& name, + int SubscribeLocalNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeLocalNotification(int request_id); void PostWorkspaceNotification(const std::string& name, base::DictionaryValue user_info); - int SubscribeWorkspaceNotification(const std::string& name, + int SubscribeWorkspaceNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeWorkspaceNotification(int request_id); v8::Local GetUserDefault(v8::Isolate* isolate, @@ -130,7 +130,7 @@ class SystemPreferences ~SystemPreferences() override; #if BUILDFLAG(IS_MAC) - int DoSubscribeNotification(const std::string& name, + int DoSubscribeNotification(v8::Local maybe_name, const NotificationCallback& callback, NotificationCenterKind kind); void DoUnsubscribeNotification(int request_id, NotificationCenterKind kind); diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index 56fd1d396921c..70006a88dd157 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -154,10 +154,11 @@ AVMediaType ParseMediaType(const std::string& media_type) { } int SystemPreferences::SubscribeNotification( - const std::string& name, + v8::Local maybe_name, const NotificationCallback& callback) { return DoSubscribeNotification( - name, callback, NotificationCenterKind::kNSDistributedNotificationCenter); + maybe_name, callback, + NotificationCenterKind::kNSDistributedNotificationCenter); } void SystemPreferences::UnsubscribeNotification(int request_id) { @@ -174,9 +175,9 @@ AVMediaType ParseMediaType(const std::string& media_type) { } int SystemPreferences::SubscribeLocalNotification( - const std::string& name, + v8::Local maybe_name, const NotificationCallback& callback) { - return DoSubscribeNotification(name, callback, + return DoSubscribeNotification(maybe_name, callback, NotificationCenterKind::kNSNotificationCenter); } @@ -196,10 +197,11 @@ AVMediaType ParseMediaType(const std::string& media_type) { } int SystemPreferences::SubscribeWorkspaceNotification( - const std::string& name, + v8::Local maybe_name, const NotificationCallback& callback) { return DoSubscribeNotification( - name, callback, NotificationCenterKind::kNSWorkspaceNotificationCenter); + maybe_name, callback, + NotificationCenterKind::kNSWorkspaceNotificationCenter); } void SystemPreferences::UnsubscribeWorkspaceNotification(int request_id) { @@ -208,14 +210,25 @@ AVMediaType ParseMediaType(const std::string& media_type) { } int SystemPreferences::DoSubscribeNotification( - const std::string& name, + v8::Local maybe_name, const NotificationCallback& callback, NotificationCenterKind kind) { int request_id = g_next_id++; __block NotificationCallback copied_callback = callback; + v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); + std::string name_str; + if (!(maybe_name->IsNull() || + gin::ConvertFromV8(isolate, maybe_name, &name_str))) { + isolate->ThrowException(v8::Exception::Error( + gin::StringToV8(isolate, "Must pass null or a string"))); + return -1; + } + + auto* name = maybe_name->IsNull() ? nil : base::SysUTF8ToNSString(name_str); + g_id_map[request_id] = [GetNotificationCenter(kind) - addObserverForName:base::SysUTF8ToNSString(name) + addObserverForName:name object:nil queue:nil usingBlock:^(NSNotification* notification) { diff --git a/spec-main/api-system-preferences-spec.ts b/spec-main/api-system-preferences-spec.ts index 3670527649302..38a16045ddb13 100644 --- a/spec-main/api-system-preferences-spec.ts +++ b/spec-main/api-system-preferences-spec.ts @@ -116,6 +116,39 @@ describe('systemPreferences module', () => { }); }); + ifdescribe(process.platform === 'darwin')('systemPreferences.subscribeNotification(event, callback)', () => { + it('throws an error if invalid arguments are passed', () => { + const badArgs = [123, {}, ['hi', 'bye'], new Date()]; + for (const bad of badArgs) { + expect(() => { + systemPreferences.subscribeNotification(bad as any, () => {}); + }).to.throw('Must pass null or a string'); + } + }); + }); + + ifdescribe(process.platform === 'darwin')('systemPreferences.subscribeLocalNotification(event, callback)', () => { + it('throws an error if invalid arguments are passed', () => { + const badArgs = [123, {}, ['hi', 'bye'], new Date()]; + for (const bad of badArgs) { + expect(() => { + systemPreferences.subscribeNotification(bad as any, () => {}); + }).to.throw('Must pass null or a string'); + } + }); + }); + + ifdescribe(process.platform === 'darwin')('systemPreferences.subscribeWorkspaceNotification(event, callback)', () => { + it('throws an error if invalid arguments are passed', () => { + const badArgs = [123, {}, ['hi', 'bye'], new Date()]; + for (const bad of badArgs) { + expect(() => { + systemPreferences.subscribeWorkspaceNotification(bad as any, () => {}); + }).to.throw('Must pass null or a string'); + } + }); + }); + ifdescribe(process.platform === 'darwin')('systemPreferences.getSystemColor(color)', () => { it('throws on invalid system colors', () => { const color = 'bad-color'; From 3d4d39d67b072a7c355dada2881cb6791e9e9f53 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 13 Apr 2022 14:51:00 -0700 Subject: [PATCH 275/811] chore: interpret bytes to string (#33766) --- script/release/uploaders/upload-index-json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index a96ffbc556a5c..e90eed678c028 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -56,7 +56,7 @@ def main(): new_content = get_content() - with open(index_json, "w") as f: + with open(index_json, "wb") as f: f.write(new_content) store_artifact(OUT_DIR, 'atom-shell/dist', [index_json]) From 16f8d713ab05fe325a664f0fd79cb41c403c9755 Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 14 Apr 2022 13:01:00 +0900 Subject: [PATCH 276/811] fix: apply senderFrame details to ipcMain port event (#33756) --- lib/browser/api/web-contents.ts | 1 + spec-main/api-ipc-spec.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index a8abf03fa6360..b2407ee7e0a37 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -627,6 +627,7 @@ WebContents.prototype._init = function () { }); this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) { + addSenderFrameToEvent(event); event.ports = ports.map(p => new MessagePortMain(p)); ipcMain.emit(channel, event, message); }); diff --git a/spec-main/api-ipc-spec.ts b/spec-main/api-ipc-spec.ts index 44ee2cfe498e8..0595531be86ff 100644 --- a/spec-main/api-ipc-spec.ts +++ b/spec-main/api-ipc-spec.ts @@ -212,6 +212,8 @@ describe('ipc module', () => { const [ev, msg] = await p; expect(msg).to.equal('hi'); expect(ev.ports).to.have.length(1); + expect(ev.senderFrame.parent).to.be.null(); + expect(ev.senderFrame.routingId).to.equal(w.webContents.mainFrame.routingId); const [port] = ev.ports; expect(port).to.be.an.instanceOf(EventEmitter); }); @@ -226,6 +228,7 @@ describe('ipc module', () => { const [ev, msg] = await p; expect(msg).to.equal('hi'); expect(ev.ports).to.deep.equal([]); + expect(ev.senderFrame.routingId).to.equal(w.webContents.mainFrame.routingId); }); it('can communicate between main and renderer', async () => { @@ -241,6 +244,7 @@ describe('ipc module', () => { }})()`); const [ev] = await p; expect(ev.ports).to.have.length(1); + expect(ev.senderFrame.routingId).to.equal(w.webContents.mainFrame.routingId); const [port] = ev.ports; port.start(); port.postMessage(42); From 7658edfa1abb0ce9713e4848d1c1af15f8cac479 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 14 Apr 2022 00:53:05 -0700 Subject: [PATCH 277/811] ci: manually install python@2 (#33785) --- .circleci/build_config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 6b075c4c68b38..d408eef59417a 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -506,6 +506,14 @@ step-install-gnutar-on-mac: &step-install-gnutar-on-mac ln -fs /usr/local/bin/gtar /usr/local/bin/tar fi +step-install-python2-on-mac: &step-install-python2-on-mac + run: + name: Install python2 on macos + command: | + if [ "`uname`" == "Darwin" ]; then + brew install vertedinde/python2/python@2 + fi + step-gn-gen-default: &step-gn-gen-default run: name: Default GN gen @@ -1039,6 +1047,7 @@ steps-electron-gn-check: &steps-electron-gn-check - attach_workspace: at: . - *step-depot-tools-add-to-path + - *step-install-python2-on-mac - *step-setup-env-for-build - *step-setup-goma-for-build - *step-gn-gen-default @@ -1052,6 +1061,7 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha - *step-depot-tools-add-to-path - *step-restore-brew-cache - *step-install-gnutar-on-mac + - *step-install-python2-on-mac - *step-get-more-space-on-mac - *step-generate-deps-hash - *step-touch-sync-done @@ -1086,6 +1096,7 @@ steps-native-tests: &steps-native-tests - attach_workspace: at: . - *step-depot-tools-add-to-path + - *step-install-python2-on-mac - *step-setup-env-for-build - *step-setup-goma-for-build - *step-gn-gen-default @@ -1355,6 +1366,7 @@ commands: - run: rm -rf src/electron - *step-restore-brew-cache - *step-install-gnutar-on-mac + - *step-install-python2-on-mac - *step-save-brew-cache - when: condition: << parameters.checkout-and-assume-cache >> From 233a39dbc9e07f5620798323309a2d065a27c21b Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 14 Apr 2022 12:35:36 +0200 Subject: [PATCH 278/811] fix: event propagation after exiting fullscreen on Windows (#33757) --- shell/browser/api/electron_api_web_contents.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 714d0d60c6076..caf9cdb41b3ea 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1342,6 +1342,11 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) { if (!owner_window_) return; + // This needs to be called before we exit fullscreen on the native window, + // or the controller will incorrectly think we weren't fullscreen and bail. + exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab( + source); + SetHtmlApiFullscreen(false); if (native_fullscreen_) { @@ -1350,9 +1355,6 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) { // `chrome/browser/ui/exclusive_access/fullscreen_controller.cc`. source->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties(); } - - exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab( - source); } void WebContents::RendererUnresponsive( From dda8bc3cd1ec221b74df153a92131d5127713b01 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 06:13:26 -0700 Subject: [PATCH 279/811] Bump v20.0.0-nightly.20220414 --- 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 dba45c6149e4d..0f98037c171fc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220414 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..cbe91e49e5d38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220414", "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 c61fbb8edac8a..b264c48dc0297 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220414 + PRODUCTVERSION 20,0,0,20220414 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f5e874cbcbd7e5b94cdef7090852e466210ef38f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 07:03:05 -0700 Subject: [PATCH 280/811] Revert "Bump v20.0.0-nightly.20220414" This reverts commit dda8bc3cd1ec221b74df153a92131d5127713b01. --- 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 0f98037c171fc..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220414 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index cbe91e49e5d38..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220414", + "version": "20.0.0-nightly.20220411", "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 b264c48dc0297..c61fbb8edac8a 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 20,0,0,20220414 - PRODUCTVERSION 20,0,0,20220414 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 8b0af8609763366755223718c084568cda09276d Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 14 Apr 2022 18:07:51 -0700 Subject: [PATCH 281/811] ci: build python2 from source (#33793) * ci: add python2 to publish jobs * chore: install python2 via circle --- .circleci/build_config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index d408eef59417a..d66ece9a80bac 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -511,7 +511,8 @@ step-install-python2-on-mac: &step-install-python2-on-mac name: Install python2 on macos command: | if [ "`uname`" == "Darwin" ]; then - brew install vertedinde/python2/python@2 + curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg + sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / fi step-gn-gen-default: &step-gn-gen-default @@ -1532,6 +1533,7 @@ commands: - *step-depot-tools-get - *step-depot-tools-add-to-path - *step-restore-brew-cache + - *step-install-python2-on-mac - *step-get-more-space-on-mac - when: condition: << parameters.checkout >> From 99791f620b5adc6e87ab4f449e6c88b899fd4131 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 18:08:45 -0700 Subject: [PATCH 282/811] Bump v20.0.0-nightly.20220414 --- 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 dba45c6149e4d..0f98037c171fc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220414 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..cbe91e49e5d38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220414", "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 c61fbb8edac8a..b264c48dc0297 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220414 + PRODUCTVERSION 20,0,0,20220414 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 635b3a94c84333c0e4b1828663d0eb74e2e993f6 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 20:08:02 -0700 Subject: [PATCH 283/811] Revert "Bump v20.0.0-nightly.20220414" This reverts commit 99791f620b5adc6e87ab4f449e6c88b899fd4131. --- 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 0f98037c171fc..dba45c6149e4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220414 \ No newline at end of file +20.0.0-nightly.20220411 \ No newline at end of file diff --git a/package.json b/package.json index cbe91e49e5d38..bbea9c9644f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220414", + "version": "20.0.0-nightly.20220411", "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 b264c48dc0297..c61fbb8edac8a 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 20,0,0,20220414 - PRODUCTVERSION 20,0,0,20220414 + FILEVERSION 20,0,0,20220411 + PRODUCTVERSION 20,0,0,20220411 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From eee4232069a5dff4f980c68d1b0f2ea1524788e0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 20:08:45 -0700 Subject: [PATCH 284/811] Bump v20.0.0-nightly.20220414 --- 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 dba45c6149e4d..0f98037c171fc 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220411 \ No newline at end of file +20.0.0-nightly.20220414 \ No newline at end of file diff --git a/package.json b/package.json index bbea9c9644f22..cbe91e49e5d38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220411", + "version": "20.0.0-nightly.20220414", "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 c61fbb8edac8a..b264c48dc0297 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 20,0,0,20220411 - PRODUCTVERSION 20,0,0,20220411 + FILEVERSION 20,0,0,20220414 + PRODUCTVERSION 20,0,0,20220414 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9d4aceb94045cc6ff292904a1c46f3d3a09a5d55 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 09:32:01 -0700 Subject: [PATCH 285/811] Bump v20.0.0-nightly.20220415 --- 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 0f98037c171fc..161f3d33e8dee 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220414 \ No newline at end of file +20.0.0-nightly.20220415 \ No newline at end of file diff --git a/package.json b/package.json index cbe91e49e5d38..f633ed03dd69e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220414", + "version": "20.0.0-nightly.20220415", "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 b264c48dc0297..eb4631ae0aca0 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 20,0,0,20220414 - PRODUCTVERSION 20,0,0,20220414 + FILEVERSION 20,0,0,20220415 + PRODUCTVERSION 20,0,0,20220415 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 37b7e347fce555836d694f36f6ee5e2ea67db049 Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 18 Apr 2022 13:24:32 +0900 Subject: [PATCH 286/811] fix: potential crash caused by dlopen different gtk libraries (#33650) --- BUILD.gn | 59 ++++---- patches/chromium/.patches | 2 +- .../chromium/make_gtk_getlibgtk_public.patch | 52 +++++++ patches/chromium/ui_gtk_public_header.patch | 38 ------ shell/browser/browser_linux.cc | 2 +- shell/browser/electron_browser_main_parts.cc | 12 +- .../linux/libnotify_notification.cc | 2 +- shell/browser/ui/electron_gtk.fragment | 1 + shell/browser/ui/electron_gtk.sigs | 6 + shell/browser/ui/file_dialog_gtk.cc | 127 +++--------------- shell/browser/ui/message_box_gtk.cc | 4 +- .../ui/views/client_frame_view_linux.cc | 2 +- shell/browser/ui/views/menu_bar.cc | 2 +- shell/common/application_info_linux.cc | 2 +- shell/common/platform_util_linux.cc | 2 +- 15 files changed, 130 insertions(+), 183 deletions(-) create mode 100644 patches/chromium/make_gtk_getlibgtk_public.patch delete mode 100644 patches/chromium/ui_gtk_public_header.patch create mode 100644 shell/browser/ui/electron_gtk.fragment create mode 100644 shell/browser/ui/electron_gtk.sigs diff --git a/BUILD.gn b/BUILD.gn index 7b32da03ec35f..45def72146ec5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -43,6 +43,7 @@ if (is_mac) { if (is_linux) { import("//build/config/linux/pkg_config.gni") + import("//tools/generate_stubs/rules.gni") pkg_config("gio_unix") { packages = [ "gio-unix-2.0" ] @@ -54,6 +55,38 @@ if (is_linux) { "gdk-pixbuf-2.0", ] } + + generate_library_loader("libnotify_loader") { + name = "LibNotifyLoader" + output_h = "libnotify_loader.h" + output_cc = "libnotify_loader.cc" + header = "" + config = ":libnotify_config" + + functions = [ + "notify_is_initted", + "notify_init", + "notify_get_server_caps", + "notify_get_server_info", + "notify_notification_new", + "notify_notification_add_action", + "notify_notification_set_image_from_pixbuf", + "notify_notification_set_timeout", + "notify_notification_set_urgency", + "notify_notification_set_hint_string", + "notify_notification_show", + "notify_notification_close", + ] + } + + generate_stubs("electron_gtk_stubs") { + sigs = [ "shell/browser/ui/electron_gtk.sigs" ] + extra_header = "shell/browser/ui/electron_gtk.fragment" + output_name = "electron_gtk_stubs" + public_deps = [ "//ui/gtk:gtk_config" ] + logging_function = "LogNoop()" + logging_include = "ui/gtk/log_noop.h" + } } declare_args() { @@ -253,31 +286,6 @@ copy("copy_shell_devtools_discovery_page") { outputs = [ "$target_gen_dir/shell_devtools_discovery_page.html" ] } -if (is_linux) { - generate_library_loader("libnotify_loader") { - name = "LibNotifyLoader" - output_h = "libnotify_loader.h" - output_cc = "libnotify_loader.cc" - header = "" - config = ":libnotify_config" - - functions = [ - "notify_is_initted", - "notify_init", - "notify_get_server_caps", - "notify_get_server_info", - "notify_notification_new", - "notify_notification_add_action", - "notify_notification_set_image_from_pixbuf", - "notify_notification_set_timeout", - "notify_notification_set_urgency", - "notify_notification_set_hint_string", - "notify_notification_show", - "notify_notification_close", - ] - } -} - npm_action("electron_version_args") { script = "generate-version-json" @@ -538,6 +546,7 @@ source_set("electron_lib") { if (is_linux) { libs = [ "xshmfence" ] deps += [ + ":electron_gtk_stubs", ":libnotify_loader", "//build/config/linux/gtk", "//dbus", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index cd928849ccf21..ff7ade0c3c84f 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -61,7 +61,6 @@ feat_enable_offscreen_rendering_with_viz_compositor.patch gpu_notify_when_dxdiag_request_fails.patch feat_allow_embedders_to_add_observers_on_created_hunspell.patch feat_add_onclose_to_messageport.patch -ui_gtk_public_header.patch allow_in-process_windows_to_have_different_web_prefs.patch refactor_expose_cursor_changes_to_the_webcontentsobserver.patch crash_allow_setting_more_options.patch @@ -108,3 +107,4 @@ build_disable_partition_alloc_on_mac.patch fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch build_make_libcxx_abi_unstable_false_for_electron.patch introduce_ozoneplatform_electron_can_call_x11_property.patch +make_gtk_getlibgtk_public.patch diff --git a/patches/chromium/make_gtk_getlibgtk_public.patch b/patches/chromium/make_gtk_getlibgtk_public.patch new file mode 100644 index 0000000000000..bf195bbaba7d3 --- /dev/null +++ b/patches/chromium/make_gtk_getlibgtk_public.patch @@ -0,0 +1,52 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Thu, 7 Apr 2022 20:30:16 +0900 +Subject: Make gtk::GetLibGtk public + +Allows embedders to get a handle to the gtk library +already loaded in the process. + +diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc +index 7104a0d5f4489c687f3cb9e63bc7cbef59d2fa62..f0b9ed834a3f7310da09377f0b2105cf635ffeb7 100644 +--- a/ui/gtk/gtk_compat.cc ++++ b/ui/gtk/gtk_compat.cc +@@ -86,12 +86,6 @@ void* GetLibGtk4(bool check = true) { + return libgtk4; + } + +-void* GetLibGtk() { +- if (GtkCheckVersion(4)) +- return GetLibGtk4(); +- return GetLibGtk3(); +-} +- + bool LoadGtk3() { + if (!GetLibGtk3(false)) + return false; +@@ -133,6 +127,12 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) { + + } // namespace + ++void* GetLibGtk() { ++ if (GtkCheckVersion(4)) ++ return GetLibGtk4(); ++ return GetLibGtk3(); ++} ++ + bool LoadGtk() { + static bool loaded = LoadGtkImpl(); + return loaded; +diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h +index 72981270fe26579211afcaf3c596a412f69f5fac..b5dbfde5b011d57d26960d245e0dc61cac9341e4 100644 +--- a/ui/gtk/gtk_compat.h ++++ b/ui/gtk/gtk_compat.h +@@ -37,6 +37,9 @@ using SkColor = uint32_t; + + namespace gtk { + ++// Get handle to the currently loaded gtk library in the process. ++void* GetLibGtk(); ++ + // Loads libgtk and related libraries and returns true on success. + bool LoadGtk(); + diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch deleted file mode 100644 index 12f9984100bd6..0000000000000 --- a/patches/chromium/ui_gtk_public_header.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Fri, 10 Apr 2020 17:47:18 -0700 -Subject: ui_gtk_public_header.patch - -Allow electron to depend on gtk_util.h and gtk_ui.h from //ui/gtk/ - -diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index 4093df78da0bbb1d8df743942f364cf728ad3414..2f7c404307bfebb0e2890148cf9b0d6d9c68094f 100644 ---- a/ui/gtk/BUILD.gn -+++ b/ui/gtk/BUILD.gn -@@ -69,7 +69,11 @@ generate_stubs("gtk_stubs") { - } - - component("gtk") { -- public = [ "gtk_ui_factory.h" ] -+ public = [ -+ "gtk_ui.h", -+ "gtk_ui_factory.h", -+ "gtk_util.h", -+ ] - - sources = [ - "gtk_color_mixers.cc", -@@ -79,13 +83,11 @@ component("gtk") { - "gtk_key_bindings_handler.cc", - "gtk_key_bindings_handler.h", - "gtk_ui.cc", -- "gtk_ui.h", - "gtk_ui_factory.cc", - "gtk_ui_platform.h", - "gtk_ui_platform_stub.cc", - "gtk_ui_platform_stub.h", - "gtk_util.cc", -- "gtk_util.h", - "input_method_context_impl_gtk.cc", - "input_method_context_impl_gtk.h", - "native_theme_gtk.cc", diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index f47a46e8dd5c8..8b38c9ca67bf7 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -17,7 +17,7 @@ #if BUILDFLAG(IS_LINUX) #include "shell/browser/linux/unity_service.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck #endif namespace electron { diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 98344e65d95ac..a03835dd81e0e 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -69,11 +69,13 @@ #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 "electron/electron_gtk_stubs.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/gtk/gtk_compat.h" // nogncheck +#include "ui/gtk/gtk_ui_factory.h" // nogncheck +#include "ui/gtk/gtk_util.h" // nogncheck #include "ui/ozone/public/ozone_platform.h" #include "ui/views/linux_ui/linux_ui.h" #endif @@ -367,6 +369,12 @@ void ElectronBrowserMainParts::ToolkitInitialized() { linux_ui->Initialize(); DCHECK(ui::LinuxInputMethodContextFactory::instance()); + // Try loading gtk symbols used by Electron. + electron::InitializeElectron_gtk(gtk::GetLibGtk()); + if (!electron::IsElectron_gtkInitialized()) { + electron::UninitializeElectron_gtk(); + } + // 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 // issue to keep updated: diff --git a/shell/browser/notifications/linux/libnotify_notification.cc b/shell/browser/notifications/linux/libnotify_notification.cc index 8391566640c32..07d7135788de1 100644 --- a/shell/browser/notifications/linux/libnotify_notification.cc +++ b/shell/browser/notifications/linux/libnotify_notification.cc @@ -16,7 +16,7 @@ #include "shell/common/application_info.h" #include "shell/common/platform_util.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck namespace electron { diff --git a/shell/browser/ui/electron_gtk.fragment b/shell/browser/ui/electron_gtk.fragment new file mode 100644 index 0000000000000..74a31b23585ac --- /dev/null +++ b/shell/browser/ui/electron_gtk.fragment @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/shell/browser/ui/electron_gtk.sigs b/shell/browser/ui/electron_gtk.sigs new file mode 100644 index 0000000000000..568a270165cbb --- /dev/null +++ b/shell/browser/ui/electron_gtk.sigs @@ -0,0 +1,6 @@ +GtkFileChooserNative* gtk_file_chooser_native_new(const gchar* title, GtkWindow* parent, GtkFileChooserAction action, const gchar* accept_label, const gchar* cancel_label); +void gtk_native_dialog_set_modal(GtkNativeDialog* self, gboolean modal); +void gtk_native_dialog_show(GtkNativeDialog* self); +void gtk_native_dialog_hide(GtkNativeDialog* self); +gint gtk_native_dialog_run(GtkNativeDialog* self); +void gtk_native_dialog_destroy(GtkNativeDialog* self); \ No newline at end of file diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 440c06823cea3..7e5c7698cadfa 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include - #include #include @@ -11,6 +9,7 @@ #include "base/files/file_util.h" #include "base/strings/string_util.h" #include "base/threading/thread_restrictions.h" +#include "electron/electron_gtk_stubs.h" #include "shell/browser/javascript_environment.h" #include "shell/browser/native_window_views.h" #include "shell/browser/ui/file_dialog.h" @@ -18,32 +17,11 @@ #include "shell/browser/unresponsive_suppressor.h" #include "shell/common/gin_converters/file_path_converter.h" #include "ui/base/glib/glib_signal.h" -#include "ui/gtk/gtk_ui.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_ui.h" // nogncheck +#include "ui/gtk/gtk_util.h" // nogncheck namespace file_dialog { -static GModule* gtk_module; -static absl::optional supports_gtk_file_chooser_native; - -using dl_gtk_native_dialog_show_t = void (*)(void*); -using dl_gtk_native_dialog_destroy_t = void (*)(void*); -using dl_gtk_native_dialog_set_modal_t = void (*)(void*, gboolean); -using dl_gtk_native_dialog_run_t = int (*)(void*); -using dl_gtk_native_dialog_hide_t = void (*)(void*); -using dl_gtk_file_chooser_native_new_t = void* (*)(const char*, - GtkWindow*, - GtkFileChooserAction, - const char*, - const char*); - -static dl_gtk_native_dialog_show_t dl_gtk_native_dialog_show; -static dl_gtk_native_dialog_destroy_t dl_gtk_native_dialog_destroy; -static dl_gtk_native_dialog_set_modal_t dl_gtk_native_dialog_set_modal; -static dl_gtk_native_dialog_run_t dl_gtk_native_dialog_run; -static dl_gtk_native_dialog_hide_t dl_gtk_native_dialog_hide; -static dl_gtk_file_chooser_native_new_t dl_gtk_file_chooser_native_new; - DialogSettings::DialogSettings() = default; DialogSettings::DialogSettings(const DialogSettings&) = default; DialogSettings::~DialogSettings() = default; @@ -53,85 +31,16 @@ namespace { static const int kPreviewWidth = 256; static const int kPreviewHeight = 512; -void InitGtkFileChooserNativeSupport() { - // Return early if we have already setup the native functions or we have tried - // once before and failed. Avoid running expensive dynamic library operations. - if (supports_gtk_file_chooser_native) { - return; - } - - // Mark that we have attempted to initialize support at least once - supports_gtk_file_chooser_native = false; - - if (!g_module_supported()) { - return; - } - - gtk_module = g_module_open("libgtk-3.so", G_MODULE_BIND_LAZY); - if (!gtk_module) { - return; - } - - // Will never be unloaded - g_module_make_resident(gtk_module); - - bool found = g_module_symbol( - gtk_module, "gtk_file_chooser_native_new", - reinterpret_cast(&dl_gtk_file_chooser_native_new)); - if (!found) { - return; - } - - found = g_module_symbol( - gtk_module, "gtk_native_dialog_set_modal", - reinterpret_cast(&dl_gtk_native_dialog_set_modal)); - if (!found) { - return; - } - - found = - g_module_symbol(gtk_module, "gtk_native_dialog_destroy", - reinterpret_cast(&dl_gtk_native_dialog_destroy)); - if (!found) { - return; - } - - found = g_module_symbol(gtk_module, "gtk_native_dialog_show", - reinterpret_cast(&dl_gtk_native_dialog_show)); - if (!found) { - return; - } - - found = g_module_symbol(gtk_module, "gtk_native_dialog_hide", - reinterpret_cast(&dl_gtk_native_dialog_hide)); - if (!found) { - return; - } - - found = g_module_symbol(gtk_module, "gtk_native_dialog_run", - reinterpret_cast(&dl_gtk_native_dialog_run)); - if (!found) { - return; - } - - supports_gtk_file_chooser_native = - dl_gtk_file_chooser_native_new && dl_gtk_native_dialog_set_modal && - dl_gtk_native_dialog_destroy && dl_gtk_native_dialog_run && - dl_gtk_native_dialog_show && dl_gtk_native_dialog_hide; -} - class FileChooserDialog { public: FileChooserDialog(GtkFileChooserAction action, const DialogSettings& settings) : parent_( static_cast(settings.parent_window)), filters_(settings.filters) { - InitGtkFileChooserNativeSupport(); - auto label = settings.button_label; - if (*supports_gtk_file_chooser_native) { - dialog_ = GTK_FILE_CHOOSER(dl_gtk_file_chooser_native_new( + if (electron::IsElectron_gtkInitialized()) { + dialog_ = GTK_FILE_CHOOSER(gtk_file_chooser_native_new( settings.title.c_str(), NULL, action, label.empty() ? nullptr : label.c_str(), nullptr)); } else { @@ -150,8 +59,8 @@ class FileChooserDialog { if (parent_) { parent_->SetEnabled(false); - if (*supports_gtk_file_chooser_native) { - dl_gtk_native_dialog_set_modal(static_cast(dialog_), TRUE); + if (electron::IsElectron_gtkInitialized()) { + gtk_native_dialog_set_modal(GTK_NATIVE_DIALOG(dialog_), TRUE); } else { gtk::SetGtkTransientForAura(GTK_WIDGET(dialog_), parent_->GetNativeWindow()); @@ -188,7 +97,7 @@ class FileChooserDialog { // org.freedesktop.portal.FileChooser portal. In the case of running through // the org.freedesktop.portal.FileChooser portal, anything having to do with // the update-preview signal or the preview widget will just be ignored. - if (!*supports_gtk_file_chooser_native) { + if (!electron::IsElectron_gtkInitialized()) { preview_ = gtk_image_new(); g_signal_connect(dialog_, "update-preview", G_CALLBACK(OnUpdatePreviewThunk), this); @@ -197,8 +106,8 @@ class FileChooserDialog { } ~FileChooserDialog() { - if (*supports_gtk_file_chooser_native) { - dl_gtk_native_dialog_destroy(static_cast(dialog_)); + if (electron::IsElectron_gtkInitialized()) { + gtk_native_dialog_destroy(GTK_NATIVE_DIALOG(dialog_)); } else { gtk_widget_destroy(GTK_WIDGET(dialog_)); } @@ -236,8 +145,8 @@ class FileChooserDialog { void RunAsynchronous() { g_signal_connect(dialog_, "response", G_CALLBACK(OnFileDialogResponseThunk), this); - if (*supports_gtk_file_chooser_native) { - dl_gtk_native_dialog_show(static_cast(dialog_)); + if (electron::IsElectron_gtkInitialized()) { + gtk_native_dialog_show(GTK_NATIVE_DIALOG(dialog_)); } else { gtk_widget_show_all(GTK_WIDGET(dialog_)); gtk::GtkUi::GetPlatform()->ShowGtkWindow(GTK_WINDOW(dialog_)); @@ -305,8 +214,8 @@ class FileChooserDialog { }; void FileChooserDialog::OnFileDialogResponse(GtkWidget* widget, int response) { - if (*supports_gtk_file_chooser_native) { - dl_gtk_native_dialog_hide(static_cast(dialog_)); + if (electron::IsElectron_gtkInitialized()) { + gtk_native_dialog_hide(GTK_NATIVE_DIALOG(dialog_)); } else { gtk_widget_hide(GTK_WIDGET(dialog_)); } @@ -371,7 +280,7 @@ bool CanPreview(const struct stat& st) { } void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) { - CHECK(!*supports_gtk_file_chooser_native); + CHECK(!electron::IsElectron_gtkInitialized()); gchar* filename = gtk_file_chooser_get_preview_filename(chooser); if (!filename) { gtk_file_chooser_set_preview_widget_active(chooser, FALSE); @@ -400,15 +309,15 @@ void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) { void ShowFileDialog(const FileChooserDialog& dialog) { // gtk_native_dialog_run() will call gtk_native_dialog_show() for us. - if (!*supports_gtk_file_chooser_native) { + if (!electron::IsElectron_gtkInitialized()) { gtk_widget_show_all(GTK_WIDGET(dialog.dialog())); } } int RunFileDialog(const FileChooserDialog& dialog) { int response = 0; - if (*supports_gtk_file_chooser_native) { - response = dl_gtk_native_dialog_run(static_cast(dialog.dialog())); + if (electron::IsElectron_gtkInitialized()) { + response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(dialog.dialog())); } else { response = gtk_dialog_run(GTK_DIALOG(dialog.dialog())); } diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 28b332d6f8adf..3efc453fc97bd 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -18,8 +18,8 @@ #include "shell/browser/unresponsive_suppressor.h" #include "ui/base/glib/glib_signal.h" #include "ui/gfx/image/image_skia.h" -#include "ui/gtk/gtk_ui.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_ui.h" // nogncheck +#include "ui/gtk/gtk_util.h" // nogncheck #if defined(USE_OZONE) #include "ui/base/ui_base_features.h" diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 4455ddb3727a6..a5e8067968583 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -22,7 +22,7 @@ #include "ui/gfx/skia_util.h" #include "ui/gfx/text_constants.h" #include "ui/gtk/gtk_compat.h" // nogncheck -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck #include "ui/native_theme/native_theme.h" #include "ui/strings/grit/ui_strings.h" #include "ui/views/controls/button/image_button.h" diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index e56094075b275..380ce55efdf42 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -14,7 +14,7 @@ #include "ui/views/layout/box_layout.h" #if BUILDFLAG(IS_LINUX) -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck #endif #if BUILDFLAG(IS_WIN) diff --git a/shell/common/application_info_linux.cc b/shell/common/application_info_linux.cc index d7eb9d72875b8..cb043d1d0f907 100644 --- a/shell/common/application_info_linux.cc +++ b/shell/common/application_info_linux.cc @@ -13,7 +13,7 @@ #include "base/logging.h" #include "electron/electron_version.h" #include "shell/common/platform_util.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck namespace { diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index 9d58f8fc959f4..ef8d8f8f0de01 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -28,7 +28,7 @@ #include "dbus/object_proxy.h" #include "shell/common/platform_util_internal.h" #include "third_party/abseil-cpp/absl/types/optional.h" -#include "ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" // nogncheck #include "url/gurl.h" #define ELECTRON_TRASH "ELECTRON_TRASH" From fd191fc50b5ba483b314f04830ec427059337750 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 06:01:41 -0700 Subject: [PATCH 287/811] Bump v20.0.0-nightly.20220418 --- 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 161f3d33e8dee..fd85ac3cfd285 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220415 \ No newline at end of file +20.0.0-nightly.20220418 \ No newline at end of file diff --git a/package.json b/package.json index f633ed03dd69e..72c95b89025f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220415", + "version": "20.0.0-nightly.20220418", "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 eb4631ae0aca0..e0d88a4007e14 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 20,0,0,20220415 - PRODUCTVERSION 20,0,0,20220415 + FILEVERSION 20,0,0,20220418 + PRODUCTVERSION 20,0,0,20220418 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b9c0166b4912dbba344a43d25a310f5a86633ace Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 06:35:44 -0700 Subject: [PATCH 288/811] Revert "Bump v20.0.0-nightly.20220418" This reverts commit fd191fc50b5ba483b314f04830ec427059337750. --- 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 fd85ac3cfd285..161f3d33e8dee 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220418 \ No newline at end of file +20.0.0-nightly.20220415 \ No newline at end of file diff --git a/package.json b/package.json index 72c95b89025f5..f633ed03dd69e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220418", + "version": "20.0.0-nightly.20220415", "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 e0d88a4007e14..eb4631ae0aca0 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 20,0,0,20220418 - PRODUCTVERSION 20,0,0,20220418 + FILEVERSION 20,0,0,20220415 + PRODUCTVERSION 20,0,0,20220415 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0f087127de7228ad77dbaba524421932c46b4ef8 Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 18 Apr 2022 22:36:17 +0900 Subject: [PATCH 289/811] chore: fix patch conflicts from 37b7e347 (#33818) * chore: update patches * chore: address review feedback --- BUILD.gn | 7 +++++++ patches/chromium/make_gtk_getlibgtk_public.patch | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 45def72146ec5..53096fff480c3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -79,6 +79,13 @@ if (is_linux) { ] } + # Generates electron_gtk_stubs.h header which contains + # stubs for extracting function ptrs from the gtk library. + # Function signatures for which stubs are required should be + # declared in electron_gtk.sigs, currently this file contains + # signatures for the functions used with native file chooser + # implementation. In future, this file can be extended to contain + # gtk4 stubs to switch gtk version in runtime. generate_stubs("electron_gtk_stubs") { sigs = [ "shell/browser/ui/electron_gtk.sigs" ] extra_header = "shell/browser/ui/electron_gtk.fragment" diff --git a/patches/chromium/make_gtk_getlibgtk_public.patch b/patches/chromium/make_gtk_getlibgtk_public.patch index bf195bbaba7d3..a6bce37ae4aea 100644 --- a/patches/chromium/make_gtk_getlibgtk_public.patch +++ b/patches/chromium/make_gtk_getlibgtk_public.patch @@ -7,7 +7,7 @@ Allows embedders to get a handle to the gtk library already loaded in the process. diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc -index 7104a0d5f4489c687f3cb9e63bc7cbef59d2fa62..f0b9ed834a3f7310da09377f0b2105cf635ffeb7 100644 +index 0ed04582106639911d9a4e0284ff880be9c3bc74..bfda81b08be52406048be9b96d2de59223d56ee7 100644 --- a/ui/gtk/gtk_compat.cc +++ b/ui/gtk/gtk_compat.cc @@ -86,12 +86,6 @@ void* GetLibGtk4(bool check = true) { @@ -23,7 +23,7 @@ index 7104a0d5f4489c687f3cb9e63bc7cbef59d2fa62..f0b9ed834a3f7310da09377f0b2105cf bool LoadGtk3() { if (!GetLibGtk3(false)) return false; -@@ -133,6 +127,12 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) { +@@ -134,6 +128,12 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) { } // namespace From 5ae234d5e1d20bc9db5abb780d79b694a4ef09d7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 06:38:13 -0700 Subject: [PATCH 290/811] Bump v20.0.0-nightly.20220418 --- 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 161f3d33e8dee..fd85ac3cfd285 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220415 \ No newline at end of file +20.0.0-nightly.20220418 \ No newline at end of file diff --git a/package.json b/package.json index f633ed03dd69e..72c95b89025f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220415", + "version": "20.0.0-nightly.20220418", "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 eb4631ae0aca0..e0d88a4007e14 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 20,0,0,20220415 - PRODUCTVERSION 20,0,0,20220415 + FILEVERSION 20,0,0,20220418 + PRODUCTVERSION 20,0,0,20220418 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 2d0ad043542d99d28332127915b70084409b5786 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 18 Apr 2022 07:09:54 -0700 Subject: [PATCH 291/811] docs: update security guide regarding ctx isolation (#33807) --- docs/api/context-bridge.md | 2 +- docs/breaking-changes.md | 2 +- docs/tutorial/security.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/context-bridge.md b/docs/api/context-bridge.md index c816b43ab64d8..5d62220bd6070 100644 --- a/docs/api/context-bridge.md +++ b/docs/api/context-bridge.md @@ -35,7 +35,7 @@ page you load in your renderer executes code in this world. When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an "Isolated World". You can read more about context isolation and what it affects in the -[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs. +[security](../tutorial/security.md#3-enable-context-isolation) docs. ## Methods diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 7dcbaaff47e3a..cf0e48d0df670 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -372,7 +372,7 @@ value. In Electron 12, `contextIsolation` will be enabled by default. To restore the previous behavior, `contextIsolation: false` must be specified in WebPreferences. -We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application. +We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation) for the security of your application. Another implication is that `require()` cannot be used in the renderer process unless `nodeIntegration` is `true` and `contextIsolation` is `false`. diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index cda76d60b210a..0d98921a95afe 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -99,7 +99,7 @@ You should at least follow these steps to improve the security of your applicati 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) +3. [Enable context isolation in all renderers](#3-enable-context-isolation) 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) @@ -225,7 +225,7 @@ 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 via the [contextBridge API](../api/context-bridge.md). -### 3. Enable Context Isolation for remote content +### 3. Enable Context Isolation :::info This recommendation is the default behavior in Electron since 12.0.0. From 67332790375e0ed457f4517720355c9ec566de8f Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Mon, 18 Apr 2022 19:41:44 +0530 Subject: [PATCH 292/811] docs: document when BrowserWindow and BrowserView can be used (#33696) We already document such info for other APIs, like the 'screen' API in https://github.com/electron/electron/blob/f711fe6b5701196e5d803c04aab44bc62b392f8e/docs/api/screen.md?plain=1#L7-L8. So we should do the same thing for these ones too. Signed-off-by: Darshan Sen --- docs/api/browser-view.md | 3 +++ docs/api/browser-window.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/api/browser-view.md b/docs/api/browser-view.md index ed63f4a4881db..a2c5b03079a06 100644 --- a/docs/api/browser-view.md +++ b/docs/api/browser-view.md @@ -11,6 +11,9 @@ relative to its owning window. It is meant to be an alternative to the Process: [Main](../glossary.md#main-process) +This module cannot be used until the `ready` event of the `app` +module is emitted. + ### Example ```javascript diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 44de118440190..4adb22ec0e6ea 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -4,6 +4,9 @@ Process: [Main](../glossary.md#main-process) +This module cannot be used until the `ready` event of the `app` +module is emitted. + ```javascript // In the main process. const { BrowserWindow } = require('electron') From 31c2b5703a75a5ff2bf0e68f472d9002fe866bfb Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 06:00:47 -0700 Subject: [PATCH 293/811] Bump v20.0.0-nightly.20220419 --- 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 fd85ac3cfd285..b10011eae8d4d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220418 \ No newline at end of file +20.0.0-nightly.20220419 \ No newline at end of file diff --git a/package.json b/package.json index 72c95b89025f5..6ce2a604bad91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220418", + "version": "20.0.0-nightly.20220419", "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 e0d88a4007e14..0ec25ddca319e 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 20,0,0,20220418 - PRODUCTVERSION 20,0,0,20220418 + FILEVERSION 20,0,0,20220419 + PRODUCTVERSION 20,0,0,20220419 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 841e0a4e0ccae2b9fdac3944f7db1f23cb6a3c0a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 19 Apr 2022 20:00:51 -0700 Subject: [PATCH 294/811] fix: include accessibility blink strings (#33840) --- electron_paks.gni | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electron_paks.gni b/electron_paks.gni index 2b089fa53b940..73d181d3f018d 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -184,6 +184,7 @@ template("electron_paks") { "${root_gen_dir}/components/strings/components_strings_", "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", "${root_gen_dir}/services/strings/services_strings_", + "${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_", "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", "${root_gen_dir}/ui/strings/app_locale_settings_", "${root_gen_dir}/ui/strings/ax_strings_", @@ -198,6 +199,7 @@ template("electron_paks") { "//device/bluetooth/strings", "//services/strings", "//third_party/blink/public/strings", + "//third_party/blink/public/strings:accessibility_strings", "//ui/strings:app_locale_settings", "//ui/strings:ax_strings", "//ui/strings:ui_strings", From fec147a0cbff493a7ca1579a3eb0351c2c52cc7f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 06:01:22 -0700 Subject: [PATCH 295/811] Bump v20.0.0-nightly.20220420 --- 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 b10011eae8d4d..aa0390e8d18bb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220419 \ No newline at end of file +20.0.0-nightly.20220420 \ No newline at end of file diff --git a/package.json b/package.json index 6ce2a604bad91..fe2fbaa3e04be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220419", + "version": "20.0.0-nightly.20220420", "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 0ec25ddca319e..34f9c73045a19 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 20,0,0,20220419 - PRODUCTVERSION 20,0,0,20220419 + FILEVERSION 20,0,0,20220420 + PRODUCTVERSION 20,0,0,20220420 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0c864837af77d6d8a59b6c44f982dcafc3d2fdde Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 20 Apr 2022 13:49:59 -0700 Subject: [PATCH 296/811] chore: use semantic-commit-action (#33857) * chore: use semantic-commit-action * Update semantic.yml --- .github/workflows/semantic.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/semantic.yml diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml new file mode 100644 index 0000000000000..11d62c9d62855 --- /dev/null +++ b/.github/workflows/semantic.yml @@ -0,0 +1,20 @@ +name: "Check Semantic Commit" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - name: semantic-pull-request + uses: amannn/action-semantic-pull-request@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + validateSingleCommit: false From b53118ca28bcc9dcff3304f33d7c576a82b3f298 Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 21 Apr 2022 05:52:15 +0900 Subject: [PATCH 297/811] fix: adopt partition alloc early initialization (#33832) Refs https://chromium-review.googlesource.com/c/chromium/src/+/3298858 --- BUILD.gn | 6 +++++- shell/app/electron_main_mac.cc | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 53096fff480c3..039250e5a955a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -916,7 +916,10 @@ if (is_mac) { assert(defined(invoker.helper_name_suffix)) output_name = electron_helper_name + invoker.helper_name_suffix - deps = [ ":electron_framework+link" ] + deps = [ + ":electron_framework+link", + "//base/allocator:early_zone_registration_mac", + ] if (!is_mas_build) { deps += [ "//sandbox/mac:seatbelt" ] } @@ -1077,6 +1080,7 @@ if (is_mac) { ":electron_app_plist", ":electron_app_resources", ":electron_fuses", + "//base/allocator:early_zone_registration_mac", "//electron/buildflags", ] if (is_mas_build) { diff --git a/shell/app/electron_main_mac.cc b/shell/app/electron_main_mac.cc index c0f9576fff7fe..c040db6624c63 100644 --- a/shell/app/electron_main_mac.cc +++ b/shell/app/electron_main_mac.cc @@ -5,6 +5,7 @@ #include #include +#include "base/allocator/early_zone_registration_mac.h" #include "electron/buildflags/buildflags.h" #include "electron/fuses.h" #include "shell/app/electron_library_main.h" @@ -28,6 +29,7 @@ namespace { } // namespace int main(int argc, char* argv[]) { + partition_alloc::EarlyMallocZoneRegistration(); FixStdioStreams(); #if BUILDFLAG(ENABLE_RUN_AS_NODE) From 00021a41b1905cbee93e775958c4fb50d473cda4 Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 21 Apr 2022 10:38:47 +0900 Subject: [PATCH 298/811] chore: backport 7c9b3938d from libuv (#33815) Backports https://github.com/libuv/libuv/pull/3597 --- patches/node/.patches | 1 + ...acos_avoid_posix_spawnp_cwd_bug_3597.patch | 111 ++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 patches/node/macos_avoid_posix_spawnp_cwd_bug_3597.patch diff --git a/patches/node/.patches b/patches/node/.patches index b04c145d37cf8..963b9aa10808e 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -43,3 +43,4 @@ macos_don_t_use_thread-unsafe_strtok_3524.patch process_fix_hang_after_note_exit_3521.patch feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch fix_preserve_proper_method_names_as-is_in_error_stack.patch +macos_avoid_posix_spawnp_cwd_bug_3597.patch diff --git a/patches/node/macos_avoid_posix_spawnp_cwd_bug_3597.patch b/patches/node/macos_avoid_posix_spawnp_cwd_bug_3597.patch new file mode 100644 index 0000000000000..f05f9ee5186e0 --- /dev/null +++ b/patches/node/macos_avoid_posix_spawnp_cwd_bug_3597.patch @@ -0,0 +1,111 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Fri, 15 Apr 2022 14:10:27 -0400 +Subject: macos: avoid posix_spawnp() cwd bug (#3597) + +macOS 10.15 has a bug where configuring the working directory with +posix_spawn_file_actions_addchdir_np() makes posix_spawnp() fail with +ENOENT even though the executable is spawned successfully. + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index c8816b85b7e531648064e739fb89257565ad64bb..de51bac3d0e8daf519d35c6a3994f1479590607a 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -671,27 +671,25 @@ static int uv__spawn_resolve_and_spawn(const uv_process_options_t* options, + 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) { ++ /* If options->file contains a slash, posix_spawn/posix_spawnp should behave ++ * the same, and do not involve PATH resolution at all. The libc ++ * `posix_spawnp` provided by Apple is buggy (since 10.15), so we now emulate it ++ * here, per https://github.com/libuv/libuv/pull/3583. */ ++ if (strchr(options->file, '/') != NULL) { + do +- err = posix_spawnp(pid, options->file, actions, attrs, options->args, env); ++ err = posix_spawn(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); ++ path = uv__spawn_find_path_in_env(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 ++ /* If no path was provided in env, use the default value + * to look for the executable */ + if (path == NULL) + path = _PATH_DEFPATH; +diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h +index 199402e31406cf8ba360d54769461bb5285011ee..f8c08a4a7eb164ffff495c81e1f5df712084648b 100644 +--- a/deps/uv/test/test-list.h ++++ b/deps/uv/test/test-list.h +@@ -322,6 +322,7 @@ TEST_DECLARE (spawn_inherit_streams) + TEST_DECLARE (spawn_quoted_path) + TEST_DECLARE (spawn_tcp_server) + TEST_DECLARE (spawn_exercise_sigchld_issue) ++TEST_DECLARE (spawn_relative_path) + TEST_DECLARE (fs_poll) + TEST_DECLARE (fs_poll_getpath) + TEST_DECLARE (fs_poll_close_request) +@@ -954,6 +955,7 @@ TASK_LIST_START + TEST_ENTRY (spawn_quoted_path) + TEST_ENTRY (spawn_tcp_server) + TEST_ENTRY (spawn_exercise_sigchld_issue) ++ TEST_ENTRY (spawn_relative_path) + 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 dfd5458ef37c664af9a55a8383bdb3121885db3b..de9c710020ef7da66e45f5617a8a697e698fa202 100644 +--- a/deps/uv/test/test-spawn.c ++++ b/deps/uv/test/test-spawn.c +@@ -1981,3 +1981,37 @@ void spawn_stdin_stdout(void) { + } + } + #endif /* !_WIN32 */ ++ ++TEST_IMPL(spawn_relative_path) { ++ char* sep; ++ ++ init_process_options("spawn_helper1", exit_cb); ++ ++ exepath_size = sizeof(exepath) - 2; ++ ASSERT_EQ(0, uv_exepath(exepath, &exepath_size)); ++ exepath[exepath_size] = '\0'; ++ ++ /* Poor man's basename(3). */ ++ sep = strrchr(exepath, '/'); ++ if (sep == NULL) ++ sep = strrchr(exepath, '\\'); ++ ASSERT_NOT_NULL(sep); ++ ++ /* Split into dirname and basename and make basename relative. */ ++ memmove(sep + 2, sep, 1 + strlen(sep)); ++ sep[0] = '\0'; ++ sep[1] = '.'; ++ sep[2] = '/'; ++ ++ options.cwd = exepath; ++ options.file = options.args[0] = sep + 1; ++ ++ ASSERT_EQ(0, uv_spawn(uv_default_loop(), &process, &options)); ++ ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ++ ++ ASSERT_EQ(1, exit_cb_called); ++ ASSERT_EQ(1, close_cb_called); ++ ++ MAKE_VALGRIND_HAPPY(); ++ return 0; ++} From 64517b36efb06464fcf6d2f214fd75d833fdb07a Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 21 Apr 2022 10:25:51 +0200 Subject: [PATCH 299/811] build: fix intermittent compilation failures on macOS (#33768) * build: fix intermittent compilation failures on macOS * chore: remove //base dependency from main executable * chore: fix lint Co-authored-by: deepak1556 --- BUILD.gn | 1 - shell/app/electron_main_mac.cc | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 039250e5a955a..883f9c4146e3a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1072,7 +1072,6 @@ if (is_mac) { "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 = [ diff --git a/shell/app/electron_main_mac.cc b/shell/app/electron_main_mac.cc index c040db6624c63..c817df186e205 100644 --- a/shell/app/electron_main_mac.cc +++ b/shell/app/electron_main_mac.cc @@ -10,7 +10,6 @@ #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 @@ -33,7 +32,8 @@ int main(int argc, char* argv[]) { FixStdioStreams(); #if BUILDFLAG(ENABLE_RUN_AS_NODE) - if (electron::fuses::IsRunAsNodeEnabled() && IsEnvSet(electron::kRunAsNode)) { + if (electron::fuses::IsRunAsNodeEnabled() && + IsEnvSet("ELECTRON_RUN_AS_NODE")) { return ElectronInitializeICUandStartNode(argc, argv); } #endif From e864bc44c66de68e6b1645a41e79a1eda77538c2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 06:05:18 -0700 Subject: [PATCH 300/811] Bump v20.0.0-nightly.20220421 --- 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 aa0390e8d18bb..1cebb017206ab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220420 \ No newline at end of file +20.0.0-nightly.20220421 \ No newline at end of file diff --git a/package.json b/package.json index fe2fbaa3e04be..771724ee7b2d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220420", + "version": "20.0.0-nightly.20220421", "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 34f9c73045a19..6778ac033fe5e 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 20,0,0,20220420 - PRODUCTVERSION 20,0,0,20220420 + FILEVERSION 20,0,0,20220421 + PRODUCTVERSION 20,0,0,20220421 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 33e9bfd99bd6b8802aa60fefcf3c87df2341b837 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 21 Apr 2022 14:34:25 -0700 Subject: [PATCH 301/811] build: improve circleci config (#33881) * build: fix conditional restore of git cache * build: split lint out of setup.yml --- .circleci/.gitignore | 1 + .circleci/config.yml | 117 ++++-------------- .../{build_config.yml => config/base.yml} | 57 +++++++-- .circleci/config/build.js | 34 +++++ .circleci/config/jobs/lint.yml | 51 ++++++++ .circleci/config/package.json | 10 ++ .circleci/config/yarn.lock | 43 +++++++ 7 files changed, 207 insertions(+), 106 deletions(-) create mode 100644 .circleci/.gitignore rename .circleci/{build_config.yml => config/base.yml} (97%) create mode 100644 .circleci/config/build.js create mode 100644 .circleci/config/jobs/lint.yml create mode 100644 .circleci/config/package.json create mode 100644 .circleci/config/yarn.lock diff --git a/.circleci/.gitignore b/.circleci/.gitignore new file mode 100644 index 0000000000000..2b7d56379cacd --- /dev/null +++ b/.circleci/.gitignore @@ -0,0 +1 @@ +config-staging diff --git a/.circleci/config.yml b/.circleci/config.yml index 344b434438134..adcf9e502490c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ setup: true # Orbs orbs: path-filtering: circleci/path-filtering@0.1.0 + continuation: circleci/continuation@0.2.0 # All input parameters to pass to build config parameters: @@ -43,103 +44,33 @@ 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: - 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 >> - -# List of always run steps -step-checkout-electron: &step-checkout-electron - checkout: - path: src/electron - -steps-lint: &steps-lint - steps: - - *step-checkout-electron - - run: - name: Setup third_party Depot Tools - command: | - # "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file. - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools - echo 'export PATH="$PATH:'"$PWD"'/src/third_party/depot_tools"' >> $BASH_ENV - - run: - name: Download GN Binary - command: | - chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" - gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)" - - cipd ensure -ensure-file - -root . \<<-CIPD - \$ServiceURL https://chrome-infra-packages.appspot.com/ - @Subdir src/buildtools/linux64 - gn/gn/linux-amd64 $gn_version - CIPD - - echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV - - run: - name: Download clang-format Binary - command: | - chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" - - sha1_path='buildtools/linux64/clang-format.sha1' - curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}" - - download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}" - - run: - name: Run Lint - command: | - # gn.py tries to find a gclient root folder starting from the current dir. - # When it fails and returns "None" path, the whole script fails. Let's "fix" it. - touch .gclient - # Another option would be to checkout "buildtools" inside the Electron checkout, - # but then we would lint its contents (at least gn format), and it doesn't pass it. - - cd src/electron - node script/yarn install --frozen-lockfile - node script/yarn lint - - run: - name: Run Script Typechecker - command: | - cd src/electron - node script/yarn tsc -p tsconfig.script.json - -# List of always run jobs. jobs: - lint: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *steps-lint - -# Initial setup workflow -workflows: - lint: - jobs: - # Job inherited from path-filtering orb - - path-filtering/filter: + generate-config: + docker: + - image: cimg/node:16.14 + steps: + - checkout + - path-filtering/set-parameters: 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 + - run: + command: | + cd .circleci/config + yarn + export CIRCLECI_BINARY="$HOME/circleci" + curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | DESTDIR=$CIRCLECI_BINARY bash + node build.js + name: Pack config.yml + - continuation/continue: + configuration_path: .circleci/config-staging/built.yml + parameters: /tmp/pipeline-parameters.json + +# Initial setup workflow +workflows: + setup: + jobs: + - generate-config diff --git a/.circleci/build_config.yml b/.circleci/config/base.yml similarity index 97% rename from .circleci/build_config.yml rename to .circleci/config/base.yml index d66ece9a80bac..a9f5ba36b3b61 100644 --- a/.circleci/build_config.yml +++ b/.circleci/config/base.yml @@ -927,12 +927,12 @@ step-touch-sync-done: &step-touch-sync-done step-maybe-restore-src-cache: &step-maybe-restore-src-cache restore_cache: keys: - - v12-src-cache-{{ checksum "src/electron/.depshash" }} + - v14-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: - - v5-src-cache-marker-{{ checksum "src/electron/.depshash" }} + - v14-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 @@ -941,10 +941,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 + - git-cache keys: - - v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - - v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} + - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }} name: Conditionally restoring git cache step-restore-out-cache: &step-restore-out-cache @@ -961,15 +961,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="$PWD/gclient-cache"' >> $BASH_ENV + echo 'export GIT_CACHE_PATH="$PWD/git-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: v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - git-cache + key: v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} name: Persisting git cache step-save-out-cache: &step-save-out-cache @@ -1014,7 +1014,7 @@ step-save-src-cache: &step-save-src-cache save_cache: paths: - /var/portal - key: v12-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v14-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} name: Persisting src cache step-make-src-cache-marker: &step-make-src-cache-marker run: @@ -1024,7 +1024,7 @@ step-save-src-cache-marker: &step-save-src-cache-marker save_cache: paths: - .src-cache-marker - key: v5-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v14-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change run: @@ -1401,12 +1401,40 @@ commands: - *step-checkout-electron - *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-save-git-cache + # Mark sync as done _after_ saving the git cache so that it is uploaded + # only when the src cache was not present + # Their are theoretically two cases for this cache key + # 1. `vX-git-cache-DONE-{deps_hash} + # 2. `vX-git-cache-EMPTY-{deps_hash} + # + # Case (1) occurs when the flag file has "DONE" in it + # which only occurs when "step-mark-sync-done" is run + # or when the src cache was restored successfully as that + # flag file contains "DONE" in the src cache. + # + # Case (2) occurs when the flag file is empty, this occurs + # when the src cache was not restored and "step-mark-sync-done" + # has not run yet. + # + # Notably both of these cases also have completely different + # gclient cache states. + # In (1) the git cache is completely empty as we didn't run + # "gclient sync" because the src cache was restored. + # In (2) the git cache is full as we had to run "gclient sync" + # + # This allows us to do make the follow transitive assumption: + # In cases where the src cache is restored, saving the git cache + # will save an empty cache. In cases where the src cache is built + # during this build the git cache will save a full cache. + # + # In order words if there is a src cache for a given DEPS hash + # the git cache restored will be empty. But if the src cache + # is missing we will restore a useful git cache. + - *step-mark-sync-done - *step-minimize-workspace-size-from-checkout - *step-delete-git-directories - when: @@ -2475,3 +2503,6 @@ workflows: ignore: /pull\/[0-9]+/ requires: - mas-testing-arm64 + lint: + jobs: + - lint diff --git a/.circleci/config/build.js b/.circleci/config/build.js new file mode 100644 index 0000000000000..4e255608a0905 --- /dev/null +++ b/.circleci/config/build.js @@ -0,0 +1,34 @@ +const cp = require('child_process'); +const fs = require('fs-extra'); +const path = require('path'); +const yaml = require('js-yaml'); + +const STAGING_DIR = path.resolve(__dirname, '..', 'config-staging'); + +function copyAndExpand(dir = './') { + const absDir = path.resolve(__dirname, dir); + const targetDir = path.resolve(STAGING_DIR, dir); + + if (!fs.existsSync(targetDir)) { + fs.mkdirSync(targetDir); + } + + for (const file of fs.readdirSync(absDir)) { + if (!file.endsWith('.yml')) { + if (fs.statSync(path.resolve(absDir, file)).isDirectory()) { + copyAndExpand(path.join(dir, file)); + } + continue; + } + + fs.writeFileSync(path.resolve(targetDir, file), yaml.dump(yaml.load(fs.readFileSync(path.resolve(absDir, file), 'utf8')), { + noRefs: true, + })); + } +} + +if (fs.pathExists(STAGING_DIR)) fs.removeSync(STAGING_DIR); +copyAndExpand(); + +const output = cp.spawnSync(process.env.CIRCLECI_BINARY || 'circleci', ['config', 'pack', STAGING_DIR]); +fs.writeFileSync(path.resolve(STAGING_DIR, 'built.yml'), output.stdout.toString()); diff --git a/.circleci/config/jobs/lint.yml b/.circleci/config/jobs/lint.yml new file mode 100644 index 0000000000000..2137566547120 --- /dev/null +++ b/.circleci/config/jobs/lint.yml @@ -0,0 +1,51 @@ +executor: + name: linux-docker + size: medium +steps: + - checkout: + path: src/electron + - run: + name: Setup third_party Depot Tools + command: | + # "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file. + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools + echo 'export PATH="$PATH:'"$PWD"'/src/third_party/depot_tools"' >> $BASH_ENV + - run: + name: Download GN Binary + command: | + chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" + gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)" + + cipd ensure -ensure-file - -root . \<<-CIPD + \$ServiceURL https://chrome-infra-packages.appspot.com/ + @Subdir src/buildtools/linux64 + gn/gn/linux-amd64 $gn_version + CIPD + + echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV + - run: + name: Download clang-format Binary + command: | + chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" + + sha1_path='buildtools/linux64/clang-format.sha1' + curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}" + + download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}" + - run: + name: Run Lint + command: | + # gn.py tries to find a gclient root folder starting from the current dir. + # When it fails and returns "None" path, the whole script fails. Let's "fix" it. + touch .gclient + # Another option would be to checkout "buildtools" inside the Electron checkout, + # but then we would lint its contents (at least gn format), and it doesn't pass it. + + cd src/electron + node script/yarn install --frozen-lockfile + node script/yarn lint + - run: + name: Run Script Typechecker + command: | + cd src/electron + node script/yarn tsc -p tsconfig.script.json diff --git a/.circleci/config/package.json b/.circleci/config/package.json new file mode 100644 index 0000000000000..054dd7c11cc9e --- /dev/null +++ b/.circleci/config/package.json @@ -0,0 +1,10 @@ +{ + "name": "@electron/circleci-config", + "version": "0.0.0", + "private": true, + "license": "MIT", + "dependencies": { + "fs-extra": "^10.1.0", + "js-yaml": "^4.1.0" + } +} diff --git a/.circleci/config/yarn.lock b/.circleci/config/yarn.lock new file mode 100644 index 0000000000000..51b2d9877643f --- /dev/null +++ b/.circleci/config/yarn.lock @@ -0,0 +1,43 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== From bb146e3deb15db0462c43e64ba1d2a5faccc9c6e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 06:01:30 -0700 Subject: [PATCH 302/811] Bump v20.0.0-nightly.20220422 --- 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 1cebb017206ab..664ae84494ade 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220421 \ No newline at end of file +20.0.0-nightly.20220422 \ No newline at end of file diff --git a/package.json b/package.json index 771724ee7b2d7..7f63479fea508 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220421", + "version": "20.0.0-nightly.20220422", "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 6778ac033fe5e..adece31432a58 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 20,0,0,20220421 - PRODUCTVERSION 20,0,0,20220421 + FILEVERSION 20,0,0,20220422 + PRODUCTVERSION 20,0,0,20220422 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0c8c755ffb13b18bdaf3f0533661fc8515a112bf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 09:17:29 -0700 Subject: [PATCH 303/811] Revert "Bump v20.0.0-nightly.20220422" This reverts commit bb146e3deb15db0462c43e64ba1d2a5faccc9c6e. --- 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 664ae84494ade..1cebb017206ab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220422 \ No newline at end of file +20.0.0-nightly.20220421 \ No newline at end of file diff --git a/package.json b/package.json index 7f63479fea508..771724ee7b2d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220422", + "version": "20.0.0-nightly.20220421", "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 adece31432a58..6778ac033fe5e 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 20,0,0,20220422 - PRODUCTVERSION 20,0,0,20220422 + FILEVERSION 20,0,0,20220421 + PRODUCTVERSION 20,0,0,20220421 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a5501d71182326b132648b4683d6819b1c28ae90 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 09:18:12 -0700 Subject: [PATCH 304/811] Bump v20.0.0-nightly.20220422 --- 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 1cebb017206ab..664ae84494ade 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220421 \ No newline at end of file +20.0.0-nightly.20220422 \ No newline at end of file diff --git a/package.json b/package.json index 771724ee7b2d7..7f63479fea508 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220421", + "version": "20.0.0-nightly.20220422", "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 6778ac033fe5e..adece31432a58 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 20,0,0,20220421 - PRODUCTVERSION 20,0,0,20220421 + FILEVERSION 20,0,0,20220422 + PRODUCTVERSION 20,0,0,20220422 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e571417c522da40f7a66904bf332e7b6783d2cd3 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 09:22:41 -0700 Subject: [PATCH 305/811] Revert "Bump v20.0.0-nightly.20220422" This reverts commit a5501d71182326b132648b4683d6819b1c28ae90. --- 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 664ae84494ade..1cebb017206ab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220422 \ No newline at end of file +20.0.0-nightly.20220421 \ No newline at end of file diff --git a/package.json b/package.json index 7f63479fea508..771724ee7b2d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220422", + "version": "20.0.0-nightly.20220421", "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 adece31432a58..6778ac033fe5e 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 20,0,0,20220422 - PRODUCTVERSION 20,0,0,20220422 + FILEVERSION 20,0,0,20220421 + PRODUCTVERSION 20,0,0,20220421 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 283e4826afb497e2a1b1ec5d158ea4df6282d1f1 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:40:22 -0700 Subject: [PATCH 306/811] Bump v20.0.0-nightly.20220422 --- 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 1cebb017206ab..664ae84494ade 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220421 \ No newline at end of file +20.0.0-nightly.20220422 \ No newline at end of file diff --git a/package.json b/package.json index 771724ee7b2d7..7f63479fea508 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220421", + "version": "20.0.0-nightly.20220422", "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 6778ac033fe5e..adece31432a58 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 20,0,0,20220421 - PRODUCTVERSION 20,0,0,20220421 + FILEVERSION 20,0,0,20220422 + PRODUCTVERSION 20,0,0,20220422 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 53c3dd68b29e2a864aff9cb6d758a727e5665972 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:45:02 -0700 Subject: [PATCH 307/811] Revert "Bump v20.0.0-nightly.20220422" This reverts commit 283e4826afb497e2a1b1ec5d158ea4df6282d1f1. --- 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 664ae84494ade..1cebb017206ab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220422 \ No newline at end of file +20.0.0-nightly.20220421 \ No newline at end of file diff --git a/package.json b/package.json index 7f63479fea508..771724ee7b2d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220422", + "version": "20.0.0-nightly.20220421", "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 adece31432a58..6778ac033fe5e 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 20,0,0,20220422 - PRODUCTVERSION 20,0,0,20220422 + FILEVERSION 20,0,0,20220421 + PRODUCTVERSION 20,0,0,20220421 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f3e0517b6e1ddb0fbd05949007720d685fc86924 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 15:36:22 -0700 Subject: [PATCH 308/811] chore: bump chromium to 102.0.4999.0 (main) (#33731) * chore: bump chromium in DEPS to 102.0.4999.0 * 3576640: Set OOM handler during V8 initialization https://chromium-review.googlesource.com/c/chromium/src/+/3576640 * 3574964: Remove deprecated base::Value usage in print_settings_conversion code. https://chromium-review.googlesource.com/c/chromium/src/+/3574964 * 3570062: Replicate Active state to render process for all RenderViews. https://chromium-review.googlesource.com/c/chromium/src/+/3570062 * chore: fixup patch indices * 3380402: Remove legacy SwiftShader https://chromium-review.googlesource.com/c/chromium/src/+/3380402 * 3570254: [Local Fonts] Rename permission name from FONT_ACCESS to LOCAL_FONTS. https://chromium-review.googlesource.com/c/chromium/src/+/3570254 * 3572172: Rename or remove several parameters involved in creation of MimeHandler streams https://chromium-review.googlesource.com/c/chromium/src/+/3572172 * fix: add missing base/bits include * chore: fix lint * chore: remove ia32 Linux support * chore: patch out swift-format cipd dep on macOS * build: apply patch better * build: reset all caches * build: update zip manifests to remove swiftshared libraries Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3380402 * Revert "build: update zip manifests to remove swiftshared libraries" This reverts commit 6aeec01ef1a79425a7b7d8c1cfb131a26b91c494. * Revert "3380402: Remove legacy SwiftShader" This reverts commit 4c7eebbbf2d0a459cc192959e17ae20f970c2da2. * build: remove unused swiftshader egl libraries Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr Co-authored-by: Samuel Attard --- .circleci/config/base.yml | 145 ++---------------- BUILD.gn | 50 +++--- DEPS | 2 +- docs/development/build-instructions-linux.md | 2 +- .../add_didinstallconditionalfeatures.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 6 +- ..._windows_to_have_different_web_prefs.patch | 20 +-- patches/chromium/blink_local_frame.patch | 8 +- ..._depend_on_packed_resource_integrity.patch | 16 +- patches/chromium/can_create_window.patch | 18 +-- ..._v8_initialization_isolate_callbacks.patch | 4 +- ...screationoverridden_with_full_params.patch | 6 +- patches/chromium/dcheck.patch | 2 +- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 8 +- ...ll_getwebframe_-_view_when_get_blink.patch | 2 +- .../extend_apply_webpreferences.patch | 4 +- ..._raw_response_headers_from_urlloader.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 54 +++---- .../chromium/gritsettings_resource_ids.patch | 2 +- ...nse_interceptor_to_point_to_electron.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- patches/chromium/isolate_holder.patch | 22 +-- .../mas_disable_remote_accessibility.patch | 2 +- patches/chromium/printing.patch | 54 +++---- ...r_changes_to_the_webcontentsobserver.patch | 18 +-- .../render_widget_host_view_base.patch | 6 +- patches/chromium/resource_file_conflict.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- patches/chromium/web_contents.patch | 2 +- patches/chromium/webview_cross_drag.patch | 2 +- patches/chromium/webview_fullscreen.patch | 4 +- patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 8 +- patches/v8/expose_mksnapshot.patch | 4 +- ...eleted_cstors_in_cppheapcreateparams.patch | 2 +- script/release/ci-release-build.js | 2 +- script/release/release.js | 6 - .../zip_manifests/dist_zip.mac.arm64.manifest | 2 - .../zip_manifests/dist_zip.mac.x64.manifest | 2 - .../dist_zip.mac_mas.arm64.manifest | 2 - .../dist_zip.mac_mas.x64.manifest | 2 - .../streams_private/streams_private_api.cc | 17 +- .../api/streams_private/streams_private_api.h | 20 +-- shell/browser/javascript_environment.cc | 12 +- .../gin_converters/content_converter.cc | 4 +- 49 files changed, 217 insertions(+), 375 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index a9f5ba36b3b61..82c78df50c64e 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -24,7 +24,7 @@ parameters: linux-publish-arch-limit: type: enum default: all - enum: ["all", "arm", "arm64", "x64", "ia32"] + enum: ["all", "arm", "arm64", "x64"] run-macos-publish: type: boolean @@ -115,12 +115,6 @@ env-unittests: &env-unittests 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 @@ -246,11 +240,20 @@ 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 + # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja else sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja + # Remove swift-format dep from cipd on macOS until we send a patch upstream. + cd depot_tools + patch gclient.py -R \<<'EOF' + 676,677c676 + < packages = dep_value.get('packages', []) + < for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')): + --- + > for package in dep_value.get('packages', []): + EOF fi step-depot-tools-add-to-path: &step-depot-tools-add-to-path @@ -343,14 +346,14 @@ step-restore-brew-cache: &step-restore-brew-cache - /usr/local/Cellar/gnu-tar - /usr/local/bin/gtar keys: - - v4-brew-cache-{{ arch }} + - v5-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 }} + key: v5-brew-cache-{{ arch }} name: Persisting brew cache step-get-more-space-on-mac: &step-get-more-space-on-mac @@ -586,8 +589,6 @@ step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip 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 @@ -618,8 +619,6 @@ step-electron-dist-build: &step-electron-dist-build 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 @@ -952,7 +951,7 @@ step-restore-out-cache: &step-restore-out-cache paths: - ./src/out/Default keys: - - v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }} + - v10-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 @@ -976,7 +975,7 @@ 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" }} + key: v10-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 @@ -1802,54 +1801,6 @@ jobs: 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 @@ -2240,60 +2191,6 @@ jobs: <<: *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: @@ -2371,8 +2268,6 @@ workflows: jobs: - linux-x64-publish: context: release-env - - linux-ia32-publish: - context: release-env - linux-arm-publish: context: release-env - linux-arm64-publish: @@ -2426,16 +2321,6 @@ workflows: - 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: diff --git a/BUILD.gn b/BUILD.gn index 883f9c4146e3a..fb64d22339ec1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -818,16 +818,11 @@ if (is_mac) { # Add the SwiftShader .dylibs in the Libraries directory of the Framework. bundle_data("electron_swiftshader_binaries") { sources = [ - "$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib", - "$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib", "$root_out_dir/vk_intermediates/libvk_swiftshader.dylib", "$root_out_dir/vk_intermediates/vk_swiftshader_icd.json", ] outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ] - public_deps = [ - "//ui/gl:swiftshader_egl_library_copy", - "//ui/gl:swiftshader_vk_library_copy", - ] + public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ] } } group("electron_angle_library") { @@ -1123,21 +1118,18 @@ if (is_mac) { deps = [ ":electron_app" ] } - extract_symbols("swiftshader_egl_syms") { - binary = "$root_out_dir/libswiftshader_libEGL.dylib" + extract_symbols("egl_syms") { + binary = "$root_out_dir/ibEGL.dylib" symbol_dir = "$root_out_dir/breakpad_symbols" - dsym_file = "$root_out_dir/libswiftshader_libEGL.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libEGL.dylib" - deps = - [ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ] + dsym_file = "$root_out_dir/libEGL.dylib.dSYM/Contents/Resources/DWARF/libEGL.dylib" + deps = [ "//third_party/angle:libEGL" ] } - extract_symbols("swiftshader_gles_syms") { - binary = "$root_out_dir/libswiftshader_libGLESv2.dylib" + extract_symbols("gles_syms") { + binary = "$root_out_dir/libGLESv2.dylib" symbol_dir = "$root_out_dir/breakpad_symbols" - dsym_file = "$root_out_dir/libswiftshader_libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libGLESv2.dylib" - deps = [ - "//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2", - ] + dsym_file = "$root_out_dir/libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libGLESv2.dylib" + deps = [ "//third_party/angle:libGLESv2" ] } extract_symbols("crashpad_handler_syms") { @@ -1149,10 +1141,10 @@ if (is_mac) { group("electron_symbols") { deps = [ + ":egl_syms", ":electron_app_syms", ":electron_framework_syms", - ":swiftshader_egl_syms", - ":swiftshader_gles_syms", + ":gles_syms", ] if (!is_mas_build) { @@ -1307,27 +1299,23 @@ if (is_mac) { deps = [ ":electron_app" ] } - extract_symbols("swiftshader_egl_symbols") { - binary = "$root_out_dir/swiftshader/libEGL$_target_shared_library_suffix" + extract_symbols("egl_symbols") { + binary = "$root_out_dir/libEGL$_target_shared_library_suffix" symbol_dir = "$root_out_dir/breakpad_symbols" - deps = - [ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ] + deps = [ "//third_party/angle:libEGL" ] } - extract_symbols("swiftshader_gles_symbols") { - binary = - "$root_out_dir/swiftshader/libGLESv2$_target_shared_library_suffix" + extract_symbols("gles_symbols") { + binary = "$root_out_dir/libGLESv2$_target_shared_library_suffix" symbol_dir = "$root_out_dir/breakpad_symbols" - deps = [ - "//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2", - ] + deps = [ "//third_party/angle:libGLESv2" ] } group("electron_symbols") { deps = [ + ":egl_symbols", ":electron_app_symbols", - ":swiftshader_egl_symbols", - ":swiftshader_gles_symbols", + ":gles_symbols", ] } } diff --git a/DEPS b/DEPS index 191d6b86c7db5..f6d9b49af0592 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '102.0.4989.0', + '102.0.4999.0', 'node_version': 'v16.14.2', 'nan_version': diff --git a/docs/development/build-instructions-linux.md b/docs/development/build-instructions-linux.md index 3bdd96863ceba..7663773e511b4 100644 --- a/docs/development/build-instructions-linux.md +++ b/docs/development/build-instructions-linux.md @@ -82,7 +82,7 @@ $ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \ g++-aarch64-linux-gnu ``` -And to cross-compile for `arm` or `ia32` targets, you should pass the +And to cross-compile for `arm` or targets, you should pass the `target_cpu` parameter to `gn gen`: ```sh diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index be61078f2626f..0be836b9cb0d2 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,7 +23,7 @@ index eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 448e5e6eab9e3bb98569a1d60619732173a396d2..88ba5eb82133a665cd5f9bdc52746c605c95509f 100644 +index 596dc721842c707844a771d64337e9cf0d82bfcc..b9eea3470139e1833b2b23d3b535b11235e2bc8e 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -4465,6 +4465,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, 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 b0d67115605e2..1e65be856e7b0 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 a1427a6a95583ae853284b97cab77d577172e60e..4645764213c82e73532f7c61ed03f919 // 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 0dc6c707cdbe14aec69f72575941c16a50ac2ce4..177e463358c3e8e94044f2ccc8eb2cf4a8ce7525 100644 +index d7b5e40a26026b7f4640c2f405fadab4a800e267..b2a2e38397fdf3e9bb52c4532a1d14463ed4110d 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3693,6 +3693,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3688,6 +3688,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 0dc6c707cdbe14aec69f72575941c16a50ac2ce4..177e463358c3e8e94044f2ccc8eb2cf4 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3704,7 +3711,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3699,7 +3706,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( 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 4d55e26c12764..020ad8959be89 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 a422f50719e4c6a4fc96364d0370272695aab15f..eb310c01b11ccd2d8aeb8065dd4aa5e252b16f7c 100644 +index 4e51622d725ad0ee448ea1794c209aae7f78e09a..df6e9ed6fda9e6fa695fa3ab717847735dc63b17 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -141,6 +141,20 @@ WebPreferences::WebPreferences() +@@ -140,6 +140,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 a422f50719e4c6a4fc96364d0370272695aab15f..eb310c01b11ccd2d8aeb8065dd4aa5e2 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 e37be0929c0fc05f0e8e8bbe702cb6e2b6a4ac18..36a8ca7796a3e021df869ebacd7d76ed4d63e59d 100644 +index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadcc12afd1a 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( -@@ -147,6 +151,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index e37be0929c0fc05f0e8e8bbe702cb6e2b6a4ac18..36a8ca7796a3e021df869ebacd7d76ed 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 d682f3bf81da362cc6721817189ae0222ebad087..e1cf124e87b507a841044096d8325a4043fe2d1e 100644 +index b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f0812c41aab 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 d682f3bf81da362cc6721817189ae0222ebad087..e1cf124e87b507a841044096d8325a40 #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" -@@ -156,6 +157,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -152,6 +153,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index d682f3bf81da362cc6721817189ae0222ebad087..e1cf124e87b507a841044096d8325a40 // 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 d09fed37e7a57e4f7399277dd116e306233019e4..87008b486c25918f5737880b97ca37d003434fac 100644 +index 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691eccaf3cd7b19 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 d09fed37e7a57e4f7399277dd116e306233019e4..87008b486c25918f5737880b97ca37d0 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -423,6 +424,60 @@ 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 cf424b45c60ee6cd8fcb5bced73332ffd4b60c2d..17d59201aa0e4f077536ec29a3c59bd4e1d831a7 100644 +index b95ed440737ccdf32607c90831d13a482315d515..73f7aeee21f0116e46dad91cb9a088ab5adda6e3 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -542,10 +542,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -543,10 +543,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index cf424b45c60ee6cd8fcb5bced73332ffd4b60c2d..17d59201aa0e4f077536ec29a3c59bd4 if (!Client()) return false; -@@ -591,6 +587,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -592,6 +588,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); 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 4c64f9bb9664d..17729820471d9 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 ff2e479125f1a6d7cbb52e4f674cb836d4f6596c..f334b0b4fd4a6550c3b2baba870c5997f24db1ab 100644 +index 3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4..b5a20be5e22238e7e1969bdaf52c0b05e84bb846 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index ff2e479125f1a6d7cbb52e4f674cb836d4f6596c..f334b0b4fd4a6550c3b2baba870c5997 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 158bfba2bc80925c49821453df63664a571ad571..e0a7d98c75c9692ce13ff3f2fb97852e91ead91f 100644 +index 02e4b0e27f4a0d3409327ba929f78b129dc06385..dce624825dc8e9e545c15a0cb0427aa33877aa3e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4539,7 +4539,7 @@ static_library("browser") { +@@ -4552,7 +4552,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 158bfba2bc80925c49821453df63664a571ad571..e0a7d98c75c9692ce13ff3f2fb97852e sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index f04d3f3303eace8a7ef6b996197c4ff58aca8c37..15b5311dcf2e43a8703b714e688da683392e9b36 100644 +index 060e49987d27be37afb2b85e658525d4edc08df6..3333bb6be0d07eff9d4ef5aea446c44c00b3d3af 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5984,7 +5984,6 @@ test("unit_tests") { +@@ -5995,7 +5995,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index f04d3f3303eace8a7ef6b996197c4ff58aca8c37..15b5311dcf2e43a8703b714e688da683 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -6007,6 +6006,10 @@ test("unit_tests") { +@@ -6018,6 +6017,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index f04d3f3303eace8a7ef6b996197c4ff58aca8c37..15b5311dcf2e43a8703b714e688da683 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6695,7 +6698,6 @@ test("unit_tests") { +@@ -6706,7 +6709,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index f04d3f3303eace8a7ef6b996197c4ff58aca8c37..15b5311dcf2e43a8703b714e688da683 "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6743,6 +6745,11 @@ test("unit_tests") { +@@ -6754,6 +6756,11 @@ test("unit_tests") { if (is_chromeos) { deps += [ "//ui/chromeos" ] } diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 978b5c4c8e288..4fb371adedae3 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 c9f0b4a30f8df2ba2a12914b447cede52ed1ff85..a5d6618aac35f01e09a90bdafa9f60c8140b088c 100644 +index 9b08d7bbbda75390813ff07e0dc83bb9d16992a6..b47dc4a90a0294c5d7e73f01c496fd2b4f621400 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6937,6 +6937,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6939,6 +6939,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 c9f0b4a30f8df2ba2a12914b447cede52ed1ff85..a5d6618aac35f01e09a90bdafa9f60c8 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6261962f55f065d4edc0641ce8927143468add8a..cf37734d313470c27d2d40bd90cb199234a1e99e 100644 +index d0092176fd24acb0657819d666e4f76ec65012ec..df03de0a810bbce796d5bc421b92000e02dbd449 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3943,6 +3943,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -53,7 +53,7 @@ index 6261962f55f065d4edc0641ce8927143468add8a..cf37734d313470c27d2d40bd90cb1992 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 28144893598e6b4caa18cd23fea1da3ca1f406b1..8b83eb8c342499ec7a677cd849f0e3c17d955a38 100644 +index a7f36529608011013dab96a803ad3187c940fc81..2bbcea3efede2fda4ff2c5b270e1db0135c54290 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -569,6 +569,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index 28144893598e6b4caa18cd23fea1da3ca1f406b1..8b83eb8c342499ec7a677cd849f0e3c1 // 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 2a51c8c4d4cd21c0dc106dbb3b2e4e940a47319b..79479dd5fc7e0a9c27e75b85e1380c38f32f6fe7 100644 +index ffa24d4b6779226ea3b94afdf176939ea7e42e34..16fb4946cb3ea2d097e8ed05bb340cc3f0782ed6 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -578,6 +578,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -579,6 +579,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 2a51c8c4d4cd21c0dc106dbb3b2e4e940a47319b..79479dd5fc7e0a9c27e75b85e1380c38 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 d6ad990189520f7fc15e04c1c4bd03588d3ee81e..6aa01e2f4e8227f0c1cb78b88009728efccdd998 100644 +index ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d563d5aafc 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -164,6 +164,7 @@ class NetworkService; +@@ -165,6 +165,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index d6ad990189520f7fc15e04c1c4bd03588d3ee81e..6aa01e2f4e8227f0c1cb78b88009728e } // namespace network namespace sandbox { -@@ -953,6 +954,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -954,6 +955,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch index 574913f05552a..dfbf2c9b770cd 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 66dddc124ca48024cb9539529b787f6e9aa1fd5c..fd6dc712df185724ae88a40e643a26126e54d712 100644 +index 90d3a635eec331130b738d0839cc9fdfa60ce451..9eb900ff4449f277f8c5ab3ccc29b0aa725be356 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -446,8 +446,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, +@@ -448,8 +448,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 2b88e17531304..1230a33e25953 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -183,7 +183,7 @@ index ed23267cd9f28f4e02d8374177f0bb697547cc2a..a979719f75ab4c9b49775ec3df5eff13 } 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 1911b0558fad1d5834befa98e57a978e6e0b72da..cb85515f79617a32e2809ad6eb7f55e4ecc36b3f 100644 +index 1a6bbeea689901e23717d660e67f8d1abb21f799..85f7b42e7aadce3abcae9f9596403f9856771993 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( @@ -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 63b01c486f56499bbc2acff0b5abdbf24b0ce676..aeb111257740cd8c73e88c9b15d1f95fd49240c4 100644 +index b9309e1cbc4a8b701534aa8be2827c40d98d6678..c1b1bfc8333e93456178842db392eabff96bf4c9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3891,8 +3891,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -316,7 +316,7 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10 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 56b6d5d28fe21a2bea723060ad48ee0134e814a2..a3da9c86c0018e7f4810feb73ca32896cd6ce93c 100644 +index b652f1f30ce7043a0c8434d05a3b1da653aee1fc..259c62c60f302abebf167709b4a1c68ad5607129 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 @@ -402,8 +402,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 4832704e4e759..0b4fa1aa751ef 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,7 +17,7 @@ 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 a4d74f8e59673d4734ef338235c027bd1c77e92e..6969d1c69ee215055bd49a2bf830416c9e8b62c8 100644 +index ab0afb79514e42acb87e94809ed4a2b7c736a825..23fb303820860a030643d6d5a1a449823bb146e8 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 @@ -515,8 +515,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index cb16038fb732b..85264ef143680 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 54a1142f17e2a63b86e1fab52ea90276091c85a4..df9381bf8dc4b2b85548c529038f60cc3185fcdd 100644 +index 18c77a5520ea2ae7cfee4eea3ed01fa8a588829d..557b77bea785108359b0c78f12c2b2afbdc2475d 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -511,7 +511,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 8b054f701425d..4ccc6a9d37635 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 04bba6457636018af2f76f0e218076e993f47467..7e421c72e3cb9abd9c3dc6542afed08f3910df93 100644 +index 9e740edbf36dd7a30062c88f857103c56eebd729..7cda66952e0d3a67c32791ad3c7d7de8df03f876 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -808,6 +808,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,10 +20,10 @@ index 04bba6457636018af2f76f0e218076e993f47467..7e421c72e3cb9abd9c3dc6542afed08f 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 cb2dd8695096c4eda0b4c1782fa9ebd7a05e2b7b..22ba56a675f28abd9857e3c6d4b9908c568df016 100644 +index 23783e5e004b613c27fd753e1f7ff96d51fa5f68..225b4ea0c5ac74d6b6700c306182d003a972cedc 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -877,6 +877,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -886,6 +886,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl SiteInstanceGroup* GetSiteInstanceGroup(); @@ -34,7 +34,7 @@ index cb2dd8695096c4eda0b4c1782fa9ebd7a05e2b7b..22ba56a675f28abd9857e3c6d4b9908c // |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 907de04692ff86a3b287c5e66d4811ed1b31858e..035a168a8520ff28a832a79903dc3efdff596c05 100644 +index 5f29761ad8556e730dca6b076b87f6391313fb95..3e5f5a34150079bf74d612bff85b6875ad41d2e6 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { 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 197e3b15b0834..e35ef06f99372 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,7 +11,7 @@ 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 88ba5eb82133a665cd5f9bdc52746c605c95509f..ceefc966e0b8f79e00d108de78f56f868f08ee67 100644 +index b9eea3470139e1833b2b23d3b535b11235e2bc8e..fbc1f6d8387e33cb7daafc96b7514897f067f008 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -2377,7 +2377,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 1ffad5f73b38c..b6a0b701b7663 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 177e463358c3e8e94044f2ccc8eb2cf4a8ce7525..7efdb7a0cf2db85fadd0db0b6665bdf492f8f5bc 100644 +index b2a2e38397fdf3e9bb52c4532a1d14463ed4110d..9f0f209f279cc3dbe35efc12eb1e51449dfda470 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -160,6 +160,7 @@ @@ -23,7 +23,7 @@ index 177e463358c3e8e94044f2ccc8eb2cf4a8ce7525..7efdb7a0cf2db85fadd0db0b6665bdf4 #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" -@@ -1780,6 +1781,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1777,6 +1778,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 9a069045d5097..c3215e637e3b0 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -103,7 +103,7 @@ index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d6 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 74365833e96d5a3c443e9160e1ada106026ada30..10bc715a2d0bd4cfe750ed222424dd4c7be37979 100644 +index 4c11fd542a66f514a6c36e684a34d0a62053c1f4..6852fd470c79e2fb041bf57a01e2b0b913cb94db 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -469,6 +469,7 @@ URLLoader::URLLoader( @@ -123,7 +123,7 @@ index 74365833e96d5a3c443e9160e1ada106026ada30..10bc715a2d0bd4cfe750ed222424dd4c url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1407,6 +1408,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1411,6 +1412,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 e01dfbd4ead06..aa7e2ee965bab 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 5766344e7ca539e4ac8526eaa651f0079a9f01b1..ca02c970d0e83b24503a5128c5cf088d9e348f3b 100644 +index 07355cb194bd429a693e587072d11432d6c0888a..b74b4209931c6acd6bc2e93a100c3e65a834ead9 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1827,7 +1827,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1828,7 +1828,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 9b3efd6eefcaa..76a94c113f5b7 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 d3228eb29e921f63d74b7291814c7121f99bf8f8..739def8df363d8f33b194c7191a0016eefffcd9a 100644 +index 390ac74f01b5080880dcab65537a22fb7ef0cc41..103dc143f6310a2b9f0a834f7d25cf32207bea86 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3171,6 +3171,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3180,6 +3180,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index d3228eb29e921f63d74b7291814c7121f99bf8f8..739def8df363d8f33b194c7191a0016e } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 6aa01e2f4e8227f0c1cb78b88009728efccdd998..98830a0b12036025b69c74342329f95d74e2c623 100644 +index 9b988bb631ab759739ae01c918efb1d563d5aafc..4db1e6c2dbea27249ca15d5660b7fcd8c6736ad1 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -271,6 +271,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -272,6 +272,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 c25fe7140292c..cfe45b10a0647 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,51 +7,51 @@ 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 00190da513499e6275d19bd99b6502db246cd33d..f273749bd026abb287ba33e03208a286e80a57a1 100644 +index 7b4b42449a60e9309135aae38213cb3b003337e0..7d9068b87eee4dbc3435ed6f67285d428dc85f52 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -121,9 +121,10 @@ IsolateHolder::~IsolateHolder() { - void IsolateHolder::Initialize(ScriptMode mode, - v8::ArrayBuffer::Allocator* allocator, +@@ -123,9 +123,10 @@ void IsolateHolder::Initialize(ScriptMode mode, const intptr_t* reference_table, -- const std::string js_command_line_flags) { -+ const std::string js_command_line_flags, + const std::string js_command_line_flags, + v8::FatalErrorCallback fatal_error_callback, +- v8::OOMErrorCallback oom_error_callback) { ++ v8::OOMErrorCallback oom_error_callback, + bool create_v8_platform) { CHECK(allocator); -- V8Initializer::Initialize(mode, js_command_line_flags); -+ V8Initializer::Initialize(mode, js_command_line_flags, create_v8_platform); +- V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback); ++ V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback, create_v8_platform); g_array_buffer_allocator = allocator; g_reference_table = reference_table; - } + g_fatal_error_callback = fatal_error_callback; diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b1800357818 100644 +index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d064318627452ba852b2 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h @@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder { - static void Initialize(ScriptMode mode, - v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table = nullptr, -- const std::string js_command_line_flags = {}); -+ const std::string js_command_line_flags = {}, + const std::string js_command_line_flags = {}, + v8::FatalErrorCallback fatal_error_callback = nullptr, +- v8::OOMErrorCallback oom_error_callback = nullptr); ++ v8::OOMErrorCallback oom_error_callback = nullptr, + 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 6996e07dd19c0fa29fe658c6cb33adc60969e63e..ee480cc557db3bfd4ff9428324151d071ad1f444 100644 +index 9dddcdf88d56b32a9b8b9be529f0f13a03bd6e06..f4e5be79c1d3b92f6723f7b0c4d9a7f38c81ff99 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -351,7 +351,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, - +@@ -352,7 +352,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, -- const std::string js_command_line_flags) { -+ const std::string js_command_line_flags, + const std::string js_command_line_flags, +- v8::OOMErrorCallback oom_error_callback) { ++ v8::OOMErrorCallback oom_error_callback, + bool create_v8_platform) { static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -361,7 +362,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -362,7 +363,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); @@ -59,18 +59,18 @@ index 6996e07dd19c0fa29fe658c6cb33adc60969e63e..ee480cc557db3bfd4ff9428324151d07 + if (create_v8_platform) + v8::V8::InitializePlatform(V8Platform::Get()); - // Set this early on as some initialization steps, such as the initialization - // of the virtual memory cage, already use V8's random number generator. + // Set this as early as possible in order to ensure OOM errors are reported + // correctly. diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h -index beeedc5737f6e60dde123200fbb6430a40366577..17ee4c894e89b7d2d12377475a5dd01910b61312 100644 +index da5b4017b4a8128bf620d4b43d4c2d183719265b..13a120c7fe8e69a44793473f3124c33d572a07a3 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h -@@ -29,7 +29,8 @@ class GIN_EXPORT V8Initializer { - public: +@@ -31,7 +31,8 @@ class GIN_EXPORT V8Initializer { // This should be called by IsolateHolder::Initialize(). static void Initialize(IsolateHolder::ScriptMode mode, -- const std::string js_command_line_flags = {}); -+ const std::string js_command_line_flags = {}, + const std::string js_command_line_flags = {}, +- v8::OOMErrorCallback oom_error_callback = nullptr); ++ v8::OOMErrorCallback oom_error_callback = nullptr, + bool create_v8_platform = true); // Get address and size information for currently loaded snapshot. diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index c3969f67ffd76..9737467116185 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index b036986b35dac88ab58d572a9e77bf0b1210411a..56f58636177cba954bdd24f8c43fc339a5e9b436 100644 +index 6a91282809a76ca60dd1b329c683705b127eb22a..a2672faad7c39c3d938c1c31abb6fd0d37582fbf 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -954,6 +954,11 @@ 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 2b0621f918e82..af8133b783c0f 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,7 +8,7 @@ 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 b5c0e1c131351a51e3c03918dfc10e92ca1bace1..c6fe2e473a9d8a5ed2854a69909eb360d052147a 100644 +index 9d7479bff662ca3c482e4672a9129e1f83100ebd..cfcc14087d9d5d9ab08ff9a5349a096ec75f4b6a 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 @@ 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 dff95cff6f340..5bf3a6a382a81 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 a8f53aaae2f2dd7e5af3b50a3bf80671a6276581..ee128e30c394c755306a62412b06d15503ccd2f2 100755 +index 694a67b7a0f622c7a8bfc1d46148398140d51384..00b588b268aa059ff84adbbc6ae266aa67e174b1 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index bcf1ff58add19..70d8833b4744a 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,15 +15,15 @@ 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 f273749bd026abb287ba33e03208a286e80a57a1..0159cd61a8e95d6cca51cdc855f1dea3ec965d6b 100644 +index 7d9068b87eee4dbc3435ed6f67285d428dc85f52..c0b8c6e5b49390b8a87d6a9d19605f6b6a1c3562 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -59,7 +59,8 @@ IsolateHolder::IsolateHolder( + IsolateType isolate_type, + IsolateCreationMode isolate_creation_mode, v8::CreateHistogramCallback create_histogram_callback, - v8::AddHistogramSampleCallback add_histogram_sample_callback, - v8::FatalErrorCallback fatal_error_callback, -- v8::OOMErrorCallback oom_error_callback) -+ v8::OOMErrorCallback oom_error_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()) @@ -38,15 +38,15 @@ index f273749bd026abb287ba33e03208a286e80a57a1..0159cd61a8e95d6cca51cdc855f1dea3 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 178023d52c9e8ef716ee215e7a243b1800357818..979fdc27efbe69c276894e0dc82e53ac2c4db7b4 100644 +index 4efc13c79ae742fa1925d064318627452ba852b2..978c0d144370162e65038cf8a2e125fbfd0f7ebf 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -84,7 +84,8 @@ class GIN_EXPORT IsolateHolder { +@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder { + IsolateType isolate_type, + IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, v8::CreateHistogramCallback create_histogram_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::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/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 5dedbca657033..3b5355498e8b6 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -114,7 +114,7 @@ index 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b4 // 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 14fec4b1b39d995553b029ca7ec780ce29b27162..54a1142f17e2a63b86e1fab52ea90276091c85a4 100644 +index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8a588829d 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -252,8 +252,10 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 09a9b9dd6df08..673afb1da0042 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -69,7 +69,7 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 5248f98e3d8e1469afe2ec87f696581cb0ff4687..4fe1faed3bb95407e2d25ea9c868bc0d615ba03c 100644 +index f989f040cb9ff6df001225057202fb1653ade9fc..8a7dd2a4c4e9f5c778a8a35658cb55883ea5fae5 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -88,7 +88,7 @@ index 5248f98e3d8e1469afe2ec87f696581cb0ff4687..4fe1faed3bb95407e2d25ea9c868bc0d #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -232,16 +232,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -230,16 +230,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -114,10 +114,10 @@ index 5248f98e3d8e1469afe2ec87f696581cb0ff4687..4fe1faed3bb95407e2d25ea9c868bc0d #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 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b899e5972 100644 +index 02dfcad0c6b208f7df4d2b10112739554f6ab75c..0774aa95ee1521b0e76fe72d8d9e8de4540f0ff1 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -305,7 +305,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -331,7 +331,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -127,7 +127,7 @@ index 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774bf8b4b9b9 100644 +index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b1071921e7cabb4 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -168,7 +168,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -191,7 +195,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -193,7 +197,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -179,7 +179,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -244,6 +250,7 @@ void ScriptedPrintReplyOnIO( +@@ -246,6 +252,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -187,7 +187,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -253,8 +260,9 @@ void ScriptedPrintReplyOnIO( +@@ -255,8 +262,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -198,7 +198,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -292,12 +300,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -294,12 +302,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -213,7 +213,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -305,7 +315,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -307,7 +317,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -225,7 +225,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -331,7 +344,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -333,7 +346,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -236,7 +236,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -484,7 +499,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -486,7 +501,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -246,7 +246,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -497,16 +513,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -499,16 +515,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -270,7 +270,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b } void PrintViewManagerBase::NavigationStopped() { -@@ -622,11 +641,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -624,11 +643,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -285,7 +285,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -653,18 +675,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -658,18 +680,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -307,7 +307,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -674,6 +698,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -679,6 +703,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -315,7 +315,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -699,14 +724,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -704,14 +729,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -332,7 +332,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b return; } #endif -@@ -729,7 +754,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { +@@ -734,7 +759,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -340,7 +340,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b #endif ReleasePrinterQuery(); -@@ -744,6 +768,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -749,6 +773,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -352,7 +352,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -754,10 +783,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -759,10 +788,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -365,7 +365,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b } void PrintViewManagerBase::DidStartLoading() { -@@ -817,6 +848,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -822,6 +853,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -377,7 +377,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -878,7 +914,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -883,7 +919,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -389,7 +389,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b if (!weak_this) return false; -@@ -960,6 +999,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -965,6 +1004,13 @@ void PrintViewManagerBase::ReleasePrintJob() { UnregisterSystemPrintClient(); #endif @@ -403,7 +403,7 @@ index 9d17312dce6fb7619f0a7f1a05219f70561ea7a3..1d83d9ea04b582216b0244d038ca774b if (!print_job_) return; -@@ -1009,7 +1055,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1014,7 +1060,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -809,17 +809,17 @@ index cd26f9ecf888c2a321890edd378ee0f8843a7f6c..958794f95fe8830b7e494340fbd53b0e #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 c4cdb402bc0aaa25b9118bad33a84b7f04cc94c4..8022f3599ec38d614272cde3109a7be2d9b2840e 100644 +index d0ef2181c649afe110c3c466a565a01cf6ae63a9..2daf9f02d41e04930fc4dad6d36ccbf3006dc175 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc -@@ -120,7 +120,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { +@@ -119,7 +119,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { mojom::ResultCode PrintingContext::UpdatePrintSettings( base::Value job_settings) { - ResetSettings(); { std::unique_ptr settings = - PrintSettingsFromJobSettings(job_settings); + PrintSettingsFromJobSettings(job_settings.GetDict()); diff --git a/printing/printing_context.h b/printing/printing_context.h index 3f36303105b7979a1a771bf26b42596abe5b3cce..52f740bb832db4a8d76431d9bc77cab10bb7e0c7 100644 --- a/printing/printing_context.h 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 ab990b94d8742..1fb2c1b47c131 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 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c379c9645 100644 +index bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabcaa9c5f432 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 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c #include "content/public/common/drop_data.h" #include "services/metrics/public/cpp/ukm_recorder.h" #include "third_party/abseil-cpp/absl/types/optional.h" -@@ -252,6 +253,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -257,6 +258,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); @@ -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 7e421c72e3cb9abd9c3dc6542afed08f3910df93..218fe3eb6d6e2e4bce19776f25560aa7b81dfefa 100644 +index 7cda66952e0d3a67c32791ad3c7d7de8df03f876..8cb3a596593c52e776d546d25fb078003204faa6 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2067,6 +2067,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2080,6 +2080,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 7e421c72e3cb9abd9c3dc6542afed08f3910df93..218fe3eb6d6e2e4bce19776f25560aa7 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index cf37734d313470c27d2d40bd90cb199234a1e99e..63b01c486f56499bbc2acff0b5abdbf24b0ce676 100644 +index df03de0a810bbce796d5bc421b92000e02dbd449..b9309e1cbc4a8b701534aa8be2827c40d98d6678 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4506,6 +4506,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4519,6 +4519,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,12 +59,12 @@ index cf37734d313470c27d2d40bd90cb199234a1e99e..63b01c486f56499bbc2acff0b5abdbf2 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 207633738a6bb358c796c8bb42aa5805b753f61b..5766344e7ca539e4ac8526eaa651f0079a9f01b1 100644 +index 80aeacf4ad593a7d40dae6c9096ab0c700ab22d8..07355cb194bd429a693e587072d11432d6c0888a 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -961,6 +961,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, - blink::mojom::FrameVisibility visibility) override; +@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; + void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; + void OnCursorChanged(const WebCursor& cursor) override; bool IsWidgetForPrimaryMainFrame( diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 79d8bc6b449cb..ad382863c801c 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 7d6f0a7f7f65440b7827a2fe01d75998716b1bef..6aaa797b602f7fca7f78026311938c6c88efcfbd 100644 +index 1bdeb27db614d3ab535e536e7e433d9ee27fd9da..e478228a5729a2a2fa0a816e25a4f1a6fe996bac 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -658,6 +658,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -668,6 +668,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 7d6f0a7f7f65440b7827a2fe01d75998716b1bef..6aaa797b602f7fca7f78026311938c6c 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 a5c773c9a78565230013b6219ec83621980defef..34b6650c766673274f0da3e539bf9a8e71c3d36e 100644 +index 5f2abc1943e2f25aa31c499ed7fd870a49ba5732..d3d6800e0920380bc9efe8dba35e03efe10e6a50 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/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6e7b9f068b951..6b0998109b045 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 6b8f8778d17008582ab9edeae6d63dd1111182f3..ff2e479125f1a6d7cbb52e4f674cb836d4f6596c 100644 +index 7203dde2f96d5e8ed44443e21a2257166b6e6f36..3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) { +@@ -1529,7 +1529,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 6b8f8778d17008582ab9edeae6d63dd1111182f3..ff2e479125f1a6d7cbb52e4f674cb836 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1576,6 +1576,12 @@ if (!is_android) { +@@ -1558,6 +1558,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index ae352c1290d32..535a2d61a447d 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 6ee18591ecf3f73388384d82a6530a950ff580e7..c43e94bc7c53ec9573c2e0b869d93bfd73f7051a 100644 +index 24b18a620f3e60ed26dddfaa5d3133b5ede972fe..0377f156a23182d1a65fe5ef82f3f5203b98aed0 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1313,7 +1313,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1320,7 +1320,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index f71e73be0d009..645a763ee4263 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 aeb111257740cd8c73e88c9b15d1f95fd49240c4..d00640770b8648116cb83d3a565f4b2f3ca37f8c 100644 +index c1b1bfc8333e93456178842db392eabff96bf4c9..1eee3bf88b5566b07cdb4f33fc03bf3d904ec6b9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3057,6 +3057,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 365473fa3413c..4821358337913 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,7 +8,7 @@ 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 4095ee0ef25226180acb35d320630f971305528e..a0aff5ad93e7644211a2c15553b3d0988f380b7b 100644 +index dad12d60cea0cd11302e38090eb9af204138b028..ee7615c26df635e433fe14d68dc0a724820f3d2a 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -899,10 +899,7 @@ bool WebContentsViewAura::IsValidDragTarget( diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 55e05e7be1181..c63e24436accf 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 a5d6618aac35f01e09a90bdafa9f60c8140b088c..9385e097701ef51ed375fcaa097cdbf14d7ef0c7 100644 +index b47dc4a90a0294c5d7e73f01c496fd2b4f621400..cf02dbe536eec67b77c85ceb73d285fcbde025fc 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6322,6 +6322,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6324,6 +6324,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index e0f0f0f0ab2ef..c17d287366fd4 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 c5f46f1b0c565fa9f55f8ead1e9ef6dab9571e95..25df04a1e1fc0a2b4ba61d33384c33d076d471fa 100644 +index fec387d31eb5842f4fb0ff617f10b2254c0ee260..2385ccc74d41c10a3f61179f31073062250afcdc 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -605,7 +605,7 @@ config("internal_config") { +@@ -606,7 +606,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index c5f46f1b0c565fa9f55f8ead1e9ef6dab9571e95..25df04a1e1fc0a2b4ba61d33384c33d0 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5823,7 +5823,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5826,7 +5826,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index c5f46f1b0c565fa9f55f8ead1e9ef6dab9571e95..25df04a1e1fc0a2b4ba61d33384c33d0 deps = [ ":v8_libbase", -@@ -5861,6 +5861,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5864,6 +5864,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index f47cb07374a30..1e2876e1fb704 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 ac85fb294df295d65236a5e9143337989d2bf6e6..f7004b9aed1ea8c33695be5eda01150ed626c37b 100644 +index d22910b209c614162363938accfc86696719ad12..22af6bf24d672817bf620b9411d1b678b7a9800f 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9110,7 +9110,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9115,7 +9115,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index ac85fb294df295d65236a5e9143337989d2bf6e6..f7004b9aed1ea8c33695be5eda01150e isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 73263505e22956f10eaac4482d8a9ddf191edc13..083b488e0391224da0d13d7d2b80b3696619d59d 100644 +index 509ee8574736261307d9e270b7151197c6988649..00532d4dedf67c0764ca574b40e10ff0ce184762 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6161,9 +6161,9 @@ void Heap::TearDown() { +@@ -6200,9 +6200,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 32f89f3419eab..01d7180fc6f13 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 29f753f4944541dd8dc11b4daff900cb45be42a8..21b85f6188b7b9cea577128d0957fc463dfe74ee 100644 +index 1310890fbec222c0edfda08ec962292d39aca8d1..5ff12eaa98887826b9a962c41f69480ca1d9dd3a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -605,6 +605,10 @@ config("internal_config") { +@@ -606,6 +606,10 @@ config("internal_config") { ":cppgc_header_features", ] @@ -27,10 +27,10 @@ index 29f753f4944541dd8dc11b4daff900cb45be42a8..21b85f6188b7b9cea577128d0957fc46 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index fcb9f8756fd3ce9b83fe4ef60ad02fb225ec32dd..57dcd3deab5f37420a427954699dd85175328f3d 100644 +index 61644ffe0582787578dc3848f87cc8c2a0e88bb7..cd3e11e4ff77a388d2325a015e1a71641a4924a0 100644 --- a/src/base/macros.h +++ b/src/base/macros.h -@@ -393,13 +393,17 @@ bool is_inbounds(float_t v) { +@@ -387,13 +387,17 @@ bool is_inbounds(float_t v) { #ifdef V8_OS_WIN // Setup for Windows shared library export. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index d149375c1a9b0..f3d31e645c36a 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 25df04a1e1fc0a2b4ba61d33384c33d076d471fa..29f753f4944541dd8dc11b4daff900cb45be42a8 100644 +index 2385ccc74d41c10a3f61179f31073062250afcdc..1310890fbec222c0edfda08ec962292d39aca8d1 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5835,7 +5835,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5838,7 +5838,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch b/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch index bf4935b108d45..1eabe26bfd11c 100644 --- a/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch +++ b/patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch @@ -6,7 +6,7 @@ Subject: Revert "fix(cppgc): removed deleted cstors in CppHeapCreateParams" This reverts commit a66b09e5510d62ff469e72b1a8ff7f0ead1bf0f6. diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h -index 201773f59ddd3ce2ed61fe08cb58786aeed605cc..7761d87fd0a325a53d398bafcdeadd6a87f4f1c2 100644 +index 412154930f7d92b5e3932bf7a1cace16eee940e8..401e492210609f9c1b16a082ff9d97b8acd4fc61 100644 --- a/include/v8-cppgc.h +++ b/include/v8-cppgc.h @@ -77,6 +77,9 @@ struct WrapperDescriptor final { diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 86189ba6a292d..61b413f76a1cd 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -22,7 +22,7 @@ const circleCIPublishWorkflows = [ const circleCIPublishIndividualArches = { 'macos-publish': ['osx-x64', 'mas-x64', 'osx-arm64', 'mas-arm64'], - 'linux-publish': ['arm', 'arm64', 'ia32', 'x64'] + 'linux-publish': ['arm', 'arm64', 'x64'] }; const vstsArmJobs = [ diff --git a/script/release/release.js b/script/release/release.js index f43cbf9a03560..83200e153e7f4 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -101,7 +101,6 @@ function assetsForVersion (version, validatingRelease) { `chromedriver-${version}-darwin-arm64.zip`, `chromedriver-${version}-linux-arm64.zip`, `chromedriver-${version}-linux-armv7l.zip`, - `chromedriver-${version}-linux-ia32.zip`, `chromedriver-${version}-linux-x64.zip`, `chromedriver-${version}-mas-x64.zip`, `chromedriver-${version}-mas-arm64.zip`, @@ -120,8 +119,6 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-linux-arm64.zip`, `electron-${version}-linux-armv7l-symbols.zip`, `electron-${version}-linux-armv7l.zip`, - `electron-${version}-linux-ia32-symbols.zip`, - `electron-${version}-linux-ia32.zip`, `electron-${version}-linux-x64-debug.zip`, `electron-${version}-linux-x64-symbols.zip`, `electron-${version}-linux-x64.zip`, @@ -150,13 +147,11 @@ function assetsForVersion (version, validatingRelease) { 'libcxxabi_headers.zip', `libcxx-objects-${version}-linux-arm64.zip`, `libcxx-objects-${version}-linux-armv7l.zip`, - `libcxx-objects-${version}-linux-ia32.zip`, `libcxx-objects-${version}-linux-x64.zip`, `ffmpeg-${version}-darwin-x64.zip`, `ffmpeg-${version}-darwin-arm64.zip`, `ffmpeg-${version}-linux-arm64.zip`, `ffmpeg-${version}-linux-armv7l.zip`, - `ffmpeg-${version}-linux-ia32.zip`, `ffmpeg-${version}-linux-x64.zip`, `ffmpeg-${version}-mas-x64.zip`, `ffmpeg-${version}-mas-arm64.zip`, @@ -167,7 +162,6 @@ function assetsForVersion (version, validatingRelease) { `mksnapshot-${version}-darwin-arm64.zip`, `mksnapshot-${version}-linux-arm64-x64.zip`, `mksnapshot-${version}-linux-armv7l-x64.zip`, - `mksnapshot-${version}-linux-ia32.zip`, `mksnapshot-${version}-linux-x64.zip`, `mksnapshot-${version}-mas-x64.zip`, `mksnapshot-${version}-mas-arm64.zip`, diff --git a/script/zip_manifests/dist_zip.mac.arm64.manifest b/script/zip_manifests/dist_zip.mac.arm64.manifest index 997413de941ee..d09ff34e0e259 100644 --- a/script/zip_manifests/dist_zip.mac.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac.arm64.manifest @@ -15,8 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ diff --git a/script/zip_manifests/dist_zip.mac.x64.manifest b/script/zip_manifests/dist_zip.mac.x64.manifest index d20306318cf65..a72fbeb79ea64 100644 --- a/script/zip_manifests/dist_zip.mac.x64.manifest +++ b/script/zip_manifests/dist_zip.mac.x64.manifest @@ -15,8 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ diff --git a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest index 5f319b17895a3..ba4303603e46d 100644 --- a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest @@ -12,8 +12,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ diff --git a/script/zip_manifests/dist_zip.mac_mas.x64.manifest b/script/zip_manifests/dist_zip.mac_mas.x64.manifest index 7736d9750d8e9..a62f594edae6f 100644 --- a/script/zip_manifests/dist_zip.mac_mas.x64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.x64.manifest @@ -12,8 +12,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ diff --git a/shell/browser/extensions/api/streams_private/streams_private_api.cc b/shell/browser/extensions/api/streams_private/streams_private_api.cc index 4b0ef5df249b5..4ef72f4645b59 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.cc +++ b/shell/browser/extensions/api/streams_private/streams_private_api.cc @@ -20,23 +20,15 @@ namespace extensions { void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( const std::string& extension_id, - const std::string& view_id, + const std::string& stream_id, bool embedded, int frame_tree_node_id, - int render_process_id, - int render_frame_id, blink::mojom::TransferrableURLLoaderPtr transferrable_loader, const GURL& original_url) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - content::WebContents* web_contents = nullptr; - if (frame_tree_node_id != -1) { - web_contents = - content::WebContents::FromFrameTreeNodeId(frame_tree_node_id); - } else { - web_contents = content::WebContents::FromRenderFrameHost( - content::RenderFrameHost::FromID(render_process_id, render_frame_id)); - } + content::WebContents* web_contents = + content::WebContents::FromFrameTreeNodeId(frame_tree_node_id); if (!web_contents) return; @@ -66,8 +58,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( tab_id, embedded, handler_url, extension_id, std::move(transferrable_loader), original_url); extensions::MimeHandlerStreamManager::Get(browser_context) - ->AddStream(view_id, std::move(stream_container), frame_tree_node_id, - render_process_id, render_frame_id); + ->AddStream(stream_id, std::move(stream_container), frame_tree_node_id); } } // namespace extensions 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 b5c6e573c4d8a..a580e97175fb2 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.h +++ b/shell/browser/extensions/api/streams_private/streams_private_api.h @@ -15,24 +15,16 @@ namespace extensions { // rename and move it to make that clear. https://crbug.com/890401. class StreamsPrivateAPI { public: - // Send the onExecuteMimeTypeHandler event to |extension_id|. If the viewer is - // being opened in a BrowserPlugin, specify a non-empty |view_id| of the - // plugin. |embedded| should be set to whether the document is embedded - // within another document. The |frame_tree_node_id| parameter is used for the - // top level plugins case. (PDF, etc). If this parameter has a valid value - // then it overrides the |render_process_id| and |render_frame_id| parameters. - // The |render_process_id| is the id of the renderer process. The - // |render_frame_id| is the routing id of the RenderFrameHost. - // - // If the network service is not enabled, |stream| is used; otherwise, - // |transferrable_loader| and |original_url| are used instead. + // Send the onExecuteMimeTypeHandler event to |extension_id|. A non-empty + // |stream_id| will be used to identify the created stream during + // MimeHandlerViewGuest creation. |embedded| should be set to whether the + // document is embedded within another document. The |frame_tree_node_id| + // parameter is used for the top level plugins case. (PDF, etc). static void SendExecuteMimeTypeHandlerEvent( const std::string& extension_id, - const std::string& view_id, + const std::string& stream_id, bool embedded, int frame_tree_node_id, - int render_process_id, - int render_frame_id, blink::mojom::TransferrableURLLoaderPtr transferrable_loader, const GURL& original_url); }; diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index e4c79c77f907b..9e714f31a6d9a 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -11,6 +11,7 @@ #include "base/allocator/partition_alloc_features.h" #include "base/allocator/partition_allocator/partition_alloc.h" +#include "base/bits.h" #include "base/command_line.h" #include "base/feature_list.h" #include "base/task/current_thread.h" @@ -156,8 +157,6 @@ JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop) gin::IsolateHolder::IsolateCreationMode::kNormal, nullptr, nullptr, - nullptr, - nullptr, isolate_), locker_(isolate_) { isolate_->Enter(); @@ -343,10 +342,11 @@ 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 */, - js_flags, false /* create_v8_platform */); + gin::IsolateHolder::Initialize( + gin::IsolateHolder::kNonStrictMode, new ArrayBufferAllocator(), + nullptr /* external_reference_table */, js_flags, + nullptr /* fatal_error_callback */, nullptr /* oom_error_callback */, + false /* create_v8_platform */); v8::Isolate* isolate = v8::Isolate::Allocate(); platform_->RegisterIsolate(isolate, event_loop); diff --git a/shell/common/gin_converters/content_converter.cc b/shell/common/gin_converters/content_converter.cc index 600b525df71c7..362954d8e1171 100644 --- a/shell/common/gin_converters/content_converter.cc +++ b/shell/common/gin_converters/content_converter.cc @@ -154,8 +154,8 @@ v8::Local Converter::ToV8( return StringToV8(isolate, "clipboard-read"); case content::PermissionType::CLIPBOARD_SANITIZED_WRITE: return StringToV8(isolate, "clipboard-sanitized-write"); - case content::PermissionType::FONT_ACCESS: - return StringToV8(isolate, "font-access"); + case content::PermissionType::LOCAL_FONTS: + return StringToV8(isolate, "local-fonts"); case content::PermissionType::IDLE_DETECTION: return StringToV8(isolate, "idle-detection"); case content::PermissionType::MIDI_SYSEX: From f48a921d14bf47d09daba0bdf22919cc27a9218b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:02:58 -0700 Subject: [PATCH 309/811] Bump v20.0.0-nightly.20220425 --- 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 1cebb017206ab..31ee7e25ca0c5 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220421 \ No newline at end of file +20.0.0-nightly.20220425 \ No newline at end of file diff --git a/package.json b/package.json index 771724ee7b2d7..0569a345910b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220421", + "version": "20.0.0-nightly.20220425", "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 6778ac033fe5e..b5e7d3644c1b3 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 20,0,0,20220421 - PRODUCTVERSION 20,0,0,20220421 + FILEVERSION 20,0,0,20220425 + PRODUCTVERSION 20,0,0,20220425 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0a73f60423d30c4287a49bac7855b3480bfcdbe9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:47:42 -0700 Subject: [PATCH 310/811] Revert "Bump v20.0.0-nightly.20220425" This reverts commit f48a921d14bf47d09daba0bdf22919cc27a9218b. --- 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 31ee7e25ca0c5..1cebb017206ab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220425 \ No newline at end of file +20.0.0-nightly.20220421 \ No newline at end of file diff --git a/package.json b/package.json index 0569a345910b6..771724ee7b2d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220425", + "version": "20.0.0-nightly.20220421", "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 b5e7d3644c1b3..6778ac033fe5e 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 20,0,0,20220425 - PRODUCTVERSION 20,0,0,20220425 + FILEVERSION 20,0,0,20220421 + PRODUCTVERSION 20,0,0,20220421 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6a1748da0608428fe902a3fc04a27899cd9803ad Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 25 Apr 2022 11:14:16 -0400 Subject: [PATCH 311/811] ci: update release script to handle new CircleCI configs (#33914) --- script/release/ci-release-build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 61b413f76a1cd..2e716bb67de2e 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -110,12 +110,12 @@ async function getCircleCIWorkflowId (pipelineId) { switch (pipelineInfo.state) { case 'created': { const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET'); - // The logic below expects two workflow.items: publish [0] & setup [1] - if (workflows.items.length === 2) { + // The logic below expects three workflow.items: publish, lint, & setup + if (workflows.items.length === 3) { workflowId = workflows.items.find(item => item.name.includes('publish')).id; break; } - console.log('Unxpected number of workflows, response was:', pipelineInfo); + console.log('Unxpected number of workflows, response was:', workflows); workflowId = -1; break; } From 028a72daaccc6f9085ffd54a51c07bbf427c76fa Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 25 Apr 2022 17:00:32 -0400 Subject: [PATCH 312/811] build: fix macos release GN gen (#33915) --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index fb64d22339ec1..6e77ca50491de 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1119,7 +1119,7 @@ if (is_mac) { } extract_symbols("egl_syms") { - binary = "$root_out_dir/ibEGL.dylib" + binary = "$root_out_dir/libEGL.dylib" symbol_dir = "$root_out_dir/breakpad_symbols" dsym_file = "$root_out_dir/libEGL.dylib.dSYM/Contents/Resources/DWARF/libEGL.dylib" deps = [ "//third_party/angle:libEGL" ] From 40c022ad6939dfe0227969596cdd4bf51378fd64 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:01:18 -0700 Subject: [PATCH 313/811] Bump v20.0.0-nightly.20220425 --- 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 1cebb017206ab..31ee7e25ca0c5 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220421 \ No newline at end of file +20.0.0-nightly.20220425 \ No newline at end of file diff --git a/package.json b/package.json index 771724ee7b2d7..0569a345910b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220421", + "version": "20.0.0-nightly.20220425", "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 6778ac033fe5e..b5e7d3644c1b3 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 20,0,0,20220421 - PRODUCTVERSION 20,0,0,20220421 + FILEVERSION 20,0,0,20220425 + PRODUCTVERSION 20,0,0,20220425 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From bfabd671123f49256d9bca91c2bc49ab8e6a10b4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 06:01:17 -0700 Subject: [PATCH 314/811] Bump v20.0.0-nightly.20220426 --- 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 31ee7e25ca0c5..51a0063d6f6ff 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220425 \ No newline at end of file +20.0.0-nightly.20220426 \ No newline at end of file diff --git a/package.json b/package.json index 0569a345910b6..31cfc887bd44c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220425", + "version": "20.0.0-nightly.20220426", "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 b5e7d3644c1b3..7b9d064e38e2d 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 20,0,0,20220425 - PRODUCTVERSION 20,0,0,20220425 + FILEVERSION 20,0,0,20220426 + PRODUCTVERSION 20,0,0,20220426 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6d5501d0bda8e8abfedc2560302ddb08bf8ab308 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 26 Apr 2022 15:21:59 -0700 Subject: [PATCH 315/811] build: use dev-cdn instead of sysroots s3 bucket (#33922) --- patches/chromium/sysroot.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index 4dd9ad00ae567..715b58b173cd0 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..1824d513f6296985b5a3758f7e052ed77dcf0e0f 100755 +index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..74140d29ed56ce54e39940e7bffa3778db983f27 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py @@ -41,9 +41,11 @@ except ImportError: @@ -19,8 +19,8 @@ index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..1824d513f6296985b5a3758f7e052ed7 -URL_PREFIX = 'https://commondatastorage.googleapis.com' -URL_PATH = 'chrome-linux-sysroot/toolchain' -+URL_PREFIX = 'https://s3.amazonaws.com' -+URL_PATH = 'electronjs-sysroots/toolchain' ++URL_PREFIX = 'https://dev-cdn.electronjs.org' ++URL_PATH = 'linux-sysroots' VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el') From 160d6923db04432ae583de228c5ca22436d838c1 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 26 Apr 2022 23:14:59 -0700 Subject: [PATCH 316/811] build: improve CI speeds and reduce CI costs (#33904) * rely on src cache instead of workspace * run some tasks in the background and "thread join" later * merge some ninja build commands to reduce overhead --- .circleci/config/base.yml | 218 ++++++++++++++++---------------- BUILD.gn | 4 + script/node-disabled-tests.json | 1 + 3 files changed, 114 insertions(+), 109 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 82c78df50c64e..45e1803b0e058 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -339,6 +339,19 @@ step-setup-goma-for-build: &step-setup-goma-for-build 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 .. + touch "${TMPDIR:=/tmp}"/.goma-ready + background: true + +step-wait-for-goma: &step-wait-for-goma + run: + name: Wait for Goma + command: | + until [ -f "${TMPDIR:=/tmp}"/.goma-ready ] + do + sleep 5 + done + echo "Goma ready" + no_output_timeout: 2m step-restore-brew-cache: &step-restore-brew-cache restore_cache: @@ -574,14 +587,6 @@ step-electron-build: &step-electron-build 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 @@ -598,38 +603,6 @@ step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip 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 - 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 @@ -682,7 +655,6 @@ step-persist-data-for-tests: &step-persist-data-for-tests - 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/Default/overlapped-checker - src/out/ffmpeg/ffmpeg.zip @@ -794,6 +766,7 @@ step-show-goma-stats: &step-show-goma-stats $LOCAL_GOMA_DIR/diagnose_goma_log.py true when: always + background: true step-mksnapshot-build: &step-mksnapshot-build run: @@ -822,13 +795,6 @@ step-mksnapshot-build: &step-mksnapshot-build (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S) fi -step-nodejs-build-test-executable: &step-nodejs-build-test-executable - run: - name: Build Node.js Test Executables - command: | - cd src - ninja -C out/Default third_party/electron_node:overlapped-checker - step-hunspell-build: &step-hunspell-build run: name: hunspell build @@ -1044,12 +1010,16 @@ step-ts-compile: &step-ts-compile # List of all steps. steps-electron-gn-check: &steps-electron-gn-check steps: - - attach_workspace: - at: . + - *step-checkout-electron + - *step-depot-tools-get - *step-depot-tools-add-to-path - *step-install-python2-on-mac - *step-setup-env-for-build - *step-setup-goma-for-build + - *step-generate-deps-hash + - *step-touch-sync-done + - maybe-restore-portaled-src-cache + - *step-wait-for-goma - *step-gn-gen-default - *step-gn-check @@ -1063,6 +1033,7 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha - *step-install-gnutar-on-mac - *step-install-python2-on-mac - *step-get-more-space-on-mac + - *step-setup-goma-for-build - *step-generate-deps-hash - *step-touch-sync-done - maybe-restore-portaled-src-cache @@ -1082,7 +1053,7 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha - *step-depot-tools-add-to-path - *step-setup-env-for-build - - *step-setup-goma-for-build + - *step-wait-for-goma - *step-get-more-space-on-mac - *step-install-npm-deps-on-mac - *step-fix-sync @@ -1099,6 +1070,7 @@ steps-native-tests: &steps-native-tests - *step-install-python2-on-mac - *step-setup-env-for-build - *step-setup-goma-for-build + - *step-wait-for-goma - *step-gn-gen-default - run: @@ -1284,7 +1256,6 @@ commands: 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 @@ -1322,6 +1293,44 @@ commands: - *step-checkout-electron - *step-run-electron-only-hooks - *step-generate-deps-hash-cleanly + + step-electron-dist-build: + parameters: + additional-targets: + type: string + default: '' + steps: + - run: + name: Build dist.zip + command: | + cd src + if [ "$SKIP_DIST_ZIP" != "1" ]; then + ninja -C out/Default electron:electron_dist_zip << parameters.additional-targets >> + 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 + 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 + electron-build: parameters: attach: @@ -1368,6 +1377,10 @@ commands: - *step-install-gnutar-on-mac - *step-install-python2-on-mac - *step-save-brew-cache + - when: + condition: << parameters.build >> + steps: + - *step-setup-goma-for-build - when: condition: << parameters.checkout-and-assume-cache >> steps: @@ -1462,7 +1475,7 @@ commands: steps: - *step-depot-tools-add-to-path - *step-setup-env-for-build - - *step-setup-goma-for-build + - *step-wait-for-goma - *step-get-more-space-on-mac - *step-fix-sync - *step-delete-git-directories @@ -1475,16 +1488,8 @@ commands: - *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 - - # Node.js test executable - - *step-nodejs-build-test-executable + - step-electron-dist-build: + additional-targets: shell_browser_ui_unittests third_party/electron_node:headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip - *step-show-goma-stats @@ -1502,13 +1507,14 @@ commands: - *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-minimize-workspace-size-from-checkout + - run: | + rm -rf src/third_party/electron_node/deps/openssl + rm -rf src/third_party/electron_node/deps/v8 - *step-persist-data-for-tests - when: @@ -1575,6 +1581,7 @@ commands: - *step-fix-sync - *step-setup-env-for-build - *step-setup-goma-for-build + - *step-wait-for-goma - *step-gn-gen-default # Electron app @@ -1582,7 +1589,7 @@ commands: - *step-show-goma-stats - *step-maybe-generate-breakpad-symbols - *step-maybe-electron-dist-strip - - *step-electron-dist-build + - step-electron-dist-build - *step-maybe-zip-symbols # mksnapshot @@ -1623,20 +1630,10 @@ jobs: <<: *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 + executor: + name: linux-docker + size: xlarge environment: <<: *env-linux-2xlarge GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' @@ -1687,22 +1684,10 @@ jobs: 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 + executor: + name: linux-docker + size: xlarge environment: <<: *env-linux-2xlarge <<: *env-testing-build @@ -1727,7 +1712,8 @@ jobs: steps: - electron-build: persist: true - checkout: true + checkout: false + checkout-and-assume-cache: true use-out-cache: false linux-x64-testing-asan: @@ -1767,6 +1753,7 @@ jobs: environment: <<: *env-linux-medium <<: *env-testing-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' <<: *steps-electron-gn-check linux-x64-release: @@ -1815,7 +1802,8 @@ jobs: steps: - electron-build: persist: true - checkout: true + checkout: false + checkout-and-assume-cache: true use-out-cache: false linux-arm-release: @@ -1867,7 +1855,8 @@ jobs: steps: - electron-build: persist: true - checkout: true + checkout: false + checkout-and-assume-cache: true use-out-cache: false linux-arm64-testing-gn-check: @@ -1878,6 +1867,7 @@ jobs: <<: *env-linux-medium <<: *env-arm64 <<: *env-testing-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' <<: *steps-electron-gn-check linux-arm64-release: @@ -1939,6 +1929,7 @@ jobs: environment: <<: *env-machine-mac <<: *env-testing-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' <<: *steps-electron-gn-check osx-publish-x64-skip-checkout: @@ -2029,6 +2020,7 @@ jobs: <<: *env-machine-mac <<: *env-mas <<: *env-testing-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' <<: *steps-electron-gn-check mas-publish-x64-skip-checkout: @@ -2301,14 +2293,19 @@ workflows: - 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: + requires: + - linux-make-src-cache + - linux-x64-testing-asan: + requires: + - linux-make-src-cache + - linux-x64-testing-no-run-as-node: + requires: + - linux-make-src-cache - linux-x64-testing-gn-check: requires: - - linux-checkout-for-workspace + - linux-make-src-cache - linux-x64-testing-tests: requires: - linux-x64-testing @@ -2321,7 +2318,9 @@ workflows: - linux-x64-testing-node: requires: - linux-x64-testing - - linux-arm-testing + - linux-arm-testing: + requires: + - linux-make-src-cache - linux-arm-testing-tests: filters: branches: @@ -2329,7 +2328,9 @@ workflows: ignore: /pull\/[0-9]+/ requires: - linux-arm-testing - - linux-arm64-testing + - linux-arm64-testing: + requires: + - linux-make-src-cache - linux-arm64-testing-tests: filters: branches: @@ -2339,7 +2340,7 @@ workflows: - linux-arm64-testing - linux-arm64-testing-gn-check: requires: - - linux-checkout-for-workspace + - linux-make-src-cache build-mac: when: @@ -2348,14 +2349,13 @@ workflows: - 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 + - mac-make-src-cache - osx-testing-x64-tests: requires: - osx-testing-x64 @@ -2374,7 +2374,7 @@ workflows: - mac-make-src-cache - mas-testing-x64-gn-check: requires: - - mac-checkout-for-workspace + - mac-make-src-cache - mas-testing-x64-tests: requires: - mas-testing-x64 diff --git a/BUILD.gn b/BUILD.gn index 6e77ca50491de..60ab4cac8106c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1281,6 +1281,10 @@ if (is_mac) { if (!is_component_build && is_component_ffmpeg) { configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } + + if (is_linux) { + deps += [ "//sandbox/linux:chrome_sandbox" ] + } } } diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index bfaf96bf9415d..579502c128b9d 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -26,6 +26,7 @@ "parallel/test-http2-clean-output", "parallel/test-https-agent-session-reuse", "parallel/test-https-options-boolean-check", + "parallel/test-icu-minimum-version", "parallel/test-inspector-multisession-ws", "parallel/test-inspector-port-zero-cluster", "parallel/test-inspector-tracing-domain", From a00544c7452a2f742a39d88c64898305e7f26290 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 27 Apr 2022 06:00:58 -0700 Subject: [PATCH 317/811] Bump v20.0.0-nightly.20220427 --- 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 51a0063d6f6ff..34ebd7aa06ead 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220426 \ No newline at end of file +20.0.0-nightly.20220427 \ No newline at end of file diff --git a/package.json b/package.json index 31cfc887bd44c..c7a7de0ab3bdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220426", + "version": "20.0.0-nightly.20220427", "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 7b9d064e38e2d..21cb688d5998c 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 20,0,0,20220426 - PRODUCTVERSION 20,0,0,20220426 + FILEVERSION 20,0,0,20220427 + PRODUCTVERSION 20,0,0,20220427 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d2c3e7811728164de7a3f98ae7414bed79d957ff Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 27 Apr 2022 10:37:26 -0700 Subject: [PATCH 318/811] build: actually verify az urls too (#33929) --- script/release/release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/release/release.js b/script/release/release.js index 83200e153e7f4..14464d5b76a63 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -81,7 +81,7 @@ async function validateReleaseAssets (release, validatingRelease) { const s3RemoteFiles = s3RemoteFilesForVersion(release.tag_name); await verifyShasumsForRemoteFiles(s3RemoteFiles, true); const azRemoteFiles = azRemoteFilesForVersion(release.tag_name); - await verifyShasumsForRemoteFiles(s3RemoteFiles, true); + await verifyShasumsForRemoteFiles(azRemoteFiles, true); } } From f91b24deb5d573563b0fd904ea24cbf078d7660e Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 27 Apr 2022 12:54:52 -0700 Subject: [PATCH 319/811] build: ensure sync-done file exists during git cache save (#33949) --- .circleci/config/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 45e1803b0e058..09aedd08a9e19 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -1413,6 +1413,7 @@ commands: - *step-checkout-electron - *step-run-electron-only-hooks - *step-generate-deps-hash-cleanly + - *step-touch-sync-done - when: condition: << parameters.save-git-cache >> steps: From 15c931201ab880de84009baa59b9bc5923e1ef67 Mon Sep 17 00:00:00 2001 From: Baoshuo Ren Date: Thu, 28 Apr 2022 03:56:01 +0800 Subject: [PATCH 320/811] chore: remove git.io (#33933) * chore: remove git.io All links on git.io will stop redirecting after April 29, 2022. - https://github.blog/changelog/2022-04-25-git-io-deprecation/ * fix: lint Co-authored-by: Charles Kerr Co-authored-by: Charles Kerr --- shell/browser/native_window_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 7ed794206322e..7093717e07681 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -364,7 +364,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { // Don't show title bar. [window_ setTitlebarAppearsTransparent:YES]; [window_ setTitleVisibility:NSWindowTitleHidden]; - // Remove non-transparent corners, see http://git.io/vfonD. + // Remove non-transparent corners, see + // https://github.com/electron/electron/issues/517. [window_ setOpaque:NO]; // Show window buttons if titleBarStyle is not "normal". if (title_bar_style_ == TitleBarStyle::kNormal) { From b5297ea8e2380b9174c26d5a35b1a73c2c9566d0 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Thu, 28 Apr 2022 15:45:23 +0530 Subject: [PATCH 321/811] docs: fix return type of setJumpList() in electron.d.ts (#33910) Before: ```ts setJumpList(categories: (JumpListCategory[]) | (null)): void; ``` After: ```ts setJumpList(categories: (JumpListCategory[]) | (null)): ('ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError'); ``` Fixes: https://github.com/electron/electron/issues/33909 Signed-off-by: Darshan Sen --- docs/api/app.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api/app.md b/docs/api/app.md index 5970bf58e57cf..2aec42c48ae93 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -864,6 +864,8 @@ Returns `Object`: * `categories` [JumpListCategory[]](structures/jump-list-category.md) | `null` - Array of `JumpListCategory` objects. +Returns `string` + Sets or removes a custom Jump List for the application, and returns one of the following strings: From b3530d5df8bc5341fe172ec4b3cf945b9f174fc7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 28 Apr 2022 03:17:05 -0700 Subject: [PATCH 322/811] build: use smaller resource_class because goma (#33905) --- .circleci/config/base.yml | 190 +++++++++++--------------------------- 1 file changed, 53 insertions(+), 137 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 09aedd08a9e19..d420933d73598 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -41,9 +41,8 @@ executors: parameters: size: description: "Docker executor size" - default: 2xlarge+ type: enum - enum: ["medium", "xlarge", "2xlarge+"] + enum: ["medium", "xlarge", "2xlarge"] docker: - image: ghcr.io/electron/build:e6bebd08a51a0d78ec23e5b3fd7e7c0846412328 resource_class: << parameters.size >> @@ -52,12 +51,11 @@ executors: parameters: size: description: "macOS executor size" - default: macos.x86.medium.gen2 type: enum enum: ["macos.x86.medium.gen2", "large"] xcode: description: "xcode version" - default: "12.4.0" + default: 13.3.0 type: enum enum: ["12.4.0", "13.3.0"] @@ -1623,7 +1621,9 @@ commands: jobs: # Layer 0: Docs. Standalone. ts-compile-doc-change: - executor: linux-docker + executor: + name: linux-docker + size: medium environment: <<: *env-linux-2xlarge <<: *env-testing-build @@ -1646,32 +1646,10 @@ jobs: 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 + executor: + name: linux-docker + size: xlarge environment: <<: *env-linux-2xlarge <<: *env-testing-build @@ -1704,7 +1682,9 @@ jobs: # Layer 2: Builds. linux-x64-testing: - executor: linux-docker + executor: + name: linux-docker + size: xlarge environment: <<: *env-global <<: *env-testing-build @@ -1718,7 +1698,9 @@ jobs: use-out-cache: false linux-x64-testing-asan: - executor: linux-docker + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-global <<: *env-testing-build @@ -1734,7 +1716,9 @@ jobs: build-nonproprietary-ffmpeg: false linux-x64-testing-no-run-as-node: - executor: linux-docker + executor: + name: linux-docker + size: xlarge environment: <<: *env-linux-2xlarge <<: *env-testing-build @@ -1757,21 +1741,10 @@ jobs: GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' <<: *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 + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-linux-2xlarge-release <<: *env-release-build @@ -1791,7 +1764,9 @@ jobs: linux-arm-testing: - executor: linux-docker + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-global <<: *env-arm @@ -1807,22 +1782,10 @@ jobs: checkout-and-assume-cache: 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 + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-linux-2xlarge-release <<: *env-arm @@ -1844,7 +1807,9 @@ jobs: checkout: true linux-arm64-testing: - executor: linux-docker + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-global <<: *env-arm64 @@ -1871,22 +1836,10 @@ jobs: GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' <<: *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 + executor: + name: linux-docker + size: 2xlarge environment: <<: *env-linux-2xlarge-release <<: *env-arm64 @@ -1909,7 +1862,7 @@ jobs: osx-testing-x64: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-testing-build @@ -1926,7 +1879,7 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-machine-mac <<: *env-testing-build @@ -1936,7 +1889,7 @@ jobs: osx-publish-x64-skip-checkout: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large-release <<: *env-release-build @@ -1957,7 +1910,7 @@ jobs: osx-publish-arm64-skip-checkout: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large-release <<: *env-release-build @@ -1979,7 +1932,7 @@ jobs: osx-testing-arm64: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-testing-build @@ -1998,7 +1951,7 @@ jobs: mas-testing-x64: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-mas @@ -2016,7 +1969,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-machine-mac <<: *env-mas @@ -2027,7 +1980,7 @@ jobs: mas-publish-x64-skip-checkout: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large-release <<: *env-mas @@ -2048,7 +2001,7 @@ jobs: mas-publish-arm64-skip-checkout: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large-release <<: *env-mas-apple-silicon @@ -2070,7 +2023,7 @@ jobs: mas-testing-arm64: executor: name: macos - xcode: "13.3.0" + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-testing-build @@ -2087,41 +2040,6 @@ jobs: 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 @@ -2157,22 +2075,14 @@ jobs: <<: *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 + size: xlarge environment: <<: *env-linux-medium <<: *env-headless-testing - <<: *env-send-slack-notifications - <<: *steps-tests + <<: *env-stack-dumping + <<: *steps-test-node linux-x64-verify-ffmpeg: executor: @@ -2203,7 +2113,10 @@ jobs: <<: *steps-tests osx-testing-x64-tests: - executor: macos + executor: + name: macos + xcode: 12.4.0 + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-stack-dumping @@ -2219,7 +2132,10 @@ jobs: <<: *steps-tests mas-testing-x64-tests: - executor: macos + executor: + name: macos + xcode: 12.4.0 + size: macos.x86.medium.gen2 environment: <<: *env-mac-large <<: *env-stack-dumping From 097da1d4ba79a78215eb324a23c0ac0cfcae29d5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 06:01:07 -0700 Subject: [PATCH 323/811] Bump v20.0.0-nightly.20220428 --- 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 34ebd7aa06ead..05b50a0190220 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220427 \ No newline at end of file +20.0.0-nightly.20220428 \ No newline at end of file diff --git a/package.json b/package.json index c7a7de0ab3bdf..292a2b4c1b398 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220427", + "version": "20.0.0-nightly.20220428", "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 21cb688d5998c..6f9d788a56e44 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 20,0,0,20220427 - PRODUCTVERSION 20,0,0,20220427 + FILEVERSION 20,0,0,20220428 + PRODUCTVERSION 20,0,0,20220428 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 192a7fad0d548d1883c58bdf95ab7a2ff1391881 Mon Sep 17 00:00:00 2001 From: Jacek Oleksy <35292764+pr0t4zy@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:28:27 +0200 Subject: [PATCH 324/811] fix: disable MallocNanoZone on mac (#33704) --- shell/browser/resources/mac/Info.plist | 5 +++++ shell/common/resources/mac/Info.plist | 5 +++++ shell/renderer/resources/mac/Info.plist | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/shell/browser/resources/mac/Info.plist b/shell/browser/resources/mac/Info.plist index 29a0823c1504b..39ca2170dee22 100644 --- a/shell/browser/resources/mac/Info.plist +++ b/shell/browser/resources/mac/Info.plist @@ -41,6 +41,11 @@ NSQuitAlwaysKeepsWindows + LSEnvironment + + MallocNanoZone + 0 + NSMicrophoneUsageDescription This app needs access to the microphone NSCameraUsageDescription diff --git a/shell/common/resources/mac/Info.plist b/shell/common/resources/mac/Info.plist index 1d585534067bf..3aa1e88b39efa 100644 --- a/shell/common/resources/mac/Info.plist +++ b/shell/common/resources/mac/Info.plist @@ -14,5 +14,10 @@ CFBundleVersion ${ELECTRON_VERSION} + LSEnvironment + + MallocNanoZone + 0 + diff --git a/shell/renderer/resources/mac/Info.plist b/shell/renderer/resources/mac/Info.plist index 2d39d2a9845a9..219fa59997db4 100644 --- a/shell/renderer/resources/mac/Info.plist +++ b/shell/renderer/resources/mac/Info.plist @@ -12,5 +12,10 @@ NSSupportsAutomaticGraphicsSwitching + LSEnvironment + + MallocNanoZone + 0 + From fb534c927ae3ca696f0de3a10f90d447dd4fd52c Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 29 Apr 2022 02:34:12 +0200 Subject: [PATCH 325/811] refactor: better solution for resizable frameless DCHECK (#33790) * refactor: better solution for resizable frameless DCHECK * fix: also implement TargetForRectin WinFrameView --- shell/browser/ui/views/frameless_view.cc | 10 +++++++++ shell/browser/ui/views/frameless_view.h | 5 ++++- shell/browser/ui/views/win_frame_view.cc | 27 +++++++++++++++++------- shell/browser/ui/views/win_frame_view.h | 3 +++ 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/shell/browser/ui/views/frameless_view.cc b/shell/browser/ui/views/frameless_view.cc index d2d0b2fdc5e85..e171a7e5049bf 100644 --- a/shell/browser/ui/views/frameless_view.cc +++ b/shell/browser/ui/views/frameless_view.cc @@ -112,6 +112,16 @@ void FramelessView::UpdateWindowTitle() {} void FramelessView::SizeConstraintsChanged() {} +views::View* FramelessView::TargetForRect(views::View* root, + const gfx::Rect& rect) { + CHECK_EQ(root, this); + + if (NonClientHitTest(rect.origin()) != HTCLIENT) + return this; + + return NonClientFrameView::TargetForRect(root, rect); +} + gfx::Size FramelessView::CalculatePreferredSize() const { return frame_->non_client_view() ->GetWindowBoundsForClientBounds( diff --git a/shell/browser/ui/views/frameless_view.h b/shell/browser/ui/views/frameless_view.h index 80868f90c89c0..f88f543757e1e 100644 --- a/shell/browser/ui/views/frameless_view.h +++ b/shell/browser/ui/views/frameless_view.h @@ -47,7 +47,10 @@ class FramelessView : public views::NonClientFrameView { void UpdateWindowTitle() override; void SizeConstraintsChanged() override; - // Overridden from View: + // views::ViewTargeterDelegate: + views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; + + // views::View: gfx::Size CalculatePreferredSize() const override; gfx::Size GetMinimumSize() const override; gfx::Size GetMaximumSize() const override; diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index b5d56fa751481..8a25bcdd73e8e 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -34,14 +34,6 @@ void WinFrameView::Init(NativeWindowViews* window, views::Widget* frame) { window_ = window; frame_ = frame; - // Prevent events from trickling down the views hierarchy here, since - // when a given resizable window is frameless we only want to use - // FramelessView's ResizingBorderHitTest in - // ShouldDescendIntoChildForEventHandling. See - // https://chromium-review.googlesource.com/c/chromium/src/+/3251980. - if (!window_->has_frame() && window_->IsResizable()) - frame_->client_view()->SetCanProcessEventsWithinSubtree(false); - if (window->IsWindowControlsOverlayEnabled()) { caption_button_container_ = AddChildView(std::make_unique(this)); @@ -83,6 +75,25 @@ int WinFrameView::FrameBorderThickness() const { : display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXSIZEFRAME); } +views::View* WinFrameView::TargetForRect(views::View* root, + const gfx::Rect& rect) { + if (NonClientHitTest(rect.origin()) != HTCLIENT) { + // Custom system titlebar returns non HTCLIENT value, however event should + // be handled by the view, not by the system, because there are no system + // buttons underneath. + if (!ShouldCustomDrawSystemTitlebar()) { + return this; + } + auto local_point = rect.origin(); + ConvertPointToTarget(parent(), caption_button_container_, &local_point); + if (!caption_button_container_->HitTestPoint(local_point)) { + return this; + } + } + + return NonClientFrameView::TargetForRect(root, rect); +} + int WinFrameView::NonClientHitTest(const gfx::Point& point) { if (window_->has_frame()) return frame_->client_view()->NonClientHitTest(point); diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index 76b8e64bd184e..460474e03bb66 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -61,6 +61,9 @@ class WinFrameView : public FramelessView { int FrameBorderThickness() const; + // views::ViewTargeterDelegate: + views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; + // Returns the thickness of the window border for the top edge of the frame, // which is sometimes different than FrameBorderThickness(). Does not include // the titlebar/tabstrip area. If |restored| is true, this is calculated as if From 015185ad5aa54721e434ba0cd9296ffa8642c680 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 28 Apr 2022 22:17:19 -0700 Subject: [PATCH 326/811] fix: fix FirstPartySetsHandler initialization (#33971) --- shell/browser/net/system_network_context_manager.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index d1f474d59ead7..552df5c6b2a18 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -20,6 +20,7 @@ #include "components/os_crypt/os_crypt.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/first_party_sets_handler.h" #include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/network_service_util.h" @@ -288,6 +289,11 @@ 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::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets( + base::File()); + std::string app_name = electron::Browser::Get()->GetName(); #if BUILDFLAG(IS_MAC) KeychainPassword::GetServiceName() = app_name + " Safe Storage"; From ce562b68890043ae3404be27b088b20a91420c0e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 06:01:34 -0700 Subject: [PATCH 327/811] Bump v20.0.0-nightly.20220429 --- 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 05b50a0190220..40b6e6ed257e3 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220428 \ No newline at end of file +20.0.0-nightly.20220429 \ No newline at end of file diff --git a/package.json b/package.json index 292a2b4c1b398..ad229b28c5629 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220428", + "version": "20.0.0-nightly.20220429", "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 6f9d788a56e44..cc32846033b8e 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 20,0,0,20220428 - PRODUCTVERSION 20,0,0,20220428 + FILEVERSION 20,0,0,20220429 + PRODUCTVERSION 20,0,0,20220429 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b55f9d868a0dd7f7096fc2316e5cbdfbcb7f3c27 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Sat, 30 Apr 2022 13:29:05 +0200 Subject: [PATCH 328/811] spec: allow connections to port 2049 (#33983) --- spec/static/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/static/main.js b/spec/static/main.js index d52fa1953a8c4..075d699ede5cc 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -28,6 +28,13 @@ v8.setFlagsFromString('--expose_gc'); app.commandLine.appendSwitch('js-flags', '--expose_gc'); app.commandLine.appendSwitch('ignore-certificate-errors'); app.commandLine.appendSwitch('disable-renderer-backgrounding'); +// Some ports are considered to be "unsafe" by Chromium +// but Windows on Microsoft-hosted agents sometimes assigns one of them +// to a Node.js server. Chromium refuses to establish a connection +// and the whole app crashes with the "Error: net::ERR_UNSAFE_PORT" error. +// Let's allow connections to those ports to avoid test failures. +// Use a comma-separated list of ports as a flag value, e.g. "666,667,668". +app.commandLine.appendSwitch('explicitly-allowed-ports', '2049'); // Disable security warnings (the security warnings test will enable them) process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; From 682d2e3f78b51f1a2b0e293250bcdfa360a0e7d6 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 2 May 2022 07:49:13 +0200 Subject: [PATCH 329/811] build: allow script/spec-runner.js with empty list of runners (#33982) --- script/spec-runner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/spec-runner.js b/script/spec-runner.js index 31162d32a76e1..11502c2da0c23 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -41,8 +41,8 @@ const runners = new Map([ const specHashPath = path.resolve(__dirname, '../spec/.hash'); let runnersToRun = null; -if (args.runners) { - runnersToRun = args.runners.split(','); +if (args.runners !== undefined) { + runnersToRun = args.runners.split(',').filter(value => value); if (!runnersToRun.every(r => [...runners.keys()].includes(r))) { console.log(`${fail} ${runnersToRun} must be a subset of [${[...runners.keys()].join(' | ')}]`); process.exit(1); From 6f851afab53e17df4b9c76cbcf82ef2a51f4d040 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 06:01:26 -0700 Subject: [PATCH 330/811] Bump v20.0.0-nightly.20220502 --- 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 40b6e6ed257e3..7a838bf298a9d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220429 \ No newline at end of file +20.0.0-nightly.20220502 \ No newline at end of file diff --git a/package.json b/package.json index ad229b28c5629..52e8ff7a1853e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220429", + "version": "20.0.0-nightly.20220502", "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 cc32846033b8e..eb462713a0338 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 20,0,0,20220429 - PRODUCTVERSION 20,0,0,20220429 + FILEVERSION 20,0,0,20220502 + PRODUCTVERSION 20,0,0,20220502 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 14f07d7814e3ffd64d18213129ff4a4cfa50e1e1 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 2 May 2022 08:20:30 -0700 Subject: [PATCH 331/811] fix: move FirstPartySets into the browser process (#33998) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3448551 --- shell/browser/electron_browser_main_parts.cc | 6 ++++++ shell/browser/net/system_network_context_manager.cc | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index a03835dd81e0e..defb91ab6e1da 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -25,6 +25,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/device_service.h" +#include "content/public/browser/first_party_sets_handler.h" #include "content/public/browser/web_ui_controller_factory.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" @@ -416,6 +417,11 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { // url::Add*Scheme are not threadsafe, this helps prevent data races. url::LockSchemeRegistries(); + // The First-Party Sets feature always expects to be initialized + // CL: https://chromium-review.googlesource.com/c/chromium/src/+/3448551 + content::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets( + base::File()); + #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) extensions_client_ = std::make_unique(); extensions::ExtensionsClient::Set(extensions_client_.get()); diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index 552df5c6b2a18..d1f474d59ead7 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -20,7 +20,6 @@ #include "components/os_crypt/os_crypt.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/first_party_sets_handler.h" #include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/network_service_util.h" @@ -289,11 +288,6 @@ 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::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets( - base::File()); - std::string app_name = electron::Browser::Get()->GetName(); #if BUILDFLAG(IS_MAC) KeychainPassword::GetServiceName() = app_name + " Safe Storage"; From 9901d2f28173d9df4286bf4aa0f8c0726b184ec0 Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Mon, 2 May 2022 08:54:17 -0700 Subject: [PATCH 332/811] fix: support mixed-case extensions in Linux file dialogs (#33918) --- shell/browser/ui/file_dialog_gtk.cc | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 7e5c7698cadfa..74df37b57d5f1 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -31,6 +31,25 @@ namespace { static const int kPreviewWidth = 256; static const int kPreviewHeight = 512; +std::string MakeCaseInsensitivePattern(const std::string& extension) { + std::string pattern("*."); + + for (std::size_t i = 0, n = extension.size(); i < n; i++) { + char ch = extension[i]; + if (!base::IsAsciiAlpha(ch)) { + pattern.push_back(ch); + continue; + } + + pattern.push_back('['); + pattern.push_back(base::ToLowerASCII(ch)); + pattern.push_back(base::ToUpperASCII(ch)); + pattern.push_back(']'); + } + + return pattern; +} + class FileChooserDialog { public: FileChooserDialog(GtkFileChooserAction action, const DialogSettings& settings) @@ -252,12 +271,8 @@ void FileChooserDialog::AddFilters(const Filters& filters) { GtkFileFilter* gtk_filter = gtk_file_filter_new(); for (const auto& extension : filter.second) { - // guarantee a pure lowercase variant - std::string file_extension = base::ToLowerASCII("*." + extension); - gtk_file_filter_add_pattern(gtk_filter, file_extension.c_str()); - // guarantee a pure uppercase variant - file_extension = base::ToUpperASCII("*." + extension); - gtk_file_filter_add_pattern(gtk_filter, file_extension.c_str()); + std::string pattern = MakeCaseInsensitivePattern(extension); + gtk_file_filter_add_pattern(gtk_filter, pattern.c_str()); } gtk_file_filter_set_name(gtk_filter, filter.first.c_str()); From e1ed96b574a016c58b274ce0026432c05f5ad2aa Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Mon, 2 May 2022 10:09:23 -0700 Subject: [PATCH 333/811] test: scope internal test fixtures under `@electron-ci` (#33822) * test: scope internal test fixtures under `@electron` * Missed references * Move packages from @electron to @electron-ci scope * Fix tests --- .../api/native-window-open-native-addon.html | 2 +- spec-main/fixtures/module/echo-renamed.js | 2 +- spec-main/fixtures/module/echo.js | 2 +- spec-main/fixtures/module/uv-dlopen.js | 2 +- spec-main/fixtures/native-addon/echo/package.json | 3 +-- .../fixtures/native-addon/uv-dlopen/package.json | 2 +- spec-main/modules-spec.ts | 8 ++++++-- spec-main/package.json | 4 ++-- spec-main/yarn.lock | 12 ++++++------ 9 files changed, 20 insertions(+), 17 deletions(-) diff --git a/spec-main/fixtures/api/native-window-open-native-addon.html b/spec-main/fixtures/api/native-window-open-native-addon.html index 27c24a60b7550..c1cd5cea755a1 100644 --- a/spec-main/fixtures/api/native-window-open-native-addon.html +++ b/spec-main/fixtures/api/native-window-open-native-addon.html @@ -7,7 +7,7 @@ let requireError try { - echo = require('echo') + echo = require('@electron-ci/echo') } catch (error) { requireError = error } diff --git a/spec-main/fixtures/module/echo-renamed.js b/spec-main/fixtures/module/echo-renamed.js index 7b4b195f88f94..6dfa05f914a3c 100644 --- a/spec-main/fixtures/module/echo-renamed.js +++ b/spec-main/fixtures/module/echo-renamed.js @@ -1,6 +1,6 @@ let echo; try { - echo = require('echo'); + echo = require('@electron-ci/echo'); } catch (e) { process.exit(1); } diff --git a/spec-main/fixtures/module/echo.js b/spec-main/fixtures/module/echo.js index 915d0e3393893..ae1b31dd9bed9 100644 --- a/spec-main/fixtures/module/echo.js +++ b/spec-main/fixtures/module/echo.js @@ -2,5 +2,5 @@ process.on('uncaughtException', function (err) { process.send(err.message); }); -const echo = require('echo'); +const echo = require('@electron-ci/echo'); process.send(echo('ok')); diff --git a/spec-main/fixtures/module/uv-dlopen.js b/spec-main/fixtures/module/uv-dlopen.js index c2f0cb94b7872..2f1e3413f3255 100644 --- a/spec-main/fixtures/module/uv-dlopen.js +++ b/spec-main/fixtures/module/uv-dlopen.js @@ -1 +1 @@ -require('uv-dlopen'); +require('@electron-ci/uv-dlopen'); diff --git a/spec-main/fixtures/native-addon/echo/package.json b/spec-main/fixtures/native-addon/echo/package.json index 650586e326125..74956d42a0e27 100644 --- a/spec-main/fixtures/native-addon/echo/package.json +++ b/spec-main/fixtures/native-addon/echo/package.json @@ -1,6 +1,5 @@ - { "main": "./lib/echo.js", - "name": "echo", + "name": "@electron-ci/echo", "version": "0.0.1" } diff --git a/spec-main/fixtures/native-addon/uv-dlopen/package.json b/spec-main/fixtures/native-addon/uv-dlopen/package.json index 32d7aeb11c7cc..f6844acfeb0f4 100644 --- a/spec-main/fixtures/native-addon/uv-dlopen/package.json +++ b/spec-main/fixtures/native-addon/uv-dlopen/package.json @@ -1,5 +1,5 @@ { - "name": "uv-dlopen", + "name": "@electron-ci/uv-dlopen", "version": "0.0.1", "main": "index.js" } diff --git a/spec-main/modules-spec.ts b/spec-main/modules-spec.ts index 8554bc525dab2..a83797961fcf7 100644 --- a/spec-main/modules-spec.ts +++ b/spec-main/modules-spec.ts @@ -21,7 +21,11 @@ describe('modules support', () => { it('can be required in renderer', async () => { const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); w.loadURL('about:blank'); - await expect(w.webContents.executeJavaScript('{ require(\'echo\'); null }')).to.be.fulfilled(); + await expect( + w.webContents.executeJavaScript( + "{ require('@electron-ci/echo'); null }" + ) + ).to.be.fulfilled(); }); ifit(features.isRunAsNodeEnabled())('can be required in node binary', async function () { @@ -53,7 +57,7 @@ describe('modules support', () => { it('can be required in renderer', async () => { const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); w.loadURL('about:blank'); - await expect(w.webContents.executeJavaScript('{ require(\'uv-dlopen\'); null }')).to.be.fulfilled(); + await expect(w.webContents.executeJavaScript('{ require(\'@electron-ci/uv-dlopen\'); null }')).to.be.fulfilled(); }); ifit(features.isRunAsNodeEnabled())('can be required in node binary', async function () { diff --git a/spec-main/package.json b/spec-main/package.json index dfbfd1330da34..1635e32313cda 100644 --- a/spec-main/package.json +++ b/spec-main/package.json @@ -4,13 +4,13 @@ "main": "index.js", "version": "0.1.0", "devDependencies": { + "@electron-ci/echo": "file:./fixtures/native-addon/echo", + "@electron-ci/uv-dlopen": "file:./fixtures/native-addon/uv-dlopen/", "@types/sinon": "^9.0.4", "@types/ws": "^7.2.0", "busboy": "^0.3.1", - "echo": "file:fixtures/native-addon/echo", "q": "^1.5.1", "sinon": "^9.0.1", - "uv-dlopen": "./fixtures/native-addon/uv-dlopen/", "ws": "^7.4.6" }, "dependencies": { diff --git a/spec-main/yarn.lock b/spec-main/yarn.lock index 6f6264a60426e..28e15239334c4 100644 --- a/spec-main/yarn.lock +++ b/spec-main/yarn.lock @@ -2,6 +2,12 @@ # yarn lockfile v1 +"@electron-ci/echo@file:./fixtures/native-addon/echo": + version "0.0.1" + +"@electron-ci/uv-dlopen@file:./fixtures/native-addon/uv-dlopen": + version "0.0.1" + "@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2": version "1.8.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.0.tgz#c8d68821a854c555bba172f3b06959a0039b236d" @@ -320,9 +326,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -"echo@file:fixtures/native-addon/echo": - version "0.0.1" - emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -949,9 +952,6 @@ uuid@^3.3.2: 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" From a71936e395b761023a49ff36e9cd9da27a56d6c1 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 2 May 2022 21:08:20 -0400 Subject: [PATCH 334/811] test: skip flaky test on 32-bit Windows (#34021) --- spec-main/crash-spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec-main/crash-spec.ts b/spec-main/crash-spec.ts index eb9718dac5acd..803d9117d1a13 100644 --- a/spec-main/crash-spec.ts +++ b/spec-main/crash-spec.ts @@ -2,6 +2,7 @@ import { expect } from 'chai'; import * as cp from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; +import { ifit } from './spec-helpers'; const fixturePath = path.resolve(__dirname, 'fixtures', 'crash-cases'); @@ -41,7 +42,8 @@ describe('crash cases', () => { const cases = fs.readdirSync(fixturePath); for (const crashCase of cases) { - it(`the "${crashCase}" case should not crash`, () => { + // TODO(jkleinsc) fix this flaky test on Windows 32-bit + ifit(process.platform !== 'win32' || process.arch !== 'ia32' || crashCase !== 'quit-on-crashed-event')(`the "${crashCase}" case should not crash`, () => { const fixture = path.resolve(fixturePath, crashCase); const argsFile = path.resolve(fixture, 'electron.args'); const args = [fixture]; From 7dee5179cb0f4a79056204a243aa3317fbe711a6 Mon Sep 17 00:00:00 2001 From: Ruben R Date: Mon, 2 May 2022 20:36:06 -0500 Subject: [PATCH 335/811] Handle SIGUSR2 (#33589) `start-server-webpack-plugin` uses `SIGUSR2` to signal an HMR update to a server process: https://github.com/ericclemmons/start-server-webpack-plugin/blob/master/src/StartServerPlugin.js#L70 Note that this signal does not actually kill the child process, but merely functions as a message-passing system. --- script/start.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script/start.js b/script/start.js index 0ba6e56a1fcb1..94ecfeac87952 100644 --- a/script/start.js +++ b/script/start.js @@ -14,3 +14,4 @@ const handleTerminationSignal = (signal) => handleTerminationSignal('SIGINT'); handleTerminationSignal('SIGTERM'); +handleTerminationSignal('SIGUSR2'); From f887000d505cb6dbc4d195c03f38cef943f135fd Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Tue, 3 May 2022 13:09:18 +0530 Subject: [PATCH 336/811] fix: make BrowserWindow#isFocused() return false when blur() is called on macOS (#33734) The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately, this didn't work well with blur() because it wasn't calling any macOS APIs that would change the key status of the window. Hence, this changes the implementation of blur() to call orderOut first, which removes the key status of the window. Then when the orderBack function is called, it moves the window to the back of its level in the screen list, without changing the key window. Fixes: https://github.com/electron/electron/issues/33732 Signed-off-by: Darshan Sen --- shell/browser/native_window_mac.mm | 1 + spec-main/api-browser-window-spec.ts | 128 ++++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 7093717e07681..e370f2e47e8ef 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -507,6 +507,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { [[NSApplication sharedApplication] activateIgnoringOtherApps:NO]; [window_ makeKeyAndOrderFront:nil]; } else { + [window_ orderOut:nil]; [window_ orderBack:nil]; } } diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index d783cde6b8883..37c5c269c7981 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -760,13 +760,137 @@ describe('BrowserWindow module', () => { w.focus(); expect(w.isVisible()).to.equal(false); }); + + ifit(process.platform !== 'win32')('focuses a blurred window', async () => { + { + const isBlurred = emittedOnce(w, 'blur'); + const isShown = emittedOnce(w, 'show'); + w.show(); + w.blur(); + await isShown; + await isBlurred; + } + expect(w.isFocused()).to.equal(false); + w.focus(); + expect(w.isFocused()).to.equal(true); + }); + + ifit(process.platform !== 'linux')('acquires focus status from the other windows', async () => { + const w1 = new BrowserWindow({ show: false }); + const w2 = new BrowserWindow({ show: false }); + const w3 = new BrowserWindow({ show: false }); + { + const isFocused3 = emittedOnce(w3, 'focus'); + const isShown1 = emittedOnce(w1, 'show'); + const isShown2 = emittedOnce(w2, 'show'); + const isShown3 = emittedOnce(w3, 'show'); + w1.show(); + w2.show(); + w3.show(); + await isShown1; + await isShown2; + await isShown3; + await isFocused3; + } + // TODO(RaisinTen): Investigate why this assertion fails only on Linux. + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(true); + + w1.focus(); + expect(w1.isFocused()).to.equal(true); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(false); + + w2.focus(); + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(true); + expect(w3.isFocused()).to.equal(false); + + w3.focus(); + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(true); + + { + const isClosed1 = emittedOnce(w1, 'closed'); + const isClosed2 = emittedOnce(w2, 'closed'); + const isClosed3 = emittedOnce(w3, 'closed'); + w1.destroy(); + w2.destroy(); + w3.destroy(); + await isClosed1; + await isClosed2; + await isClosed3; + } + }); }); - describe('BrowserWindow.blur()', () => { - it('removes focus from window', () => { + // TODO(RaisinTen): Make this work on Windows too. + // Refs: https://github.com/electron/electron/issues/20464. + ifdescribe(process.platform !== 'win32')('BrowserWindow.blur()', () => { + it('removes focus from window', async () => { + { + const isFocused = emittedOnce(w, 'focus'); + const isShown = emittedOnce(w, 'show'); + w.show(); + await isShown; + await isFocused; + } + expect(w.isFocused()).to.equal(true); w.blur(); expect(w.isFocused()).to.equal(false); }); + + ifit(process.platform !== 'linux')('transfers focus status to the next window', async () => { + const w1 = new BrowserWindow({ show: false }); + const w2 = new BrowserWindow({ show: false }); + const w3 = new BrowserWindow({ show: false }); + { + const isFocused3 = emittedOnce(w3, 'focus'); + const isShown1 = emittedOnce(w1, 'show'); + const isShown2 = emittedOnce(w2, 'show'); + const isShown3 = emittedOnce(w3, 'show'); + w1.show(); + w2.show(); + w3.show(); + await isShown1; + await isShown2; + await isShown3; + await isFocused3; + } + // TODO(RaisinTen): Investigate why this assertion fails only on Linux. + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(true); + + w3.blur(); + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(true); + expect(w3.isFocused()).to.equal(false); + + w2.blur(); + expect(w1.isFocused()).to.equal(true); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(false); + + w1.blur(); + expect(w1.isFocused()).to.equal(false); + expect(w2.isFocused()).to.equal(false); + expect(w3.isFocused()).to.equal(true); + + { + const isClosed1 = emittedOnce(w1, 'closed'); + const isClosed2 = emittedOnce(w2, 'closed'); + const isClosed3 = emittedOnce(w3, 'closed'); + w1.destroy(); + w2.destroy(); + w3.destroy(); + await isClosed1; + await isClosed2; + await isClosed3; + } + }); }); describe('BrowserWindow.getFocusedWindow()', () => { From 08937334966fa484539252b21758ea38745dd60c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 06:02:57 -0700 Subject: [PATCH 337/811] Bump v20.0.0-nightly.20220503 --- 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 7a838bf298a9d..d1882459cb9ec 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220502 \ No newline at end of file +20.0.0-nightly.20220503 \ No newline at end of file diff --git a/package.json b/package.json index 52e8ff7a1853e..1b8e8b0bd5b63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220502", + "version": "20.0.0-nightly.20220503", "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 eb462713a0338..e11e7c06200d0 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 20,0,0,20220502 - PRODUCTVERSION 20,0,0,20220502 + FILEVERSION 20,0,0,20220503 + PRODUCTVERSION 20,0,0,20220503 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 658407df7aa5300091028a37b42f9914940ab21c Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 3 May 2022 17:49:01 +0200 Subject: [PATCH 338/811] test: fix require('echo') -> require('@electron-ci/echo') (#34026) --- spec/fixtures/pages/native-module.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/fixtures/pages/native-module.html b/spec/fixtures/pages/native-module.html index 78d928f2366c0..922a09aeeddfe 100644 --- a/spec/fixtures/pages/native-module.html +++ b/spec/fixtures/pages/native-module.html @@ -2,7 +2,7 @@ From 747dfe585151e8971ae4b2a1aa002708d2faf12b Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 3 May 2022 12:06:25 -0700 Subject: [PATCH 339/811] build: remove dead circle config bits (#34034) --- .circleci/config/base.yml | 98 ++++----------------------------------- 1 file changed, 8 insertions(+), 90 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index d420933d73598..ddd55364e9601 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -681,13 +681,6 @@ step-electron-dist-unzip: &step-electron-dist-unzip # 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 @@ -716,13 +709,6 @@ step-ffmpeg-build: &step-ffmpeg-build 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 @@ -1060,53 +1046,6 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha #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-install-python2-on-mac - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-wait-for-goma - - *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: @@ -1886,7 +1825,7 @@ jobs: GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' <<: *steps-electron-gn-check - osx-publish-x64-skip-checkout: + osx-publish-x64: executor: name: macos size: macos.x86.medium.gen2 @@ -1907,7 +1846,7 @@ jobs: attach: true checkout: false - osx-publish-arm64-skip-checkout: + osx-publish-arm64: executor: name: macos size: macos.x86.medium.gen2 @@ -1977,7 +1916,7 @@ jobs: GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' <<: *steps-electron-gn-check - mas-publish-x64-skip-checkout: + mas-publish-x64: executor: name: macos size: macos.x86.medium.gen2 @@ -1998,7 +1937,7 @@ jobs: attach: true checkout: false - mas-publish-arm64-skip-checkout: + mas-publish-arm64: executor: name: macos size: macos.x86.medium.gen2 @@ -2084,16 +2023,6 @@ jobs: <<: *env-stack-dumping <<: *steps-test-node - 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-arm-testing-tests: executor: linux-arm environment: @@ -2150,17 +2079,6 @@ jobs: <<: *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: @@ -2186,19 +2104,19 @@ workflows: when: << pipeline.parameters.run-macos-publish >> jobs: - mac-checkout - - osx-publish-x64-skip-checkout: + - osx-publish-x64: requires: - mac-checkout context: release-env - - mas-publish-x64-skip-checkout: + - mas-publish-x64: requires: - mac-checkout context: release-env - - osx-publish-arm64-skip-checkout: + - osx-publish-arm64: requires: - mac-checkout context: release-env - - mas-publish-arm64-skip-checkout: + - mas-publish-arm64: requires: - mac-checkout context: release-env From 349cd98b0a5517ffeb3bf2c277af4b2bae130565 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 4 May 2022 08:56:45 +0200 Subject: [PATCH 340/811] test: fix nativeModulesEnabled in spec/webview-spec.js (#34027) --- spec/webview-spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 0b649d1bd77ad..f4af0158f2c85 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -7,7 +7,7 @@ const { emittedOnce, waitForEvent } = require('./events-helpers'); const { ifdescribe, ifit, delay } = require('./spec-helpers'); const features = process._linkedBinding('electron_common_features'); -const nativeModulesEnabled = process.env.ELECTRON_SKIP_NATIVE_MODULE_TESTS; +const nativeModulesEnabled = !process.env.ELECTRON_SKIP_NATIVE_MODULE_TESTS; /* Most of the APIs here don't use standard callbacks */ /* eslint-disable standard/no-callback-literal */ From 60f1e5e0085e20a9e704d608e4a424fe4955faca Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 4 May 2022 01:29:30 -0700 Subject: [PATCH 341/811] test: unflake some focus tests (#34061) * spec: unflake some focus tests * test: disable flaky webFrame visibiilty spec --- spec-main/api-browser-window-spec.ts | 10 +++++----- spec-main/api-web-frame-main-spec.ts | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 37c5c269c7981..94bdc956a5b68 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -694,12 +694,12 @@ describe('BrowserWindow module', () => { }); describe('BrowserWindow.show()', () => { - it('should focus on window', () => { - w.show(); + it('should focus on window', async () => { + await emittedOnce(w, 'focus', () => w.show()); expect(w.isFocused()).to.equal(true); }); - it('should make the window visible', () => { - w.show(); + it('should make the window visible', async () => { + await emittedOnce(w, 'focus', () => w.show()); expect(w.isVisible()).to.equal(true); }); it('emits when window is shown', async () => { @@ -895,7 +895,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.getFocusedWindow()', () => { it('returns the opener window when dev tools window is focused', async () => { - w.show(); + await emittedOnce(w, 'focus', () => w.show()); w.webContents.openDevTools({ mode: 'undocked' }); await emittedOnce(w.webContents, 'devtools-focused'); expect(BrowserWindow.getFocusedWindow()).to.equal(w); diff --git a/spec-main/api-web-frame-main-spec.ts b/spec-main/api-web-frame-main-spec.ts index 49545c4eaf992..7f947f7f54922 100644 --- a/spec-main/api-web-frame-main-spec.ts +++ b/spec-main/api-web-frame-main-spec.ts @@ -137,7 +137,9 @@ describe('webFrameMain module', () => { }); describe('WebFrame.visibilityState', () => { - it('should match window state', async () => { + // TODO(MarshallOfSound): Fix flaky test + // @flaky-test + it.skip('should match window state', async () => { const w = new BrowserWindow({ show: true }); await w.loadURL('about:blank'); const webFrame = w.webContents.mainFrame; From 4fad376b0e0fbe837f34b6666fa7c0ae031ce206 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 4 May 2022 06:04:36 -0700 Subject: [PATCH 342/811] Bump v20.0.0-nightly.20220504 --- 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 d1882459cb9ec..5234c946d816e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220503 \ No newline at end of file +20.0.0-nightly.20220504 \ No newline at end of file diff --git a/package.json b/package.json index 1b8e8b0bd5b63..21dc2cac61987 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220503", + "version": "20.0.0-nightly.20220504", "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 e11e7c06200d0..e6d07029086e6 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 20,0,0,20220503 - PRODUCTVERSION 20,0,0,20220503 + FILEVERSION 20,0,0,20220504 + PRODUCTVERSION 20,0,0,20220504 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 2091343b78e5b3b865f406a72a4047df9a6486cf Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 4 May 2022 16:30:05 +0200 Subject: [PATCH 343/811] refactor: initialize member variables directly (#34046) --- lib/browser/api/net.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/browser/api/net.ts b/lib/browser/api/net.ts index 80351c0cdbaae..6438eb0230c16 100644 --- a/lib/browser/api/net.ts +++ b/lib/browser/api/net.ts @@ -36,17 +36,14 @@ const discardableDuplicateHeaders = new Set([ ]); class IncomingMessage extends Readable { - _shouldPush: boolean; - _data: (Buffer | null)[]; + _shouldPush: boolean = false; + _data: (Buffer | null)[] = []; _responseHead: NodeJS.ResponseHead; - _resume: (() => void) | null; + _resume: (() => void) | null = null; constructor (responseHead: NodeJS.ResponseHead) { super(); - this._shouldPush = false; - this._data = []; this._responseHead = responseHead; - this._resume = null; } get statusCode () { From 5b648854d59180cc9d72c6def8849ec59489bba6 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Wed, 4 May 2022 10:30:30 -0700 Subject: [PATCH 344/811] fix: requestSingleInstanceLock API sometimes hangs (#33777) --- ...ransfer_to_requestsingleinstancelock.patch | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 07752f798efa4..a539bdab51ef7 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -282,7 +282,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f941384b249a5d 100644 +index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d05018b627 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -21,6 +21,7 @@ @@ -406,7 +406,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 bool ProcessLaunchNotification( const ProcessSingleton::NotificationCallback& notification_callback, UINT message, -@@ -151,16 +233,23 @@ bool ProcessLaunchNotification( +@@ -151,16 +233,35 @@ bool ProcessLaunchNotification( // Handle the WM_COPYDATA message from another process. const COPYDATASTRUCT* cds = reinterpret_cast(lparam); @@ -423,18 +423,30 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 - *result = notification_callback.Run(parsed_command_line, current_directory) ? - TRUE : FALSE; ++ // notification_callback.Run waits for StoreAck to ++ // run to completion before moving onwards. ++ // Therefore, we cannot directly send the SendBackAck ++ // callback instead, as it would hang the program ++ // during the ConnectNamedPipe call. + g_write_ack_callback_called = false; + *result = notification_callback.Run(parsed_command_line, current_directory, + std::move(additional_data), + base::BindRepeating(&StoreAck)) + ? TRUE + : FALSE; -+ g_ack_timer.Start(FROM_HERE, base::Seconds(0), -+ base::BindOnce(&SendBackAck)); ++ if (*result) { ++ // If *result is TRUE, we return NOTIFY_SUCCESS. ++ // Only for that case does the second process read ++ // the acknowledgement. Therefore, only send back ++ // the acknowledgement if *result is TRUE, ++ // otherwise the program hangs during the ConnectNamedPipe call. ++ g_ack_timer.Start(FROM_HERE, base::Seconds(0), ++ base::BindOnce(&SendBackAck)); ++ } return true; } -@@ -261,9 +350,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -261,9 +362,13 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -449,7 +461,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -278,6 +371,37 @@ ProcessSingleton::~ProcessSingleton() { +@@ -278,6 +383,37 @@ ProcessSingleton::~ProcessSingleton() { ::CloseHandle(lock_file_); } @@ -487,7 +499,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 // Code roughly based on Mozilla. ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); -@@ -290,8 +414,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { +@@ -290,8 +426,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } @@ -498,7 +510,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 return PROCESS_NOTIFIED; case chrome::NOTIFY_FAILED: remote_window_ = NULL; -@@ -429,6 +554,18 @@ bool ProcessSingleton::Create() { +@@ -429,6 +566,18 @@ bool ProcessSingleton::Create() { << "Lock file can not be created! Error code: " << error; if (lock_file_ != INVALID_HANDLE_VALUE) { @@ -517,7 +529,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..a3d4dd1efc950033855a1f2783f94138 // 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. TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); -@@ -456,6 +593,7 @@ bool ProcessSingleton::Create() { +@@ -456,6 +605,7 @@ bool ProcessSingleton::Create() { } void ProcessSingleton::Cleanup() { From 706d585eb8b2ba2fb396f1f673df9c61ad6161bc Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 5 May 2022 01:41:52 -0700 Subject: [PATCH 345/811] build: fix run-clang-format extension matching (#34076) --- script/run-clang-format.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index 4d2e4b0641c0c..33548391c23e1 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -55,8 +55,7 @@ def list_files(files, recursive=False, extensions=None, exclude=None): x for x in fpaths if not fnmatch.fnmatch(x, pattern) ] for fp in fpaths: - ext = os.path.splitext(f)[1][1:] - print(ext) + ext = os.path.splitext(fp)[1][1:] if ext in extensions: out.append(fp) else: From 323f7d4c19b232ec5661d9d87fcecaf6918d8abf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 06:01:44 -0700 Subject: [PATCH 346/811] Bump v20.0.0-nightly.20220505 --- 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 5234c946d816e..0c1167e43a995 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220504 \ No newline at end of file +20.0.0-nightly.20220505 \ No newline at end of file diff --git a/package.json b/package.json index 21dc2cac61987..93cbb7fdbb453 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220504", + "version": "20.0.0-nightly.20220505", "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 e6d07029086e6..ba4beeefb1fdd 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 20,0,0,20220504 - PRODUCTVERSION 20,0,0,20220504 + FILEVERSION 20,0,0,20220505 + PRODUCTVERSION 20,0,0,20220505 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 90eb47f70ba0ba1b89933ba505f6cc8805411bcf Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 5 May 2022 15:53:39 +0200 Subject: [PATCH 347/811] fix: offscreen rendering crash on input select (#34069) --- .../osr/osr_render_widget_host_view.cc | 29 +++++------------ .../browser/osr/osr_render_widget_host_view.h | 2 +- shell/browser/osr/osr_video_consumer.cc | 31 ++++++++++++++----- shell/browser/osr/osr_video_consumer.h | 2 +- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index f24cf051c5e96..7edfd582b2d24 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -397,7 +397,7 @@ void OffScreenRenderWidgetHostView::ResetFallbackToFirstNavigationSurface() { void OffScreenRenderWidgetHostView::InitAsPopup( content::RenderWidgetHostView* parent_host_view, - const gfx::Rect& pos, + const gfx::Rect& bounds, const gfx::Rect& anchor_rect) { DCHECK_EQ(parent_host_view_, parent_host_view); DCHECK_EQ(widget_type_, content::WidgetType::kPopup); @@ -411,13 +411,10 @@ void OffScreenRenderWidgetHostView::InitAsPopup( base::BindRepeating(&OffScreenRenderWidgetHostView::OnPopupPaint, parent_host_view_->weak_ptr_factory_.GetWeakPtr()); - popup_position_ = pos; + popup_position_ = bounds; - ResizeRootLayer(false); + ResizeRootLayer(true); SetPainting(parent_host_view_->IsPainting()); - if (video_consumer_) { - video_consumer_->SizeChanged(); - } Show(); } @@ -688,13 +685,8 @@ void OffScreenRenderWidgetHostView::OnPaint(const gfx::Rect& damage_rect, gfx::Size OffScreenRenderWidgetHostView::SizeInPixels() { float sf = GetDeviceScaleFactor(); - if (IsPopupWidget()) { - return gfx::ToFlooredSize( - gfx::ConvertSizeToPixels(popup_position_.size(), sf)); - } else { - return gfx::ToFlooredSize( - gfx::ConvertSizeToPixels(GetViewBounds().size(), sf)); - } + return gfx::ToFlooredSize( + gfx::ConvertSizeToPixels(GetViewBounds().size(), sf)); } void OffScreenRenderWidgetHostView::CompositeFrame( @@ -995,7 +987,7 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer(bool force) { display::Screen::GetScreen()->GetDisplayNearestView(GetNativeView()); const float scaleFactor = display.device_scale_factor(); float sf = GetDeviceScaleFactor(); - const bool scaleFactorDidChange = scaleFactor != sf; + const bool sf_did_change = scaleFactor != sf; // Initialize a screen_infos_ struct as needed, to cache the scale factor. if (screen_infos_.screen_infos.empty()) { @@ -1003,14 +995,9 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer(bool force) { } screen_infos_.mutable_current().device_scale_factor = scaleFactor; - gfx::Size size; - if (!IsPopupWidget()) - size = GetViewBounds().size(); - else - size = popup_position_.size(); + gfx::Size size = GetViewBounds().size(); - if (!force && !scaleFactorDidChange && - size == GetRootLayer()->bounds().size()) + if (!force && !sf_did_change && size == GetRootLayer()->bounds().size()) return; GetRootLayer()->SetBounds(gfx::Rect(size)); diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 874fd68268b3d..d047e702941ae 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -121,7 +121,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, void ResetFallbackToFirstNavigationSurface() override; void InitAsPopup(content::RenderWidgetHostView* parent_host_view, - const gfx::Rect& pos, + const gfx::Rect& bounds, const gfx::Rect& anchor_rect) override; void UpdateCursor(const content::WebCursor&) override; void SetIsLoading(bool is_loading) override; diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index aeb60a7b5b28e..a8240681f814e 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -6,6 +6,7 @@ #include +#include "media/base/limits.h" #include "media/base/video_frame_metadata.h" #include "media/capture/mojom/video_capture_buffer.mojom.h" #include "media/capture/mojom/video_capture_types.mojom.h" @@ -13,6 +14,21 @@ #include "shell/browser/osr/osr_render_widget_host_view.h" #include "ui/gfx/skbitmap_operations.h" +namespace { + +bool IsValidMinAndMaxFrameSize(gfx::Size min_frame_size, + gfx::Size max_frame_size) { + // Returns true if + // 0 < |min_frame_size| <= |max_frame_size| <= media::limits::kMaxDimension. + return 0 < min_frame_size.width() && 0 < min_frame_size.height() && + min_frame_size.width() <= max_frame_size.width() && + min_frame_size.height() <= max_frame_size.height() && + max_frame_size.width() <= media::limits::kMaxDimension && + max_frame_size.height() <= media::limits::kMaxDimension; +} + +} // namespace + namespace electron { OffScreenVideoConsumer::OffScreenVideoConsumer( @@ -21,11 +37,11 @@ OffScreenVideoConsumer::OffScreenVideoConsumer( : callback_(callback), view_(view), video_capturer_(view->CreateVideoCapturer()) { - video_capturer_->SetResolutionConstraints(view_->SizeInPixels(), - view_->SizeInPixels(), true); video_capturer_->SetAutoThrottlingEnabled(false); video_capturer_->SetMinSizeChangePeriod(base::TimeDelta()); video_capturer_->SetFormat(media::PIXEL_FORMAT_ARGB); + + SizeChanged(view_->SizeInPixels()); SetFrameRate(view_->GetFrameRate()); } @@ -43,9 +59,10 @@ void OffScreenVideoConsumer::SetFrameRate(int frame_rate) { video_capturer_->SetMinCapturePeriod(base::Seconds(1) / frame_rate); } -void OffScreenVideoConsumer::SizeChanged() { - video_capturer_->SetResolutionConstraints(view_->SizeInPixels(), - view_->SizeInPixels(), true); +void OffScreenVideoConsumer::SizeChanged(const gfx::Size& size_in_pixels) { + DCHECK(IsValidMinAndMaxFrameSize(size_in_pixels, size_in_pixels)); + video_capturer_->SetResolutionConstraints(size_in_pixels, size_in_pixels, + true); video_capturer_->RequestRefreshFrame(); } @@ -58,9 +75,7 @@ void OffScreenVideoConsumer::OnFrameCaptured( auto& data_region = data->get_read_only_shmem_region(); if (!CheckContentRect(content_rect)) { - gfx::Size view_size = view_->SizeInPixels(); - video_capturer_->SetResolutionConstraints(view_size, view_size, true); - video_capturer_->RequestRefreshFrame(); + SizeChanged(view_->SizeInPixels()); return; } diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index c6687965441e8..ee6bf0aafd419 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -33,7 +33,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { void SetActive(bool active); void SetFrameRate(int frame_rate); - void SizeChanged(); + void SizeChanged(const gfx::Size& size_in_pixels); private: // viz::mojom::FrameSinkVideoConsumer implementation. From a2a8e493eb28622541986615c2608f5ceba0fda7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 5 May 2022 11:42:38 -0700 Subject: [PATCH 348/811] test: unflake some more tests (#34084) * test: unflake webview fullscreen test * test: unflake net throttle test * Update spec-main/api-net-spec.ts Co-authored-by: Jeremy Rose Co-authored-by: Jeremy Rose --- spec-main/api-net-spec.ts | 7 ++++++- spec-main/webview-spec.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec-main/api-net-spec.ts b/spec-main/api-net-spec.ts index 2386aacaff80a..fc70135fa38ed 100644 --- a/spec-main/api-net-spec.ts +++ b/spec-main/api-net-spec.ts @@ -1811,7 +1811,12 @@ describe('net module', () => { urlRequest.on('response', () => {}); urlRequest.end(); await delay(2000); - expect(numChunksSent).to.be.at.most(20); + // TODO(nornagon): I think this ought to max out at 20, but in practice + // it seems to exceed that sometimes. This is at 25 to avoid test flakes, + // but we should investigate if there's actually something broken here and + // if so fix it and reset this to max at 20, and if not then delete this + // comment. + expect(numChunksSent).to.be.at.most(25); }); }); diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index 01b93a66e2307..7c7315eca85b6 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -435,6 +435,11 @@ describe(' tag', function () { }; afterEach(closeAllWindows); + afterEach(async () => { + // The leaving animation is un-observable but can interfere with future tests + // Specifically this is async on macOS but can be on other platforms too + await delay(1000); + }); // TODO(jkleinsc) fix this test on arm64 macOS. It causes the tests following it to fail/be flaky ifit(process.platform !== 'darwin' || process.arch !== 'arm64')('should make parent frame element fullscreen too', async () => { From d8a7219d07d5afae515d198d09c7e395af69941a Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 5 May 2022 11:50:21 -0700 Subject: [PATCH 349/811] chore: stop using v8::Locker everywhere (#34078) --- shell/browser/api/electron_api_app.cc | 4 ---- shell/browser/api/electron_api_auto_updater.cc | 2 -- shell/browser/api/electron_api_base_window.cc | 2 -- shell/browser/api/electron_api_browser_window.cc | 1 - shell/browser/api/electron_api_data_pipe_holder.cc | 1 - shell/browser/api/electron_api_debugger.cc | 2 -- shell/browser/api/electron_api_desktop_capturer.cc | 2 -- shell/browser/api/electron_api_menu.cc | 1 - shell/browser/api/electron_api_session.cc | 1 - shell/browser/api/electron_api_tray.cc | 1 - shell/browser/api/electron_api_web_contents.cc | 6 ------ shell/browser/api/electron_api_web_frame_main.cc | 1 - shell/browser/event_emitter_mixin.h | 1 - shell/browser/javascript_environment.cc | 2 -- shell/browser/net/node_stream_loader.cc | 2 -- shell/browser/printing/print_preview_message_handler.cc | 2 -- shell/browser/ui/file_dialog_mac.mm | 1 - shell/browser/ui/file_dialog_win.cc | 2 -- shell/common/api/electron_bindings.cc | 1 - shell/common/gin_helper/event_emitter.h | 1 - shell/common/gin_helper/pinnable.h | 1 - shell/common/gin_helper/promise.cc | 4 ---- shell/common/node_bindings.cc | 2 -- 23 files changed, 43 deletions(-) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 3b04c8ee2ea2a..5964a4933f302 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -802,7 +802,6 @@ bool App::CanCreateWindow( bool opener_suppressed, bool* no_javascript_access) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); content::WebContents* web_contents = content::WebContents::FromRenderFrameHost(opener); @@ -828,7 +827,6 @@ void App::AllowCertificateError( base::OnceCallback callback) { auto adapted_callback = base::AdaptCallbackForRepeating(std::move(callback)); v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); bool prevent_default = Emit( "certificate-error", WebContents::FromOrCreate(isolate, web_contents), @@ -1086,7 +1084,6 @@ std::string App::GetLocaleCountryCode() { void App::OnFirstInstanceAck( const base::span* first_instance_data) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); base::Value data_to_send; if (first_instance_data) { @@ -1120,7 +1117,6 @@ void App::OnSecondInstance( const std::vector additional_data, const ProcessSingleton::NotificationAckCallback& ack_callback) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Local data_value = DeserializeV8Value(isolate, std::move(additional_data)); diff --git a/shell/browser/api/electron_api_auto_updater.cc b/shell/browser/api/electron_api_auto_updater.cc index e49dcea4c5ea6..c8f2c4fece090 100644 --- a/shell/browser/api/electron_api_auto_updater.cc +++ b/shell/browser/api/electron_api_auto_updater.cc @@ -32,7 +32,6 @@ AutoUpdater::~AutoUpdater() { void AutoUpdater::OnError(const std::string& message) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Local wrapper; if (GetWrapper(isolate).ToLocal(&wrapper)) { @@ -49,7 +48,6 @@ void AutoUpdater::OnError(const std::string& message, const int code, const std::string& domain) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Local wrapper; if (GetWrapper(isolate).ToLocal(&wrapper)) { diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index 3024eba2098ec..3291cf5e7506f 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -209,7 +209,6 @@ void BaseWindow::OnWindowWillResize(const gfx::Rect& new_bounds, const gfx::ResizeEdge& edge, bool* prevent_default) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); gin_helper::Dictionary info = gin::Dictionary::CreateEmpty(isolate); info.Set("edge", edge); @@ -309,7 +308,6 @@ void BaseWindow::OnSystemContextMenu(int x, int y, bool* prevent_default) { void BaseWindow::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) { if (IsWindowMessageHooked(message)) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); messages_callback_map_[message].Run( ToBuffer(isolate, static_cast(&w_param), sizeof(WPARAM)), diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index e71b15fc0d575..92178079b3506 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -349,7 +349,6 @@ void BrowserWindow::UpdateWindowControlsOverlay( void BrowserWindow::CloseImmediately() { // Close all child windows before closing current window. - v8::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); for (v8::Local value : child_windows_.Values(isolate())) { gin::Handle child; diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index 85ee9204f4ec4..ebe585b88bd46 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -107,7 +107,6 @@ class DataPipeReader { // // Note that the lifetime of the native buffer belongs to us, and we will // free memory when JS buffer gets garbage collected. - v8::Locker locker(promise_.isolate()); v8::HandleScope handle_scope(promise_.isolate()); v8::Local buffer = node::Buffer::New(promise_.isolate(), &buffer_.front(), buffer_.size(), diff --git a/shell/browser/api/electron_api_debugger.cc b/shell/browser/api/electron_api_debugger.cc index 2569e24b3d390..69c8ea7bcebfa 100644 --- a/shell/browser/api/electron_api_debugger.cc +++ b/shell/browser/api/electron_api_debugger.cc @@ -43,8 +43,6 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, DCHECK(agent_host == agent_host_); v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); base::StringPiece message_str(reinterpret_cast(message.data()), diff --git a/shell/browser/api/electron_api_desktop_capturer.cc b/shell/browser/api/electron_api_desktop_capturer.cc index 00721e52bfcf8..bea6a03547e58 100644 --- a/shell/browser/api/electron_api_desktop_capturer.cc +++ b/shell/browser/api/electron_api_desktop_capturer.cc @@ -155,7 +155,6 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) { if (!webrtc::DxgiDuplicatorController::Instance()->GetDeviceNames( &device_names)) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); gin_helper::CallMethod(this, "_onerror", "Failed to get sources."); @@ -191,7 +190,6 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) { if (!capture_window_ && !capture_screen_) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); gin_helper::CallMethod(this, "_onfinished", captured_sources_); diff --git a/shell/browser/api/electron_api_menu.cc b/shell/browser/api/electron_api_menu.cc index b77b46d3541e5..ff18a7e76b98b 100644 --- a/shell/browser/api/electron_api_menu.cc +++ b/shell/browser/api/electron_api_menu.cc @@ -146,7 +146,6 @@ void Menu::OnMenuWillShow(ui::SimpleMenuModel* source) { base::OnceClosure Menu::BindSelfToClosure(base::OnceClosure callback) { // return ((callback, ref) => { callback() }).bind(null, callback, this) v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); v8::Local self; if (GetWrapper(isolate).ToLocal(&self)) { diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index ac6b38cdb58f4..19be4a8f3df88 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -372,7 +372,6 @@ void Session::OnDownloadCreated(content::DownloadManager* manager, if (item->IsSavePackageDownload()) return; - v8::Locker locker(isolate_); v8::HandleScope handle_scope(isolate_); auto handle = DownloadItem::FromOrCreate(isolate_, item); if (item->GetState() == download::DownloadItem::INTERRUPTED) diff --git a/shell/browser/api/electron_api_tray.cc b/shell/browser/api/electron_api_tray.cc index 312fec8b09ddf..dc57b2cbfe293 100644 --- a/shell/browser/api/electron_api_tray.cc +++ b/shell/browser/api/electron_api_tray.cc @@ -389,7 +389,6 @@ gfx::Rect Tray::GetBounds() { bool Tray::CheckAlive() { if (!tray_icon_) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); gin_helper::ErrorThrower(isolate).ThrowError("Tray is destroyed"); return false; diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index caf9cdb41b3ea..f27eb39170c74 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1041,7 +1041,6 @@ void WebContents::WebContentsCreatedWithFullParams( tracker->body = params.body; v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); gin_helper::Dictionary dict; @@ -1073,7 +1072,6 @@ bool WebContents::IsWebContentsCreationOverridden( void WebContents::SetNextChildWebPreferences( const gin_helper::Dictionary preferences) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); // Store these prefs for when Chrome calls WebContentsCreatedWithFullParams // with the new child contents. @@ -1105,7 +1103,6 @@ void WebContents::AddNewContents( v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); auto api_web_contents = CreateAndTake(isolate, std::move(new_contents), Type::kBrowserWindow); @@ -1392,7 +1389,6 @@ void WebContents::FindReply(content::WebContents* web_contents, return; v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); gin_helper::Dictionary result = gin::Dictionary::CreateEmpty(isolate); result.Set("requestId", request_id); @@ -1991,7 +1987,6 @@ void WebContents::DevToolsFocused() { void WebContents::DevToolsOpened() { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); DCHECK(inspectable_web_contents_); DCHECK(inspectable_web_contents_->GetDevToolsWebContents()); @@ -2015,7 +2010,6 @@ void WebContents::DevToolsOpened() { void WebContents::DevToolsClosed() { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); devtools_web_contents_.Reset(); diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index e7ba32a33f782..d39943e4d64cb 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -108,7 +108,6 @@ void WebFrameMain::UpdateRenderFrameHost(content::RenderFrameHost* rfh) { bool WebFrameMain::CheckRenderFrame() const { if (render_frame_disposed_) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope scope(isolate); gin_helper::ErrorThrower(isolate).ThrowError( "Render frame was disposed before WebFrameMain could be accessed"); diff --git a/shell/browser/event_emitter_mixin.h b/shell/browser/event_emitter_mixin.h index 101e4d5e4591a..4f796c55ea8a2 100644 --- a/shell/browser/event_emitter_mixin.h +++ b/shell/browser/event_emitter_mixin.h @@ -29,7 +29,6 @@ class EventEmitterMixin { template bool Emit(base::StringPiece name, Args&&... args) { v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Local wrapper; if (!static_cast(this)->GetWrapper(isolate).ToLocal(&wrapper)) diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 9e714f31a6d9a..8b9c46c8d509a 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -171,7 +171,6 @@ JavascriptEnvironment::~JavascriptEnvironment() { platform_->DrainTasks(isolate_); { - v8::Locker locker(isolate_); v8::HandleScope scope(isolate_); context_.Get(isolate_)->Exit(); } @@ -370,7 +369,6 @@ void JavascriptEnvironment::OnMessageLoopCreated() { void JavascriptEnvironment::OnMessageLoopDestroying() { DCHECK(microtasks_runner_); { - v8::Locker locker(isolate_); v8::HandleScope scope(isolate_); gin_helper::CleanedUpAtExit::DoCleanup(); } diff --git a/shell/browser/net/node_stream_loader.cc b/shell/browser/net/node_stream_loader.cc index c4d264a578390..74ec0e0f295f7 100644 --- a/shell/browser/net/node_stream_loader.cc +++ b/shell/browser/net/node_stream_loader.cc @@ -30,7 +30,6 @@ NodeStreamLoader::NodeStreamLoader( } NodeStreamLoader::~NodeStreamLoader() { - v8::Locker locker(isolate_); v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); @@ -154,7 +153,6 @@ void NodeStreamLoader::DidWrite(MojoResult result) { } void NodeStreamLoader::On(const char* event, EventCallback callback) { - v8::Locker locker(isolate_); v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index 172bd53e33d15..18890ee0ce7c5 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -24,7 +24,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_user_data.h" #include "mojo/public/cpp/bindings/callback_helpers.h" -#include "shell/common/gin_helper/locker.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "shell/common/node_includes.h" @@ -250,7 +249,6 @@ void PrintPreviewMessageHandler::ResolvePromise( gin_helper::Promise> promise = GetPromise(request_id); v8::Isolate* isolate = promise.isolate(); - gin_helper::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Context::Scope context_scope( v8::Local::New(isolate, promise.GetContext())); diff --git a/shell/browser/ui/file_dialog_mac.mm b/shell/browser/ui/file_dialog_mac.mm index d4572bdd7e1fe..94c84e9672d00 100644 --- a/shell/browser/ui/file_dialog_mac.mm +++ b/shell/browser/ui/file_dialog_mac.mm @@ -307,7 +307,6 @@ void ResolvePromiseInNextTick(gin_helper::Promise> promise, [](gin_helper::Promise> promise, v8::Global global) { v8::Isolate* isolate = promise.isolate(); - v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); v8::Local value = global.Get(isolate); promise.Resolve(value); diff --git a/shell/browser/ui/file_dialog_win.cc b/shell/browser/ui/file_dialog_win.cc index 18fc06b0b7063..7cd094d2d6692 100644 --- a/shell/browser/ui/file_dialog_win.cc +++ b/shell/browser/ui/file_dialog_win.cc @@ -221,7 +221,6 @@ void ShowOpenDialog(const DialogSettings& settings, gin_helper::Promise promise) { auto done = [](gin_helper::Promise promise, bool success, std::vector result) { - v8::Locker locker(promise.isolate()); v8::HandleScope handle_scope(promise.isolate()); gin::Dictionary dict = gin::Dictionary::CreateEmpty(promise.isolate()); dict.Set("canceled", !success); @@ -271,7 +270,6 @@ void ShowSaveDialog(const DialogSettings& settings, gin_helper::Promise promise) { auto done = [](gin_helper::Promise promise, bool success, base::FilePath result) { - v8::Locker locker(promise.isolate()); v8::HandleScope handle_scope(promise.isolate()); gin::Dictionary dict = gin::Dictionary::CreateEmpty(promise.isolate()); dict.Set("canceled", !success); diff --git a/shell/common/api/electron_bindings.cc b/shell/common/api/electron_bindings.cc index 50509dec3401a..5cd1930a8bcd2 100644 --- a/shell/common/api/electron_bindings.cc +++ b/shell/common/api/electron_bindings.cc @@ -250,7 +250,6 @@ void ElectronBindings::DidReceiveMemoryDump( bool success, std::unique_ptr global_dump) { v8::Isolate* isolate = promise.isolate(); - gin_helper::Locker locker(isolate); v8::HandleScope handle_scope(isolate); gin_helper::MicrotasksScope microtasks_scope(isolate, true); v8::Context::Scope context_scope( diff --git a/shell/common/gin_helper/event_emitter.h b/shell/common/gin_helper/event_emitter.h index 90af3f7478df4..58b8d07a43f86 100644 --- a/shell/common/gin_helper/event_emitter.h +++ b/shell/common/gin_helper/event_emitter.h @@ -61,7 +61,6 @@ class EventEmitter : public gin_helper::Wrappable { // this.emit(name, new Event(), args...); template bool Emit(base::StringPiece name, Args&&... args) { - v8::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); v8::Local wrapper = GetWrapper(); if (wrapper.IsEmpty()) diff --git a/shell/common/gin_helper/pinnable.h b/shell/common/gin_helper/pinnable.h index 42b98f55179d8..a5e5f68cc6236 100644 --- a/shell/common/gin_helper/pinnable.h +++ b/shell/common/gin_helper/pinnable.h @@ -14,7 +14,6 @@ class Pinnable { protected: // Prevent the object from being garbage collected until Unpin() is called. void Pin(v8::Isolate* isolate) { - v8::Locker locker(isolate); v8::HandleScope scope(isolate); v8::Local wrapper; if (static_cast(this)->GetWrapper(isolate).ToLocal(&wrapper)) { diff --git a/shell/common/gin_helper/promise.cc b/shell/common/gin_helper/promise.cc index e17881ef2c4a6..67c56cc2cf578 100644 --- a/shell/common/gin_helper/promise.cc +++ b/shell/common/gin_helper/promise.cc @@ -24,7 +24,6 @@ PromiseBase::~PromiseBase() = default; PromiseBase& PromiseBase::operator=(PromiseBase&&) = default; v8::Maybe PromiseBase::Reject() { - gin_helper::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); gin_helper::MicrotasksScope microtasks_scope(isolate()); v8::Context::Scope context_scope(GetContext()); @@ -33,7 +32,6 @@ v8::Maybe PromiseBase::Reject() { } v8::Maybe PromiseBase::Reject(v8::Local except) { - gin_helper::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); gin_helper::MicrotasksScope microtasks_scope(isolate()); v8::Context::Scope context_scope(GetContext()); @@ -42,7 +40,6 @@ v8::Maybe PromiseBase::Reject(v8::Local except) { } v8::Maybe PromiseBase::RejectWithErrorMessage(base::StringPiece message) { - gin_helper::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); gin_helper::MicrotasksScope microtasks_scope(isolate()); v8::Context::Scope context_scope(GetContext()); @@ -85,7 +82,6 @@ v8::Local Promise::ResolvedPromise(v8::Isolate* isolate) { } v8::Maybe Promise::Resolve() { - gin_helper::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); gin_helper::MicrotasksScope microtasks_scope(isolate()); v8::Context::Scope context_scope(GetContext()); diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 15560da0cb71b..5d0a89992f84f 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -628,8 +628,6 @@ void NodeBindings::UvRunOnce() { if (!env) return; - // Use Locker in browser process. - gin_helper::Locker locker(env->isolate()); v8::HandleScope handle_scope(env->isolate()); // Enter node context while dealing with uv events. From a401360057cab274e8552736647f7a1e1793c54e Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 6 May 2022 02:46:36 +0200 Subject: [PATCH 350/811] refactor: prevent RemoveFromLoginItems() from mounting volumes from login items (#34068) --- shell/browser/browser_mac.mm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 1094747b41130..9821e0b0a3803 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -318,26 +318,32 @@ return settings; } +// Some logic here copied from GetLoginItemForApp in base/mac/mac_util.mm void RemoveFromLoginItems() { #pragma clang diagnostic push // https://crbug.com/1154377 #pragma clang diagnostic ignored "-Wdeprecated-declarations" - // logic to find the login item copied from GetLoginItemForApp in - // base/mac/mac_util.mm base::ScopedCFTypeRef login_items( LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL)); if (!login_items.get()) { LOG(ERROR) << "Couldn't get a Login Items list."; return; } + base::scoped_nsobject login_items_array( base::mac::CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL))); NSURL* url = [NSURL fileURLWithPath:[base::mac::MainBundle() bundlePath]]; - for (NSUInteger i = 0; i < [login_items_array count]; ++i) { + for (id login_item in login_items_array.get()) { LSSharedFileListItemRef item = - reinterpret_cast(login_items_array[i]); + reinterpret_cast(login_item); + + // kLSSharedFileListDoNotMountVolumes is used so that we don't trigger + // mounting when it's not expected by a user. Just listing the login + // items should not cause any side-effects. base::ScopedCFTypeRef error; - CFURLRef item_url_ref = - LSSharedFileListItemCopyResolvedURL(item, 0, error.InitializeInto()); + base::ScopedCFTypeRef item_url_ref( + LSSharedFileListItemCopyResolvedURL( + item, kLSSharedFileListDoNotMountVolumes, error.InitializeInto())); + if (!error && item_url_ref) { base::ScopedCFTypeRef item_url(item_url_ref); if (CFEqual(item_url, url)) { From 0696320d28157539febd4547c872be7ff50d5f60 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 5 May 2022 21:40:34 -0700 Subject: [PATCH 351/811] build: remove S3 uploads (#34104) --- .circleci/config.yml | 1 + script/lib/azput.js | 7 +--- script/lib/config.py | 11 ----- script/lib/s3put.js | 40 ------------------- script/lib/util.py | 21 +--------- script/release/release.js | 11 ----- script/release/uploaders/upload-index-json.py | 2 +- .../uploaders/upload-node-checksums.py | 2 +- .../release/uploaders/upload-node-headers.py | 10 ++--- script/release/uploaders/upload-symbols.py | 4 +- script/release/uploaders/upload.py | 5 ++- 11 files changed, 16 insertions(+), 98 deletions(-) delete mode 100644 script/lib/s3put.js diff --git a/.circleci/config.yml b/.circleci/config.yml index adcf9e502490c..b7556c5783095 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,7 @@ parameters: type: boolean default: false + # TODO (vertedinde): migrate this variable to upload-to-az upload-to-s3: type: string default: '1' diff --git a/script/lib/azput.js b/script/lib/azput.js index 0e6a75cd2ad8f..6abd0220db768 100644 --- a/script/lib/azput.js +++ b/script/lib/azput.js @@ -20,12 +20,7 @@ let anErrorOccurred = false; function next (done) { const file = files.shift(); if (!file) return done(); - let key = filenameToKey(file); - // TODO: When we drop s3put, migrate the key to not include atom-shell in the callsites - key = key.replace('atom-shell/dist/', 'headers/dist/'); - key = key.replace('atom-shell/symbols/', 'symbols/'); - key = key.replace('atom-shell/tmp/', 'checksums-scratchpad/'); - key = key.replace('electron-artifacts/', 'release-builds/'); + const key = filenameToKey(file); const [containerName, ...keyPath] = key.split('/'); const blobKey = keyPath.join('/'); diff --git a/script/lib/config.py b/script/lib/config.py index b523475cf81e0..7ba2163ab4a30 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -53,17 +53,6 @@ def get_env_var(name): return value -def s3_config(): - config = (get_env_var('S3_BUCKET'), - get_env_var('S3_ACCESS_KEY'), - get_env_var('S3_SECRET_KEY')) - message = ('Error: Please set the $ELECTRON_S3_BUCKET, ' - '$ELECTRON_S3_ACCESS_KEY, and ' - '$ELECTRON_S3_SECRET_KEY environment variables') - assert all(len(c) for c in config), message - return config - - def enable_verbose_mode(): print('Running in verbose mode') global verbose_mode diff --git a/script/lib/s3put.js b/script/lib/s3put.js deleted file mode 100644 index 8f92b6d95decf..0000000000000 --- a/script/lib/s3put.js +++ /dev/null @@ -1,40 +0,0 @@ -/* eslint-disable camelcase */ -const AWS = require('aws-sdk'); -const fs = require('fs'); -const path = require('path'); -AWS.config.update({ region: 'us-west-2' }); -const s3 = new AWS.S3({ apiVersion: '2006-03-01' }); - -const args = require('minimist')(process.argv.slice(2)); - -let { bucket, prefix = '/', key_prefix = '', grant, _: files } = args; -if (prefix && !prefix.endsWith(path.sep)) prefix = path.resolve(prefix) + path.sep; - -function filenameToKey (file) { - file = path.resolve(file); - if (file.startsWith(prefix)) file = file.substr(prefix.length - 1); - return key_prefix + (path.sep === '\\' ? file.replace(/\\/g, '/') : file); -} - -let anErrorOccurred = false; -function next (done) { - const file = files.shift(); - if (!file) return done(); - const key = filenameToKey(file); - console.log(`Uploading '${file}' to bucket '${bucket}' with key '${key}'...`); - s3.upload({ - Bucket: bucket, - Key: key, - Body: fs.createReadStream(file), - ACL: grant - }, (err, data) => { - if (err) { - console.error(err); - anErrorOccurred = true; - } - next(done); - }); -} -next(() => { - process.exit(anErrorOccurred ? 1 : 0); -}); diff --git a/script/lib/util.py b/script/lib/util.py index 2dc6c45777e0d..05d476e93ab26 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -15,7 +15,7 @@ from urllib2 import urlopen import zipfile -from lib.config import is_verbose_mode, s3_config +from lib.config import is_verbose_mode ELECTRON_DIR = os.path.abspath( os.path.dirname(os.path.dirname(os.path.dirname(__file__))) @@ -156,26 +156,9 @@ def get_electron_version(): return 'v' + f.read().strip() def store_artifact(prefix, key_prefix, files): - # Legacy S3 Bucket - s3put(prefix, key_prefix, files) - # New AZ Storage + # Azure Storage azput(prefix, key_prefix, files) -def s3put(prefix, key_prefix, files): - bucket, access_key, secret_key = s3_config() - env = os.environ.copy() - env['AWS_ACCESS_KEY_ID'] = access_key - env['AWS_SECRET_ACCESS_KEY'] = secret_key - output = execute([ - 'node', - os.path.join(os.path.dirname(__file__), 's3put.js'), - '--bucket', bucket, - '--prefix', prefix, - '--key_prefix', key_prefix, - '--grant', 'public-read', - ] + files, env) - print(output) - def azput(prefix, key_prefix, files): env = os.environ.copy() output = execute([ diff --git a/script/release/release.js b/script/release/release.js index 14464d5b76a63..221d7bd6d7cf4 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -78,8 +78,6 @@ async function validateReleaseAssets (release, validatingRelease) { console.log(`${fail} error verifyingShasums`, err); }); } - const s3RemoteFiles = s3RemoteFilesForVersion(release.tag_name); - await verifyShasumsForRemoteFiles(s3RemoteFiles, true); const azRemoteFiles = azRemoteFilesForVersion(release.tag_name); await verifyShasumsForRemoteFiles(azRemoteFiles, true); } @@ -195,15 +193,6 @@ const cloudStoreFilePaths = (version) => [ 'SHASUMS256.txt' ]; -function s3RemoteFilesForVersion (version) { - const bucket = 'https://gh-contractor-zcbenz.s3.amazonaws.com/'; - const versionPrefix = `${bucket}atom-shell/dist/${version}/`; - return cloudStoreFilePaths(version).map((filePath) => ({ - file: filePath, - url: `${versionPrefix}${filePath}` - })); -} - function azRemoteFilesForVersion (version) { const azCDN = 'https://artifacts.electronjs.org/headers/'; const versionPrefix = `${azCDN}dist/${version}/`; diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index e90eed678c028..568016a218509 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -59,7 +59,7 @@ def main(): with open(index_json, "wb") as f: f.write(new_content) - store_artifact(OUT_DIR, 'atom-shell/dist', [index_json]) + store_artifact(OUT_DIR, 'headers/dist/', [index_json]) if __name__ == '__main__': diff --git a/script/release/uploaders/upload-node-checksums.py b/script/release/uploaders/upload-node-checksums.py index 7df8bc1468c8f..6e36ca30d2a07 100755 --- a/script/release/uploaders/upload-node-checksums.py +++ b/script/release/uploaders/upload-node-checksums.py @@ -29,7 +29,7 @@ def main(): ] if args.target_dir is None: - store_artifact(directory, 'atom-shell/dist/{0}'.format(args.version), + store_artifact(directory, 'headers/dist/{0}'.format(args.version), checksums) else: copy_files(checksums, args.target_dir) diff --git a/script/release/uploaders/upload-node-headers.py b/script/release/uploaders/upload-node-headers.py index 77b72ae1d61a2..d70a5b704ac2a 100755 --- a/script/release/uploaders/upload-node-headers.py +++ b/script/release/uploaders/upload-node-headers.py @@ -45,9 +45,9 @@ def upload_node(version): versioned_header_tar = header_tar.format(version) shutil.copy2(generated_tar, os.path.join(GEN_DIR, versioned_header_tar)) - store_artifact(GEN_DIR, 'atom-shell/dist/{0}'.format(version), + store_artifact(GEN_DIR, 'headers/dist/{0}'.format(version), glob.glob('node-*.tar.gz')) - store_artifact(GEN_DIR, 'atom-shell/dist/{0}'.format(version), + store_artifact(GEN_DIR, 'headers/dist/{0}'.format(version), glob.glob('iojs-*.tar.gz')) if PLATFORM == 'win32': @@ -73,13 +73,13 @@ def upload_node(version): shutil.copy2(electron_lib, v4_node_lib) # Upload the node.lib. - store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), [node_lib]) + store_artifact(DIST_DIR, 'headers/dist/{0}'.format(version), [node_lib]) # Upload the iojs.lib. - store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), [iojs_lib]) + store_artifact(DIST_DIR, 'headers/dist/{0}'.format(version), [iojs_lib]) # Upload the v4 node.lib. - store_artifact(DIST_DIR, 'atom-shell/dist/{0}'.format(version), + store_artifact(DIST_DIR, 'headers/dist/{0}'.format(version), [v4_node_lib]) diff --git a/script/release/uploaders/upload-symbols.py b/script/release/uploaders/upload-symbols.py index 402cb4b2d31c1..bb0286777e0ec 100755 --- a/script/release/uploaders/upload-symbols.py +++ b/script/release/uploaders/upload-symbols.py @@ -56,7 +56,7 @@ def main(): files += glob.glob(SYMBOLS_DIR + '/*/*/*.src.zip') - # The file upload needs to be atom-shell/symbols/:symbol_name/:hash/:symbol + # The file upload needs to be symbols/:symbol_name/:hash/:symbol os.chdir(SYMBOLS_DIR) files = [os.path.relpath(f, os.getcwd()) for f in files] @@ -84,7 +84,7 @@ def run_symstore(pdb, dest, product): def upload_symbols(files): - store_artifact(SYMBOLS_DIR, 'atom-shell/symbols', + store_artifact(SYMBOLS_DIR, 'symbols', files) diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 25078bbcc6302..a25d67523ab64 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -343,8 +343,9 @@ def upload_electron(release, file_path, args): pass # if upload_to_s3 is set, skip github upload. + # todo (vertedinde): migrate this variable to upload_to_az if args.upload_to_s3: - key_prefix = 'electron-artifacts/{0}_{1}'.format(args.version, + key_prefix = 'release-builds/{0}_{1}'.format(args.version, args.upload_timestamp) store_artifact(os.path.dirname(file_path), key_prefix, [file_path]) upload_sha256_checksum(args.version, file_path, key_prefix) @@ -369,7 +370,7 @@ def upload_io_to_github(release, filename, filepath, version): def upload_sha256_checksum(version, file_path, key_prefix=None): checksum_path = '{}.sha256sum'.format(file_path) if key_prefix is None: - key_prefix = 'atom-shell/tmp/{0}'.format(version) + key_prefix = 'checksums-scratchpad/{0}'.format(version) sha256 = hashlib.sha256() with open(file_path, 'rb') as f: sha256.update(f.read()) From 808efd89ed6575078194ccea08680516a0f5c984 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 6 May 2022 02:42:34 -0700 Subject: [PATCH 352/811] build: use azure function to hash assets instead of lambda (#34117) --- script/release/get-url-hash.js | 47 ++++++++++++++-------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/script/release/get-url-hash.js b/script/release/get-url-hash.js index 0633567a7dd90..ae91fac30e526 100644 --- a/script/release/get-url-hash.js +++ b/script/release/get-url-hash.js @@ -1,34 +1,25 @@ -const AWS = require('aws-sdk'); - -const lambda = new AWS.Lambda({ - credentials: { - accessKeyId: process.env.AWS_LAMBDA_EXECUTE_KEY, - secretAccessKey: process.env.AWS_LAMBDA_EXECUTE_SECRET - }, - region: 'us-east-1' -}); +const got = require('got'); +const url = require('url'); module.exports = async function getUrlHash (targetUrl, algorithm = 'sha256', attempts = 3) { + const options = { + code: process.env.ELECTRON_ARTIFACT_HASHER_FUNCTION_KEY, + targetUrl, + algorithm + }; + const search = new url.URLSearchParams(options); + const functionUrl = url.format({ + protocol: 'https:', + hostname: 'electron-artifact-hasher.azurewebsites.net', + pathname: '/api/HashArtifact', + search: search.toString() + }); try { - return new Promise((resolve, reject) => { - lambda.invoke({ - FunctionName: 'hasher', - Payload: JSON.stringify({ - targetUrl, - algorithm - }) - }, (err, data) => { - if (err) return reject(err); - try { - const response = JSON.parse(data.Payload); - if (response.statusCode !== 200) return reject(new Error('non-200 status code received from hasher function')); - if (!response.hash) return reject(new Error('Successful lambda call but failed to get valid hash')); - resolve(response.hash); - } catch (err) { - return reject(err); - } - }); - }); + const resp = await got(functionUrl); + if (resp.statusCode !== 200) throw new Error('non-200 status code received from hasher function'); + if (!resp.body) throw new Error('Successful lambda call but failed to get valid hash'); + + return resp.body.trim(); } catch (err) { if (attempts > 1) { console.error('Failed to get URL hash for', targetUrl, 'we will retry', err); From 0f2da5c8306e6a4f2ad404ac25c598da53eca80b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 06:01:48 -0700 Subject: [PATCH 353/811] Bump v20.0.0-nightly.20220506 --- 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 0c1167e43a995..df17f7c29105e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220505 \ No newline at end of file +20.0.0-nightly.20220506 \ No newline at end of file diff --git a/package.json b/package.json index 93cbb7fdbb453..da3a8ce01cc1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220505", + "version": "20.0.0-nightly.20220506", "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 ba4beeefb1fdd..2a2ef5843bf70 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 20,0,0,20220505 - PRODUCTVERSION 20,0,0,20220505 + FILEVERSION 20,0,0,20220506 + PRODUCTVERSION 20,0,0,20220506 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0d35084adabea009b81bb07ed6f05d4a4d68d314 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 08:14:11 -0700 Subject: [PATCH 354/811] Revert "Bump v20.0.0-nightly.20220506" This reverts commit 0f2da5c8306e6a4f2ad404ac25c598da53eca80b. --- 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 df17f7c29105e..0c1167e43a995 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220506 \ No newline at end of file +20.0.0-nightly.20220505 \ No newline at end of file diff --git a/package.json b/package.json index da3a8ce01cc1d..93cbb7fdbb453 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220506", + "version": "20.0.0-nightly.20220505", "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 2a2ef5843bf70..ba4beeefb1fdd 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 20,0,0,20220506 - PRODUCTVERSION 20,0,0,20220506 + FILEVERSION 20,0,0,20220505 + PRODUCTVERSION 20,0,0,20220505 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 2900bc55aa7481b2bd8841108cdb9b3e0261b3e0 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 6 May 2022 12:57:18 -0700 Subject: [PATCH 355/811] build: remove ending slash upload-index-json (#34125) --- script/release/uploaders/upload-index-json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/release/uploaders/upload-index-json.py b/script/release/uploaders/upload-index-json.py index 568016a218509..348023cf2cbd3 100755 --- a/script/release/uploaders/upload-index-json.py +++ b/script/release/uploaders/upload-index-json.py @@ -59,7 +59,7 @@ def main(): with open(index_json, "wb") as f: f.write(new_content) - store_artifact(OUT_DIR, 'headers/dist/', [index_json]) + store_artifact(OUT_DIR, 'headers/dist', [index_json]) if __name__ == '__main__': From 1bdbb69351f1989d10718cf5dce4eb91bfc1ec19 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 12:58:25 -0700 Subject: [PATCH 356/811] Bump v20.0.0-nightly.20220506 --- 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 0c1167e43a995..df17f7c29105e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220505 \ No newline at end of file +20.0.0-nightly.20220506 \ No newline at end of file diff --git a/package.json b/package.json index 93cbb7fdbb453..da3a8ce01cc1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220505", + "version": "20.0.0-nightly.20220506", "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 ba4beeefb1fdd..2a2ef5843bf70 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 20,0,0,20220505 - PRODUCTVERSION 20,0,0,20220505 + FILEVERSION 20,0,0,20220506 + PRODUCTVERSION 20,0,0,20220506 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3ba60de51d38b0384b38948f28314efa6a5447f9 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 6 May 2022 13:24:14 -0700 Subject: [PATCH 357/811] docs: add missing ackCallback parameter (#34126) --- docs/api/app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/app.md b/docs/api/app.md index 2aec42c48ae93..e10e20fcd5d22 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -1001,7 +1001,7 @@ const gotTheLock = app.requestSingleInstanceLock(additionalData) if (!gotTheLock) { app.quit() } else { - app.on('second-instance', (event, commandLine, workingDirectory, additionalData) => { + app.on('second-instance', (event, commandLine, workingDirectory, additionalData, ackCallback) => { // We must call preventDefault if we're sending back data. event.preventDefault() // Print out data received from the second instance. From dd7dfd7ecd4a79ca0aa4c126b516dd7d3ac3e5a6 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 06:01:36 -0700 Subject: [PATCH 358/811] Bump v20.0.0-nightly.20220509 --- 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 df17f7c29105e..813858b4a9d49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220506 \ No newline at end of file +20.0.0-nightly.20220509 \ No newline at end of file diff --git a/package.json b/package.json index da3a8ce01cc1d..a8be96a419284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220506", + "version": "20.0.0-nightly.20220509", "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 2a2ef5843bf70..896668b38e784 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 20,0,0,20220506 - PRODUCTVERSION 20,0,0,20220506 + FILEVERSION 20,0,0,20220509 + PRODUCTVERSION 20,0,0,20220509 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6fea35271c67c6ad69cf026560cb221054a505a8 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 9 May 2022 06:34:17 -0700 Subject: [PATCH 359/811] build: change upload-to-s3 vars to upload-to-storage (#34105) * build: change upload-to-s3 vars to upload-to-az * build: change upload-to-az to upload-to-storage --- .circleci/config.yml | 3 +-- .circleci/config/base.yml | 22 +++++++++++----------- appveyor.yml | 8 ++++---- script/release/ci-release-build.js | 6 +++--- script/release/uploaders/upload.py | 18 +++++++++--------- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7556c5783095..372018b9e2532 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,8 +14,7 @@ parameters: type: boolean default: false - # TODO (vertedinde): migrate this variable to upload-to-az - upload-to-s3: + upload-to-storage: type: string default: '1' diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index ddd55364e9601..454a7a59152b9 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -5,7 +5,7 @@ parameters: type: boolean default: false - upload-to-s3: + upload-to-storage: type: string default: '1' @@ -637,9 +637,9 @@ step-electron-publish: &step-electron-publish 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 + if [ "$UPLOAD_TO_STORAGE" == "1" ]; then + echo 'Uploading Electron release distribution to Azure' + script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE else echo 'Uploading Electron release distribution to Github releases' script/release/uploaders/upload.py --verbose @@ -1687,7 +1687,7 @@ jobs: environment: <<: *env-linux-2xlarge-release <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running @@ -1731,7 +1731,7 @@ jobs: <<: *env-release-build <<: *env-32bit-release GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True' - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running @@ -1784,7 +1784,7 @@ jobs: <<: *env-arm64 <<: *env-release-build GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True' - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running @@ -1832,7 +1832,7 @@ jobs: environment: <<: *env-mac-large-release <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running @@ -1854,7 +1854,7 @@ jobs: <<: *env-mac-large-release <<: *env-release-build <<: *env-apple-silicon - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running @@ -1924,7 +1924,7 @@ jobs: <<: *env-mac-large-release <<: *env-mas <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> steps: - run: echo running - when: @@ -1945,7 +1945,7 @@ jobs: <<: *env-mac-large-release <<: *env-mas-apple-silicon <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >> <<: *env-ninja-status steps: - run: echo running diff --git a/appveyor.yml b/appveyor.yml index d716dad15c70c..f693c7d634e8a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ # - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}. # Is used in some publishing scripts, but does NOT affect the Electron binary. # Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value. -# - "UPLOAD_TO_S3" Set it to '1' upload a release to the S3 bucket. +# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket. # Otherwise the release will be uploaded to the Github Releases. # (The value is only checked if "ELECTRON_RELEASE" is defined.) # @@ -229,9 +229,9 @@ deploy_script: - cd electron - ps: >- if (Test-Path Env:\ELECTRON_RELEASE) { - if (Test-Path Env:\UPLOAD_TO_S3) { - Write-Output "Uploading Electron release distribution to s3" - & python script\release\uploaders\upload.py --verbose --upload_to_s3 + if (Test-Path Env:\UPLOAD_TO_STORAGE) { + Write-Output "Uploading Electron release distribution to azure" + & python script\release\uploaders\upload.py --verbose --upload_to_storage } else { Write-Output "Uploading Electron release distribution to github releases" & python script\release\uploaders\upload.py --verbose diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 2e716bb67de2e..31ac6a3b74962 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -62,9 +62,9 @@ async function circleCIcall (targetBranch, workflowName, options) { parameters: {} }; if (options.ghRelease) { - buildRequest.parameters['upload-to-s3'] = '0'; + buildRequest.parameters['upload-to-storage'] = '0'; } else { - buildRequest.parameters['upload-to-s3'] = '1'; + buildRequest.parameters['upload-to-storage'] = '1'; } buildRequest.parameters[`run-${workflowName}`] = true; if (options.arch) { @@ -205,7 +205,7 @@ async function callAppVeyor (targetBranch, job, options) { }; if (!options.ghRelease) { - environmentVariables.UPLOAD_TO_S3 = 1; + environmentVariables.UPLOAD_TO_STORAGE = 1; } const requestOpts = { diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index a25d67523ab64..69c4bbfa5720d 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -47,7 +47,7 @@ def main(): args = parse_args() if args.verbose: enable_verbose_mode() - if args.upload_to_s3: + if args.upload_to_storage: utcnow = datetime.datetime.utcnow() args.upload_timestamp = utcnow.strftime('%Y%m%d') @@ -64,7 +64,7 @@ def main(): if not release['draft']: tag_exists = True - if not args.upload_to_s3: + if not args.upload_to_storage: assert release['exists'], \ 'Release does not exist; cannot upload to GitHub!' assert tag_exists == args.overwrite, \ @@ -148,7 +148,7 @@ def main(): OUT_DIR, 'hunspell_dictionaries.zip') upload_electron(release, hunspell_dictionaries_zip, args) - if not tag_exists and not args.upload_to_s3: + if not tag_exists and not args.upload_to_storage: # Upload symbols to symbol server. run_python_upload_script('upload-symbols.py') if PLATFORM == 'win32': @@ -174,9 +174,9 @@ def parse_args(): parser.add_argument('-p', '--publish-release', help='Publish the release', action='store_true') - parser.add_argument('-s', '--upload_to_s3', - help='Upload assets to s3 bucket', - dest='upload_to_s3', + parser.add_argument('-s', '--upload_to_storage', + help='Upload assets to azure bucket', + dest='upload_to_storage', action='store_true', default=False, required=False) @@ -342,9 +342,9 @@ def upload_electron(release, file_path, args): except NonZipFileError: pass - # if upload_to_s3 is set, skip github upload. - # todo (vertedinde): migrate this variable to upload_to_az - if args.upload_to_s3: + # if upload_to_storage is set, skip github upload. + # todo (vertedinde): migrate this variable to upload_to_storage + if args.upload_to_storage: key_prefix = 'release-builds/{0}_{1}'.format(args.version, args.upload_timestamp) store_artifact(os.path.dirname(file_path), key_prefix, [file_path]) From 03e68e2efeee34715a5b37e6f7065ac8487f2485 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Mon, 9 May 2022 19:08:53 +0530 Subject: [PATCH 360/811] fix: fix a crash in `safeStorage` on Linux (#33913) On Linux, `isEncryptionAvailable()` was crashing instead of returning a boolean before the 'ready' event was emitted by the app. The reason of the crash is that [`CreateKeyStorage()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=74;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0) expects the config to be set but the function responsible for setting the config, [`SetConfig()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=237;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0), is called only after the app is ready inside [`PostCreateMainMessageLoop()`](https://github.com/electron/electron/blob/main/shell/browser/electron_browser_main_parts.cc#L499). So this changes `IsEncryptionAvailable()` to return `false` when the app is not ready on Linux and uses that instead of the raw API in other places like `EncryptString()` and `DecryptString()`. Fixes: https://github.com/electron/electron/issues/32206 Signed-off-by: Darshan Sen --- docs/api/safe-storage.md | 4 +- .../browser/api/electron_api_safe_storage.cc | 21 +++++++++- spec-main/api-safe-storage-spec.ts | 19 +++++++++ .../crash-cases/safe-storage/index.js | 39 +++++++++++++++++++ 4 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 spec-main/fixtures/crash-cases/safe-storage/index.js diff --git a/docs/api/safe-storage.md b/docs/api/safe-storage.md index e96c18bbf0795..471351c9c1cd3 100644 --- a/docs/api/safe-storage.md +++ b/docs/api/safe-storage.md @@ -18,8 +18,8 @@ The `safeStorage` module has the following methods: Returns `boolean` - Whether encryption is available. -On Linux, returns true if the secret key is -available. On MacOS, returns true if Keychain is available. +On Linux, returns true if the app has emitted the `ready` event and the secret key is available. +On MacOS, returns true if Keychain is available. On Windows, returns true once the app has emitted the `ready` event. ### `safeStorage.encryptString(plainText)` diff --git a/shell/browser/api/electron_api_safe_storage.cc b/shell/browser/api/electron_api_safe_storage.cc index ba1396cf28332..d0e3a73bcdb0d 100644 --- a/shell/browser/api/electron_api_safe_storage.cc +++ b/shell/browser/api/electron_api_safe_storage.cc @@ -31,12 +31,24 @@ void SetElectronCryptoReady(bool ready) { #endif bool IsEncryptionAvailable() { +#if BUILDFLAG(IS_LINUX) + // Calling IsEncryptionAvailable() before the app is ready results in a crash + // on Linux. + // Refs: https://github.com/electron/electron/issues/32206. + if (!Browser::Get()->is_ready()) + return false; +#endif return OSCrypt::IsEncryptionAvailable(); } v8::Local EncryptString(v8::Isolate* isolate, const std::string& plaintext) { - if (!OSCrypt::IsEncryptionAvailable()) { + if (!IsEncryptionAvailable()) { + if (!Browser::Get()->is_ready()) { + gin_helper::ErrorThrower(isolate).ThrowError( + "safeStorage cannot be used before app is ready"); + return v8::Local(); + } gin_helper::ErrorThrower(isolate).ThrowError( "Error while decrypting the ciphertext provided to " "safeStorage.decryptString. " @@ -59,7 +71,12 @@ v8::Local EncryptString(v8::Isolate* isolate, } std::string DecryptString(v8::Isolate* isolate, v8::Local buffer) { - if (!OSCrypt::IsEncryptionAvailable()) { + if (!IsEncryptionAvailable()) { + if (!Browser::Get()->is_ready()) { + gin_helper::ErrorThrower(isolate).ThrowError( + "safeStorage cannot be used before app is ready"); + return ""; + } gin_helper::ErrorThrower(isolate).ThrowError( "Error while decrypting the ciphertext provided to " "safeStorage.decryptString. " diff --git a/spec-main/api-safe-storage-spec.ts b/spec-main/api-safe-storage-spec.ts index b89f909513bd1..098095e2fde06 100644 --- a/spec-main/api-safe-storage-spec.ts +++ b/spec-main/api-safe-storage-spec.ts @@ -12,8 +12,27 @@ import * as fs from 'fs'; * * Because all encryption methods are gated by isEncryptionAvailable, the methods will never return the correct values * when run on CI and linux. +* Refs: https://github.com/electron/electron/issues/30424. */ +describe('safeStorage module', () => { + it('safeStorage before and after app is ready', async () => { + const appPath = path.join(__dirname, 'fixtures', 'crash-cases', 'safe-storage'); + const appProcess = cp.spawn(process.execPath, [appPath]); + + let output = ''; + appProcess.stdout.on('data', data => { output += data; }); + appProcess.stderr.on('data', data => { output += data; }); + + const code = (await emittedOnce(appProcess, 'exit'))[0] ?? 1; + + if (code !== 0 && output) { + console.log(output); + } + expect(code).to.equal(0); + }); +}); + ifdescribe(process.platform !== 'linux')('safeStorage module', () => { after(async () => { const pathToEncryptedString = path.resolve(__dirname, 'fixtures', 'api', 'safe-storage', 'encrypted.txt'); diff --git a/spec-main/fixtures/crash-cases/safe-storage/index.js b/spec-main/fixtures/crash-cases/safe-storage/index.js new file mode 100644 index 0000000000000..151751820a8d5 --- /dev/null +++ b/spec-main/fixtures/crash-cases/safe-storage/index.js @@ -0,0 +1,39 @@ +const { app, safeStorage } = require('electron'); +const { expect } = require('chai'); + +(async () => { + if (!app.isReady()) { + // isEncryptionAvailable() returns false before the app is ready on + // Linux: https://github.com/electron/electron/issues/32206 + // and + // Windows: https://github.com/electron/electron/issues/33640. + expect(safeStorage.isEncryptionAvailable()).to.equal(process.platform === 'darwin'); + if (safeStorage.isEncryptionAvailable()) { + const plaintext = 'plaintext'; + const ciphertext = safeStorage.encryptString(plaintext); + expect(Buffer.isBuffer(ciphertext)).to.equal(true); + expect(safeStorage.decryptString(ciphertext)).to.equal(plaintext); + } else { + expect(() => safeStorage.encryptString('plaintext')).to.throw(/safeStorage cannot be used before app is ready/); + expect(() => safeStorage.decryptString(Buffer.from(''))).to.throw(/safeStorage cannot be used before app is ready/); + } + } + await app.whenReady(); + // isEncryptionAvailable() will always return false on CI due to a mocked + // dbus as mentioned above. + expect(safeStorage.isEncryptionAvailable()).to.equal(process.platform !== 'linux'); + if (safeStorage.isEncryptionAvailable()) { + const plaintext = 'plaintext'; + const ciphertext = safeStorage.encryptString(plaintext); + expect(Buffer.isBuffer(ciphertext)).to.equal(true); + expect(safeStorage.decryptString(ciphertext)).to.equal(plaintext); + } else { + expect(() => safeStorage.encryptString('plaintext')).to.throw(/Encryption is not available/); + expect(() => safeStorage.decryptString(Buffer.from(''))).to.throw(/Decryption is not available/); + } +})() + .then(app.quit) + .catch((err) => { + console.error(err); + app.exit(1); + }); From 9483e714c46cfa134209691b29b4ab5cf9fdb2ac Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 9 May 2022 23:26:57 +0900 Subject: [PATCH 361/811] feat: allow customizing browser data location (#33554) * feat: redirect Electron/Chromium cache location * fix: network services should also use browserData * test: browserData * chore: no need to explicitly create dir * feat: browserData => sessionData * test: check existings of specific items * docs: add background on userData and sessionData Co-authored-by: emmanuel.kimmerlin@thomsonreuters.com --- docs/api/app.md | 18 +++++-- shell/app/electron_main_delegate.cc | 5 +- shell/browser/api/electron_api_app.cc | 2 + shell/browser/browser_process_impl.cc | 2 +- shell/browser/electron_browser_client.cc | 8 +-- shell/browser/electron_browser_context.cc | 3 +- shell/browser/electron_browser_main_parts.cc | 2 +- shell/browser/ui/devtools_manager_delegate.cc | 6 +-- shell/common/electron_paths.h | 3 +- spec-main/api-app-spec.ts | 50 ++++++++++++++++++- spec-main/fixtures/apps/set-path/main.js | 43 ++++++++++++++++ spec-main/fixtures/apps/set-path/package.json | 4 ++ 12 files changed, 128 insertions(+), 18 deletions(-) create mode 100644 spec-main/fixtures/apps/set-path/main.js create mode 100644 spec-main/fixtures/apps/set-path/package.json diff --git a/docs/api/app.md b/docs/api/app.md index e10e20fcd5d22..16207e255c60e 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -635,8 +635,18 @@ Returns `string` - The current application directory. * `%APPDATA%` on Windows * `$XDG_CONFIG_HOME` or `~/.config` on Linux * `~/Library/Application Support` on macOS - * `userData` The directory for storing your app's configuration files, which by - default it is the `appData` directory appended with your app's name. + * `userData` The directory for storing your app's configuration files, which + by default is the `appData` directory appended with your app's name. By + convention files storing user data should be written to this directory, and + it is not recommended to write large files here because some environments + may backup this directory to cloud storage. + * `sessionData` The directory for storing data generated by `Session`, such + as localStorage, cookies, disk cache, downloaded dictionaries, network + state, devtools files. By default this points to `userData`. Chromium may + write very large disk cache here, so if your app does not rely on browser + storage like localStorage or cookies to save user data, it is recommended + to set this directory to other locations to avoid polluting the `userData` + directory. * `temp` Temporary directory. * `exe` The current executable file. * `module` The `libchromiumcontent` library. @@ -686,9 +696,9 @@ In that case, the directory should be created with `fs.mkdirSync` or similar. You can only override paths of a `name` defined in `app.getPath`. -By default, web pages' cookies and caches will be stored under the `userData` +By default, web pages' cookies and caches will be stored under the `sessionData` directory. If you want to change this location, you have to override the -`userData` path before the `ready` event of the `app` module is emitted. +`sessionData` path before the `ready` event of the `app` module is emitted. ### `app.getVersion()` diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index e1769670fb8ba..a0ca93fc63e30 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -134,11 +134,14 @@ bool ElectronPathProvider(int key, base::FilePath* result) { break; case chrome::DIR_APP_DICTIONARIES: // TODO(nornagon): can we just default to using Chrome's logic here? - if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) + if (!base::PathService::Get(DIR_SESSION_DATA, &cur)) return false; cur = cur.Append(base::FilePath::FromUTF8Unsafe("Dictionaries")); create_dir = true; break; + case DIR_SESSION_DATA: + // By default and for backward, equivalent to DIR_USER_DATA. + return base::PathService::Get(chrome::DIR_USER_DATA, result); case DIR_USER_CACHE: { #if BUILDFLAG(IS_POSIX) int parent_key = base::DIR_CACHE; diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 5964a4933f302..6bd1d052e6cf0 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -473,6 +473,8 @@ IconLoader::IconSize GetIconSizeByString(const std::string& size) { int GetPathConstant(const std::string& name) { if (name == "appData") return DIR_APP_DATA; + else if (name == "sessionData") + return DIR_SESSION_DATA; else if (name == "userData") return chrome::DIR_USER_DATA; else if (name == "cache") diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 5f0bdc532ab6d..31653e104f8c5 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -110,7 +110,7 @@ void BrowserProcessImpl::PostEarlyInitialization() { // Only use a persistent prefs store when cookie encryption is enabled as that // is the only key that needs it base::FilePath prefs_path; - CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &prefs_path)); + CHECK(base::PathService::Get(electron::DIR_SESSION_DATA, &prefs_path)); prefs_path = prefs_path.Append(FILE_PATH_LITERAL("Local State")); base::ThreadRestrictions::ScopedAllowIO allow_io; scoped_refptr user_pref_store = diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 6db8fbec2119b..f1d4d25077aac 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1139,11 +1139,11 @@ void ElectronBrowserClient::OnNetworkServiceCreated( std::vector ElectronBrowserClient::GetNetworkContextsParentDirectory() { - base::FilePath user_data_dir; - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); - DCHECK(!user_data_dir.empty()); + base::FilePath session_data; + base::PathService::Get(DIR_SESSION_DATA, &session_data); + DCHECK(!session_data.empty()); - return {user_data_dir}; + return {session_data}; } std::string ElectronBrowserClient::GetProduct() { diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index eb640eb3517c2..5d3c74ad3d054 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -120,8 +120,7 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition, base::StringToInt(command_line->GetSwitchValueASCII(switches::kDiskCacheSize), &max_cache_size_); - CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_)); - + base::PathService::Get(DIR_SESSION_DATA, &path_); if (!in_memory && !partition.empty()) path_ = path_.Append(FILE_PATH_LITERAL("Partitions")) .Append(base::FilePath::FromUTF8Unsafe( diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index defb91ab6e1da..5245db81376d3 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -501,7 +501,7 @@ void ElectronBrowserMainParts::PostCreateMainMessageLoop() { // https://source.chromium.org/chromium/chromium/src/+/master:chrome/common/chrome_switches.cc;l=689;drc=9d82515060b9b75fa941986f5db7390299669ef1 config->should_use_preference = command_line.HasSwitch(::switches::kEnableEncryptionSelection); - base::PathService::Get(chrome::DIR_USER_DATA, &config->user_data_path); + base::PathService::Get(DIR_SESSION_DATA, &config->user_data_path); OSCrypt::SetConfig(std::move(config)); #endif #if BUILDFLAG(IS_POSIX) diff --git a/shell/browser/ui/devtools_manager_delegate.cc b/shell/browser/ui/devtools_manager_delegate.cc index 40773b35b2f21..a9aac3cace877 100644 --- a/shell/browser/ui/devtools_manager_delegate.cc +++ b/shell/browser/ui/devtools_manager_delegate.cc @@ -91,10 +91,10 @@ const char kBrowserCloseMethod[] = "Browser.close"; // static void DevToolsManagerDelegate::StartHttpHandler() { - base::FilePath user_dir; - base::PathService::Get(chrome::DIR_USER_DATA, &user_dir); + base::FilePath session_data; + base::PathService::Get(DIR_SESSION_DATA, &session_data); content::DevToolsAgentHost::StartRemoteDebuggingServer( - CreateSocketFactory(), user_dir, base::FilePath()); + CreateSocketFactory(), session_data, base::FilePath()); } DevToolsManagerDelegate::DevToolsManagerDelegate() = default; diff --git a/shell/common/electron_paths.h b/shell/common/electron_paths.h index 6854e97d6ae48..c614f992940bb 100644 --- a/shell/common/electron_paths.h +++ b/shell/common/electron_paths.h @@ -23,7 +23,8 @@ enum { PATH_START = 11000, DIR_USER_CACHE = PATH_START, // Directory where user cache can be written. - DIR_APP_LOGS, // Directory where app logs live + DIR_APP_LOGS, // Directory where app logs live. + DIR_SESSION_DATA, // Where cookies, localStorage are stored. #if BUILDFLAG(IS_WIN) DIR_RECENT, // Directory where recent files live diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index 0389b70931a07..f1af0bc512159 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -3,7 +3,7 @@ import * as cp from 'child_process'; import * as https from 'https'; import * as http from 'http'; import * as net from 'net'; -import * as fs from 'fs'; +import * as fs from 'fs-extra'; import * as path from 'path'; import { promisify } from 'util'; import { app, BrowserWindow, Menu, session, net as electronNet } from 'electron/main'; @@ -1078,6 +1078,54 @@ describe('app module', () => { expect(() => { app.getPath(badPath as any); }).to.throw(); }); + + describe('sessionData', () => { + const appPath = path.join(__dirname, 'fixtures', 'apps', 'set-path'); + const appName = fs.readJsonSync(path.join(appPath, 'package.json')).name; + const userDataPath = path.join(app.getPath('appData'), appName); + const tempBrowserDataPath = path.join(app.getPath('temp'), appName); + + const sessionFiles = [ + 'Preferences', + 'Code Cache', + 'Local Storage', + 'IndexedDB', + 'Service Worker' + ]; + const hasSessionFiles = (dir: string) => { + for (const file of sessionFiles) { + if (!fs.existsSync(path.join(dir, file))) { + return false; + } + } + return true; + }; + + beforeEach(() => { + fs.removeSync(userDataPath); + fs.removeSync(tempBrowserDataPath); + }); + + it('writes to userData by default', () => { + expect(hasSessionFiles(userDataPath)).to.equal(false); + cp.spawnSync(process.execPath, [appPath]); + expect(hasSessionFiles(userDataPath)).to.equal(true); + }); + + it('can be changed', () => { + expect(hasSessionFiles(userDataPath)).to.equal(false); + cp.spawnSync(process.execPath, [appPath, 'sessionData', tempBrowserDataPath]); + expect(hasSessionFiles(userDataPath)).to.equal(false); + expect(hasSessionFiles(tempBrowserDataPath)).to.equal(true); + }); + + it('changing userData affects default sessionData', () => { + expect(hasSessionFiles(userDataPath)).to.equal(false); + cp.spawnSync(process.execPath, [appPath, 'userData', tempBrowserDataPath]); + expect(hasSessionFiles(userDataPath)).to.equal(false); + expect(hasSessionFiles(tempBrowserDataPath)).to.equal(true); + }); + }); }); describe('setAppLogsPath(path)', () => { diff --git a/spec-main/fixtures/apps/set-path/main.js b/spec-main/fixtures/apps/set-path/main.js new file mode 100644 index 0000000000000..efc6a624eef5b --- /dev/null +++ b/spec-main/fixtures/apps/set-path/main.js @@ -0,0 +1,43 @@ +const http = require('http'); +const { app, ipcMain, BrowserWindow } = require('electron'); + +if (process.argv.length > 3) { + app.setPath(process.argv[2], process.argv[3]); +} + +const html = ` + +`; + +const js = 'console.log("From service worker")'; + +app.once('ready', () => { + ipcMain.on('success', () => { + app.quit(); + }); + + const server = http.createServer((request, response) => { + if (request.url === '/') { + response.writeHead(200, { 'Content-Type': 'text/html' }); + response.end(html); + } else if (request.url === '/sw.js') { + response.writeHead(200, { 'Content-Type': 'text/javascript' }); + response.end(js); + } + }).listen(0, '127.0.0.1', () => { + const serverUrl = 'http://127.0.0.1:' + server.address().port; + const mainWindow = new BrowserWindow({ show: false, webPreferences: { webSecurity: true, nodeIntegration: true, contextIsolation: false } }); + mainWindow.loadURL(serverUrl); + }); +}); diff --git a/spec-main/fixtures/apps/set-path/package.json b/spec-main/fixtures/apps/set-path/package.json new file mode 100644 index 0000000000000..84edf0f3a389a --- /dev/null +++ b/spec-main/fixtures/apps/set-path/package.json @@ -0,0 +1,4 @@ +{ + "name": "electron-test-set-path", + "main": "main.js" +} From 00368aca37c838decd414920e3a9db6447444ea6 Mon Sep 17 00:00:00 2001 From: Robo Date: Tue, 10 May 2022 05:37:50 +0900 Subject: [PATCH 362/811] chore: stub gtk_native_dialog_get_type (#34141) --- shell/browser/ui/electron_gtk.sigs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/electron_gtk.sigs b/shell/browser/ui/electron_gtk.sigs index 568a270165cbb..451fc74a953d6 100644 --- a/shell/browser/ui/electron_gtk.sigs +++ b/shell/browser/ui/electron_gtk.sigs @@ -3,4 +3,5 @@ void gtk_native_dialog_set_modal(GtkNativeDialog* self, gboolean modal); void gtk_native_dialog_show(GtkNativeDialog* self); void gtk_native_dialog_hide(GtkNativeDialog* self); gint gtk_native_dialog_run(GtkNativeDialog* self); -void gtk_native_dialog_destroy(GtkNativeDialog* self); \ No newline at end of file +void gtk_native_dialog_destroy(GtkNativeDialog* self); +GType gtk_native_dialog_get_type(void); \ No newline at end of file From 53912118243ed64378e98f1c92b1d06e3919288b Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 18:55:49 -0400 Subject: [PATCH 363/811] chore: bump node to v16.15.0 (main) (#33947) * chore: bump node in DEPS to v16.15.0 * chore: update patches * src: allow preventing InitializeInspector in env https://github.com/nodejs/node/pull/35025 * chore: update node gn filenames * crypto: change default check(Host|Email) behavior * Revert "crypto: change default check(Host|Email) behavior" This reverts commit 1f1eb23702fe9dfc09470248d6c1a673f42b80fe. * update node crypto tests to work with boringssl Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- DEPS | 2 +- patches/node/.patches | 2 - patches/node/build_add_gn_build_files.patch | 12 ++- ...de_entrypoint_to_be_a_builtin_module.patch | 8 +- .../chore_fix_-wimplicit-fallthrough.patch | 10 +-- ...owserglobals_from_global_not_process.patch | 2 +- ...is_on_64bit_arch_and_ptr_compression.patch | 4 +- ...nalhandler_to_environment_to_prevent.patch | 28 +++---- .../node/feat_initialize_asar_support.patch | 6 +- ..._values_for_variables_in_common_gypi.patch | 4 +- ...everse_jsargs_defines_in_common_gypi.patch | 6 +- ...reventing_initializeinspector_in_env.patch | 81 ------------------- .../fix_crypto_tests_to_run_with_bssl.patch | 49 +++++++++-- ...console_window_when_creating_process.patch | 25 ------ ...se_tracing_tracingcontroller_instead.patch | 8 +- ...ingssl_and_openssl_incompatibilities.patch | 14 ++-- .../pass_all_globals_through_require.patch | 4 +- ...dder_overriding_of_internal_fs_calls.patch | 4 +- ...cess_fork_to_use_execute_script_with.patch | 2 +- ...rash_when_sharedarraybuffer_disabled.patch | 4 +- ...to_provide_a_custom_pageallocator_to.patch | 6 +- .../node/worker_thread_add_asar_support.patch | 10 +-- shell/common/node_bindings.cc | 2 +- 23 files changed, 111 insertions(+), 182 deletions(-) delete mode 100644 patches/node/fix_allow_preventing_initializeinspector_in_env.patch delete mode 100644 patches/node/fix_don_t_create_console_window_when_creating_process.patch diff --git a/DEPS b/DEPS index f6d9b49af0592..32458aa34c76b 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '102.0.4999.0', 'node_version': - 'v16.14.2', + 'v16.15.0', '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 963b9aa10808e..d1df090471f84 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -13,7 +13,6 @@ chore_read_nobrowserglobals_from_global_not_process.patch enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch fix_handle_boringssl_and_openssl_incompatibilities.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch -fix_allow_preventing_initializeinspector_in_env.patch src_allow_embedders_to_provide_a_custom_pageallocator_to.patch fix_crypto_tests_to_run_with_bssl.patch fix_account_for_debugger_agent_race_condition.patch @@ -22,7 +21,6 @@ fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch chore_fix_-wimplicit-fallthrough.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 fix_serdes_test.patch darwin_remove_eprototype_error_workaround_3405.patch darwin_translate_eprototype_to_econnreset_3413.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index de7fc0acfc4d5..788c5dc5bcf6d 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -973,10 +973,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636 +} diff --git a/filenames.json b/filenames.json new file mode 100644 -index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424afb63ca5 +index 0000000000000000000000000000000000000000..a2cfdffcd7308b73c5c302ebc4b946c6de1bd518 --- /dev/null +++ b/filenames.json -@@ -0,0 +1,612 @@ +@@ -0,0 +1,616 @@ +// This file is automatically generated by generate_gn_filenames_json.py +// DO NOT EDIT +{ @@ -1233,6 +1233,7 @@ index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424 + "lib/internal/cluster/primary.js", + "lib/internal/cluster/utils.js", + "lib/internal/cluster/child.js", ++ "lib/internal/webstreams/compression.js", + "lib/internal/webstreams/util.js", + "lib/internal/webstreams/writablestream.js", + "lib/internal/webstreams/readablestream.js", @@ -1314,6 +1315,7 @@ index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424 + "lib/internal/modules/package_json_reader.js", + "lib/internal/modules/esm/module_job.js", + "lib/internal/modules/esm/assert.js", ++ "lib/internal/modules/esm/fetch_module.js", + "lib/internal/modules/esm/get_source.js", + "lib/internal/modules/esm/translators.js", + "lib/internal/modules/esm/resolve.js", @@ -1323,6 +1325,7 @@ index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424 + "lib/internal/modules/esm/initialize_import_meta.js", + "lib/internal/modules/esm/module_map.js", + "lib/internal/modules/esm/get_format.js", ++ "lib/internal/modules/esm/formats.js", + "lib/internal/modules/esm/loader.js", + "lib/internal/modules/cjs/helpers.js", + "lib/internal/modules/cjs/loader.js", @@ -1381,7 +1384,8 @@ index 0000000000000000000000000000000000000000..d2d196a59037ed32800ab6981c6a7424 + "deps/acorn/acorn/dist/acorn.js", + "deps/acorn/acorn-walk/dist/walk.js", + "deps/cjs-module-lexer/lexer.js", -+ "deps/cjs-module-lexer/dist/lexer.js" ++ "deps/cjs-module-lexer/dist/lexer.js", ++ "deps/undici/undici.js" + ], + "node_sources": [ + "src/api/async_resource.cc", @@ -1795,7 +1799,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 41081f82714169f3bf388c3a8c2d9aa78e21a3f4..48c0d2655789a0528dfea0a60f756aacb48a6f60 100644 +index 29c9be6366d63be7b340b35cea141e4d7e7f71cc..587735f2ddc0e5d93edd8644d121c6fb31fc4378 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ 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 b921424c37b37..63740ebc306f6 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 3c5e6fe40070f52d8b3f4e9757485845c1d6dbed..2af6b11c97ecdca3c40792ab35c69b07b9db76a0 100644 +index b184a0d9ae3434af746be269495e9e4c80c58091..899d5a906683e8967746e10a6de452e99e236903 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -95,11 +95,13 @@ function patchProcessObject(expandArgv1) { +@@ -103,11 +103,13 @@ function patchProcessObject(expandArgv1) { if (expandArgv1 && process.argv[1] && !StringPrototypeStartsWith(process.argv[1], '-')) { // Expand process.argv[1] into a full path. @@ -31,10 +31,10 @@ index 3c5e6fe40070f52d8b3f4e9757485845c1d6dbed..2af6b11c97ecdca3c40792ab35c69b07 } diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index caca939942cb721a3efde7005b0a987a19237a8b..2d30a56a87ff8657cddb3d9e6af5bd9f81deffdb 100644 +index 5195ff2da0496f2bfb9112d336c38040f662087b..5c62e367f2dd7d112096551f1c34ee67ce1a5c3a 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1077,6 +1077,13 @@ Module.prototype._compile = function(content, filename) { +@@ -1079,6 +1079,13 @@ Module.prototype._compile = function(content, filename) { if (getOptionValue('--inspect-brk') && process._eval == null) { if (!resolvedArgv) { // We enter the repl if we're not given a filename argument. diff --git a/patches/node/chore_fix_-wimplicit-fallthrough.patch b/patches/node/chore_fix_-wimplicit-fallthrough.patch index 5b3103652136e..41f961ad0e5c9 100644 --- a/patches/node/chore_fix_-wimplicit-fallthrough.patch +++ b/patches/node/chore_fix_-wimplicit-fallthrough.patch @@ -18,10 +18,10 @@ index 8bfecba74d4d90e9fbf0e2cd301118e4adc6cba8..63e1149f0c4a39cb944114e5824d6074 "-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 +index 30ee9b88920c0a0bb8f8b714e3deabe0207cac40..010edf48f614c23e971df0f37716275cc1656469 100644 --- a/deps/nghttp2/lib/nghttp2_hd.c +++ b/deps/nghttp2/lib/nghttp2_hd.c -@@ -1891,7 +1891,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, +@@ -1892,7 +1892,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, rv = NGHTTP2_ERR_HEADER_COMP; goto fail; } @@ -30,7 +30,7 @@ index 5e8693152599215261e47b152d565bbd9a0083e7..6d54e91dea6d77ad8925ad0452fd2a0a case NGHTTP2_HD_STATE_INFLATE_START: case NGHTTP2_HD_STATE_OPCODE: if ((*in & 0xe0u) == 0x20u) { -@@ -2001,7 +2001,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, +@@ -2002,7 +2002,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, inflater->left = 0; inflater->shift = 0; DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); @@ -39,7 +39,7 @@ index 5e8693152599215261e47b152d565bbd9a0083e7..6d54e91dea6d77ad8925ad0452fd2a0a case NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN: rfin = 0; rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); -@@ -2085,7 +2085,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, +@@ -2086,7 +2086,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, inflater->left = 0; inflater->shift = 0; DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); @@ -49,7 +49,7 @@ index 5e8693152599215261e47b152d565bbd9a0083e7..6d54e91dea6d77ad8925ad0452fd2a0a rfin = 0; rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); diff --git a/deps/nghttp2/lib/nghttp2_session.c b/deps/nghttp2/lib/nghttp2_session.c -index 36f1179f72a22595dda0b98927d87e2098cad4df..f007dbf410b1bdc5d1f603aa85c3a4f0704e9741 100644 +index 380a47c1b1e82b015c271e2818aed0baf982aa2d..2f3997709cd07f6f8294f985f60b2e1e4b85a2cf 100644 --- a/deps/nghttp2/lib/nghttp2_session.c +++ b/deps/nghttp2/lib/nghttp2_session.c @@ -2644,10 +2644,10 @@ static int session_after_frame_sent1(nghttp2_session *session) { diff --git a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch index a666b1d9744f7..b47a91bbe02ed 100644 --- a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch +++ b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch @@ -7,7 +7,7 @@ This is used so that we can modify the flag at runtime where config can only be set at compile time. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index 085dd7e09d31fb1800b3596cc068637e1956ba52..9e0f811b2a37f45a9d8162dff7c9d5c935b856d6 100644 +index 8c31d0202b70ec9784b4289a175a62fd9fd85f8c..2b4c7a933d7f87050f7342e6c3ae2070e3dde030 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -209,7 +209,7 @@ const { 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 6b9b4d53271ba..d6ef9a68a08c7 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 b86c3f3bbeddfa57c223ff066451fd3e1ce1315d..59e6a857060a35ca52cff2b44bc412a3f5e8eece 100644 +index 3fd1d4ddddc109dfd87f4ba6115948f1c31b1261..7ffd577817d3c6ae7164dd3945479aedcee9640e 100644 --- a/common.gypi +++ b/common.gypi @@ -64,7 +64,7 @@ @@ -20,7 +20,7 @@ index b86c3f3bbeddfa57c223ff066451fd3e1ce1315d..59e6a857060a35ca52cff2b44bc412a3 # Disable V8 untrusted code mitigations. # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations -@@ -130,6 +130,9 @@ +@@ -133,6 +133,9 @@ 'v8_enable_pointer_compression': 0, 'v8_enable_31bit_smis_on_64bit_arch': 0, }], diff --git a/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch index 3deaaeccdc157..eff6170cab0b4 100644 --- a/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch +++ b/patches/node/feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch @@ -7,11 +7,11 @@ Subject: feat: add kNoStartDebugSignalHandler to Environment to prevent This patch should be upstreamed, it allows embedders to prevent the call to StartDebugSignalHandler which handles SIGUSR1 and starts the inspector agent. Apps that have --inspect disabled also don't want SIGUSR1 to have this affect. diff --git a/src/env-inl.h b/src/env-inl.h -index 2da8174fe9e4209f4705af0a1cf8bca5928f088c..954602f3fc7c3344509bb57530840bb1dfeacab3 100644 +index 4a34393cad7e071bf27947418be6b3d9bdd42f98..b9834a797c89f707d1e4978587af66ebf11591d4 100644 --- a/src/env-inl.h +++ b/src/env-inl.h -@@ -886,6 +886,10 @@ inline bool Environment::should_initialize_inspector() const { - return (flags_ & EnvironmentFlags::kNoInitializeInspector) == 0; +@@ -886,6 +886,10 @@ inline bool Environment::no_global_search_paths() const { + !options_->global_search_paths; } +inline bool Environment::should_start_debug_signal_handler() const { @@ -22,22 +22,22 @@ index 2da8174fe9e4209f4705af0a1cf8bca5928f088c..954602f3fc7c3344509bb57530840bb1 return emit_filehandle_warning_; } diff --git a/src/env.h b/src/env.h -index 2554c530f2ca7078ed0cca03968b31f56027231b..1fbf965788f9c68d2999f38b40d39579f746d768 100644 +index cda7a52fa1ffc66d7ba42de3a275f49093f8557d..86f3c718ada13ee71e5af87e1b3772f39274cf43 100644 --- a/src/env.h +++ b/src/env.h @@ -1216,6 +1216,7 @@ class Environment : public MemoryRetainer { + inline bool tracks_unmanaged_fds() const; inline bool hide_console_windows() const; inline bool no_global_search_paths() const; - inline bool should_initialize_inspector() const; + inline bool should_start_debug_signal_handler() const; inline uint64_t thread_id() const; inline worker::Worker* worker_context() const; Environment* worker_parent_env() const; diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc -index fd9f514b9b6a7b7b1c1a6f5fe834f51266156596..14565f6885b3f88194b3b8efb340a4099ca1966c 100644 +index 5fc533741d7c8d7a8471b3c3c6a334c0e9e43501..2c36a0b132cf1b21595ac39619b99d316ad81d9e 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc -@@ -680,8 +680,10 @@ bool Agent::Start(const std::string& path, +@@ -690,8 +690,10 @@ bool Agent::Start(const std::string& path, StartIoThreadAsyncCallback)); uv_unref(reinterpret_cast(&start_io_thread_async)); start_io_thread_async.data = this; @@ -51,19 +51,19 @@ index fd9f514b9b6a7b7b1c1a6f5fe834f51266156596..14565f6885b3f88194b3b8efb340a409 parent_env_->AddCleanupHook([](void* data) { Environment* env = static_cast(data); diff --git a/src/node.h b/src/node.h -index b2b766f242e02593631be087fceaf63f71d74284..535df2d8dfb48ddc4d01e94565fdc527aed15ef7 100644 +index 0a9f5139276eb2e102b41a586adf61fa563b47d6..0b807cb25f9eb52b2100f0e2a7c25344790967cf 100644 --- a/src/node.h +++ b/src/node.h -@@ -444,7 +444,11 @@ enum Flags : uint64_t { - // Controls whether or not the Environment should call InitializeInspector. +@@ -445,7 +445,11 @@ enum Flags : uint64_t { // This control is needed by embedders who may not want to initialize the V8 - // inspector in situations where it already exists. -- kNoInitializeInspector = 1 << 8 -+ kNoInitializeInspector = 1 << 8, + // inspector in situations where one has already been created, + // e.g. Blink's in Chromium. +- kNoCreateInspector = 1 << 9 ++ kNoCreateInspector = 1 << 9, + // Controls where or not the InspectorAgent for this Environment should + // call StartDebugSignalHandler. This control is needed by embedders who may + // not want to allow other processes to start the V8 inspector. -+ kNoStartDebugSignalHandler = 1 << 9 ++ kNoStartDebugSignalHandler = 1 << 10 }; } // namespace EnvironmentFlags diff --git a/patches/node/feat_initialize_asar_support.patch b/patches/node/feat_initialize_asar_support.patch index 350139338d233..a7901aba7994f 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 f21ba048b4863863e6c7b740f410775776a7649a..3c5e6fe40070f52d8b3f4e9757485845c1d6dbed 100644 +index 8de57a5666131ff0c9f7ad844498e1bd3c357a70..b184a0d9ae3434af746be269495e9e4c80c58091 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { +@@ -84,6 +84,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { assert(!CJSLoader.hasLoadedAnyUserCJSModule); loadPreloadModules(); initializeFrozenIntrinsics(); @@ -17,7 +17,7 @@ index f21ba048b4863863e6c7b740f410775776a7649a..3c5e6fe40070f52d8b3f4e9757485845 } function patchProcessObject(expandArgv1) { -@@ -477,6 +478,10 @@ function loadPreloadModules() { +@@ -540,6 +541,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 3278701357152..aba4b338e5f86 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,10 +7,10 @@ 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 be30169cf58d9759320f1763ede7e0ce89be3aa2..b86c3f3bbeddfa57c223ff066451fd3e1ce1315d 100644 +index bdc2c105abeddc4c8e434ead05ebc0d7d82cfae8..3fd1d4ddddc109dfd87f4ba6115948f1c31b1261 100644 --- a/common.gypi +++ b/common.gypi -@@ -81,6 +81,23 @@ +@@ -84,6 +84,23 @@ ##### end V8 defaults ##### 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 cc2b2f0f7cbb4..b8578ea1afcc4 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 59e6a857060a35ca52cff2b44bc412a3f5e8eece..7741f97758282d1c601eecf263cb4ce1510be284 100644 +index 7ffd577817d3c6ae7164dd3945479aedcee9640e..6674f9f9b8880c40db579664fa40f62ad0139368 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ @@ -17,7 +17,7 @@ index 59e6a857060a35ca52cff2b44bc412a3f5e8eece..7741f97758282d1c601eecf263cb4ce1 # Disable V8 untrusted code mitigations. # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations -@@ -79,6 +80,7 @@ +@@ -82,6 +83,7 @@ # TODO(refack): make v8-perfetto happen 'v8_use_perfetto': 0, @@ -25,7 +25,7 @@ index 59e6a857060a35ca52cff2b44bc412a3f5e8eece..7741f97758282d1c601eecf263cb4ce1 ##### end V8 defaults ##### # When building native modules using 'npm install' with the system npm, -@@ -398,6 +400,9 @@ +@@ -401,6 +403,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_allow_preventing_initializeinspector_in_env.patch b/patches/node/fix_allow_preventing_initializeinspector_in_env.patch deleted file mode 100644 index 8cfa46d3819e0..0000000000000 --- a/patches/node/fix_allow_preventing_initializeinspector_in_env.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 22 Sep 2020 19:44:30 -0700 -Subject: fix: allow preventing InitializeInspector in env - -https://github.com/nodejs/node/commit/8c5ad1392f30cfe6b107e9bd85f4cb918ba04aab -made it such that env->InitializeInspector was called in CreateEnvironment -no matter what, which creates an issue for Electron, as the V8 inspector -already exists in the renderer process and therefore we only want to -initialize it in the browser process. This adds a new -EnvironmentFlags option which allows preventing that invocation. - -diff --git a/src/api/environment.cc b/src/api/environment.cc -index 523d252e08974a10f9a53fb46d3345669cec3380..5bf19a0dda42849159d954181058897c45d280fd 100644 ---- a/src/api/environment.cc -+++ b/src/api/environment.cc -@@ -344,12 +344,14 @@ Environment* CreateEnvironment( - Environment* env = new Environment( - isolate_data, context, args, exec_args, nullptr, flags, thread_id); - #if HAVE_INSPECTOR -- if (inspector_parent_handle) { -- env->InitializeInspector( -- std::move(static_cast( -- inspector_parent_handle.get())->impl)); -- } else { -- env->InitializeInspector({}); -+ if (env->should_initialize_inspector()) { -+ if (inspector_parent_handle) { -+ env->InitializeInspector( -+ std::move(static_cast( -+ inspector_parent_handle.get())->impl)); -+ } else { -+ env->InitializeInspector({}); -+ } - } - #endif - -diff --git a/src/env-inl.h b/src/env-inl.h -index e679780900abc9f6b6d1d6baa52576df278be8c7..2da8174fe9e4209f4705af0a1cf8bca5928f088c 100644 ---- a/src/env-inl.h -+++ b/src/env-inl.h -@@ -882,6 +882,10 @@ inline bool Environment::no_global_search_paths() const { - !options_->global_search_paths; - } - -+inline bool Environment::should_initialize_inspector() const { -+ return (flags_ & EnvironmentFlags::kNoInitializeInspector) == 0; -+} -+ - bool Environment::filehandle_close_warning() const { - return emit_filehandle_warning_; - } -diff --git a/src/env.h b/src/env.h -index 7aa5822abf11f1858d1ef8551cfc7a8c3d931f1e..2554c530f2ca7078ed0cca03968b31f56027231b 100644 ---- a/src/env.h -+++ b/src/env.h -@@ -1215,6 +1215,7 @@ class Environment : public MemoryRetainer { - inline bool tracks_unmanaged_fds() const; - inline bool hide_console_windows() const; - inline bool no_global_search_paths() const; -+ inline bool should_initialize_inspector() const; - inline uint64_t thread_id() const; - inline worker::Worker* worker_context() const; - Environment* worker_parent_env() const; -diff --git a/src/node.h b/src/node.h -index 70518ba49b3bcbfaf2e46ba8ddc3f04236bc27b8..7ca7502e086190c87ae6a61dca2192253894e906 100644 ---- a/src/node.h -+++ b/src/node.h -@@ -439,7 +439,11 @@ enum Flags : uint64_t { - // $HOME/.node_modules and $NODE_PATH. This is used by standalone apps that - // do not expect to have their behaviors changed because of globally - // installed modules. -- kNoGlobalSearchPaths = 1 << 7 -+ kNoGlobalSearchPaths = 1 << 7, -+ // Controls whether or not the Environment should call InitializeInspector. -+ // This control is needed by embedders who may not want to initialize the V8 -+ // inspector in situations where it already exists. -+ kNoInitializeInspector = 1 << 8 - }; - } // namespace EnvironmentFlags - 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 20e89d87ef6be..44a303b93a03b 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -31,7 +31,7 @@ index 4e3c32fdcd23fbe3e74bd5e624b739d224689f33..19d65aae7fa8ec9f9b907733ead17a20 // Test Parallel Execution w/ KeyObject is threadsafe in openssl3 { diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js -index 21c5af6cfe3e5eef64fc2d4dcc63c55b1d79ad51..b21eb4b97ad778304b3a4e8d549e109614350dfb 100644 +index 3749895769ffc9947143aee9aeb126628262bc84..f769fc37dbd81d5a0219236921e0bcb0de416463 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -50,7 +50,9 @@ const errMessages = { @@ -739,7 +739,7 @@ index d1782359277dc52d7a60830a6dd958544d610e6b..4c781f062bc505b860b821773070551f + assert.match(legacyObject.serialNumber, legacyObjectCheck.serialNumberPattern); } diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js -index 58441be4d093f06cac3d47e2fa752f2354a49f8a..36a91946c8ad23250a47c433c1216ec9cb14f0e1 100644 +index a8ceb169de2b3de73f062083c42292babc673e73..a3bb574d0e5dc85b4ba3fb0b3bd8782fbb8c8700 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -67,7 +67,7 @@ assert.throws(() => { @@ -769,16 +769,16 @@ index 58441be4d093f06cac3d47e2fa752f2354a49f8a..36a91946c8ad23250a47c433c1216ec9 !('opensslErrorStack' in err); }); -@@ -137,8 +137,6 @@ assert(crypto.getHashes().includes('sha1')); +@@ -150,8 +150,6 @@ assert(crypto.getHashes().includes('sha1')); assert(crypto.getHashes().includes('sha256')); assert(!crypto.getHashes().includes('SHA1')); assert(!crypto.getHashes().includes('SHA256')); -assert(crypto.getHashes().includes('RSA-SHA1')); -assert(!crypto.getHashes().includes('rsa-sha1')); validateList(crypto.getHashes()); - - // Assume that we have at least secp384r1. -@@ -172,7 +170,7 @@ const encodingError = { + // Make sure all of the hashes are supported by OpenSSL + for (const algo of crypto.getHashes()) +@@ -188,7 +186,7 @@ const encodingError = { // hex input that's not a power of two should throw, not assert in C++ land. ['createCipher', 'createDecipher'].forEach((funcName) => { assert.throws( @@ -787,7 +787,7 @@ index 58441be4d093f06cac3d47e2fa752f2354a49f8a..36a91946c8ad23250a47c433c1216ec9 (error) => { assert.ok(!('opensslErrorStack' in error)); if (common.hasFipsCrypto) { -@@ -224,15 +222,15 @@ assert.throws(() => { +@@ -240,15 +238,15 @@ assert.throws(() => { library: 'rsa routines', } : { name: 'Error', @@ -808,7 +808,7 @@ index 58441be4d093f06cac3d47e2fa752f2354a49f8a..36a91946c8ad23250a47c433c1216ec9 if (!common.hasOpenSSL3) { assert.throws(() => { // The correct header inside `rsa_private_pkcs8_bad.pem` should have been -@@ -260,7 +258,7 @@ if (!common.hasOpenSSL3) { +@@ -276,7 +274,7 @@ if (!common.hasOpenSSL3) { return true; }); } @@ -1010,3 +1010,36 @@ index 1094845c73e14313860ad476fb7baba2a11b5af4..51972b4b34b191ac59145889dbf2da5c }; function generateWrappingKeys() { +diff --git a/test/parallel/test-x509-escaping.js b/test/parallel/test-x509-escaping.js +index 99418e4c0bf21c26d5ba0ad9d617419abc625593..fc129b26ea13895353d6ede26bb2d91695c94ba4 100644 +--- a/test/parallel/test-x509-escaping.js ++++ b/test/parallel/test-x509-escaping.js +@@ -425,11 +425,11 @@ const { hasOpenSSL3 } = common; + assert.strictEqual(certX509.subjectAltName, 'DNS:evil.example.com'); + + // The newer X509Certificate API allows customizing this behavior: +- assert.strictEqual(certX509.checkHost(servername), servername); ++ assert.strictEqual(certX509.checkHost(servername), undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'default' }), + undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'always' }), +- servername); ++ undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'never' }), + undefined); + +@@ -464,11 +464,11 @@ const { hasOpenSSL3 } = common; + assert.strictEqual(certX509.subjectAltName, 'IP Address:1.2.3.4'); + + // The newer X509Certificate API allows customizing this behavior: +- assert.strictEqual(certX509.checkHost(servername), servername); ++ assert.strictEqual(certX509.checkHost(servername), undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'default' }), +- servername); ++ undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'always' }), +- servername); ++ undefined); + assert.strictEqual(certX509.checkHost(servername, { subject: 'never' }), + undefined); + 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 deleted file mode 100644 index 2ae896f558c86..0000000000000 --- a/patches/node/fix_don_t_create_console_window_when_creating_process.patch +++ /dev/null @@ -1,25 +0,0 @@ -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(); diff --git a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch index 97e7fb79cfe5a..b374abb78a810 100644 --- a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch +++ b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch @@ -7,10 +7,10 @@ Subject: fix: expose tracing::Agent and use tracing::TracingController instead This API is used by Electron to create Node's tracing controller. diff --git a/src/api/environment.cc b/src/api/environment.cc -index 0fb750c5abbe00740f2095ec397c823e26666199..523d252e08974a10f9a53fb46d3345669cec3380 100644 +index 55b895c235f51eb7bcbd8cd4065b42a05208026a..1add2976e7c48e6704400b9ea0795b934ab0bfc2 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc -@@ -459,6 +459,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) { +@@ -461,6 +461,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) { return env->platform(); } @@ -22,7 +22,7 @@ index 0fb750c5abbe00740f2095ec397c823e26666199..523d252e08974a10f9a53fb46d334566 int thread_pool_size, node::tracing::TracingController* tracing_controller) { diff --git a/src/node.h b/src/node.h -index 5b1404ff8e290a505a1143b582494e9a3319a183..70518ba49b3bcbfaf2e46ba8ddc3f04236bc27b8 100644 +index 966edcd041be1bded2c3a86e5734d2849019c372..9b9ff1c86ceeaeca828328065e2ad5573ea17fc5 100644 --- a/src/node.h +++ b/src/node.h @@ -118,6 +118,7 @@ namespace node { @@ -33,7 +33,7 @@ index 5b1404ff8e290a505a1143b582494e9a3319a183..70518ba49b3bcbfaf2e46ba8ddc3f042 class TracingController; } -@@ -518,6 +519,8 @@ NODE_EXTERN v8::MaybeLocal PrepareStackTraceCallback( +@@ -523,6 +524,8 @@ NODE_EXTERN v8::MaybeLocal PrepareStackTraceCallback( NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env); NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env); diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index f7b4c08817e12..5f0d8ae50dab9 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 f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda45426038d199 100644 +index a5aa39c23c1708ac27564a1a77a9f05fc07791e2..630a3400e74f20b1dbee17027c7dbe8688fed4b2 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc -@@ -176,7 +176,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { +@@ -162,7 +162,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { const unsigned char* buf; size_t len; size_t rem; @@ -29,7 +29,7 @@ index f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda4542 if (!SSL_client_hello_get0_ext( ssl.get(), TLSEXT_TYPE_application_layer_protocol_negotiation, -@@ -189,13 +189,15 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { +@@ -175,13 +175,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 f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda4542 if (!SSL_client_hello_get0_ext( ssl.get(), TLSEXT_TYPE_server_name, -@@ -217,6 +219,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) { +@@ -203,6 +205,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) { if (len + 2 > rem) return nullptr; return reinterpret_cast(buf + 5); @@ -55,7 +55,7 @@ index f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda4542 } const char* GetServerName(SSL* ssl) { -@@ -224,7 +228,10 @@ const char* GetServerName(SSL* ssl) { +@@ -210,7 +214,10 @@ const char* GetServerName(SSL* ssl) { } bool SetGroups(SecureContext* sc, const char* groups) { @@ -66,7 +66,7 @@ index f830da2cfba18ae2f7ad02fa862122780c956c80..51b26af969d5c84c741563297fda4542 } const char* X509ErrorCode(long err) { // NOLINT(runtime/int) -@@ -1126,14 +1133,14 @@ MaybeLocal GetClientHelloCiphers( +@@ -1101,14 +1108,14 @@ MaybeLocal GetClientHelloCiphers( Environment* env, const SSLPointer& ssl) { EscapableHandleScope scope(env->isolate()); @@ -304,7 +304,7 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba } // namespace diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index 5060fc3f2fbd67d8b33975f2512cbd7cf7fedf1a..4f86810f8366b490ca2293cd1a811e69a199f708 100644 +index c431159e6f77f8c86844bcadb86012b056d03372..0ce3a8f219a2952f660ff72a6ce36ee109add649 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h @@ -16,7 +16,9 @@ diff --git a/patches/node/pass_all_globals_through_require.patch b/patches/node/pass_all_globals_through_require.patch index ee776addc06a7..63e91ad95678d 100644 --- a/patches/node/pass_all_globals_through_require.patch +++ b/patches/node/pass_all_globals_through_require.patch @@ -6,7 +6,7 @@ Subject: Pass all globals through "require" (cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index cfe2982bf22c245d3249a743e341c9948d98c18b..2c188ae0b5cb86493a7fd701c343b36370369f20 100644 +index b4902850c7fec5bb67c9566f40ca1cdd2ba17b55..200c352cfd7321c47f37776589cfca397cad5d25 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -127,6 +127,13 @@ const { @@ -23,7 +23,7 @@ index cfe2982bf22c245d3249a743e341c9948d98c18b..2c188ae0b5cb86493a7fd701c343b363 const { isProxy } = require('internal/util/types'); -@@ -1098,10 +1105,12 @@ Module.prototype._compile = function(content, filename) { +@@ -1100,10 +1107,12 @@ Module.prototype._compile = function(content, filename) { if (requireDepth === 0) statCache = new SafeMap(); if (inspectorWrapper) { result = inspectorWrapper(compiledWrapper, thisValue, exports, diff --git a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch index ff492a0b6b9b0..c6ffa555f14c1 100644 --- a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch +++ b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch @@ -7,7 +7,7 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were a real filesystem. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index 1393cc20f45db69c9e133e25ac9428fcb6d81100..085dd7e09d31fb1800b3596cc068637e1956ba52 100644 +index dfae7675e16a6a81e40c69d85004fc841cadf738..8c31d0202b70ec9784b4289a175a62fd9fd85f8c 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -66,6 +66,10 @@ setupBuffer(); @@ -22,7 +22,7 @@ index 1393cc20f45db69c9e133e25ac9428fcb6d81100..085dd7e09d31fb1800b3596cc068637e const nativeModule = internalBinding('native_module'); diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 2c188ae0b5cb86493a7fd701c343b36370369f20..caca939942cb721a3efde7005b0a987a19237a8b 100644 +index 200c352cfd7321c47f37776589cfca397cad5d25..5195ff2da0496f2bfb9112d336c38040f662087b 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -86,7 +86,7 @@ const fs = require('fs'); diff --git a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch index 67c1845b31c13..5157829f69aa6 100644 --- a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch +++ b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch @@ -7,7 +7,7 @@ Subject: refactor: alter child_process.fork to use execute script with When forking a child script, we setup a special environment to make the Electron binary run like the upstream node. On Mac, we use the helper app as node binary. diff --git a/lib/child_process.js b/lib/child_process.js -index a7ef8ba1e4af1aaabf88ea424b0a101397f7eb16..9cd99a7440ee4d2273fe94a0d51b4bf4051f612d 100644 +index 415010241cdabac42ea79601c464bae4a2081c78..5c202237ecdf32afe89b5a5b4dfc2cf648fb9d23 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -160,6 +160,15 @@ function fork(modulePath, args = [], options) { diff --git a/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch b/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch index 510461bd8a1be..dae469157d32e 100644 --- a/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch +++ b/patches/node/repl_fix_crash_when_sharedarraybuffer_disabled.patch @@ -25,7 +25,7 @@ index a771b1813731edf4f0dd60f3505799e389f1d876..b9461677e2d7d1df192e752496e62cca bench.start(); for (let i = 0; i < n; i++) diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js -index 65827ecd593ffb050484152fc6d31411fd3e4dcc..2e5d6b01d86e34549c1c7a3d3128350cad2b0c47 100644 +index a8167b86ca2e5a11b2628e20063849e85a200a8c..110a3ed1637b642b1d83fb36549cced151b9c5cd 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -9,7 +9,7 @@ const { @@ -37,7 +37,7 @@ index 65827ecd593ffb050484152fc6d31411fd3e4dcc..2e5d6b01d86e34549c1c7a3d3128350c } = primordials; const { -@@ -142,6 +142,9 @@ port.on('message', (message) => { +@@ -146,6 +146,9 @@ port.on('message', (message) => { const originalCwd = process.cwd; process.cwd = function() { diff --git a/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch b/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch index 08195a21f54d5..81619a8926da2 100644 --- a/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch +++ b/patches/node/src_allow_embedders_to_provide_a_custom_pageallocator_to.patch @@ -12,7 +12,7 @@ allocator that does handle these cases. Upstreamed in https://github.com/nodejs/node/pull/38362. diff --git a/src/api/environment.cc b/src/api/environment.cc -index 5bf19a0dda42849159d954181058897c45d280fd..03078ff3869fcd17101f1cdaf77f725dbbfa43e8 100644 +index 1add2976e7c48e6704400b9ea0795b934ab0bfc2..2abf5994405e8da2a04d1b23b75ccd3658398474 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -475,8 +475,9 @@ MultiIsolatePlatform* CreatePlatform( @@ -40,7 +40,7 @@ index 5bf19a0dda42849159d954181058897c45d280fd..03078ff3869fcd17101f1cdaf77f725d MaybeLocal GetPerContextExports(Local context) { diff --git a/src/node.h b/src/node.h -index 7ca7502e086190c87ae6a61dca2192253894e906..b2b766f242e02593631be087fceaf63f71d74284 100644 +index 9b9ff1c86ceeaeca828328065e2ad5573ea17fc5..0a9f5139276eb2e102b41a586adf61fa563b47d6 100644 --- a/src/node.h +++ b/src/node.h @@ -332,7 +332,8 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform { @@ -53,7 +53,7 @@ index 7ca7502e086190c87ae6a61dca2192253894e906..b2b766f242e02593631be087fceaf63f }; enum IsolateSettingsFlags { -@@ -528,7 +529,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent(); +@@ -529,7 +530,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent(); NODE_DEPRECATED("Use MultiIsolatePlatform::Create() instead", NODE_EXTERN MultiIsolatePlatform* CreatePlatform( int thread_pool_size, diff --git a/patches/node/worker_thread_add_asar_support.patch b/patches/node/worker_thread_add_asar_support.patch index 070774bf05748..0fd22dff59e46 100644 --- a/patches/node/worker_thread_add_asar_support.patch +++ b/patches/node/worker_thread_add_asar_support.patch @@ -7,10 +7,10 @@ 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 2af6b11c97ecdca3c40792ab35c69b07b9db76a0..e79ce2b79a5f88a315ac013b6e12534ba1531d6b 100644 +index 899d5a906683e8967746e10a6de452e99e236903..4c459b58b5a048d9d8a4f15f4011e7cce68089f4 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -498,6 +498,7 @@ module.exports = { +@@ -563,6 +563,7 @@ module.exports = { loadPreloadModules, setupTraceCategoryState, setupInspectorHooks, @@ -19,10 +19,10 @@ index 2af6b11c97ecdca3c40792ab35c69b07b9db76a0..e79ce2b79a5f88a315ac013b6e12534b initializeCJSLoader, initializeWASI diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js -index 2e5d6b01d86e34549c1c7a3d3128350cad2b0c47..74ab84ca39a01269925ca0e326e4aa8894fce8a1 100644 +index 110a3ed1637b642b1d83fb36549cced151b9c5cd..50da62d11bf87c333322264f26e5b427efc7d46b 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js -@@ -27,6 +27,7 @@ const { +@@ -29,6 +29,7 @@ const { initializeReport, initializeSourceMapsHandlers, loadPreloadModules, @@ -30,7 +30,7 @@ index 2e5d6b01d86e34549c1c7a3d3128350cad2b0c47..74ab84ca39a01269925ca0e326e4aa88 setupTraceCategoryState } = require('internal/bootstrap/pre_execution'); -@@ -154,6 +155,8 @@ port.on('message', (message) => { +@@ -158,6 +159,8 @@ port.on('message', (message) => { }; workerIo.sharedCwdCounter = cwdCounter; diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 5d0a89992f84f..4b2157f3c5f05 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -480,7 +480,7 @@ node::Environment* NodeBindings::CreateEnvironment( // in renderer processes this should be blink. We need to tell Node.js // not to register its handler (overriding blinks) in non-browser processes. flags |= node::EnvironmentFlags::kNoRegisterESMLoader | - node::EnvironmentFlags::kNoInitializeInspector; + node::EnvironmentFlags::kNoCreateInspector; } if (!electron::fuses::IsNodeCliInspectEnabled()) { From 030087c1c7a38b84dfa6ba285e128861abd19173 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 06:01:41 -0700 Subject: [PATCH 364/811] Bump v20.0.0-nightly.20220510 --- 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 813858b4a9d49..0051dcc52a37d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220509 \ No newline at end of file +20.0.0-nightly.20220510 \ No newline at end of file diff --git a/package.json b/package.json index a8be96a419284..2af9df60248f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220509", + "version": "20.0.0-nightly.20220510", "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 896668b38e784..40001eb458055 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 20,0,0,20220509 - PRODUCTVERSION 20,0,0,20220509 + FILEVERSION 20,0,0,20220510 + PRODUCTVERSION 20,0,0,20220510 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 55726599887b79a29d0825f2206bd079da340f57 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 08:37:52 -0700 Subject: [PATCH 365/811] Revert "Bump v20.0.0-nightly.20220510" This reverts commit 030087c1c7a38b84dfa6ba285e128861abd19173. --- 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 0051dcc52a37d..813858b4a9d49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220510 \ No newline at end of file +20.0.0-nightly.20220509 \ No newline at end of file diff --git a/package.json b/package.json index 2af9df60248f5..a8be96a419284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220510", + "version": "20.0.0-nightly.20220509", "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 40001eb458055..896668b38e784 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 20,0,0,20220510 - PRODUCTVERSION 20,0,0,20220510 + FILEVERSION 20,0,0,20220509 + PRODUCTVERSION 20,0,0,20220509 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b94f25c28719389c99a961a046d4f093c219b9e4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 09:05:20 -0700 Subject: [PATCH 366/811] Bump v20.0.0-nightly.20220510 --- 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 813858b4a9d49..0051dcc52a37d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220509 \ No newline at end of file +20.0.0-nightly.20220510 \ No newline at end of file diff --git a/package.json b/package.json index a8be96a419284..2af9df60248f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220509", + "version": "20.0.0-nightly.20220510", "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 896668b38e784..40001eb458055 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 20,0,0,20220509 - PRODUCTVERSION 20,0,0,20220509 + FILEVERSION 20,0,0,20220510 + PRODUCTVERSION 20,0,0,20220510 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c8fbabae480e0be01fa42de8edc8250f4912cace Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 09:14:27 -0700 Subject: [PATCH 367/811] Revert "Bump v20.0.0-nightly.20220510" This reverts commit b94f25c28719389c99a961a046d4f093c219b9e4. --- 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 0051dcc52a37d..813858b4a9d49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220510 \ No newline at end of file +20.0.0-nightly.20220509 \ No newline at end of file diff --git a/package.json b/package.json index 2af9df60248f5..a8be96a419284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220510", + "version": "20.0.0-nightly.20220509", "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 40001eb458055..896668b38e784 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 20,0,0,20220510 - PRODUCTVERSION 20,0,0,20220510 + FILEVERSION 20,0,0,20220509 + PRODUCTVERSION 20,0,0,20220509 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4fc42092b8d9363fa6da3f31204de5ec1e33e631 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 10:27:54 -0700 Subject: [PATCH 368/811] Bump v20.0.0-nightly.20220510 --- 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 813858b4a9d49..0051dcc52a37d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220509 \ No newline at end of file +20.0.0-nightly.20220510 \ No newline at end of file diff --git a/package.json b/package.json index a8be96a419284..2af9df60248f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220509", + "version": "20.0.0-nightly.20220510", "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 896668b38e784..40001eb458055 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 20,0,0,20220509 - PRODUCTVERSION 20,0,0,20220509 + FILEVERSION 20,0,0,20220510 + PRODUCTVERSION 20,0,0,20220510 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7f5346b9545a9d6bf0de514fee24d0e0442a4047 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 10:33:23 -0700 Subject: [PATCH 369/811] Revert "Bump v20.0.0-nightly.20220510" This reverts commit 4fc42092b8d9363fa6da3f31204de5ec1e33e631. --- 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 0051dcc52a37d..813858b4a9d49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220510 \ No newline at end of file +20.0.0-nightly.20220509 \ No newline at end of file diff --git a/package.json b/package.json index 2af9df60248f5..a8be96a419284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220510", + "version": "20.0.0-nightly.20220509", "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 40001eb458055..896668b38e784 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 20,0,0,20220510 - PRODUCTVERSION 20,0,0,20220510 + FILEVERSION 20,0,0,20220509 + PRODUCTVERSION 20,0,0,20220509 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 627c2987ba1d3b8b4204b3e8762782885a8f490b Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 10 May 2022 13:24:40 -0700 Subject: [PATCH 370/811] fix: create singleton pipename from user & executable (#34139) * fix: create singleton pipename from user & executable * fix: use process id & main thread id for pipe name * fix: write rand to file using WIN method * fix: remove file rand, add user_name to pipe * chore: style fixes, shorten program_name & user_name * fix: remove user_name --- ...ransfer_to_requestsingleinstancelock.patch | 61 +++++++++++++------ 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index a539bdab51ef7..61eeec59f5705 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -282,10 +282,20 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d05018b627 100644 +index ec725b44296266bea1a51aea889463a0bba8449c..6355e5c73ba9df9bdb9ff48205d909dca04470f1 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -21,6 +21,7 @@ +@@ -13,14 +13,17 @@ + #include "base/command_line.h" + #include "base/debug/activity_tracker.h" + #include "base/files/file_path.h" ++#include "base/files/file_util.h" + #include "base/logging.h" + #include "base/metrics/histogram_functions.h" + #include "base/metrics/histogram_macros.h" + #include "base/process/process.h" + #include "base/process/process_info.h" ++#include "base/rand_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" @@ -293,11 +303,10 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 #include "base/trace_event/base_tracing.h" #include "base/win/registry.h" #include "base/win/scoped_handle.h" -@@ -45,6 +46,14 @@ +@@ -45,6 +48,13 @@ namespace { const char kLockfile[] = "lockfile"; -+const LPCWSTR kPipeName = L"\\\\.\\pipe\\electronAckPipe"; +const DWORD kPipeTimeout = 10000; +const DWORD kMaxMessageLength = 32 * 1024; + @@ -308,7 +317,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 // A helper class that acquires the given |mutex| while the AutoLockMutex is in // scope. -@@ -80,10 +89,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { +@@ -80,10 +90,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, @@ -323,7 +332,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 static const int min_message_size = 7; if (cds->cbData < min_message_size * sizeof(wchar_t) || cds->cbData % sizeof(wchar_t) != 0) { -@@ -133,11 +144,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, +@@ -133,11 +145,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 +415,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 bool ProcessLaunchNotification( const ProcessSingleton::NotificationCallback& notification_callback, UINT message, -@@ -151,16 +233,35 @@ bool ProcessLaunchNotification( +@@ -151,16 +234,35 @@ bool ProcessLaunchNotification( // Handle the WM_COPYDATA message from another process. const COPYDATASTRUCT* cds = reinterpret_cast(lparam); @@ -446,7 +455,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 return true; } -@@ -261,9 +362,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -261,9 +363,13 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -461,16 +470,26 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -278,6 +383,37 @@ ProcessSingleton::~ProcessSingleton() { +@@ -278,6 +384,47 @@ ProcessSingleton::~ProcessSingleton() { ::CloseHandle(lock_file_); } -+void ReadAck(const ProcessSingleton::NotificationAckCallback& ack_callback) { ++void ReadAck(const ProcessSingleton::NotificationAckCallback& ack_callback, ++ const std::string program_name, ++ base::FilePath& user_data_dir) { + // We are reading the ack from the first instance. + // First, wait for the pipe. -+ ::WaitNamedPipe(kPipeName, NMPWAIT_USE_DEFAULT_WAIT); ++ HWND remote_window = chrome::FindRunningChromeWindow(user_data_dir); ++ DWORD process_id; ++ DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id); ++ std::string identifier = base::NumberToString(process_id) + ++ base::NumberToString(thread_id); ++ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier + ++ program_name); ++ const LPCWSTR w_pipe_name = pipe_name.c_str(); ++ ::WaitNamedPipe(w_pipe_name, NMPWAIT_USE_DEFAULT_WAIT); + -+ HANDLE read_ack_pipe = ::CreateFile(kPipeName, ++ HANDLE read_ack_pipe = ::CreateFile(w_pipe_name, + GENERIC_READ, + FILE_SHARE_READ, + NULL, @@ -499,23 +518,31 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 // Code roughly based on Mozilla. ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); -@@ -290,8 +426,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { +@@ -290,8 +437,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } - switch (chrome::AttemptToNotifyRunningChrome(remote_window_)) { + switch (chrome::AttemptToNotifyRunningChrome(remote_window_, additional_data_)) { case chrome::NOTIFY_SUCCESS: -+ ReadAck(notification_ack_callback_); ++ ReadAck(notification_ack_callback_, program_name_, user_data_dir_); return PROCESS_NOTIFIED; case chrome::NOTIFY_FAILED: remote_window_ = NULL; -@@ -429,6 +566,18 @@ bool ProcessSingleton::Create() { +@@ -429,6 +577,26 @@ bool ProcessSingleton::Create() { << "Lock file can not be created! Error code: " << error; if (lock_file_ != INVALID_HANDLE_VALUE) { + // We are the first instance. Create a pipe to send out ack data. -+ ack_pipe_ = ::CreateNamedPipe(kPipeName, ++ // Create a per-process pipename using a combination of the ++ // username, process id, thread id, and program name. Pipe names max ++ // at 256 characters, can include any character other than a backslash ++ std::string identifier = base::NumberToString(::GetCurrentProcessId()) + ++ base::NumberToString(::GetCurrentThreadId()); ++ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier + ++ program_name_); ++ const LPCWSTR w_pipe_name = pipe_name.c_str(); ++ ack_pipe_ = ::CreateNamedPipe(w_pipe_name, + PIPE_ACCESS_OUTBOUND, + PIPE_TYPE_BYTE | PIPE_REJECT_REMOTE_CLIENTS, + PIPE_UNLIMITED_INSTANCES, @@ -529,7 +556,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0 // 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. TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); -@@ -456,6 +605,7 @@ bool ProcessSingleton::Create() { +@@ -456,6 +624,7 @@ bool ProcessSingleton::Create() { } void ProcessSingleton::Cleanup() { From e76cf3e2ed01e1b7199a336463c21b5b8904c745 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 10 May 2022 23:26:07 +0200 Subject: [PATCH 371/811] fix: building node modules with Visual Studio 2017 (#34109) --- patches/v8/.patches | 2 +- ...recated_attribute_for_older_msvc_versions.patch} | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) rename patches/v8/{fix_build_deprecated_attirbute_for_older_msvc_versions.patch => fix_build_deprecated_attribute_for_older_msvc_versions.patch} (72%) diff --git a/patches/v8/.patches b/patches/v8/.patches index 1e5615f3ce254..67b42548459b7 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -4,6 +4,6 @@ dcheck.patch export_symbols_needed_for_windows_build.patch 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_build_deprecated_attribute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch diff --git a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch similarity index 72% rename from patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch rename to patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index def8b4cf37dd3..547b2778ac3c0 100644 --- a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -1,15 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Deepak Mohan Date: Tue, 28 Jan 2020 15:48:03 -0800 -Subject: fix: usage of c++ [[deprecated]] attirbute for older msvc versions +Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions -VS 2015 update 3 has a bug where [[deprecated]] attribute cannot -be applied to constructor declarations, this is fixed in 2017 and -higher versions, but native module compiling with this version -will have an issue. +This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..010b3633546601ba70a55aeb8e8fc503ef79e2f5 100644 +index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef74c2ab57 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -454,10 +454,13 @@ path. Add it with -I to the command line @@ -20,7 +17,7 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..010b3633546601ba70a55aeb8e8fc503 // A macro (V8_DEPRECATED) to mark classes or functions as deprecated. #if defined(V8_DEPRECATION_WARNINGS) -# define V8_DEPRECATED(message) [[deprecated(message)]] -+# if defined(_MSC_VER) && _MSC_VER <= 1900 ++# if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1920 +# define V8_DEPRECATED(message) __declspec(deprecated(message)) +# else +# define V8_DEPRECATED(message) [[deprecated(message)]] @@ -33,7 +30,7 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..010b3633546601ba70a55aeb8e8fc503 // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) -# define V8_DEPRECATE_SOON(message) [[deprecated(message)]] -+# if defined(_MSC_VER) && _MSC_VER <= 1900 ++# if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1920 +# define V8_DEPRECATE_SOON(message) __declspec(deprecated(message)) +# else +# define V8_DEPRECATE_SOON(message) [[deprecated(message)]] From 9bcbe70dbe4b4e34fc9a75f971fb30ed8a5be831 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 10 May 2022 14:26:53 -0700 Subject: [PATCH 372/811] test: run node specs with py3 (#34154) --- script/node-spec-runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/node-spec-runner.js b/script/node-spec-runner.js index 340ff1d9f63b7..16c51af15db82 100644 --- a/script/node-spec-runner.js +++ b/script/node-spec-runner.js @@ -55,7 +55,7 @@ const getCustomOptions = () => { async function main () { const options = args.default ? defaultOptions : getCustomOptions(); - const testChild = cp.spawn('python', options, { + const testChild = cp.spawn('python3', options, { env: { ...process.env, ELECTRON_RUN_AS_NODE: 'true', From 5633c45c198e22b434fa5ca1a4805ed0109cbf7c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 18:39:00 -0700 Subject: [PATCH 373/811] Bump v20.0.0-nightly.20220510 --- 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 813858b4a9d49..0051dcc52a37d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220509 \ No newline at end of file +20.0.0-nightly.20220510 \ No newline at end of file diff --git a/package.json b/package.json index a8be96a419284..2af9df60248f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220509", + "version": "20.0.0-nightly.20220510", "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 896668b38e784..40001eb458055 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 20,0,0,20220509 - PRODUCTVERSION 20,0,0,20220509 + FILEVERSION 20,0,0,20220510 + PRODUCTVERSION 20,0,0,20220510 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a853a6ce9f7936da1e17c989bece89108e481e57 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 18:40:53 -0700 Subject: [PATCH 374/811] Revert "Bump v20.0.0-nightly.20220510" This reverts commit 5633c45c198e22b434fa5ca1a4805ed0109cbf7c. --- 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 0051dcc52a37d..813858b4a9d49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220510 \ No newline at end of file +20.0.0-nightly.20220509 \ No newline at end of file diff --git a/package.json b/package.json index 2af9df60248f5..a8be96a419284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220510", + "version": "20.0.0-nightly.20220509", "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 40001eb458055..896668b38e784 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 20,0,0,20220510 - PRODUCTVERSION 20,0,0,20220510 + FILEVERSION 20,0,0,20220509 + PRODUCTVERSION 20,0,0,20220509 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 79e1881b2a7e797a90474e93e881399c0d22742f Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 11 May 2022 17:39:51 +0900 Subject: [PATCH 375/811] chore: rm enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch (#34157) * chore: rm enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch * chore: update patch --- patches/node/.patches | 3 +- ...is_on_64bit_arch_and_ptr_compression.patch | 32 ------------------- ...everse_jsargs_defines_in_common_gypi.patch | 15 +++------ 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch diff --git a/patches/node/.patches b/patches/node/.patches index d1df090471f84..e5114a032fb62 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -10,9 +10,7 @@ refactor_allow_embedder_overriding_of_internal_fs_calls.patch chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch chore_add_context_to_context_aware_module_prevention.patch chore_read_nobrowserglobals_from_global_not_process.patch -enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch fix_handle_boringssl_and_openssl_incompatibilities.patch -fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch src_allow_embedders_to_provide_a_custom_pageallocator_to.patch fix_crypto_tests_to_run_with_bssl.patch fix_account_for_debugger_agent_race_condition.patch @@ -42,3 +40,4 @@ process_fix_hang_after_note_exit_3521.patch feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch fix_preserve_proper_method_names_as-is_in_error_stack.patch macos_avoid_posix_spawnp_cwd_bug_3597.patch +fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch 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 deleted file mode 100644 index d6ef9a68a08c7..0000000000000 --- a/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Tue, 10 Dec 2019 15:02:21 -0800 -Subject: enable 31 bit smis on 64bit arch and ptr compression - -This aligns with the defaults set on the Chromium build. Without this, native -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 3fd1d4ddddc109dfd87f4ba6115948f1c31b1261..7ffd577817d3c6ae7164dd3945479aedcee9640e 100644 ---- a/common.gypi -+++ b/common.gypi -@@ -64,7 +64,7 @@ - # options but default values are required here as this file is also used by - # node-gyp to build addons. - 'v8_enable_pointer_compression%': 0, -- 'v8_enable_31bit_smis_on_64bit_arch%': 0, -+ 'v8_enable_31bit_smis_on_64bit_arch%': 1, - - # Disable V8 untrusted code mitigations. - # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations -@@ -133,6 +133,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, -+ }], - ['target_arch in "ppc64 s390x"', { - 'v8_enable_backtrace': 1, - }], 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 b8578ea1afcc4..5716a2d57dc79 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,26 +6,19 @@ 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 7ffd577817d3c6ae7164dd3945479aedcee9640e..6674f9f9b8880c40db579664fa40f62ad0139368 100644 +index 3fd1d4ddddc109dfd87f4ba6115948f1c31b1261..fd4e0b38eb6ecf81b23186ec663499d1e685fdf8 100644 --- a/common.gypi +++ b/common.gypi -@@ -65,6 +65,7 @@ - # node-gyp to build addons. - 'v8_enable_pointer_compression%': 0, - 'v8_enable_31bit_smis_on_64bit_arch%': 1, -+ 'v8_enable_reverse_jsargs%': 1, - - # Disable V8 untrusted code mitigations. - # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations -@@ -82,6 +83,7 @@ +@@ -82,6 +82,8 @@ # TODO(refack): make v8-perfetto happen 'v8_use_perfetto': 0, ++ 'v8_enable_reverse_jsargs%': 1, + ##### end V8 defaults ##### # When building native modules using 'npm install' with the system npm, -@@ -401,6 +403,9 @@ +@@ -398,6 +400,9 @@ ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], }], From 64dc90824b43b5ab18bbfd3c687a51207956298b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 11 May 2022 06:01:00 -0700 Subject: [PATCH 376/811] Bump v20.0.0-nightly.20220511 --- 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 813858b4a9d49..d493702e49f5e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220509 \ No newline at end of file +20.0.0-nightly.20220511 \ No newline at end of file diff --git a/package.json b/package.json index a8be96a419284..e79c315e5aabc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220509", + "version": "20.0.0-nightly.20220511", "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 896668b38e784..91f7d5fe92db3 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 20,0,0,20220509 - PRODUCTVERSION 20,0,0,20220509 + FILEVERSION 20,0,0,20220511 + PRODUCTVERSION 20,0,0,20220511 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6063d4f8df7298b6fbc66cc71e76c04e913faaf3 Mon Sep 17 00:00:00 2001 From: FantasqueX Date: Wed, 11 May 2022 22:05:59 +0800 Subject: [PATCH 377/811] docs: fix typo in quick-start.md (#34149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to Jetbrains LanguageTool, "Consider using All the. " --- 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 64d82d61dfdb4..cd54e26e9b9b2 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -404,7 +404,7 @@ app.on('window-all-closed', () => { ```js // preload.js -// All of the Node.js APIs are available in the preload process. +// All the Node.js APIs are available in the preload process. // It has the same sandbox as a Chrome extension. window.addEventListener('DOMContentLoaded', () => { const replaceText = (selector, text) => { From c512993744145e594c9ee8d55e5c4190c943f841 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 11 May 2022 08:27:23 -0700 Subject: [PATCH 378/811] build: re-enable 32-bit Windows symbol generation (#34162) --- appveyor.yml | 9 +++------ script/release/release.js | 5 ++--- script/release/uploaders/upload.py | 14 ++++++-------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f693c7d634e8a..540fd50f0df75 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -180,19 +180,16 @@ build_script: - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - 7z a node_headers.zip out\Default\gen\node_headers - # Temporarily disable symbol generation on 32-bit Windows due to failures - ps: >- - if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { + if ($env:GN_CONFIG -eq 'release') { # Needed for msdia140.dll on 64-bit windows $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" ninja -C out/Default electron:electron_symbols } - ps: >- if ($env:GN_CONFIG -eq 'release') { - if ($env:TARGET_ARCH -ne 'ia32') { - python electron\script\zip-symbols.py - appveyor-retry appveyor PushArtifact out/Default/symbols.zip - } + python electron\script\zip-symbols.py + appveyor-retry appveyor PushArtifact out/Default/symbols.zip } else { # It's useful to have pdb files when debugging testing builds that are # built on CI. diff --git a/script/release/release.js b/script/release/release.js index 221d7bd6d7cf4..c3c8d6363b120 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -128,9 +128,8 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-mas-arm64-dsym-snapshot.zip`, `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, - // TODO(jkleinsc) Symbol generation on 32-bit Windows is temporarily disabled due to failures - // `electron-${version}-win32-ia32-pdb.zip`, - // `electron-${version}-win32-ia32-symbols.zip`, + `electron-${version}-win32-ia32-pdb.zip`, + `electron-${version}-win32-ia32-symbols.zip`, `electron-${version}-win32-ia32.zip`, `electron-${version}-win32-x64-pdb.zip`, `electron-${version}-win32-x64-symbols.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 69c4bbfa5720d..a73955786e47c 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -76,10 +76,9 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip) upload_electron(release, electron_zip, args) if get_target_arch() != 'mips64el': - if (get_target_arch() != 'ia32' or PLATFORM != 'win32'): - symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) - upload_electron(release, symbols_zip, args) + symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) + upload_electron(release, symbols_zip, args) if PLATFORM == 'darwin': if get_platform_key() == 'darwin' and get_target_arch() == 'x64': api_path = os.path.join(ELECTRON_DIR, 'electron-api.json') @@ -96,10 +95,9 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip) upload_electron(release, dsym_snaphot_zip, args) elif PLATFORM == 'win32': - if get_target_arch() != 'ia32': - pdb_zip = os.path.join(OUT_DIR, PDB_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) - upload_electron(release, pdb_zip, args) + pdb_zip = os.path.join(OUT_DIR, PDB_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) + upload_electron(release, pdb_zip, args) elif PLATFORM == 'linux': debug_zip = os.path.join(OUT_DIR, DEBUG_NAME) shutil.copy2(os.path.join(OUT_DIR, 'debug.zip'), debug_zip) From 6f8a36f4047ba6300f93d4470193d6b54afabacf Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 11 May 2022 13:23:24 -0400 Subject: [PATCH 379/811] test: fixup done being called multiple times (#34175) --- spec-main/api-browser-window-spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 94bdc956a5b68..1b5f4260b8489 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3516,9 +3516,14 @@ describe('BrowserWindow module', () => { describe('beginFrameSubscription method', () => { it('does not crash when callback returns nothing', (done) => { const w = new BrowserWindow({ show: false }); + let called = false; w.loadFile(path.join(fixtures, 'api', 'frame-subscriber.html')); w.webContents.on('dom-ready', () => { w.webContents.beginFrameSubscription(function () { + // This callback might be called twice. + if (called) return; + called = true; + // Pending endFrameSubscription to next tick can reliably reproduce // a crash which happens when nothing is returned in the callback. setTimeout(() => { From dd6ce91f5766c9eea0ffca23e42ef8766851e0a2 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 11 May 2022 20:34:33 +0200 Subject: [PATCH 380/811] fix: call loadUrl when opening new windows from links (#34159) * fix: call loadUrl when opening new windows from links * spec: add regression test --- lib/browser/guest-window-manager.ts | 22 +++++++ spec-main/api-browser-window-spec.ts | 20 ++++++ .../apps/open-new-window-from-link/index.html | 11 ++++ .../apps/open-new-window-from-link/main.js | 64 +++++++++++++++++++ .../new-window-page.html | 11 ++++ .../open-new-window-from-link/package.json | 4 ++ .../apps/open-new-window-from-link/preload.js | 3 + 7 files changed, 135 insertions(+) create mode 100644 spec-main/fixtures/apps/open-new-window-from-link/index.html create mode 100644 spec-main/fixtures/apps/open-new-window-from-link/main.js create mode 100644 spec-main/fixtures/apps/open-new-window-from-link/new-window-page.html create mode 100644 spec-main/fixtures/apps/open-new-window-from-link/package.json create mode 100644 spec-main/fixtures/apps/open-new-window-from-link/preload.js diff --git a/lib/browser/guest-window-manager.ts b/lib/browser/guest-window-manager.ts index baa446ab91dae..76da71b15abcf 100644 --- a/lib/browser/guest-window-manager.ts +++ b/lib/browser/guest-window-manager.ts @@ -78,6 +78,19 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition ...browserWindowOptions }); + if (!guest) { + // When we open a new window from a link (via OpenURLFromTab), + // the browser process is responsible for initiating navigation + // in the new window. + window.loadURL(url, { + httpReferrer: referrer, + ...(postData && { + postData, + extraHeaders: formatPostDataHeaders(postData as Electron.UploadRawData[]) + }) + }); + } + handleWindowLifecycleEvents({ embedder, frameName, guest: window, outlivesOpener }); embedder.emit('did-create-window', window, { url, frameName, options: browserWindowOptions, disposition, referrer, postData }); @@ -243,6 +256,15 @@ export function makeWebPreferences ({ embedder, secureOverrideWebPreferences = { }; } +function formatPostDataHeaders (postData: PostData) { + if (!postData) return; + + const { contentType, boundary } = parseContentTypeFormat(postData); + if (boundary != null) { return `content-type: ${contentType}; boundary=${boundary}`; } + + return `content-type: ${contentType}`; +} + const MULTIPART_CONTENT_TYPE = 'multipart/form-data'; const URL_ENCODED_CONTENT_TYPE = 'application/x-www-form-urlencoded'; diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 1b5f4260b8489..6d76851d82b2e 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1937,6 +1937,26 @@ describe('BrowserWindow module', () => { }); }); + describe('Opening a BrowserWindow from a link', () => { + let appProcess: childProcess.ChildProcessWithoutNullStreams | undefined; + + afterEach(() => { + if (appProcess && !appProcess.killed) { + appProcess.kill(); + appProcess = undefined; + } + }); + + it('can properly open and load a new window from a link', async () => { + const appPath = path.join(__dirname, 'fixtures', 'apps', 'open-new-window-from-link'); + + appProcess = childProcess.spawn(process.execPath, [appPath]); + + const [code] = await emittedOnce(appProcess, 'exit'); + expect(code).to.equal(0); + }); + }); + describe('BrowserWindow.fromWebContents(webContents)', () => { afterEach(closeAllWindows); diff --git a/spec-main/fixtures/apps/open-new-window-from-link/index.html b/spec-main/fixtures/apps/open-new-window-from-link/index.html new file mode 100644 index 0000000000000..b7584564e0010 --- /dev/null +++ b/spec-main/fixtures/apps/open-new-window-from-link/index.html @@ -0,0 +1,11 @@ + + + + + + Hello World! + + + Open New Window + + diff --git a/spec-main/fixtures/apps/open-new-window-from-link/main.js b/spec-main/fixtures/apps/open-new-window-from-link/main.js new file mode 100644 index 0000000000000..7d41b3bb29ee5 --- /dev/null +++ b/spec-main/fixtures/apps/open-new-window-from-link/main.js @@ -0,0 +1,64 @@ +const { app, BrowserWindow } = require('electron'); +const path = require('path'); + +async function createWindow () { + const mainWindow = new BrowserWindow({ + width: 800, + height: 600, + x: 100, + y: 100, + webPreferences: { + preload: path.join(__dirname, 'preload.js'), + contextIsolation: false, + nodeIntegration: true + } + }); + + await mainWindow.loadFile('index.html'); + + const rect = await mainWindow.webContents.executeJavaScript('JSON.parse(JSON.stringify(document.querySelector("a").getBoundingClientRect()))'); + const x = rect.x + rect.width / 2; + const y = rect.y + rect.height / 2; + + function click (x, y, options) { + x = Math.floor(x); + y = Math.floor(y); + mainWindow.webContents.sendInputEvent({ + type: 'mouseDown', + button: 'left', + x, + y, + clickCount: 1, + ...options + }); + + mainWindow.webContents.sendInputEvent({ + type: 'mouseUp', + button: 'left', + x, + y, + clickCount: 1, + ...options + }); + } + + click(x, y, { modifiers: ['shift'] }); +} + +app.whenReady().then(() => { + app.on('web-contents-created', (e, wc) => { + wc.on('render-process-gone', (e, details) => { + console.error(details); + process.exit(1); + }); + + wc.on('did-finish-load', () => { + const title = wc.getTitle(); + if (title === 'Window From Link') { + process.exit(0); + } + }); + }); + + createWindow(); +}); diff --git a/spec-main/fixtures/apps/open-new-window-from-link/new-window-page.html b/spec-main/fixtures/apps/open-new-window-from-link/new-window-page.html new file mode 100644 index 0000000000000..ac919774f3b27 --- /dev/null +++ b/spec-main/fixtures/apps/open-new-window-from-link/new-window-page.html @@ -0,0 +1,11 @@ + + + + + + Window From Link + + + I'm a window opened from a link! + + diff --git a/spec-main/fixtures/apps/open-new-window-from-link/package.json b/spec-main/fixtures/apps/open-new-window-from-link/package.json new file mode 100644 index 0000000000000..ff9319a62ae99 --- /dev/null +++ b/spec-main/fixtures/apps/open-new-window-from-link/package.json @@ -0,0 +1,4 @@ +{ + "name": "electron-test-open-new-window-from-link", + "main": "main.js" +} diff --git a/spec-main/fixtures/apps/open-new-window-from-link/preload.js b/spec-main/fixtures/apps/open-new-window-from-link/preload.js new file mode 100644 index 0000000000000..edb91c4291072 --- /dev/null +++ b/spec-main/fixtures/apps/open-new-window-from-link/preload.js @@ -0,0 +1,3 @@ +window.addEventListener('click', e => { + console.log('click', e); +}); From 4f8a84360603230059ffc4ca5f90b60708cc4869 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 11 May 2022 16:01:56 -0400 Subject: [PATCH 381/811] docs: clarify added/removed events on device APIs (#34177) --- docs/api/session.md | 28 +++++++++++++++++------- docs/fiddles/features/web-hid/main.js | 20 ++++++++++------- docs/fiddles/features/web-serial/main.js | 21 +++++++++++------- docs/tutorial/devices.md | 13 +++++++---- 4 files changed, 54 insertions(+), 28 deletions(-) diff --git a/docs/api/session.md b/docs/api/session.md index 5dc29aba9b6d7..ab2ecdb701de7 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -253,9 +253,11 @@ Returns: * `device` [HIDDevice[]](structures/hid-device.md) * `frame` [WebFrameMain](web-frame-main.md) -Emitted when a new HID device becomes available. For example, when a new USB device is plugged in. - -This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired. +Emitted after `navigator.hid.requestDevice` has been called and +`select-hid-device` has fired if a new device becomes available before +the callback from `select-hid-device` is called. This event is intended for +use when using a UI to ask users to pick a device so that the UI can be updated +with the newly added device. #### Event: 'hid-device-removed' @@ -266,9 +268,11 @@ Returns: * `device` [HIDDevice[]](structures/hid-device.md) * `frame` [WebFrameMain](web-frame-main.md) -Emitted when a HID device has been removed. For example, this event will fire when a USB device is unplugged. - -This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired. +Emitted after `navigator.hid.requestDevice` has been called and +`select-hid-device` has fired if a device has been removed before the callback +from `select-hid-device` is called. This event is intended for use when using +a UI to ask users to pick a device so that the UI can be updated to remove the +specified device. #### Event: 'select-serial-port' @@ -348,7 +352,11 @@ Returns: * `port` [SerialPort](structures/serial-port.md) * `webContents` [WebContents](web-contents.md) -Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a new serial port becomes available. For example, this event will fire when a new USB device is plugged in. +Emitted after `navigator.serial.requestPort` has been called and +`select-serial-port` has fired if a new serial port becomes available before +the callback from `select-serial-port` is called. This event is intended for +use when using a UI to ask users to pick a port so that the UI can be updated +with the newly added port. #### Event: 'serial-port-removed' @@ -358,7 +366,11 @@ Returns: * `port` [SerialPort](structures/serial-port.md) * `webContents` [WebContents](web-contents.md) -Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a serial port has been removed. For example, this event will fire when a USB device is unplugged. +Emitted after `navigator.serial.requestPort` has been called and +`select-serial-port` has fired if a serial port has been removed before the +callback from `select-serial-port` is called. This event is intended for use +when using a UI to ask users to pick a port so that the UI can be updated +to remove the specified port. ### Instance Methods diff --git a/docs/fiddles/features/web-hid/main.js b/docs/fiddles/features/web-hid/main.js index cb61e188a0fd0..3304457db822f 100644 --- a/docs/fiddles/features/web-hid/main.js +++ b/docs/fiddles/features/web-hid/main.js @@ -8,20 +8,24 @@ function createWindow () { }) mainWindow.webContents.session.on('select-hid-device', (event, details, callback) => { + //Add events to handle devices being added or removed before the callback on + //`select-hid-device` is called. + mainWindow.webContents.session.on('hid-device-added', (event, device) => { + console.log('hid-device-added FIRED WITH', device) + //Optionally update details.deviceList + }) + + mainWindow.webContents.session.on('hid-device-removed', (event, device) => { + console.log('hid-device-removed FIRED WITH', device) + //Optionally update details.deviceList + }) + event.preventDefault() if (details.deviceList && details.deviceList.length > 0) { callback(details.deviceList[0].deviceId) } }) - mainWindow.webContents.session.on('hid-device-added', (event, device) => { - console.log('hid-device-added FIRED WITH', device) - }) - - mainWindow.webContents.session.on('hid-device-removed', (event, device) => { - console.log('hid-device-removed FIRED WITH', device) - }) - mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => { if (permission === 'hid' && details.securityOrigin === 'file:///') { return true diff --git a/docs/fiddles/features/web-serial/main.js b/docs/fiddles/features/web-serial/main.js index c6bd996724d2e..37b9f35c27b2f 100644 --- a/docs/fiddles/features/web-serial/main.js +++ b/docs/fiddles/features/web-serial/main.js @@ -8,6 +8,19 @@ function createWindow () { }) mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { + + //Add listeners to handle ports being added or removed before the callback for `select-serial-port` + //is called. + mainWindow.webContents.session.on('serial-port-added', (event, port) => { + console.log('serial-port-added FIRED WITH', port) + //Optionally update portList to add the new port + }) + + mainWindow.webContents.session.on('serial-port-removed', (event, port) => { + console.log('serial-port-removed FIRED WITH', port) + //Optionally update portList to remove the port + }) + event.preventDefault() if (portList && portList.length > 0) { callback(portList[0].portId) @@ -16,14 +29,6 @@ function createWindow () { } }) - mainWindow.webContents.session.on('serial-port-added', (event, port) => { - console.log('serial-port-added FIRED WITH', port) - }) - - mainWindow.webContents.session.on('serial-port-removed', (event, port) => { - console.log('serial-port-removed FIRED WITH', port) - }) - mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => { if (permission === 'serial' && details.securityOrigin === 'file:///') { return true diff --git a/docs/tutorial/devices.md b/docs/tutorial/devices.md index c5a81fc994f90..7ce513caf9a5f 100644 --- a/docs/tutorial/devices.md +++ b/docs/tutorial/devices.md @@ -36,8 +36,10 @@ the WebHID API: can be used to select a HID device when a call to `navigator.hid.requestDevice` is made. Additionally the [`hid-device-added`](../api/session.md#event-hid-device-added) and [`hid-device-removed`](../api/session.md#event-hid-device-removed) events - on the Session can be used to handle devices being plugged in or unplugged during the - `navigator.hid.requestDevice` process. + on the Session can be used to handle devices being plugged in or unplugged + when handling the `select-hid-device` event. + **Note:** These events only fire until the callback from `select-hid-device` + is called. They are not intended to be used as a generic hid device listener. * [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler) can be used to provide default permissioning to devices without first calling for permission to devices via `navigator.hid.requestDevice`. Additionally, @@ -82,8 +84,11 @@ There are several additional APIs for working with the Web Serial API: * The [`serial-port-added`](../api/session.md#event-serial-port-added) and [`serial-port-removed`](../api/session.md#event-serial-port-removed) events - on the Session can be used to handle devices being plugged in or unplugged during the - `navigator.serial.requestPort` process. + on the Session can be used to handle devices being plugged in or unplugged + when handling the `select-serial-port` event. + **Note:** These events only fire until the callback from `select-serial-port` + is called. They are not intended to be used as a generic serial port + listener. * [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler) can be used to provide default permissioning to devices without first calling for permission to devices via `navigator.serial.requestPort`. Additionally, From d67532ee9f836857bc43989fbb8376d1fe769a48 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 11 May 2022 22:41:06 +0200 Subject: [PATCH 382/811] fix: crash when loading extension with missing manifest (#34168) * fix: crash when loading extension missing manifest * Update electron_paks.gni Co-authored-by: Robo Co-authored-by: Robo --- electron_paks.gni | 2 ++ spec-main/extensions-spec.ts | 6 ++++++ spec-main/fixtures/extensions/missing-manifest/main.js | 1 + 3 files changed, 9 insertions(+) create mode 100644 spec-main/fixtures/extensions/missing-manifest/main.js diff --git a/electron_paks.gni b/electron_paks.gni index 73d181d3f018d..ed8e3c45dd996 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -183,6 +183,7 @@ template("electron_paks") { "${root_gen_dir}/components/strings/components_locale_settings_", "${root_gen_dir}/components/strings/components_strings_", "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", + "${root_gen_dir}/extensions/strings/extensions_strings_", "${root_gen_dir}/services/strings/services_strings_", "${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_", "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", @@ -197,6 +198,7 @@ template("electron_paks") { "//components/strings:components_locale_settings", "//components/strings:components_strings", "//device/bluetooth/strings", + "//extensions/strings", "//services/strings", "//third_party/blink/public/strings", "//third_party/blink/public/strings:accessibility_strings", diff --git a/spec-main/extensions-spec.ts b/spec-main/extensions-spec.ts index 5c382d53e03b3..b2dc6d7f96c21 100644 --- a/spec-main/extensions-spec.ts +++ b/spec-main/extensions-spec.ts @@ -110,6 +110,12 @@ describe('chrome extensions', () => { expect(bg).to.equal('red'); }); + it('does not crash when loading an extension with missing manifest', async () => { + const customSession = session.fromPartition(`persist:${uuid.v4()}`); + const promise = customSession.loadExtension(path.join(fixtures, 'extensions', 'missing-manifest')); + await expect(promise).to.eventually.be.rejectedWith(/Manifest file is missing or unreadable/); + }); + it('does not crash when failing to load an extension', async () => { const customSession = session.fromPartition(`persist:${uuid.v4()}`); const promise = customSession.loadExtension(path.join(fixtures, 'extensions', 'load-error')); diff --git a/spec-main/fixtures/extensions/missing-manifest/main.js b/spec-main/fixtures/extensions/missing-manifest/main.js new file mode 100644 index 0000000000000..d1e760d7b9d07 --- /dev/null +++ b/spec-main/fixtures/extensions/missing-manifest/main.js @@ -0,0 +1 @@ +console.log('oh no where is my manifest'); From ba3aca8200aaaa40c9641171b7c867d1aea065e7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 12 May 2022 00:41:58 -0700 Subject: [PATCH 383/811] test: fix background transparency flake (#34190) --- spec-main/api-browser-window-spec.ts | 6 ++++-- .../fixtures/apps/background-color-transparent/main.js | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 6d76851d82b2e..b938b483b8c5e 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1828,7 +1828,7 @@ describe('BrowserWindow module', () => { }); ifdescribe(process.platform === 'darwin')('BrowserWindow.setVibrancy(type)', () => { - let appProcess: childProcess.ChildProcessWithoutNullStreams | undefined; + let appProcess: childProcess.ChildProcessWithoutNullStreams | childProcess.ChildProcess | undefined; afterEach(() => { if (appProcess && !appProcess.killed) { @@ -1859,7 +1859,9 @@ describe('BrowserWindow module', () => { it('Allows setting a transparent window via CSS', async () => { const appPath = path.join(__dirname, 'fixtures', 'apps', 'background-color-transparent'); - appProcess = childProcess.spawn(process.execPath, [appPath]); + appProcess = childProcess.spawn(process.execPath, [appPath], { + stdio: 'inherit' + }); const [code] = await emittedOnce(appProcess, 'exit'); expect(code).to.equal(0); diff --git a/spec-main/fixtures/apps/background-color-transparent/main.js b/spec-main/fixtures/apps/background-color-transparent/main.js index 8d1da05c6c1db..3086db0dc6b97 100644 --- a/spec-main/fixtures/apps/background-color-transparent/main.js +++ b/spec-main/fixtures/apps/background-color-transparent/main.js @@ -21,6 +21,7 @@ async function createWindow () { transparent: true, vibrancy: 'under-window', webPreferences: { + backgroundThrottling: false, contextIsolation: false, nodeIntegration: true } @@ -43,6 +44,7 @@ ipcMain.on('set-transparent', async () => { colors.transparent = result[0].hex(); const { green, transparent } = colors; + console.log({ green, transparent }); process.exit(green === transparent ? 1 : 0); }); From ff5f66395ec82b812a5a25711a09563f4be4b406 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Thu, 12 May 2022 04:18:42 -0400 Subject: [PATCH 384/811] chore: upgrade extract-zip for installer (#34166) --- npm/install.js | 13 ++----------- npm/package.json | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/npm/install.js b/npm/install.js index 932bfa6c150c3..069701adee67a 100755 --- a/npm/install.js +++ b/npm/install.js @@ -70,17 +70,8 @@ function isInstalled () { // unzips and makes path.txt point at the correct executable function extractFile (zipPath) { - return new Promise((resolve, reject) => { - extract(zipPath, { dir: path.join(__dirname, 'dist') }, err => { - if (err) return reject(err); - - fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, err => { - if (err) return reject(err); - - resolve(); - }); - }); - }); + return extract(zipPath, { dir: path.join(__dirname, 'dist') }) + .then(() => fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath)); } function getPlatformPath () { diff --git a/npm/package.json b/npm/package.json index 6a5df9ee0b824..3926e40a17fcc 100644 --- a/npm/package.json +++ b/npm/package.json @@ -10,9 +10,9 @@ "dependencies": { "@electron/get": "^1.14.1", "@types/node": "^16.11.26", - "extract-zip": "^1.0.3" + "extract-zip": "^2.0.1" }, "engines": { - "node": ">= 8.6" + "node": ">= 10.17.0" } } From 142e1f667bff0ae755406876295205708a4cd887 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 06:02:20 -0700 Subject: [PATCH 385/811] Bump v20.0.0-nightly.20220512 --- 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 d493702e49f5e..9f4746656d966 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220511 \ No newline at end of file +20.0.0-nightly.20220512 \ No newline at end of file diff --git a/package.json b/package.json index e79c315e5aabc..7a18be70b374b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220511", + "version": "20.0.0-nightly.20220512", "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 91f7d5fe92db3..69536776773cd 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 20,0,0,20220511 - PRODUCTVERSION 20,0,0,20220511 + FILEVERSION 20,0,0,20220512 + PRODUCTVERSION 20,0,0,20220512 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a8103691ac33b6a71e127532cdea26d2de12d708 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 12 May 2022 16:14:11 +0200 Subject: [PATCH 386/811] fix: tray icon not highlighting on empty menu (#34173) --- shell/browser/ui/tray_icon_cocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/browser/ui/tray_icon_cocoa.mm b/shell/browser/ui/tray_icon_cocoa.mm index 0a37e4fea727e..789a993adb9f5 100644 --- a/shell/browser/ui/tray_icon_cocoa.mm +++ b/shell/browser/ui/tray_icon_cocoa.mm @@ -190,9 +190,9 @@ - (void)mouseDown:(NSEvent*)event { gfx::ScreenPointFromNSPoint([event locationInWindow]), ui::EventFlagsFromModifiers([event modifierFlags])); - // Pass click to superclass to show menu. Custom mouseUp handler won't be - // invoked. - if (menuController_) { + // Pass click to superclass to show menu if one exists and has a non-zero + // number of items. Custom mouseUp handler won't be invoked in this case. + if (menuController_ && [[menuController_ menu] numberOfItems] > 0) { [self handleClickNotifications:event]; [super mouseDown:event]; } else { From 8b5613efcbd322ea19407f8655b4691b09c3b2b4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 13 May 2022 02:20:45 +0200 Subject: [PATCH 387/811] fix: fetching PDF element from `WebLocalFrame` (#34176) fix: fetching PDF element from WebLocalFrame --- .../print_render_frame_helper_delegate.cc | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc b/shell/renderer/printing/print_render_frame_helper_delegate.cc index 8eb83a3be249a..ab952cd6e009d 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.cc +++ b/shell/renderer/printing/print_render_frame_helper_delegate.cc @@ -10,6 +10,7 @@ #include "third_party/blink/public/web/web_local_frame.h" #if BUILDFLAG(ENABLE_EXTENSIONS) +#include "chrome/common/pdf_util.h" #include "extensions/common/constants.h" #include "extensions/renderer/guest_view/mime_handler_view/post_message_support.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -24,22 +25,11 @@ PrintRenderFrameHelperDelegate::~PrintRenderFrameHelperDelegate() = default; blink::WebElement PrintRenderFrameHelperDelegate::GetPdfElement( blink::WebLocalFrame* frame) { #if BUILDFLAG(ENABLE_EXTENSIONS) - GURL url = frame->GetDocument().Url(); - bool inside_pdf_extension = - url.SchemeIs(extensions::kExtensionScheme) && - url.host_piece() == extension_misc::kPdfExtensionId; - if (inside_pdf_extension) { - // with id="plugin" is created in - // chrome/browser/resources/pdf/pdf_viewer_base.js. - auto viewer_element = frame->GetDocument().GetElementById("viewer"); - if (!viewer_element.IsNull() && !viewer_element.ShadowRoot().IsNull()) { - auto plugin_element = - viewer_element.ShadowRoot().QuerySelector("#plugin"); - if (!plugin_element.IsNull()) { - return plugin_element; - } - } - NOTREACHED(); + if (frame->Parent() && + IsPdfInternalPluginAllowedOrigin(frame->Parent()->GetSecurityOrigin())) { + auto plugin_element = frame->GetDocument().QuerySelector("embed"); + DCHECK(!plugin_element.IsNull()); + return plugin_element; } #endif // BUILDFLAG(ENABLE_EXTENSIONS) return blink::WebElement(); From b06737fdaccdbb43e90a4547d0d578d9d158509e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 13 May 2022 06:01:28 -0700 Subject: [PATCH 388/811] Bump v20.0.0-nightly.20220513 --- 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 9f4746656d966..ed3214e989ac1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220512 \ No newline at end of file +20.0.0-nightly.20220513 \ No newline at end of file diff --git a/package.json b/package.json index 7a18be70b374b..2b516b363066f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220512", + "version": "20.0.0-nightly.20220513", "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 69536776773cd..dae3ae1f2f42b 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 20,0,0,20220512 - PRODUCTVERSION 20,0,0,20220512 + FILEVERSION 20,0,0,20220513 + PRODUCTVERSION 20,0,0,20220513 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cc411946d72f69e3d6991f5a4a35bf8416b2ad66 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 16 May 2022 06:02:41 -0700 Subject: [PATCH 389/811] Bump v20.0.0-nightly.20220516 --- 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 ed3214e989ac1..b59af459922b5 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220513 \ No newline at end of file +20.0.0-nightly.20220516 \ No newline at end of file diff --git a/package.json b/package.json index 2b516b363066f..51ce8ed89fc86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220513", + "version": "20.0.0-nightly.20220516", "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 dae3ae1f2f42b..4d2bd5a0da1e7 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 20,0,0,20220513 - PRODUCTVERSION 20,0,0,20220513 + FILEVERSION 20,0,0,20220516 + PRODUCTVERSION 20,0,0,20220516 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7af0b58c9871f6e3690f8228cdf51b4235d1596d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 16 May 2022 18:14:27 +0200 Subject: [PATCH 390/811] test: add `setTitlebarOverlay` spec (#34221) spec: add setTitlebarOverlay spec --- spec-main/api-browser-window-spec.ts | 67 ++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index b938b483b8c5e..adbfd107c5e9a 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2245,9 +2245,15 @@ describe('BrowserWindow module', () => { const overlayEnabled = await w.webContents.executeJavaScript('navigator.windowControlsOverlay.visible'); expect(overlayEnabled).to.be.true('overlayEnabled'); const overlayRectPreMax = await w.webContents.executeJavaScript('getJSOverlayProperties()'); - await w.maximize(); - const max = await w.isMaximized(); - expect(max).to.equal(true); + + if (!w.isMaximized()) { + const maximize = emittedOnce(w, 'maximize'); + w.show(); + w.maximize(); + await maximize; + } + + expect(w.isMaximized()).to.be.true('not maximized'); const overlayRectPostMax = await w.webContents.executeJavaScript('getJSOverlayProperties()'); expect(overlayRectPreMax.y).to.equal(0); @@ -2269,6 +2275,61 @@ describe('BrowserWindow module', () => { }); }); + ifdescribe(process.platform === 'win32')('BrowserWindow.setTitlebarOverlay', () => { + afterEach(closeAllWindows); + afterEach(() => { ipcMain.removeAllListeners('geometrychange'); }); + + it('correctly updates the height of the overlay', async () => { + const testOverlay = async (w: BrowserWindow, size: Number) => { + const overlayHTML = path.join(__dirname, 'fixtures', 'pages', 'overlay.html'); + w.loadFile(overlayHTML); + await emittedOnce(ipcMain, 'geometrychange'); + + const overlayEnabled = await w.webContents.executeJavaScript('navigator.windowControlsOverlay.visible'); + expect(overlayEnabled).to.be.true('overlayEnabled'); + const { height: preMaxHeight } = await w.webContents.executeJavaScript('getJSOverlayProperties()'); + + if (!w.isMaximized()) { + const maximize = emittedOnce(w, 'maximize'); + w.show(); + w.maximize(); + await maximize; + } + + expect(w.isMaximized()).to.be.true('not maximized'); + const { x, y, width, height } = await w.webContents.executeJavaScript('getJSOverlayProperties()'); + expect(x).to.equal(0); + expect(y).to.equal(0); + expect(width).to.be.greaterThan(0); + expect(height).to.equal(size); + expect(preMaxHeight).to.equal(size); + }; + + const INITIAL_SIZE = 40; + const w = new BrowserWindow({ + show: false, + width: 400, + height: 400, + titleBarStyle: 'hidden', + webPreferences: { + nodeIntegration: true, + contextIsolation: false + }, + titleBarOverlay: { + height: INITIAL_SIZE + } + }); + + await testOverlay(w, INITIAL_SIZE); + + w.setTitleBarOverlay({ + height: INITIAL_SIZE + 10 + }); + + await testOverlay(w, INITIAL_SIZE + 10); + }); + }); + ifdescribe(process.platform === 'darwin')('"enableLargerThanScreen" option', () => { afterEach(closeAllWindows); it('can move the window out of screen', () => { From 4aba68a59d11da6f45a9333511f4efd92b0e08ef Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 16 May 2022 22:18:01 +0200 Subject: [PATCH 391/811] docs: add missing explanation for [angle|dawn]_enable_vulkan_validation_layers = false (#34216) --- build/args/all.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/args/all.gn b/build/args/all.gn index b0400b0951ee8..f1de439d833fc 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -21,6 +21,9 @@ proprietary_codecs = true ffmpeg_branding = "Chrome" enable_basic_printing = true + +# Removes DLLs from the build, which are only meant to be used for Chromium development. +# See https://github.com/electron/electron/pull/17985 angle_enable_vulkan_validation_layers = false dawn_enable_vulkan_validation_layers = false From 125c324a497767e6f892928aac8cd002d706504d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 06:03:06 -0700 Subject: [PATCH 392/811] Bump v20.0.0-nightly.20220517 --- 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 b59af459922b5..29b78854c172d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220516 \ No newline at end of file +20.0.0-nightly.20220517 \ No newline at end of file diff --git a/package.json b/package.json index 51ce8ed89fc86..b5bd7c8e0bf1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220516", + "version": "20.0.0-nightly.20220517", "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 4d2bd5a0da1e7..de054d840ebb6 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 20,0,0,20220516 - PRODUCTVERSION 20,0,0,20220516 + FILEVERSION 20,0,0,20220517 + PRODUCTVERSION 20,0,0,20220517 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ccde8994b53d9ef0b2136452746f14348d86e00f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 08:12:04 -0700 Subject: [PATCH 393/811] Revert "Bump v20.0.0-nightly.20220517" This reverts commit 125c324a497767e6f892928aac8cd002d706504d. --- 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 29b78854c172d..b59af459922b5 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220517 \ No newline at end of file +20.0.0-nightly.20220516 \ No newline at end of file diff --git a/package.json b/package.json index b5bd7c8e0bf1d..51ce8ed89fc86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220517", + "version": "20.0.0-nightly.20220516", "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 de054d840ebb6..4d2bd5a0da1e7 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 20,0,0,20220517 - PRODUCTVERSION 20,0,0,20220517 + FILEVERSION 20,0,0,20220516 + PRODUCTVERSION 20,0,0,20220516 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4e3587c7c6e051193c6bbe346192ff08d2b594c1 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 08:15:20 -0700 Subject: [PATCH 394/811] Bump v20.0.0-nightly.20220517 --- 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 b59af459922b5..29b78854c172d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220516 \ No newline at end of file +20.0.0-nightly.20220517 \ No newline at end of file diff --git a/package.json b/package.json index 51ce8ed89fc86..b5bd7c8e0bf1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220516", + "version": "20.0.0-nightly.20220517", "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 4d2bd5a0da1e7..de054d840ebb6 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 20,0,0,20220516 - PRODUCTVERSION 20,0,0,20220516 + FILEVERSION 20,0,0,20220517 + PRODUCTVERSION 20,0,0,20220517 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 97c9451efc3035a1072b1ff87aee125f7a9fa053 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 17 May 2022 17:50:27 +0200 Subject: [PATCH 395/811] fix: WCO crash on bad `titlebarStyle` (#34140) fix: WCO crash on bad titlebarStyle --- shell/browser/ui/views/win_frame_view.cc | 4 ++-- spec-main/api-browser-window-spec.ts | 27 ++++++++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 8a25bcdd73e8e..cea0b2937c92a 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -55,8 +55,8 @@ SkColor WinFrameView::GetReadableFeatureColor(SkColor background_color) { } void WinFrameView::InvalidateCaptionButtons() { - // Ensure that the caption buttons container exists - DCHECK(caption_button_container_); + if (!caption_button_container_) + return; caption_button_container_->InvalidateLayout(); caption_button_container_->SchedulePaint(); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index adbfd107c5e9a..4d348bb924c47 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2,10 +2,8 @@ import { expect } from 'chai'; import * as childProcess from 'child_process'; import * as path from 'path'; import * as fs from 'fs'; -import * as os from 'os'; import * as qs from 'querystring'; import * as http from 'http'; -import * as semver from 'semver'; import { AddressInfo } from 'net'; import { app, BrowserWindow, BrowserView, dialog, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, session, WebContents, BrowserWindowConstructorOptions } from 'electron/main'; @@ -2150,7 +2148,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform === 'win32' || (process.platform === 'darwin' && semver.gte(os.release(), '14.0.0')))('"titleBarStyle" option', () => { + ifdescribe(['win32', 'darwin'].includes(process.platform))('"titleBarStyle" option', () => { const testWindowsOverlay = async (style: any) => { const w = new BrowserWindow({ show: false, @@ -2219,7 +2217,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform === 'win32' || (process.platform === 'darwin' && semver.gte(os.release(), '14.0.0')))('"titleBarOverlay" option', () => { + ifdescribe(['win32', 'darwin'].includes(process.platform))('"titleBarOverlay" option', () => { const testWindowsOverlayHeight = async (size: any) => { const w = new BrowserWindow({ show: false, @@ -2279,6 +2277,27 @@ describe('BrowserWindow module', () => { afterEach(closeAllWindows); afterEach(() => { ipcMain.removeAllListeners('geometrychange'); }); + it('does not crash when an invalid titleBarStyle was initially set', () => { + const win = new BrowserWindow({ + show: false, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + }, + titleBarOverlay: { + color: '#0000f0', + symbolColor: '#ffffff' + }, + titleBarStyle: 'hiddenInset' + }); + + expect(() => { + win.setTitleBarOverlay({ + color: '#000000' + }); + }).to.not.throw(); + }); + it('correctly updates the height of the overlay', async () => { const testOverlay = async (w: BrowserWindow, size: Number) => { const overlayHTML = path.join(__dirname, 'fixtures', 'pages', 'overlay.html'); From 04b33b319b7fca9fbf415d67953643f9b29e2160 Mon Sep 17 00:00:00 2001 From: mkiki01 <56228074+mkiki01@users.noreply.github.com> Date: Tue, 17 May 2022 11:59:24 -0400 Subject: [PATCH 396/811] docs: added units to .print() pageSize option (#34088) --- docs/api/webview-tag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index c2eab361cfd94..865b101168ad6 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -556,7 +556,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`. * `header` string (optional) - string to be printed as page header. * `footer` string (optional) - string to be printed as page footer. * `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`, - `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`. + `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns. Returns `Promise` From 61374019c03ab1af8584550277318ba7c2adb0ca Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 12:48:40 -0400 Subject: [PATCH 397/811] chore: bump chromium to 103.0.5046.0 (main) (#33906) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: bump chromium in DEPS to 103.0.5020.0 * chore: bump chromium in DEPS to 103.0.5022.0 * chore: bump chromium in DEPS to 103.0.5024.0 * chore: update patches * 3587410: [Printing] Remove JobEventDetails Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3587410 * chore: bump chromium in DEPS to 103.0.5026.0 * chore: update patches * 3577218: WebUI: Delete webui_resources.grd and related GN targets. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3577218 * chore: bump chromium in DEPS to 103.0.5028.0 * chore: update patches * 3579297: Convert UpdatePrintSettings() to use non-deprecated base::Value APIs. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3579297 * 3560622: serial: Add SerialPort.forget() method Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3560622 * 3581708: Restore original display when moving from tab-fullscreen to browser-fullscreen. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3581708 * chore: fix authorization flags lint error * 3583363: Remove net wrappers around base/strings/escape.h Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3583363 * fixup! 3560622: serial: Add SerialPort.forget() method Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3560622 * 3587589: Reland "Propagate the MIME type from DownloadTargetDeterminer to DownloadItem" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3587589 * 3584006: Remove IsRenderViewLive from content public Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3584006 * 3596174: [api] Remove APIs for resurrecting finalizers Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3596174 * 3368244: Hook SnapshotForContentAnalysis renderer API to scan system prints Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3368244 * chore: bump chromium in DEPS to 103.0.5030.0 * chore: update patches * chore: bump chromium in DEPS to 103.0.5032.0 * chore: bump chromium in DEPS to 103.0.5034.0 * chore: bump chromium in DEPS to 103.0.5036.0 * chore: update patches * 3586363: Introduce PrintRenderFrame.PrintWithParams() for batch printing to PDF Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3586363 * 3593199: Remove content::PermissionType references and replace them with blink::PermissionType Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3593199 * 3368244: Hook SnapshotForContentAnalysis renderer API to scan system prints Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3368244 * chore: lint * chore: bump chromium in DEPS to 103.0.5038.0 * chore: update patches * fixup! 3560622: serial: Add SerialPort.forget() method * 3606495: mac screen capture: add metric Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3606495 * chore: bump chromium in DEPS to 103.0.5040.0 * chore: update patches * 3590840: Add IPs to DnsOverHttpsServerConfig https://chromium-review.googlesource.com/c/chromium/src/+/3590840 * stub functions for ElectronSerialDelegate and SerialChooserController to fix link * 3566412: [base] Remove base/android dependency on post_task.h and officially remove post_task.h! Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3566412 * 3347944: [content] No longer hand-off whole MainFunctionParams to BrowserMainParts Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3347944 * fixup! 3566412: [base] Remove base/android dependency on post_task.h and off… e3ea3e1 …icially remove post_task.h! * chore: update process_singleton patches for content::GetIOThreadTaskRunner({}) Ref: 2015655: [BrowserThread] Migrate co/pub/br and co/br/scheduler to the new API | https://chromium-review.googlesource.com/c/chromium/src/+/2015655 * chore: migrate base::DeleteSoon to content::GetUIThreadTaskRunner({})->DeleteSoon Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3566412 * chore: remove duplicate functions for RevokePortPermissionWebInitiated & GetPortInfo * chore: migrate Linux/Windows methods off of post_task.h Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3566412 * 64908: Stop building legacy SwiftShader GL in Chromium https://swiftshader-review.googlesource.com/c/SwiftShader/+/64908 * 3573245: Added Themed versions of RoundedRectBackground and RoundedRectBorder. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3573245 * chore: bump chromium in DEPS to 103.0.5042.0 * chore: update patches * 3571804: [api] Advance API deprecation for V8 version v10.2 https://chromium-review.googlesource.com/c/v8/v8/+/3571804 * fixup! 3571804: [api] Advance API deprecation for V8 version v10.2 * build: fix run-clang-format extension matching * lint * fix windows build * how is clang-format still not working for me * chore: update patches * 3623985: Replace ad-hoc SetPublicFirstPartySets calls with method in ContentBrowserClient. https://chromium-review.googlesource.com/c/chromium/src/+/3623985 * no need to implement WillProvidePublicFirstPartySets; the default is false * 3601036: [QT] Introduce ui/views/linux_ui/linux_ui_factory.* https://chromium-review.googlesource.com/c/chromium/src/+/3601036 * 3583363: Remove net wrappers around base/strings/escape.h https://chromium-review.googlesource.com/c/chromium/src/+/3583363 * lint * chore: bump chromium in DEPS to 103.0.5044.0 * fix conflicts * chore: update patches * upgrade nan * pin version of nan in tests * replace my hacky deprecated override fix with the fix from upstream * revert runtime dcheck in v8 * pin nan version at root too * refactor: tell gyp to use c++17 when building with our node * Revert "refactor: tell gyp to use c++17 when building with our node" This reverts commit 41a03a5799a8f40f31555d73d20ea865acfcd192. * Undo the reversion of 41a03a5799a8f40f31555d73d20ea865acfcd192. This reverts commit 54440abc598153bd7e259be4a908f0ecc0b33348. * disable sequential/test-cpu-prof-kill for now * also sequential/test-diagnostic-dir-cpu-prof Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: VerteDinde Co-authored-by: Jeremy Rose Co-authored-by: John Kleinschmidt Co-authored-by: Jeremy Rose Co-authored-by: Charles Kerr --- BUILD.gn | 2 +- DEPS | 7 +- chromium_src/BUILD.gn | 2 + electron_paks.gni | 1 - package.json | 5 +- patches/chromium/.patches | 1 + patches/chromium/accelerator.patch | 2 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 18 +- ...pedcliboardwriter_writeunsaferawdata.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 28 +- ..._windows_to_have_different_web_prefs.patch | 24 +- ...leges_in_unsandboxed_child_processes.patch | 4 +- patches/chromium/blink_local_frame.patch | 12 +- ..._node_processes_as_browser_processes.patch | 8 +- .../build_add_electron_tracing_category.patch | 2 +- ...build_disable_print_content_analysis.patch | 28 ++ ..._depend_on_packed_resource_integrity.patch | 35 ++- .../build_libc_as_static_library.patch | 2 +- patches/chromium/can_create_window.patch | 34 +-- ...screationoverridden_with_full_params.patch | 20 +- patches/chromium/chrome_key_systems.patch | 2 +- ...allow_disabling_compression_on_linux.patch | 14 +- .../crash_allow_setting_more_options.patch | 4 +- patches/chromium/dcheck.patch | 4 +- .../disable_color_correct_rendering.patch | 12 +- .../disable_compositor_recycling.patch | 14 +- patches/chromium/disable_hidden.patch | 10 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 4 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- ...locator_for_usage_outside_of_the_gin.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 12 +- .../extend_apply_webpreferences.patch | 6 +- ...ransfer_to_requestsingleinstancelock.patch | 29 ++- .../feat_add_onclose_to_messageport.patch | 6 +- ...screen_rendering_with_viz_compositor.patch | 10 +- ..._raw_response_headers_from_urlloader.patch | 30 +-- .../chromium/fix_export_zlib_symbols.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 32 ++- ...out_profile_refs_in_accessibility_ui.patch | 4 +- ..._properly_honor_printing_page_ranges.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 2 +- ...gpu_notify_when_dxdiag_request_fails.patch | 12 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- .../chromium/make_gtk_getlibgtk_public.patch | 6 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- ...as_avoid_usage_of_private_macos_apis.patch | 6 +- .../mas_disable_custom_window_frame.patch | 8 +- .../mas_disable_remote_accessibility.patch | 42 +-- .../chromium/mas_disable_remote_layer.patch | 4 +- patches/chromium/mas_no_private_api.patch | 2 +- ...emote_certificate_verification_logic.patch | 24 +- .../chromium/notification_provenance.patch | 12 +- patches/chromium/picture-in-picture.patch | 8 +- ...utofill_colors_to_the_color_pipeline.patch | 12 +- patches/chromium/printing.patch | 241 ++++++++---------- patches/chromium/process_singleton.patch | 32 +-- patches/chromium/proxy_config_monitor.patch | 8 +- ...r_changes_to_the_webcontentsobserver.patch | 12 +- ...store_base_adaptcallbackforrepeating.patch | 4 +- .../render_widget_host_view_mac.patch | 14 +- patches/chromium/resource_file_conflict.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- ...andboxed_ppapi_processes_skip_zygote.patch | 6 +- 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 | 12 +- patches/nan/.patches | 2 +- ...use_new_constructor_for_scriptorigin.patch | 42 --- ...nstructor_for_scriptorigin_when_17_x.patch | 29 +++ patches/node/.patches | 1 + .../src_update_importmoduledynamically.patch | 56 ++++ patches/v8/.patches | 1 + patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 20 +- ...export_private_v8_symbols_on_windows.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...dcheck_for_node_stream_array_buffers.patch | 2 +- ..._terminating_exception_in_microtasks.patch | 61 +++++ script/lib/config.py | 2 - script/nan-spec-runner.js | 2 +- script/node-disabled-tests.json | 2 + script/spec-runner.js | 5 + .../zip_manifests/dist_zip.linux.arm.manifest | 2 - .../dist_zip.linux.arm64.manifest | 2 - .../zip_manifests/dist_zip.linux.x64.manifest | 2 - .../zip_manifests/dist_zip.linux.x86.manifest | 2 - .../zip_manifests/dist_zip.win.arm64.manifest | 2 - .../zip_manifests/dist_zip.win.ia32.manifest | 2 - .../zip_manifests/dist_zip.win.x64.manifest | 2 - shell/app/electron_main_delegate.cc | 2 + shell/browser/api/electron_api_app.cc | 10 +- shell/browser/api/electron_api_base_window.h | 5 +- shell/browser/api/electron_api_menu_mac.mm | 1 - .../browser/api/electron_api_native_theme.cc | 5 +- .../api/electron_api_power_save_blocker.cc | 1 - shell/browser/api/electron_api_session.cc | 7 +- .../browser/api/electron_api_web_contents.cc | 9 +- shell/browser/api/electron_api_web_contents.h | 11 +- shell/browser/certificate_manager_model.cc | 9 +- shell/browser/electron_browser_client.cc | 20 +- shell/browser/electron_browser_client.h | 2 +- shell/browser/electron_browser_context.cc | 5 +- shell/browser/electron_browser_main_parts.cc | 25 +- shell/browser/electron_browser_main_parts.h | 3 +- .../electron_browser_main_parts_posix.cc | 1 - .../electron_download_manager_delegate.cc | 13 +- shell/browser/electron_permission_manager.cc | 50 ++-- shell/browser/electron_permission_manager.h | 39 ++- .../electron_management_api_delegate.cc | 1 - .../electron_extension_message_filter.cc | 3 +- .../extensions/electron_extension_system.cc | 12 +- .../electron_extensions_browser_client.cc | 5 +- shell/browser/mac/in_app_purchase.mm | 5 +- shell/browser/mac/in_app_purchase_observer.mm | 5 +- shell/browser/mac/in_app_purchase_product.mm | 5 +- shell/browser/native_window_mac.mm | 9 +- shell/browser/net/asar/asar_url_loader.cc | 1 - .../win/windows_toast_notification.cc | 13 +- .../osr/osr_render_widget_host_view.cc | 9 +- .../printing/print_preview_message_handler.cc | 5 +- .../serial/electron_serial_delegate.cc | 13 + .../browser/serial/electron_serial_delegate.h | 6 + .../browser/serial/serial_chooser_context.cc | 22 ++ shell/browser/serial/serial_chooser_context.h | 18 ++ .../serial/serial_chooser_controller.cc | 4 + .../serial/serial_chooser_controller.h | 3 +- .../browser/ui/cocoa/electron_bundle_mover.mm | 7 +- .../ui/cocoa/electron_menu_controller.mm | 7 +- shell/browser/ui/devtools_manager_delegate.cc | 4 +- shell/browser/ui/file_dialog_mac.mm | 5 +- shell/browser/ui/gtk/app_indicator_icon.cc | 1 - shell/browser/ui/inspectable_web_contents.cc | 1 - shell/browser/ui/message_box_mac.mm | 5 +- shell/browser/ui/message_box_win.cc | 1 - shell/browser/ui/tray_icon_cocoa.mm | 5 +- .../ui/views/electron_views_delegate_win.cc | 1 - shell/browser/ui/views/menu_bar.cc | 3 +- shell/browser/ui/views/menu_delegate.cc | 5 +- shell/browser/ui/webui/accessibility_ui.cc | 4 +- shell/browser/ui/win/dialog_thread.h | 6 +- .../browser/web_contents_permission_helper.cc | 37 ++- .../browser/web_contents_permission_helper.h | 12 +- shell/browser/web_contents_zoom_controller.cc | 2 +- shell/common/asar/archive.cc | 1 - .../gin_converters/content_converter.cc | 60 ++--- .../common/gin_converters/content_converter.h | 6 +- shell/common/gin_helper/callback.cc | 2 +- shell/common/gin_helper/locker.cc | 6 + shell/common/gin_helper/locker.h | 6 +- shell/common/gin_helper/promise.cc | 4 +- shell/common/gin_helper/promise.h | 9 +- shell/common/platform_util_win.cc | 5 +- shell/common/v8_value_converter.cc | 14 +- .../api/electron_api_context_bridge.cc | 23 +- .../renderer/api/electron_api_ipc_renderer.cc | 1 - shell/renderer/api/electron_api_web_frame.cc | 10 +- shell/renderer/renderer_client_base.cc | 6 +- spec/package.json | 3 + spec/yarn.lock | 7 +- 168 files changed, 1009 insertions(+), 873 deletions(-) create mode 100644 patches/chromium/build_disable_print_content_analysis.patch delete mode 100644 patches/nan/use_new_constructor_for_scriptorigin.patch create mode 100644 patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch create mode 100644 patches/node/src_update_importmoduledynamically.patch create mode 100644 patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch diff --git a/BUILD.gn b/BUILD.gn index 60ab4cac8106c..107f317be548f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -561,8 +561,8 @@ source_set("electron_lib") { "//ui/base/ime/linux", "//ui/events/devices/x11", "//ui/events/platform/x11", - "//ui/gtk", "//ui/views/controls/webview", + "//ui/views/linux_ui:linux_ui_factory", "//ui/wm", ] if (ozone_platform_x11) { diff --git a/DEPS b/DEPS index 32458aa34c76b..8d2532547f4fd 100644 --- a/DEPS +++ b/DEPS @@ -2,14 +2,11 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '102.0.4999.0', + '103.0.5044.0', 'node_version': 'v16.15.0', '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 - # available. - '65b32af46e9d7fab2e4ff657751205b3865f4920', + '16fa32231e2ccd89d2804b3f765319128b20c4ac', 'squirrel.mac_version': '0e5d146ba13101a1302d59ea6e6e0b3cace4ae38', diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index fc0f33ed2e17a..41aad0ed3b942 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -89,6 +89,8 @@ static_library("chrome") { "//chrome/browser/icon_loader_mac.mm", "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h", "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm", + "//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h", + "//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm", "//chrome/browser/media/webrtc/window_icon_util_mac.mm", "//chrome/browser/process_singleton_mac.mm", "//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h", diff --git a/electron_paks.gni b/electron_paks.gni index ed8e3c45dd996..2c5ae0b0c8c10 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -67,7 +67,6 @@ template("electron_extra_paks") { "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak", - "$root_gen_dir/ui/resources/webui_resources.pak", "$target_gen_dir/electron_resources.pak", ] deps = [ diff --git a/package.json b/package.json index b5bd7c8e0bf1d..4e2b0088f4820 100644 --- a/package.json +++ b/package.json @@ -141,5 +141,8 @@ "DEPS": [ "node script/gen-hunspell-filenames.js" ] + }, + "resolutions": { + "nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac" } -} \ No newline at end of file +} diff --git a/patches/chromium/.patches b/patches/chromium/.patches index ff7ade0c3c84f..f4512709cbcc5 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -108,3 +108,4 @@ fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch build_make_libcxx_abi_unstable_false_for_electron.patch introduce_ozoneplatform_electron_can_call_x11_property.patch make_gtk_getlibgtk_public.patch +build_disable_print_content_analysis.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 04f4464c2dbbf..58c927f03d6bb 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 2468b2c5881821d6f8e24a0e7c42243427b384ad..7e44c97edabf5ae012ff4f84d1404d8f223a13fe 100644 +index 783202623cc15168c726180fe232751551c43798..7cf5449a61a31bebbaffd920129daf1866211d7c 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 2440aa84adfbf..9176b7a52a1ad 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 660c5f35c6095b23cc483c8eb1c119c215dc681d..961c0d7f7a9fe5f9e130998aeb0c872c571b710e 100644 +index e0ff6fae1e96699e7cb54c9e82a3c68a8e95602b..2179a906bb6c93fbfaa8e7b7e64fddfaab034e94 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -240,6 +240,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -241,6 +241,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 660c5f35c6095b23cc483c8eb1c119c215dc681d..961c0d7f7a9fe5f9e130998aeb0c872c // 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 -@@ -346,7 +350,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -347,7 +351,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 0be836b9cb0d2..52a2c7249d7d4 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 596dc721842c707844a771d64337e9cf0d82bfcc..b9eea3470139e1833b2b23d3b535b11235e2bc8e 100644 +index abcd95ad39d8d66e1a7149e89bc6bfe2a8197d19..1b021461f214287c94fb22b17d980c19e3f07dde 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4465,6 +4465,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4489,6 +4489,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -79,10 +79,10 @@ index a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b09415 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 bca4cbb2b2ba84fe58b5cfeaf190add5803e27c9..b6c9dd3a2a1c9b6667c563d5da86ccb4871ae81f 100644 +index 810726792cba326f66df5a8d0d833eaee4975594..635fb45b0a9d1716bd45d8b6c5dbc5f9fbf0ffa8 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,10 +92,10 @@ index bca4cbb2b2ba84fe58b5cfeaf190add5803e27c9..b6c9dd3a2a1c9b6667c563d5da86ccb4 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 b690ada2d46146b6da38cbb2c688f249ae558464..b03774140883c5bb7de6358f3df95ab8774b9dc7 100644 +index 772748673a5854349ba2be28abe21b7ff3f8541f..b3ebd622a61187f718ca16ac8cfeb189d35584d2 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 -@@ -275,6 +275,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( +@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( web_frame_->Client()->DidCreateScriptContext(context, world_id); } @@ -110,7 +110,7 @@ index b690ada2d46146b6da38cbb2c688f249ae558464..b03774140883c5bb7de6358f3df95ab8 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 420d82ed07017deba3298c5454666c09240dd23d..15407fb95dcf25875eb76a41fe1834c1f0a53528 100644 +index 200f0c57df1f15428b45a228adfee8fd5465ecbf..ec8cad0a94b31561096fdaba1a75fb54c96d3f7e 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 @@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 420d82ed07017deba3298c5454666c09240dd23d..15407fb95dcf25875eb76a41fe1834c1 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 8087d1f62e9b1a8ac33a9e92c10a7cb8b8363e08..845c3329674d99dd385316dbfd1287fa3566a60e 100644 +index acd3b33c64f1534555c14047e29c18f31a1e8f92..63a9e0695efb0f357c0c3298175da9bbdc78a41c 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -357,6 +357,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -352,6 +352,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 01c36b3c68ded..89a42e0df8307 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,7 +8,7 @@ was removed as part of the Raw Clipboard API scrubbing. https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc -index 3009acd40eee36bc3d4dd8642f0ce5e6476da973..1d52ce84184a3ca94e4e0f04d331bf56d75e07d0 100644 +index 1eb1d0fe4696f26e7de43fc8797c283e9e6db042..766f8d8df866ce7fbc337cecceb715cced39643c 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc @@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( 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 1e65be856e7b0..5d2aae9b16dfa 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 32df5050f5a66c4b4f0981d3777a3b5a4fac9629..d8d9982bc6bd6e472677707b326a5dafa9b7fcf5 100644 +index f19a15f85afe2d754833667d8c272c75da3de0b2..18de1a2533b479a6090ed412987f0b5c3922c711 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -660,6 +660,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -661,6 +661,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,11 +22,11 @@ index 32df5050f5a66c4b4f0981d3777a3b5a4fac9629..d8d9982bc6bd6e472677707b326a5daf 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 a099eed10dd061994bff696519099c3ef7437a46..a1f1e9b55272e70b4acd5d1f1515fba7d91538fa 100644 +index 64f6ebe2a86a659da70f32cdbdb961384adca43f..2fc1062eb798a233f0eede6dd945f25d633e5f8f 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h -@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl - bool IsRenderViewLive() const override; +@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl + void EnablePreferredSizeMode() override; void WriteIntoTrace(perfetto::TracedProto context) const override; + void SetSchedulerThrottling(bool allowed) override; @@ -34,10 +34,10 @@ index a099eed10dd061994bff696519099c3ef7437a46..a1f1e9b55272e70b4acd5d1f1515fba7 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 a6fe708878eb9afba9a68e0be71ba2c0b2a84d7d..5cc81ceb44d0a8baee3ebcc63aa4137b1e9ef08e 100644 +index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da4689b7a2 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h -@@ -80,6 +80,9 @@ class CONTENT_EXPORT RenderViewHost { +@@ -77,6 +77,9 @@ class CONTENT_EXPORT RenderViewHost { virtual void WriteIntoTrace( perfetto::TracedProto context) const = 0; @@ -61,10 +61,10 @@ index fd145f0aa562d6b63fb1d3a8a9241ae1aa1ce7a0..54d30fb9db8b48b94abdb815c487f618 // 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 befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b0c766610 100644 +index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319b1a5ec28 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 { +@@ -108,4 +108,7 @@ interface PageBroadcast { // Sent to whole page, but should only be used by the main frame. SetPageBaseBackgroundColor(skia.mojom.SkColor? color); @@ -73,7 +73,7 @@ index befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index a1427a6a95583ae853284b97cab77d577172e60e..4645764213c82e73532f7c61ed03f919f8241393 100644 +index 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de372dd5be 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h @@ -364,6 +364,7 @@ class WebView { @@ -85,10 +85,10 @@ index a1427a6a95583ae853284b97cab77d577172e60e..4645764213c82e73532f7c61ed03f919 // 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 d7b5e40a26026b7f4640c2f405fadab4a800e267..b2a2e38397fdf3e9bb52c4532a1d14463ed4110d 100644 +index 9704d8d8a4ee9e36c1a61c6723ce1039320014b6..cd14dd54e3c7bb56e82cbd6c566c11018b4deb94 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3688,6 +3688,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3698,6 +3698,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index d7b5e40a26026b7f4640c2f405fadab4a800e267..b2a2e38397fdf3e9bb52c4532a1d1446 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3699,7 +3706,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3709,7 +3716,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,7 +113,7 @@ index d7b5e40a26026b7f4640c2f405fadab4a800e267..b2a2e38397fdf3e9bb52c4532a1d1446 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 08a54c62b7f4eeb6a8b0e0cb192723e1aecad915..1eeb122ac5db86c53d328a308dc2b7a4a5ca9fed 100644 +index 51ab4f029e467fa5ea2663af38445d9565e19fe4..18005ca7a272d7731a4b8eeeac92ce163c2a262e 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -419,6 +419,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, 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 020ad8959be89..a5496a4828377 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 4e51622d725ad0ee448ea1794c209aae7f78e09a..df6e9ed6fda9e6fa695fa3ab717847735dc63b17 100644 +index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..c6dc3cebfb32489a5e50b850ed02a066bf3f258e 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -140,6 +140,20 @@ WebPreferences::WebPreferences() +@@ -142,6 +142,20 @@ WebPreferences::WebPreferences() fake_no_alloc_direct_call_for_testing_enabled(false), v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), @@ -33,13 +33,13 @@ index 4e51622d725ad0ee448ea1794c209aae7f78e09a..df6e9ed6fda9e6fa695fa3ab71784773 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 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadcc12afd1a 100644 +index 187fd8d9818693262256d5cbddd5e02659ba903d..f166517f4e70ced310253539fb6197f6b3af559c 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 StructTraitssans_serif_font_family_map) || +@@ -23,6 +23,10 @@ bool StructTraitscursive_font_family_map) || !data.ReadFantasyFontFamilyMap(&out->fantasy_font_family_map) || + !data.ReadMathFontFamilyMap(&out->math_font_family_map) || + // Begin Electron-specific WebPreferences. + !data.ReadPreloads(&out->preloads) || + !data.ReadPreload(&out->preload) || @@ -47,7 +47,7 @@ index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadc !data.ReadLazyFrameLoadingDistanceThresholdsPx( &out->lazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -145,6 +149,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadc 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 b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f0812c41aab 100644 +index 59947bfd3c042e5f7d3993967fece9b519f93472..368ec7fb398409cd6386269934eaffcce356793f 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 b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f08 #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" -@@ -152,6 +153,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -154,6 +155,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f08 // 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 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691eccaf3cd7b19 100644 +index bd425a5869477de9095c6a41c683609d065b08c0..3a5d7450aa40e8a7614e83f316d3d0fb59583381 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 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691ecca #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -418,6 +419,60 @@ struct BLINK_COMMON_EXPORT StructTraitsGetChildSocket(); options->fds_to_remap.push_back(std::make_pair(sandbox_fd, GetSandboxFD())); diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 48e5d3af2555f..b682f15b7e390 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,10 +15,10 @@ 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 0396836ad4ae67e26b6920afbcd702ccb24d391e..f207eda80b6cd1d3a739cc27499691ad1ac8e13e 100644 +index c136ea03ea961ce419d42c60efc646e4ddfe5693..4e635c3775df0f1b3b3d7551fba8f8d59d1b541b 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) { +@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) { DCHECK(!IsDetached()); @@ -33,7 +33,7 @@ index 0396836ad4ae67e26b6920afbcd702ccb24d391e..f207eda80b6cd1d3a739cc27499691ad if (type == FrameDetachType::kRemove) { if (provisional_frame_) { provisional_frame_->Detach(FrameDetachType::kRemove); -@@ -153,6 +145,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 0396836ad4ae67e26b6920afbcd702ccb24d391e..f207eda80b6cd1d3a739cc27499691ad // 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 b95ed440737ccdf32607c90831d13a482315d515..73f7aeee21f0116e46dad91cb9a088ab5adda6e3 100644 +index 019b87a77fb7306bacdcda20e388cdfb8d3a6be8..f972ae236566248d3179d147e9692322153e326d 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -543,10 +543,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index b95ed440737ccdf32607c90831d13a482315d515..73f7aeee21f0116e46dad91cb9a088ab if (!Client()) return false; -@@ -592,6 +588,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -593,6 +589,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); 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 1222c47289414..f550c068a4fe7 100644 --- a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch +++ b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch @@ -10,10 +10,10 @@ 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 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa6025207d80 100644 +index 3933fa761768b5a45891bfef4c2c2123b92fc276..2eb52b71d7ebc7525cceffbecc99db6751429afd 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, +@@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, log_path[log_path_len] = '\0'; info.log_filename = log_path; #endif @@ -29,7 +29,7 @@ index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa60 info.distro = base::g_linux_distro; info.distro_length = my_strlen(base::g_linux_distro); info.upload = upload; -@@ -2025,8 +2030,13 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2027,8 +2032,13 @@ void InitCrashReporter(const std::string& process_type) { process_type == kWebViewSingleProcessType || process_type == kBrowserProcessType || #endif @@ -40,6 +40,6 @@ index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa60 + g_is_node = true; + } + - #if !BUILDFLAG(IS_CHROMEOS_ASH) + #if !BUILDFLAG(IS_CHROMEOS) SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); #endif diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 6c074efcaf841..ff503b7c6cb89 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 0736e7021761e6019e1b52448d21ffdb73b964fc..571b553e9aaa98739851d0ff312eefe9f6a75596 100644 +index 7528d88c5d40571f1dcbd02201128ba2eed0cf08..ae50430c441539eb6152a926d382fb0552f3c358 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -80,6 +80,7 @@ diff --git a/patches/chromium/build_disable_print_content_analysis.patch b/patches/chromium/build_disable_print_content_analysis.patch new file mode 100644 index 0000000000000..7dff09c3e4eea --- /dev/null +++ b/patches/chromium/build_disable_print_content_analysis.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Sun, 1 May 2022 18:01:42 -0700 +Subject: build: disable print_content_analysis + +Print Content Analysis enables enterprise users to scan to-be-printed +pages and documents for sensitive data if the OnPrintEnterpriseConnector +policy is enabled. A conversation with the Chromium team confirmed +this feature was intended for enterprise Chrome users and not embedders, +so we're disabling it to prevent build issues/additional unneeded files. + +This patch can be removed when enable_print_content_analysis can be more +easily enabled or disabled by default with buildflags. + +diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni +index 559ac76d4e4b9d9c1824c4da186a6b0f7619fcca..72855e0c5fadb286b67144b34ff71f45e1434c73 100644 +--- a/printing/buildflags/buildflags.gni ++++ b/printing/buildflags/buildflags.gni +@@ -36,8 +36,7 @@ declare_args() { + + # Enable snapshotting a page when printing for its content to be analyzed for + # sensitive content by enterprise users. +- enable_print_content_analysis = +- is_chromeos_ash || is_chromeos_lacros || is_win || is_linux || is_mac ++ enable_print_content_analysis = is_chromeos_ash || is_chromeos_lacros + } + + declare_args() { 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 17729820471d9..cfbf7076545a7 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,10 +11,10 @@ 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 3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4..b5a20be5e22238e7e1969bdaf52c0b05e84bb846 100644 +index 99ab95668a7d3a31339b576b4a3a6038f39c2795..92f43eac6d654ff8ebe57d291c4f77aa1b029895 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -171,11 +171,16 @@ if (!is_android && !is_mac) { +@@ -173,11 +173,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index 3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4..b5a20be5e22238e7e1969bdaf52c0b05 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 02e4b0e27f4a0d3409327ba929f78b129dc06385..dce624825dc8e9e545c15a0cb0427aa33877aa3e 100644 +index cb28e691fb863fe7739a7ca536170e6c7a76a315..eacc853e2b9fc3c9e448f419e02d7378da310e9e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4552,7 +4552,7 @@ static_library("browser") { +@@ -4588,7 +4588,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 02e4b0e27f4a0d3409327ba929f78b129dc06385..dce624825dc8e9e545c15a0cb0427aa3 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 060e49987d27be37afb2b85e658525d4edc08df6..3333bb6be0d07eff9d4ef5aea446c44c00b3d3af 100644 +index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938da14aab9 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5995,7 +5995,6 @@ test("unit_tests") { +@@ -5841,7 +5841,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 060e49987d27be37afb2b85e658525d4edc08df6..3333bb6be0d07eff9d4ef5aea446c44c "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -6018,6 +6017,10 @@ test("unit_tests") { +@@ -5864,6 +5863,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 060e49987d27be37afb2b85e658525d4edc08df6..3333bb6be0d07eff9d4ef5aea446c44c ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6706,7 +6709,6 @@ test("unit_tests") { +@@ -6757,7 +6760,6 @@ test("unit_tests") { } deps += [ @@ -76,15 +76,14 @@ index 060e49987d27be37afb2b85e658525d4edc08df6..3333bb6be0d07eff9d4ef5aea446c44c "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6754,6 +6756,11 @@ test("unit_tests") { - if (is_chromeos) { - deps += [ "//ui/chromeos" ] +@@ -6856,6 +6858,10 @@ test("unit_tests") { } + } + ++ if (!is_electron_build) { ++ deps += [ "//chrome:packed_resources_integrity_hash" ] ++ } + -+ if (!is_electron_build) { -+ deps += [ "//chrome:packed_resources_integrity_hash" ] -+ } -+ - if (is_chromeos_ash) { - deps += [ - "//ash/assistant/model", + if (is_chromeos_ash) { + sources -= [ + "../browser/policy/cloud/user_policy_signin_service_unittest.cc", diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 15419321d710c..f0bd3d9fd8ef3 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 a53cc9066a3485ff6829e3c410eb523de7d074d6..9697e2dc2d0892fc7f1007d62488c2f2f24ec92f 100644 +index 74b6ad644d49c003996db0eab225ea30ac17420a..0a1ba3510be3047bfc34e603c5aaafbf15908269 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 4fb371adedae3..7844ee1c891a6 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 9b08d7bbbda75390813ff07e0dc83bb9d16992a6..b47dc4a90a0294c5d7e73f01c496fd2b4f621400 100644 +index aa0be995df8c2f9fa0d84922d30c7e1cdf9025c8..e588b460aa32b4c984d593ed54e10310b59ace9b 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6939,6 +6939,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6840,6 +6840,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 9b08d7bbbda75390813ff07e0dc83bb9d16992a6..b47dc4a90a0294c5d7e73f01c496fd2b &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d0092176fd24acb0657819d666e4f76ec65012ec..df03de0a810bbce796d5bc421b92000e02dbd449 100644 +index 6da28755d61f8957b0e6b6d0f1e669c2dbb347fa..a96bb634eb5c5405abb62b88d576e5e3ed354caa 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3943,6 +3943,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3951,6 +3951,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index d0092176fd24acb0657819d666e4f76ec65012ec..df03de0a810bbce796d5bc421b92000e new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3987,12 +3995,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3995,12 +4003,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -68,10 +68,10 @@ index a7f36529608011013dab96a803ad3187c940fc81..2bbcea3efede2fda4ff2c5b270e1db01 // 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 ffa24d4b6779226ea3b94afdf176939ea7e42e34..16fb4946cb3ea2d097e8ed05bb340cc3f0782ed6 100644 +index 984205b3d1bb4acfde6c5d106118a88f866af341..e33a5c9c6d493cd4ac2664ea10390193e3e53fcc 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -579,6 +579,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -581,6 +581,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index ffa24d4b6779226ea3b94afdf176939ea7e42e34..16fb4946cb3ea2d097e8ed05bb340cc3 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 ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d563d5aafc 100644 +index 7e22f3e0b84f3e6b1ef7b1c5176665b38bd53629..f6d98708c436447ee6c93acb5d476719c238ca9c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -165,6 +165,7 @@ class NetworkService; +@@ -168,6 +168,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d5 } // namespace network namespace sandbox { -@@ -954,6 +955,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -959,6 +960,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ index ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d5 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 f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c6439b692 100644 +index 9bbc7cf6d9542a3f013313e0c497839da2beb9d1..c01e06b08b1cca7a663e30476a551904ce9c6db8 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -26,6 +26,17 @@ namespace content { @@ -124,7 +124,7 @@ index f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 85335ff06c87ea3986360fad18df6cf01a4a7cca..eeafde1fa6067804665954525eafdd482d8eb3f3 100644 +index 04aa4d993b331396ee20464f6e1d2da10c91c834..2556c044b6e28501a5fac9b0040e623b8f35f497 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,7 +150,7 @@ index 85335ff06c87ea3986360fad18df6cf01a4a7cca..eeafde1fa6067804665954525eafdd48 // 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 f7fbc40e8df8b996d6079f2e691771529ca42497..5580f245477b713d0f1f92ca9d15de847c4f8c92 100644 +index 89b07508aef80680a847c106fea0e2fa58ff964b..6630af3583a6bac6135d46644280d6444fe981b8 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -33,6 +33,7 @@ @@ -173,7 +173,7 @@ index f7fbc40e8df8b996d6079f2e691771529ca42497..5580f245477b713d0f1f92ca9d15de84 /*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 4379497806bf7c85ade2f4e4554d6a60c4ec966c..fa860bbcf0c12df33dae69d25b01587676a1b79e 100644 +index 2e7c332565ebe33b00ab7fff96a6a8dfc61422a6..0ab061f51d1d0c93f23bfcf5ba051172cea37eb8 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( @@ -186,7 +186,7 @@ index 4379497806bf7c85ade2f4e4554d6a60c4ec966c..fa860bbcf0c12df33dae69d25b015876 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 d4eb4d482b2641585d501131c64b90cc9dbcfd18..132a5d86279b9a2cb4364b9c6d3e89e12d55052e 100644 +index 00e2a8c21d4f0ef00c942498251fa44065da63c0..0fc4b092fa276063e05f990bf920fecd60c6d26c 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 00af75f5295251fb19c874d2b7d877c4a53f7f12..c0042534907dfca1789b8dde2ffa11956d3e029e 100644 +index ea47699384318126fef1a8c4cc3cb881cdc8e624..22d63b9f89913878518294f19afc85550196ca3e 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2076,6 +2076,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2088,6 +2088,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, incumbent_window); diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 1230a33e25953..492d73768b2f9 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 70ee9049e3cb73f55bed81c3e08037df2f4c9e07..8d230826aaf867d9046a6b9ac93a60f4750e52be 100644 +index 1837aac53e6e13aebb0eee00249b305e0c7192c9..cf0b500239f635decc718fb9cfceb3f3f5be23c6 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index 70ee9049e3cb73f55bed81c3e08037df2f4c9e07..8d230826aaf867d9046a6b9ac93a60f4 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 5edda102ff59ccb30d2150a88e75e8fb65379fca..82aaa442bca9e7a5e57315ace0b1c62e40ec1d24 100644 +index 631c30c8f153e72cd92de457d8ba6f44574edbe6..a24181efacd35c3d7b9b0bcdc066dd0a0f7bc43a 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -808,8 +808,7 @@ class Browser : public TabStripModelObserver, +@@ -828,8 +828,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 b9309e1cbc4a8b701534aa8be2827c40d98d6678..c1b1bfc8333e93456178842db392eabff96bf4c9 100644 +index 1b616ba52d9c77c64c7f24a0d204ce36641dce38..0303ae1c4d8681bc1bf56eb9ff1fc13afd678706 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3891,8 +3891,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3899,8 +3899,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,7 +260,7 @@ index b9309e1cbc4a8b701534aa8be2827c40d98d6678..c1b1bfc8333e93456178842db392eabf 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 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a8e0463b1 100644 +index c01e06b08b1cca7a663e30476a551904ce9c6db8..9f50a8721560f734270308776f2f37ad49a8cb91 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -274,7 +274,7 @@ index 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index eeafde1fa6067804665954525eafdd482d8eb3f3..b17f371aa489a5b61c28fbcd316b19815f072df9 100644 +index 2556c044b6e28501a5fac9b0040e623b8f35f497..4c6cd654551b2f5cfd59a5271a8d95a9e6862d3c 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -344,10 +344,10 @@ index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec48 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 424c5f89440dccc29f3431e034d0a4fd4f647a00..8d40d0bd30fc28e841eedb3f34be3c033db62449 100644 +index d2497be79bb5d7943589bb928e2fbe13f76aa3e3..54adf30432cf178f2d00630420e45cfa95551b54 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -402,8 +402,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -404,8 +404,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 2c9718a540923..62e2ef85c1b9f 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 ff769b9855810bfe3761079ddae286fc8aa5602f..1fea025e8fc1d4e2496f117780fa4d0eb2f2e983 100644 +index 587144562fffda66cee9cbd23b16fb4e8607d208..a41bb82f8dcf292cf23aa8781bd5a5c52f11e578 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ diff --git a/patches/chromium/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch index 6f4a3b926bbc6..bfe7658c28575 100644 --- a/patches/chromium/crash_allow_disabling_compression_on_linux.patch +++ b/patches/chromium/crash_allow_disabling_compression_on_linux.patch @@ -13,10 +13,10 @@ 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 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb880264464787eb32 100644 +index 2eb52b71d7ebc7525cceffbecc99db6751429afd..d3ff2942d831745efed440be0fe1e82441a39ff7 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) { +@@ -111,6 +111,8 @@ void SetUploadURL(const std::string& url) { DCHECK(!g_upload_url); g_upload_url = strdup(url.c_str()); } @@ -25,9 +25,9 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446 #endif bool g_is_node = false; -@@ -1322,56 +1324,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1324,56 +1326,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, - #else // BUILDFLAG(IS_CHROMEOS_ASH) + #else // BUILDFLAG(IS_CHROMEOS) - // Compress |dumpfile| with gzip. - const pid_t gzip_child = sys_fork(); @@ -127,7 +127,7 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446 static const char header_msg[] = "--header=Content-Type: multipart/form-data; boundary="; const size_t header_content_type_size = -@@ -1398,7 +1404,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1400,7 +1406,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, static const char kWgetBinary[] = "/usr/bin/wget"; const char* args[] = { kWgetBinary, @@ -137,9 +137,9 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446 header_content_type, post_file, g_upload_url, -@@ -2039,6 +2046,7 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2041,6 +2048,7 @@ void InitCrashReporter(const std::string& process_type) { - #if !BUILDFLAG(IS_CHROMEOS_ASH) + #if !BUILDFLAG(IS_CHROMEOS) SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); + g_compress_uploads = GetCrashReporterClient()->GetShouldCompressUploads(); #endif diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index ff3fe7c4fcfae..fb4565d06bf81 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -9,10 +9,10 @@ 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 823e49a234e3dd31bf6527c2e4efa96f3d23f1f2..43f6d476f3ee2759cf41c492f932522994e7ddec 100644 +index 4ed2558351e37dde0eb35b6eb32f442346ff2490..3933fa761768b5a45891bfef4c2c2123b92fc276 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) { +@@ -113,6 +113,7 @@ void SetUploadURL(const std::string& url) { } #endif diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 0b4fa1aa751ef..ccc3ddcd8566f 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 ab0afb79514e42acb87e94809ed4a2b7c736a825..23fb303820860a030643d6d5a1a449823bb146e8 100644 +index 21e7b1cbada3856a7d91040c259be80ae95df07e..b19206ba58725f949403469a3e1d221b12833581 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 -@@ -515,8 +515,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( +@@ -542,8 +542,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 297cb3869dcbe..f5a01a7b3ca69 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 14e13169de8b5e808e3284792237bef9939b1e00..7628a96dc8b2c9e8128cd462138d3487304c6e10 100644 +index f3f1d19619717f0f0493ab1ec90f47fd16bdd574..10bdf83528295d50cde496ade386a3546aa7bfc2 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1894,6 +1894,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1880,6 +1880,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -228,7 +228,7 @@ index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb0 + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 8cd9a960ca1de81857af60daa91596c1dbb17786..7455afe4d81eac31fe3792a4459834a7f968918c 100644 +index 11e2a00aaffeba9379c0f2c41e6300d3020c7a88..9cfd058861a506bc3d6f72e5ed4a37b60ff4454b 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -240,10 +240,10 @@ index 8cd9a960ca1de81857af60daa91596c1dbb17786..7455afe4d81eac31fe3792a4459834a7 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 927e182bbba7a3700fd20c8c964da7cc162c4210..f099940c5b8fd92c04401cfbd231c04cb413d286 100644 +index 0c8d0735523d388d0e68d2ad0b20a1c2525502ed..089b8e85776874938cfdafad0c3576562a78c1b0 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -197,6 +197,7 @@ +@@ -198,6 +198,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 927e182bbba7a3700fd20c8c964da7cc162c4210..f099940c5b8fd92c04401cfbd231c04c #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3213,6 +3214,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3217,6 +3218,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_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 85264ef143680..522db3317eff0 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,19 +6,19 @@ 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 18c77a5520ea2ae7cfee4eea3ed01fa8a588829d..557b77bea785108359b0c78f12c2b2afbdc2475d 100644 +index c37193c2207fb4f20993a35e2ac6fde8f0727a45..8e81312b1424d37c756bbb93cb4020a693c9b380 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -511,7 +511,11 @@ - return; - - host()->WasHidden(); +@@ -531,7 +531,11 @@ + browser_compositor_->GetDelegatedFrameHost()->HasSavedFrame(); + if (has_saved_frame) + TRACE_EVENT_BEGIN("cc", "RWHVMac::WasOccluded with saved frame"); - browser_compositor_->SetRenderWidgetHostIsHidden(true); + // Consider the RWHV occluded only if it is not attached to a window + // (e.g. unattached BrowserView). Otherwise we treat it as visible to + // prevent unnecessary compositor recycling. + const bool unattached = ![GetInProcessNSView() window]; + browser_compositor_->SetRenderWidgetHostIsHidden(unattached); + if (has_saved_frame) + TRACE_EVENT_END("cc"); } - - void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 4ccc6a9d37635..5073b1291fd86 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 9e740edbf36dd7a30062c88f857103c56eebd729..7cda66952e0d3a67c32791ad3c7d7de8df03f876 100644 +index 730ac0aaf36da1842c7add66fbaea58baadf2e74..fcc45c987cfce94f5378d4aeee1cfe703178e133 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -808,6 +808,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index 9e740edbf36dd7a30062c88f857103c56eebd729..7cda66952e0d3a67c32791ad3c7d7de8 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 23783e5e004b613c27fd753e1f7ff96d51fa5f68..225b4ea0c5ac74d6b6700c306182d003a972cedc 100644 +index 2ae96b816427148f4f0adf39c549d37fe3d02619..0288d36642629d7ec1846cd977f378ff9c0afd40 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -886,6 +886,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -879,6 +879,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl SiteInstanceGroup* GetSiteInstanceGroup(); @@ -34,7 +34,7 @@ index 23783e5e004b613c27fd753e1f7ff96d51fa5f68..225b4ea0c5ac74d6b6700c306182d003 // |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 5f29761ad8556e730dca6b076b87f6391313fb95..3e5f5a34150079bf74d612bff85b6875ad41d2e6 100644 +index a3eb86299d8d34262347ee093940e61af6eab348..cb99fd2eb69bba9b133664fb68076eeeb9576818 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 075e38265e551..c7593e21241c2 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 cd286b4925b3d2d9e74caecee759360488f2b8ba..0bc714a78e58719824ffeba8ced7854474fa6e92 100644 +index cfc5263749fa3068ad3699892bc4060891d7a0ef..f0aa5f66bc62efb2ea2d105d86dc3a8ea13e5eec 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1177,6 +1177,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1293,6 +1293,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index cd286b4925b3d2d9e74caecee759360488f2b8ba..0bc714a78e58719824ffeba8ced78544 // 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 && -@@ -1223,6 +1224,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1339,6 +1340,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 4b690a546db81..c5f653eb03980 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,7 +6,7 @@ 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 d871ceecd76e21b23c500643363ced2ca87e8013..e0a26a90ee38342aefdbdd76e9c56a932b214235 100644 +index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944fae3694f 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc @@ -66,7 +66,7 @@ void MemoryReclaimer::Reclaim(int flags) { @@ -49,7 +49,7 @@ index d51b37c8a2df11f71fa6056193100d00883db43d..b44002788cf4d4f5d754dd35dd193be2 #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 8542c0d0d49511298cca800a59796b1e4271a3d8..1d0eeff5800f2ccf3f1fb6b1356c8cd067cfd945 100644 +index 5b179a2d15cfc4997410d9467bf9484f5cae0b9f..98296aa4e8d75e94b141694c592dfa83627861ff 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -30,6 +30,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 e35ef06f99372..ca244bbc8639c 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 b9eea3470139e1833b2b23d3b535b11235e2bc8e..fbc1f6d8387e33cb7daafc96b7514897f067f008 100644 +index 1b021461f214287c94fb22b17d980c19e3f07dde..76691715d09a62a1edc0306dcac1d3e7e312fb1d 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2377,7 +2377,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2398,7 +2398,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { 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 aa6aa6d8e388e..74d7b3fecb28e 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 952023235d9f1905b64195f625dbb3b1af97f908..3d8b4cc17584e7ae8be0b77a073a0453bcd5b3ef 100644 +index 1a41a282f054d8ca93db19dc5df7f1de14cb8e44..452372aa40947531452c7ad7226a4ee6b0adfccb 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc -@@ -366,6 +366,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 6e3c56031e7f0..714a99251bbb5 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 98268925da14d61256f8dee3aa899f17ce7acaf6..1abdc204e278383818dc073f96c90e91ec1f3fb9 100644 +index 6a331146e6fbf23e4177176f67fe534141579eb7..7f6974b8fbfe052902e6c0a55d386fb3a8b26558 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1404,6 +1404,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1407,6 +1407,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 98268925da14d61256f8dee3aa899f17ce7acaf6..1abdc204e278383818dc073f96c90e91 // 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 58671094857cdfe5d853c8a284d51bc1b8a09660..7af71839aa1bc970370a91cd35f3cbefe06e67e5 100644 +index 620d7b7b733cc9749775c2bcabcebdedafe6ba0b..984e1f04c01006b7f038538c16ad2dd224925731 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -302,6 +302,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -298,6 +298,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 58671094857cdfe5d853c8a284d51bc1b8a09660..7af71839aa1bc970370a91cd35f3cbef 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 b52e5a2230e96d55d7886bde331a505c58dd093a..757dd77b06cba44e832e86e729e44b1e9a427c49 100644 +index 0450b50b5545d9b8f9025553167bed2e78157130..1b772288816ee770ee47cb59cf6c93439729320e 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1087,6 +1087,9 @@ interface NetworkContext { +@@ -1090,6 +1090,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 b6a0b701b7663..c6d16910db2d2 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 b2a2e38397fdf3e9bb52c4532a1d14463ed4110d..9f0f209f279cc3dbe35efc12eb1e51449dfda470 100644 +index cd14dd54e3c7bb56e82cbd6c566c11018b4deb94..0b0b3a03a64ae6a321eeb27619f4f0ae5ee388cc 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -160,6 +160,7 @@ +@@ -159,6 +159,7 @@ #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" @@ -23,7 +23,7 @@ index b2a2e38397fdf3e9bb52c4532a1d14463ed4110d..9f0f209f279cc3dbe35efc12eb1e5144 #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" -@@ -1777,6 +1778,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1785,6 +1786,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 61eeec59f5705..cd4f452726579 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -96,10 +96,10 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..5b701b1361707b610ed60c344e441e67 // 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 be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190f7d1137d 100644 +index 9bb12894da06fc7d281daced754b240afa9bedeb..52717600e7346daeb0726c177162c718da53500a 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -146,7 +146,7 @@ const char kACKToken[] = "ACK"; +@@ -145,7 +145,7 @@ const char kACKToken[] = "ACK"; const char kShutdownToken[] = "SHUTDOWN"; const char kTokenDelimiter = '\0'; const int kMaxMessageLength = 32 * 1024; @@ -108,7 +108,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 bool g_disable_prompt = false; bool g_skip_is_chrome_process_check = false; -@@ -612,6 +612,7 @@ class ProcessSingleton::LinuxWatcher +@@ -611,6 +611,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 be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 SocketReader* reader); private: -@@ -636,6 +637,9 @@ class ProcessSingleton::LinuxWatcher +@@ -635,6 +636,9 @@ class ProcessSingleton::LinuxWatcher // The ProcessSingleton that owns us. ProcessSingleton* const parent_; @@ -126,7 +126,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 std::set, base::UniquePtrComparator> readers_; }; -@@ -666,16 +670,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -665,16 +669,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -154,7 +154,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 LOG(WARNING) << "Not handling interprocess notification as browser" " is shutting down"; // Send back "SHUTDOWN" message, so that the client process can start up -@@ -685,6 +694,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( +@@ -684,6 +693,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( } } @@ -177,7 +177,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(reader); -@@ -720,7 +745,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -719,7 +744,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -187,7 +187,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 const size_t kMinMessageLength = std::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -750,10 +776,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -749,10 +775,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -217,7 +217,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -782,8 +826,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -781,8 +825,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -231,7 +231,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -902,7 +950,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -901,7 +949,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -241,7 +241,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -912,11 +961,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -911,11 +960,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); @@ -263,7 +263,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 // 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. -@@ -958,6 +1017,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -957,6 +1016,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( linux_ui->NotifyWindowManagerStartupComplete(); #endif @@ -282,10 +282,10 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190 return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index ec725b44296266bea1a51aea889463a0bba8449c..6355e5c73ba9df9bdb9ff48205d909dca04470f1 100644 +index 0c87fc8ccb4511904f19b76ae5e03a5df6664391..83ede77121c5dadbde8b0a4132de1dba6eeb5b52 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -13,14 +13,17 @@ +@@ -13,15 +13,18 @@ #include "base/command_line.h" #include "base/debug/activity_tracker.h" #include "base/files/file_path.h" @@ -295,6 +295,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..6355e5c73ba9df9bdb9ff48205d909dc #include "base/metrics/histogram_macros.h" #include "base/process/process.h" #include "base/process/process_info.h" + #include "base/strings/escape.h" +#include "base/rand_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" diff --git a/patches/chromium/feat_add_onclose_to_messageport.patch b/patches/chromium/feat_add_onclose_to_messageport.patch index 01d4fd5beeb27..61f192d132639 100644 --- a/patches/chromium/feat_add_onclose_to_messageport.patch +++ b/patches/chromium/feat_add_onclose_to_messageport.patch @@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a whole bunch more useful! diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc -index a284d187968914b4304eb49362b2a8ccafa5e5c2..d6f8bf39c47cfc622dec5736d82ccc308d406cfa 100644 +index b72ede668172bd8202b1d52736e4eb4ffe84d619..7ec7e3883925b50b064682e8976d09b18222d637 100644 --- a/third_party/blink/renderer/core/messaging/message_port.cc +++ b/third_party/blink/renderer/core/messaging/message_port.cc -@@ -162,6 +162,7 @@ void MessagePort::close() { +@@ -166,6 +166,7 @@ void MessagePort::close() { Entangle(pipe.TakePort0()); } closed_ = true; @@ -22,7 +22,7 @@ index a284d187968914b4304eb49362b2a8ccafa5e5c2..d6f8bf39c47cfc622dec5736d82ccc30 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 c5e0fefac929d4a484488761741d42f2b002f7a1..83d7901d99ad01ba039ea1ffa3dbee2595fc31ff 100644 +index 30d13d1e47e3acc7df6ce5c627fd7b3a32c3edc4..f9baba3c6d13992508da48a13c97bb10c8ec56e0 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_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 77ff74d4b5934..b4f87cd57376f 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 002b3ddfb0f77b787b74ee088578e3eb813d0192..a9003a98546bbfe78e2d30457a032218cc263441 100644 +index fe988e3bbcf0c9deb5592f24fdeda3016114e3bf..da82b0458d0c87cf4de793007b826984d010cbb2 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,8 @@ viz_component("service") { @@ -503,7 +503,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 df92bab44402330869b44aa76bb40fc20e33b16a..2b3fbaee17c0a8bb7b04cd4c4edb13626dd1bb27 100644 +index 4e38e0f49054cef3fd1a712c89608ce39003edeb..427882f8ed0d85c6e4170b213c3a3678b60a62df 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( @@ -621,7 +621,7 @@ index 80bff73a5886e8e79d7d91de5e27bc747fcfce02..8bc43d1359fa2551713992d6ccb73949 raw_ptr root_layer_ = nullptr; diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h -index c5fb29b30b9c5b7483998c567ed9a479d8743939..dc10d78315f76a3914ccd6e2e99af97fa909918b 100644 +index 12e115cd6a128d8d150abc786d4d38b1d5119d91..b6320de28750333bee7ee83393849f4eb0a956ac 100644 --- a/ui/gfx/ca_layer_params.h +++ b/ui/gfx/ca_layer_params.h @@ -6,6 +6,7 @@ @@ -632,7 +632,7 @@ index c5fb29b30b9c5b7483998c567ed9a479d8743939..dc10d78315f76a3914ccd6e2e99af97f #include "ui/gfx/geometry/size.h" #include "ui/gfx/gfx_export.h" -@@ -41,6 +42,8 @@ struct GFX_EXPORT CALayerParams { +@@ -51,6 +52,8 @@ struct GFX_EXPORT CALayerParams { gfx::ScopedRefCountedIOSurfaceMachPort io_surface_mach_port; #endif @@ -653,7 +653,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 c7035798bd867f51b39f36f1be79293bf2b5cc12..131446361de812f9b915483bca2b6d2165b65e3d 100644 +index a80185658d82c67713e578d176955c442f0568ab..e29003b3b6def9a1f842139f4269893a2609a601 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 c3215e637e3b0..d48c35ad8194c 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,43 +17,43 @@ 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 87868727a78223baef9ffd2591f49fced240ef4e..f6a6ff28f33e2d1c065f2abeb96733b2d28a6ea1 100644 +index a15e3c4bed344364f9c43e3f0b5c494d58dff789..24e3b291f8c25de2a0b82184fd731538b6586f86 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc @@ -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 && + is_outermost_main_frame == request.is_outermost_main_frame && transition_type == request.transition_type && + report_raw_headers == request.report_raw_headers && previews_state == request.previews_state && 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 8b9a7b36f53a4cfcd159ac18c06d1724072013c8..ef0191bae8a07e531ae129cf32b22f4930c5e266 100644 +index 2ff43cc1ef683707001bf22c9b030bf6e7223e0f..cfaf9170666f04407adb5738ce6723900d234735 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -156,6 +156,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; + bool is_outermost_main_frame = false; int transition_type = 0; + bool report_raw_headers = false; int previews_state = 0; 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 1fcf54cac11c38352e14774cd08bcaa162443e9c..5356da11391d52a8f9aaa57a27616cee6dc0f2b6 100644 +index 4f2740ebf2dc4bee423cdbb72cae128f28a03f12..d3f531429598b3666aaba655356155c470e8b645 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc @@ -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->is_outermost_main_frame = data.is_outermost_main_frame(); out->transition_type = data.transition_type(); + out->report_raw_headers = data.report_raw_headers(); out->previews_state = data.previews_state(); 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 3a1c5bd943c110514e4da06491190476d6e6de38..6a80fb16242865d398bcbcd380893ccc9a3fe167 100644 +index 069768e7ca727fc2ad8f5379900ad4a959a87f4f..3e6bc18564e2a3cdbac9af686636f75d64082464 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h @@ -269,6 +269,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -67,7 +67,7 @@ index 3a1c5bd943c110514e4da06491190476d6e6de38..6a80fb16242865d398bcbcd380893ccc return request.previews_state; } diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 79b5d03ded03ced9e6ff4d17d10935004bfb0062..923883fd010f9621c790dd5381a7e1f0cb36e740 100644 +index ef3e8e68621402db5a97977f49ac74c438b0a563..aa1c1bcf7ca30adde4c25ed9bd8ed8a70eb919e0 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom @@ -312,6 +312,9 @@ struct URLRequest { @@ -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 4c11fd542a66f514a6c36e684a34d0a62053c1f4..6852fd470c79e2fb041bf57a01e2b0b913cb94db 100644 +index 44ea9794a42eb9d2f0bcff722a05e530dbfff10c..318da554d3326b376898689c80b576979c564c5e 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -469,6 +469,7 @@ URLLoader::URLLoader( +@@ -468,6 +468,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index 4c11fd542a66f514a6c36e684a34d0a62053c1f4..6852fd470c79e2fb041bf57a01e2b0b9 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -636,7 +637,7 @@ URLLoader::URLLoader( +@@ -620,7 +621,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 4c11fd542a66f514a6c36e684a34d0a62053c1f4..6852fd470c79e2fb041bf57a01e2b0b9 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1411,6 +1412,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1347,6 +1348,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -144,10 +144,10 @@ index 4c11fd542a66f514a6c36e684a34d0a62053c1f4..6852fd470c79e2fb041bf57a01e2b0b9 // 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 53822d17b20f4e6d163d0dc84eea6c455254a5f7..c494a63b0c1dcb39120e8aabc84a60ebbf2ff224 100644 +index abc8ecdcd717b06552af7cf5c4e4e8f60db16ec1..4f633b5a818388f6cfd30a15496c94dde1e2b48c 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -502,6 +502,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -497,6 +497,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index 079d44b8eafbd..154bc672224a3 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,10 +6,10 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index 49f52e1f8b1e505481a124a55ab91a7dd5ec571c..2cb7ee4f708808433e638bf62cb9a465c3651944 100644 +index 999b1de1b2ba1fff5dd92173300dc22b9aa5a865..2132d8ef92acd39bffe3bebddb80b4317e1f52b8 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn -@@ -312,6 +312,10 @@ component("zlib") { +@@ -313,6 +313,10 @@ component("zlib") { defines = [] deps = [] 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 aa7e2ee965bab..6fa77fb4b861a 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 07355cb194bd429a693e587072d11432d6c0888a..b74b4209931c6acd6bc2e93a100c3e65a834ead9 100644 +index df1633d59070e19592a52f02a76bdd9006d7c6f0..e599e866d2f5e72259e5b34b65510a06b3209784 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1828,7 +1828,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1820,7 +1820,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, 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 4fd3f5b2054b5..0d8d675b6f839 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 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbbdd7f157b 100644 +index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..9fb77b8d7c3d9cb49dcb3ac1f2495fa52f53932e 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -16,12 +16,16 @@ @@ -34,7 +34,7 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb #include "chrome/common/chrome_switches.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" -@@ -159,6 +163,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -165,6 +169,7 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -42,7 +42,7 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb if (base::FeatureList::IsEnabled( blink::features::kWindowPlacementFullscreenCompanionWindow)) { if (!popunder_preventer_) -@@ -166,6 +171,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -172,6 +177,7 @@ void FullscreenController::EnterFullscreenModeForTab( else popunder_preventer_->WillActivateWebContents(web_contents); } @@ -50,7 +50,7 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -218,7 +224,9 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -221,7 +227,9 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -60,7 +60,7 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -263,11 +271,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -276,11 +284,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -74,7 +74,7 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb } void FullscreenController::OnTabDeactivated( -@@ -417,13 +427,9 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -443,17 +453,15 @@ 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. @@ -88,18 +88,24 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb return; - } #endif - + started_fullscreen_transition_ = true; toggled_into_fullscreen_ = true; -@@ -436,6 +442,7 @@ void FullscreenController::EnterFullscreenModeInternal( ++#if 0 + bool entering_tab_fullscreen = option == TAB && !tab_fullscreen_; ++#endif + GURL url; + if (option == TAB) { + url = GetRequestingOrigin(); +@@ -463,6 +471,7 @@ void FullscreenController::EnterFullscreenModeInternal( url = extension_caused_fullscreen_; } +#if 0 - if (display_id != display::kInvalidDisplayId) { + if (option == TAB && 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. -@@ -449,6 +456,7 @@ void FullscreenController::EnterFullscreenModeInternal( - display_id = display::kInvalidDisplayId; +@@ -480,6 +489,7 @@ void FullscreenController::EnterFullscreenModeInternal( + GetDisplayId(WebContents::FromRenderFrameHost(requesting_frame)); } } +#endif @@ -107,10 +113,10 @@ index 41cd193087f8d4f246993e96da96ea0523ab50ed..96cd17afad81037ce94ca3ea3583ebbb if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index 7bd40f52ef5f6b04a7ea114ec4d18c8a98ec6d42..fb04fed5cc1e2e255c9e67c180fababe1fbb3fe0 100644 +index f0841982cb296079c8b943067564d74bc1b7067c..49f59fc2c12c98faada52e0e7c8c9c6e6251b599 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -222,10 +222,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -242,10 +242,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Used in testing to set the state to tab fullscreen. bool is_tab_fullscreen_for_testing_ = false; 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 6994d7d5bdc0c..fd64b412b8433 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,10 +7,10 @@ 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 ee30fddfeb034d14ae05cb5957026f65f32a4fd4..aa38a6e0cc4c0ac57469bb67c85dae3b8ce19bc2 100644 +index 35568a00ef94ca0db2cbb0325634ce8d2a881e12..a8ea8eaabb7cf3248b19af93bf5002f88e23fd8d 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc -@@ -21,7 +21,10 @@ +@@ -22,7 +22,10 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index d67ab8eee59c7..d174f13c97b6c 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 b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5b } 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 804166d8844da5bd889f014e79d59d0cd75f5490..35ef412756a2c63394e5f2587b5bc73eadae4d60 100644 +index d0143dc64f818ee662694576ce2aa9488114f1c7..e3cbaa1b9c91805f8a4f81e110c8a85591b5f380 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -239,6 +239,24 @@ void PrintDialogGtk::UpdateSettings( +@@ -242,6 +242,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 76a94c113f5b7..ab8887f56ccd2 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 390ac74f01b5080880dcab65537a22fb7ef0cc41..103dc143f6310a2b9f0a834f7d25cf32207bea86 100644 +index 2b8e23df6545ca438c4af8434120cc40c70e09ec..049350bc63d627e85b239d23b976c3a62381fd57 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3180,6 +3180,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3206,6 +3206,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 390ac74f01b5080880dcab65537a22fb7ef0cc41..103dc143f6310a2b9f0a834f7d25cf32 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 9b988bb631ab759739ae01c918efb1d563d5aafc..4db1e6c2dbea27249ca15d5660b7fcd8c6736ad1 100644 +index f6d98708c436447ee6c93acb5d476719c238ca9c..505279149690d469fa979010435373e40a5c8c43 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -274,6 +274,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 cfe45b10a0647..cf2e47b7c03da 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,7 +38,7 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745 // 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 9dddcdf88d56b32a9b8b9be529f0f13a03bd6e06..f4e5be79c1d3b92f6723f7b0c4d9a7f38c81ff99 100644 +index 072387786cc70f7d0b7d3d31cebf86af69f98a30..9df4d0aa257e7b4ecacd8c7a4ad392c4a33ff177 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -352,7 +352,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index a5004a9488601..6aa34e52cb665 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,7 +12,7 @@ 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 e9c3f3dee36a44d40844a88dbb899f593d03c907..c8dc226ce7c87fa84da5c99760f12538e367bbc9 100644 +index bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb008827ed 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { @@ -28,10 +28,10 @@ index e9c3f3dee36a44d40844a88dbb899f593d03c907..c8dc226ce7c87fa84da5c99760f12538 void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index 4ed951d5829e87431a1f9f84f0317978cb673e31..82f9a2f97e71848ece8d04effc083db94a45d495 100644 +index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec63031666e6b978e 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, +@@ -128,6 +128,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, // BrowserMainParts override instead. void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); @@ -40,10 +40,10 @@ index 4ed951d5829e87431a1f9f84f0317978cb673e31..82f9a2f97e71848ece8d04effc083db9 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 53402e4d706f58c26498015c1a5c33b4f7ceabc7..c14ce99ec72881133a5bf2bd90369ee0211f6ca1 100644 +index 260a2d4ef5df85291eda27a0f7066646d31dacfe..1f83ab4a9b22b35dd2b9053553121b49e1c42ca1 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1215,6 +1215,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1232,6 +1232,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,7 +57,7 @@ index 53402e4d706f58c26498015c1a5c33b4f7ceabc7..c14ce99ec72881133a5bf2bd90369ee0 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 ac0afe687650da564187127dc7ea93a47acde719..237e3f00b1451be43949a797ef1b35885b958a5d 100644 +index 85a4d09a54922205d416538ea97c7f2b5897f86a..acba97124a8643c7452bea63e91533cbfa7e182c 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h @@ -90,6 +90,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 9737467116185..9ac43a88997b6 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 6a91282809a76ca60dd1b329c683705b127eb22a..a2672faad7c39c3d938c1c31abb6fd0d37582fbf 100644 +index 6cda63d5c6a0b7b2b41d01382b73dbdeea3651de..174e6a5265ec4186934a0bd0619ecf02073f4fe1 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -954,6 +954,11 @@ +@@ -962,6 +962,11 @@ "includes": [4960], }, 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 5bf3a6a382a81..78f43d3d3642d 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 694a67b7a0f622c7a8bfc1d46148398140d51384..00b588b268aa059ff84adbbc6ae266aa67e174b1 100755 +index 36786064cd26faf4968e8ee90fb382e95247e4de..ce9f4b6a0d4f3350f89e9ba4f02a5cbb064524c4 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index b44a477877ab9..a068b1a12a451 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 85a55e9bbb7403b031c512fa5e010cbb0487d9c6..31c83eab4781725540f57e1e66c6f7e7c0b85d8b 100644 +index 0a0c6eb9567a96f569c25bad8ea98b4cd165b04a..0ce83c22636fce72e613893df30ca52b142077fd 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -247,11 +247,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -252,11 +252,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/make_gtk_getlibgtk_public.patch b/patches/chromium/make_gtk_getlibgtk_public.patch index a6bce37ae4aea..dd4dec37023ec 100644 --- a/patches/chromium/make_gtk_getlibgtk_public.patch +++ b/patches/chromium/make_gtk_getlibgtk_public.patch @@ -7,7 +7,7 @@ Allows embedders to get a handle to the gtk library already loaded in the process. diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc -index 0ed04582106639911d9a4e0284ff880be9c3bc74..bfda81b08be52406048be9b96d2de59223d56ee7 100644 +index b5c7af5bdb93b320f95252d35d2d76bae7f8c445..40b706ed7cde206e98274025148604760b7477f9 100644 --- a/ui/gtk/gtk_compat.cc +++ b/ui/gtk/gtk_compat.cc @@ -86,12 +86,6 @@ void* GetLibGtk4(bool check = true) { @@ -37,10 +37,10 @@ index 0ed04582106639911d9a4e0284ff880be9c3bc74..bfda81b08be52406048be9b96d2de592 static bool loaded = LoadGtkImpl(); return loaded; diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h -index 72981270fe26579211afcaf3c596a412f69f5fac..b5dbfde5b011d57d26960d245e0dc61cac9341e4 100644 +index 57e55b9e749b43d327deff449a530e1f435a8e8b..2245974f91be4a691d82f54b55e12e44ae2000c5 100644 --- a/ui/gtk/gtk_compat.h +++ b/ui/gtk/gtk_compat.h -@@ -37,6 +37,9 @@ using SkColor = uint32_t; +@@ -34,6 +34,9 @@ using SkColor = uint32_t; namespace gtk { diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 50554c76583ba..2793f24611e78 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 21778ef0c7657937987fdc70bf9ceb9439aebf15..2f6e1390a3b824d80832e47f6c368e757e2d9806 100644 +index 335e8a576f9a66a20b5720dfd083708bf490587e..0abf4ae5c58bd841c013775f6df0b6065d6d77b1 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -162,7 +162,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -156,7 +156,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 81d1ad3dbb10e..825fccf47cfa2 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -14,10 +14,10 @@ Disable usage of the following private APIs in MAS builds: * AudioDeviceDuck diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm -index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9a6d0bacc 100644 +index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a69f54e64 100644 --- a/base/enterprise_util_mac.mm +++ b/base/enterprise_util_mac.mm -@@ -168,6 +168,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() { +@@ -189,6 +189,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() { DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { static DeviceUserDomainJoinState state = [] { DeviceUserDomainJoinState state{false, false}; @@ -31,7 +31,7 @@ index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9 @autoreleasepool { ODSession* session = [ODSession defaultSession]; -@@ -274,5 +281,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { +@@ -295,5 +302,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() { return state; } diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index e64c5fd2f5049..7579f306131a4 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b + @end diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h -index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db34239394139 100644 +index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807eb797316 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h @@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge; @@ -95,7 +95,7 @@ index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db342 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56ad456bd01 100644 +index 622b25c637ba14f287cbcdb4781967564d7e9eff..a21fe0aa19069a748b41e7d0781e20031c40fbfc 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -16,7 +16,9 @@ @@ -126,7 +126,7 @@ index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56a @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -186,6 +192,8 @@ - (BOOL)hasViewsMenuActive { +@@ -209,6 +215,8 @@ - (BOOL)hasViewsMenuActive { // NSWindow overrides. @@ -135,7 +135,7 @@ index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56a + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -197,6 +205,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -220,6 +228,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 3b5355498e8b6..426b8591f4b1c 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,7 +11,7 @@ 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 04691696ee653b95cf046edfd464b1a800a38abe..b567b1e1fa9e5103a6219292a649f8807f0aa7ae 100644 +index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063f77f707a 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm @@ -51,6 +51,7 @@ @@ -44,10 +44,10 @@ index 04691696ee653b95cf046edfd464b1a800a38abe..b567b1e1fa9e5103a6219292a649f880 } // 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 6394980da8ab8b38e29693ccedfc3827ac111a4c..7fff28ee83475963f80987f7736ac866daa7dad2 100644 +index 26a2fa4c0f39ea0254bee322f355d92a55ba3b4e..e42de9720456161c187d41d39487ee3272fa1cf9 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 -@@ -567,10 +567,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,10 +61,10 @@ index 6394980da8ab8b38e29693ccedfc3827ac111a4c..7fff28ee83475963f80987f7736ac866 // 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 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf77817c9e 100644 +index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4fb37ae38 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 -@@ -73,8 +73,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -74,8 +74,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -136,8 +138,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -137,8 +139,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -87,7 +87,7 @@ index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf } 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 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b442248c6a 100644 +index 0048862cb89d519b8c1c111f923e6dd960c855d6..c7b9124462b0779ed4d1b27fe167e653bf5c6be5 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; @@ -114,10 +114,10 @@ index 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b4 // 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 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8a588829d 100644 +index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8f0727a45 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -252,8 +252,10 @@ +@@ -255,8 +255,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -128,7 +128,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1519,8 +1521,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1541,8 +1543,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8 return [GetInProcessNSView() window]; } -@@ -1564,9 +1568,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1586,9 +1590,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2061,12 +2067,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2083,12 +2089,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,11 +167,11 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 244b208e6a7872ea4d25fcf74a78abc9248a9ac3..45bafcaaa10641ca3a8306a6685ee9ed730d1e02 100644 +index 2e39255bdb26664e8bc2d0abb26c2359c9b84bd3..1425e9935b599b01fd53f43d0415a77002c92f00 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -319,6 +319,13 @@ component("base") { - ] +@@ -329,6 +329,13 @@ component("base") { + sources += [ "resource/resource_bundle_lacros.cc" ] } + if (is_mas_build) { @@ -205,7 +205,7 @@ 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 d4051a7a8755c7b10d4df3746cb2857471f07c45..de04616893d1c97e3607eb5a4b942733ae597b05 100644 +index c93aedbce83c398a55c478df60d5ba6dd5324a0b..dfa1983e5605d14e44efae3c1418b4e53c392333 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -31,7 +31,9 @@ @@ -218,7 +218,7 @@ index d4051a7a8755c7b10d4df3746cb2857471f07c45..de04616893d1c97e3607eb5a4b942733 @class NSView; namespace remote_cocoa { -@@ -449,11 +451,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -452,11 +454,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +233,10 @@ index d4051a7a8755c7b10d4df3746cb2857471f07c45..de04616893d1c97e3607eb5a4b942733 // 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 c9294c5358401da716b6d8d2846e20e9a04f4e2d..c9a3cdee33e3aa8bfbfa9c6678c2828a94b90061 100644 +index 1c4c4a774e4d5e199ae50e8df4499a497d3b0674..b2265079021d10e2944b9474fafe32ccca95d3de 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -297,14 +297,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -296,14 +296,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 c9294c5358401da716b6d8d2846e20e9a04f4e2d..c9a3cdee33e3aa8bfbfa9c6678c2828a } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1288,6 +1296,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1287,6 +1295,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 c9294c5358401da716b6d8d2846e20e9a04f4e2d..c9a3cdee33e3aa8bfbfa9c6678c2828a remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1295,14 +1304,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1294,14 +1303,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 940e9864b669b..d9abef548d026 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -40,7 +40,7 @@ index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b 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 767d3f6454ef3150354911ed683f5485bb83fbbb..f273b56276c1b277b307f6c4c061e08d12daea42 100644 +index 547a5c4260b28d651d470e06c4c4e6bfa77ef966..01fee4e6b104aad68d52f30c9af3e9072f078e0c 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm @@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@ index 767d3f6454ef3150354911ed683f5485bb83fbbb..f273b56276c1b277b307f6c4c061e08d } template -@@ -149,7 +150,9 @@ +@@ -160,7 +161,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 8a03d6be4a747..b28e29487b800 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -122,7 +122,7 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index 3f7dce0281f7b5a540d7b9377ef14a8a6aa9a2fa..11d8419791f3e45d5242081422d452d4fc703833 100644 +index d342eb4e9fc94de4365d86c2d1af4b85a8bf63a3..012f9ce97d9ed6b00deb718a88f432e053cb3bd1 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm @@ -42,6 +42,7 @@ 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 43c8aae94a345..0bfd677514878 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17ce7acaf6 100644 +index 12d74d8751802b06198952682bfc99f18e5f8df8..6a331146e6fbf23e4177176f67fe534141579eb7 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -127,6 +127,11 @@ +@@ -128,6 +128,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -435,6 +440,91 @@ bool GetFullDataFilePath( +@@ -436,6 +441,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -732,6 +822,13 @@ void NetworkContext::SetClient( +@@ -733,6 +823,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2298,6 +2395,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2301,6 +2398,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index e9a56db142f5f31e567bff7414db110f600fc7f2..98268925da14d61256f8dee3aa899f17 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 53e3f293150e725cd1261f09a8f9bfcb5371a76c..58671094857cdfe5d853c8a284d51bc1b8a09660 100644 +index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebdedafe6ba0b 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -108,6 +108,7 @@ class URLMatcher; +@@ -105,6 +105,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index 53e3f293150e725cd1261f09a8f9bfcb5371a76c..58671094857cdfe5d853c8a284d51bc1 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index 53e3f293150e725cd1261f09a8f9bfcb5371a76c..58671094857cdfe5d853c8a284d51bc1 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -827,6 +830,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -823,6 +826,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,10 +169,10 @@ index 53e3f293150e725cd1261f09a8f9bfcb5371a76c..58671094857cdfe5d853c8a284d51bc1 // 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 b2beaa762bfe88b56ac24d35646b6e6cbc630816..b52e5a2230e96d55d7886bde331a505c58dd093a 100644 +index cc3f99007db46a488d7f8dacd3ede4a90e1d2ae3..0450b50b5545d9b8f9025553167bed2e78157130 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -281,6 +281,17 @@ struct NetworkContextFilePaths { +@@ -282,6 +282,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index b2beaa762bfe88b56ac24d35646b6e6cbc630816..b52e5a2230e96d55d7886bde331a505c // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -830,6 +841,9 @@ interface NetworkContext { +@@ -833,6 +844,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 b4277e3d63f55..5df86e0449e32 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 83b33e3f521aa79942ba3446a8b161a4e4e23da1..24f409f673797b6e8bb1da680343ea1ddc083e4f 100644 +index 362fedd0a0b654db546a73ff84c7e0676097e824..f1f6e2a36a6764ef12827fdab16818061b007959 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -195,6 +195,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -31,7 +31,7 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48 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 32a61e73658d33dcd0fe1640094c8b79dde0be37..3c3650e0f8364a5c86bd11a6f11ca559a97f5900 100644 +index a3df152caabcadaba454f73f58763a89fdea4247..ba76f2f294a2eab8581b5ef8d879cb464f14cb1f 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc @@ -82,10 +82,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( @@ -77,7 +77,7 @@ index dc8de24c86f1769680ce7830844d35dfef7eb7e7..fcd99361fa8c895d6bd89bacb9fb94e7 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 7461d5079f9cb0f257fbb93248c98be9409d38e7..4ddb9e40f0441b378d73ac75d99ae64c90d32b58 100644 +index fe015fa7d7813115a2c6a23a00cb509c4c16cd93..88e04351204c786d0fc72a99ccc421f76fc26ef9 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc @@ -129,7 +129,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { @@ -90,7 +90,7 @@ index 7461d5079f9cb0f257fbb93248c98be9409d38e7..4ddb9e40f0441b378d73ac75d99ae64c 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 1195296c6f925e6c4f52f61866cf4b7f824af4e9..d3142bef0856c5cd7f4822ee9dcaedaef74a12d3 100644 +index fc24d16beb5a0ae61bf3123d0594287031d69ddf..6a6edfa8f919ffca815cc0f50fcde0b09067d494 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc @@ -282,13 +282,14 @@ void PlatformNotificationContextImpl::Shutdown() { @@ -130,10 +130,10 @@ index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b 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 b769a06dc9443317a1073738c6fd38816ebeb186..20a697be32f7e27a9fa33d0225c94520aa5ebf2e 100644 +index 36830abdfa49fed9b8294ca33065816faa672e18..36b4e75828436df4274b522bdf75e88e1112aab6 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2083,7 +2083,8 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2085,7 +2085,8 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 4e2dbb1fe2106..c7f550e631fc7 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/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc -index 3309906bcae27ba89d73ce4fba49843a10cd31f6..987917a440480130d35f34f85c27ff7c27632fd9 100644 +index 27e776fcf770b0ef72151d98d07778badabe807e..f7fb7850497a289ca8627752ba952d9f59468079 100644 --- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc @@ -15,15 +15,19 @@ @@ -113,7 +113,7 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866 // OverlayWindowViews bool ControlsHitTestContainsPoint(const gfx::Point& point) override; diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index 850b34e3b40f7ff1848c66158976db079e0853bd..74178fd4752e9c469d50ccafda61157acd9edd56 100644 +index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d123fbd783 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -14,9 +14,11 @@ @@ -138,7 +138,7 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..74178fd4752e9c469d50ccafda61157a #include "ui/aura/window.h" #include "ui/aura/window_tree_host.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 c24fdd1360e582293a8b21b2f29dc6bc02b564c9..b9b2b4aa7d168cd7a83c36edbe4f7dc30565c921 100644 +index c1d2614f3ae3e7256db95a2cd3c5253ab6b25bd0..cabe6f261c863c35882deb8f850194e27f78a4f9 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 @@ @@ -162,7 +162,7 @@ index c24fdd1360e582293a8b21b2f29dc6bc02b564c9..b9b2b4aa7d168cd7a83c36edbe4f7dc3 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -167,7 +169,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -166,7 +168,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); 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 8dc0b14a55140..4d30cc3869be4 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index d1a9c517a69bcc79a4b42f8eb8b6fcc3cea2f4da..04569140589c25d37bad2cd5ff979cfc6b1f3f43 100644 +index 14d91a0d19c01a856a9614b127a4ef3655614684..a243dd71886af7c5313b16a8522a50ae50af5959 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -125,6 +125,16 @@ +@@ -128,6 +128,16 @@ E_CPONLY(kColorOverlayScrollbarStrokeHoveredDark) \ E_CPONLY(kColorOverlayScrollbarStrokeHoveredLight) \ E_CPONLY(kColorProgressBar) \ @@ -28,7 +28,7 @@ index d1a9c517a69bcc79a4b42f8eb8b6fcc3cea2f4da..04569140589c25d37bad2cd5ff979cfc E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -177,6 +187,7 @@ +@@ -180,6 +190,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -37,10 +37,10 @@ index d1a9c517a69bcc79a4b42f8eb8b6fcc3cea2f4da..04569140589c25d37bad2cd5ff979cfc #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index b404ef6063c3a6c542565de46458b7401f129963..ce6fca0516d91b8acfe5fe6bc89bc09ae03a17d6 100644 +index 8b5b8c6321aaf668ad90870a0567c1a97d268323..8296b2c017f1774c1a38d931add2b7cac4f57dfe 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -143,6 +143,17 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -149,6 +149,17 @@ void AddUiColorMixer(ColorProvider* provider, SetAlpha(GetColorWithMaxContrast(kColorOverlayScrollbarFillHoveredLight), gfx::kGoogleGreyAlpha500); mixer[kColorProgressBar] = {kColorAccent}; @@ -58,7 +58,7 @@ index b404ef6063c3a6c542565de46458b7401f129963..ce6fca0516d91b8acfe5fe6bc89bc09a mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -218,6 +229,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -228,6 +239,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 673afb1da0042..ac87ae19ab3c7 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 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac087918f54 100644 +index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dcf54817e9 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc -@@ -89,6 +89,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { +@@ -90,6 +90,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization); } @@ -22,7 +22,7 @@ index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac0 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 -@@ -97,6 +98,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { +@@ -98,6 +99,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { web_contents ? web_contents->GetBrowserContext() : nullptr; return context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr; } @@ -30,7 +30,7 @@ index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac0 #endif // BUILDFLAG(IS_WIN) -@@ -356,8 +358,10 @@ void PrintJob::StartPdfToEmfConversion( +@@ -351,8 +353,10 @@ void PrintJob::StartPdfToEmfConversion( const PrintSettings& settings = document()->settings(); @@ -42,7 +42,7 @@ index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac0 using RenderMode = PdfRenderSettings::Mode; RenderMode mode = print_with_reduced_rasterization -@@ -447,8 +451,10 @@ void PrintJob::StartPdfToPostScriptConversion( +@@ -442,8 +446,10 @@ void PrintJob::StartPdfToPostScriptConversion( if (ps_level2) { mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2; } else { @@ -54,22 +54,8 @@ index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac0 ? PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } -diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471c359553b 100644 ---- a/chrome/browser/printing/print_job.h -+++ b/chrome/browser/printing/print_job.h -@@ -261,6 +261,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { - public: - // Event type. - enum Type { -+ // Print... dialog box has been closed with CANCEL button. -+ USER_INIT_CANCELED, -+ - // A new document started printing. - NEW_DOC, - diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index f989f040cb9ff6df001225057202fb1653ade9fc..8a7dd2a4c4e9f5c778a8a35658cb55883ea5fae5 100644 +index ee713c5686d4ea8a5d73cebf74e67381b685cff6..375ce3294727b84bf0071681c7bc35c772e4e3b9 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -88,7 +74,7 @@ index f989f040cb9ff6df001225057202fb1653ade9fc..8a7dd2a4c4e9f5c778a8a35658cb5588 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -230,16 +230,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -229,16 +229,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -114,10 +100,10 @@ index f989f040cb9ff6df001225057202fb1653ade9fc..8a7dd2a4c4e9f5c778a8a35658cb5588 #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 02dfcad0c6b208f7df4d2b10112739554f6ab75c..0774aa95ee1521b0e76fe72d8d9e8de4540f0ff1 100644 +index dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a2c5e15c7 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -331,7 +331,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -345,7 +345,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -127,7 +113,7 @@ index 02dfcad0c6b208f7df4d2b10112739554f6ab75c..0774aa95ee1521b0e76fe72d8d9e8de4 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b1071921e7cabb4 100644 +index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..a082dd9ee23b6d4918c194161386b973039d3ff6 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -143,15 +129,15 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 #include "components/prefs/pref_service.h" #include "components/printing/browser/print_composite_client.h" #include "components/printing/browser/print_manager_utils.h" -@@ -49,6 +49,7 @@ +@@ -48,6 +48,7 @@ + #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" - #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +#include "chrome/grit/generated_resources.h" #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -88,6 +89,8 @@ using PrintSettingsCallback = +@@ -87,6 +88,8 @@ using PrintSettingsCallback = base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { @@ -160,7 +146,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -96,6 +99,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -95,6 +98,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -168,7 +154,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -193,7 +197,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -192,7 +196,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -179,7 +165,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -246,6 +252,7 @@ void ScriptedPrintReplyOnIO( +@@ -245,6 +251,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -187,7 +173,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -255,8 +262,9 @@ void ScriptedPrintReplyOnIO( +@@ -254,8 +261,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -198,7 +184,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -294,12 +302,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -293,12 +301,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -213,7 +199,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -307,7 +317,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -306,7 +316,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -225,18 +211,17 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -333,7 +346,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -332,6 +345,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); -- GetPrintRenderFrame(rfh)->PrintRequestedPages(); + callback_ = std::move(callback); + + GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings)); - for (auto& observer : GetObservers()) - observer.OnPrintNow(rfh); -@@ -486,7 +501,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( + #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) + enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; +@@ -500,7 +516,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -246,7 +231,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -499,16 +515,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -513,16 +530,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -270,7 +255,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 } void PrintViewManagerBase::NavigationStopped() { -@@ -624,11 +643,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -638,11 +658,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -285,8 +270,8 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -658,18 +680,20 @@ void PrintViewManagerBase::UpdatePrintSettings( - base::Value job_settings, +@@ -672,18 +695,20 @@ void PrintViewManagerBase::UpdatePrintSettings( + base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +#if 0 // Printing is always enabled. @@ -297,7 +282,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 } - +#endif - if (!job_settings.FindIntKey(kSettingPrinterType)) { + if (!job_settings.FindInt(kSettingPrinterType)) { UpdatePrintSettingsReply(std::move(callback), CreateEmptyPrintPagesParamsPtr(), false); return; @@ -307,15 +292,15 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -679,6 +703,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -693,6 +718,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) - job_settings.SetIntKey(kSettingRasterizePdfDpi, value); + job_settings.Set(kSettingRasterizePdfDpi, value); } +#endif auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -704,14 +729,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -718,14 +744,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -332,15 +317,15 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 return; } #endif -@@ -734,7 +759,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { - PrintManager::PrintingFailed(cookie); +@@ -763,7 +789,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, + PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. - ShowPrintErrorDialog(); #endif ReleasePrinterQuery(); -@@ -749,6 +773,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -778,6 +803,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -352,7 +337,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -759,10 +788,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -788,10 +818,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -365,7 +350,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 } void PrintViewManagerBase::DidStartLoading() { -@@ -822,6 +853,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -851,6 +883,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -377,7 +362,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -883,7 +919,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -908,7 +945,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -389,7 +374,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 if (!weak_this) return false; -@@ -965,6 +1004,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -987,6 +1027,13 @@ void PrintViewManagerBase::ReleasePrintJob() { UnregisterSystemPrintClient(); #endif @@ -403,7 +388,7 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 if (!print_job_) return; -@@ -1014,7 +1060,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1036,7 +1083,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -412,11 +397,20 @@ index 3a3f733c45e08e461a74d2458172c38ec0e572bf..ae520ae7e671183887a4703c3b107192 return true; if (!cookie) { +@@ -1144,7 +1191,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, + } + + void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { +- GetPrintRenderFrame(rfh)->PrintRequestedPages(); ++ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/); + + for (auto& observer : GetObservers()) + observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61ddde6cd552 100644 +index 746df417a23f7760818ba265d4a7d589dec8bf34..5566e7dc2929a2542c599fed91fb1eeeb866e7bb 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 { +@@ -41,6 +41,8 @@ namespace printing { class PrintQueriesQueue; class PrinterQuery; @@ -425,7 +419,7 @@ index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61dd // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { public: -@@ -58,7 +60,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -64,7 +66,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -437,15 +431,15 @@ index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61dd #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in -@@ -106,6 +111,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { - ScriptedPrintCallback callback) override; +@@ -113,6 +118,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void ShowInvalidPrinterSettingsError() override; - void PrintingFailed(int32_t cookie) override; + void PrintingFailed(int32_t cookie, + mojom::PrintFailureReason reason) override; + void UserInitCanceled(); // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -207,7 +213,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -241,7 +247,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -455,7 +449,7 @@ index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61dd // 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 -@@ -262,9 +269,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -314,9 +321,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -472,94 +466,68 @@ index 3a4cfa1e44d781a94030dec6992ffd6f6391020f..d14804d02cc61b6f75d47893f6dd61dd // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc -index 879004c790d57b28e7a816ebf560971876c17168..334509d3ab45af4bb7877f656ca5aca7ee1bce00 100644 +index aa727261738698610fab5abd3618d0d0f0d29792..8f95dae637ce25a073872ecdf229f14cc6d0614c 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc -@@ -20,7 +20,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( +@@ -21,7 +21,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( FakePrintRenderFrame::~FakePrintRenderFrame() = default; -void FakePrintRenderFrame::PrintRequestedPages() {} +void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value /*settings*/) {} - void FakePrintRenderFrame::PrintForSystemDialog() {} - + void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params) { + NOTREACHED(); diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h -index 10f46664d8337d6be2fac24d9a6933429f3b2c2b..6de833f2da3ae85cf0752284146974f2026ab174 100644 +index 5f4d6e314b21351e3e5912e3a43ef87774343085..2a93fe0139025d1a40b3f8e81378ee4213ac27c1 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h -@@ -24,7 +24,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { +@@ -25,7 +25,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { private: // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; + void PrintRequestedPages(bool silent, ::base::Value settings) override; + void PrintWithParams(mojom::PrintPagesParamsPtr params) override; void PrintForSystemDialog() override; void SetPrintPreviewUI( - mojo::PendingAssociatedRemote preview) override; diff --git a/components/printing/browser/print_to_pdf/pdf_print_manager.cc b/components/printing/browser/print_to_pdf/pdf_print_manager.cc -index 66810a2a5f0c77ba107c71d2abaef8692bda0fea..cd6103af4571f82f11652a3c7ecf0e534428dc49 100644 +index 82591f8c2abbc1a180ef62f7264a68ca279e9b9c..ad27a15ba3028af1046482192dec789df5dda7b2 100644 --- a/components/printing/browser/print_to_pdf/pdf_print_manager.cc +++ b/components/printing/browser/print_to_pdf/pdf_print_manager.cc -@@ -116,7 +116,8 @@ void PdfPrintManager::PrintToPdf( - set_cookie(print_pages_params_->params->document_cookie); +@@ -132,7 +132,8 @@ void PdfPrintManager::PrintToPdf( + set_cookie(print_pages_params->params->document_cookie); callback_ = std::move(callback); -- GetPrintRenderFrame(rfh)->PrintRequestedPages(); +- GetPrintRenderFrame(rfh)->PrintWithParams(std::move(print_pages_params)); + // TODO(electron-maintainers): do something with job_settings here? + GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/); } void PdfPrintManager::GetDefaultPrintSettings( -@@ -138,14 +139,14 @@ void PdfPrintManager::ScriptedPrint( - if (!printing_rfh_) { - DLOG(ERROR) << "Unexpected message received before PrintToPdf is " - "called: ScriptedPrint"; -- std::move(callback).Run(std::move(default_param)); -+ std::move(callback).Run(std::move(default_param), true/*canceled*/); - return; - } - if (params->is_scripted && - GetCurrentTargetFrame()->IsNestedWithinFencedFrame()) { - DLOG(ERROR) << "Unexpected message received. Script Print is not allowed" - " in a fenced frame."; -- std::move(callback).Run(std::move(default_param)); -+ std::move(callback).Run(std::move(default_param), true/*canceled*/); - return; - } - absl::variant page_ranges = -@@ -162,7 +163,7 @@ void PdfPrintManager::ScriptedPrint( - break; - } - ReleaseJob(print_result); -- std::move(callback).Run(std::move(default_param)); -+ std::move(callback).Run(std::move(default_param), true/*canceled*/); - return; - } - -@@ -170,7 +171,7 @@ void PdfPrintManager::ScriptedPrint( - print_pages_params_->pages = printing::PageRange::GetPages( - absl::get(page_ranges)); - -- std::move(callback).Run(print_pages_params_->Clone()); -+ std::move(callback).Run(print_pages_params_->Clone(), false/*canceled*/); +@@ -147,7 +148,7 @@ void PdfPrintManager::ScriptedPrint( + auto default_param = printing::mojom::PrintPagesParams::New(); + default_param->params = printing::mojom::PrintParams::New(); + DLOG(ERROR) << "Scripted print is not supported"; +- std::move(callback).Run(std::move(default_param)); ++ std::move(callback).Run(std::move(default_param), true/*canceled*/); } void PdfPrintManager::ShowInvalidPrinterSettingsError() { diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 6cd585d597315940be144506b9bb819137a7981e..8ea9c38a46460edd237f003ddd7362240a02887e 100644 +index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..fa53eb1c9dd4e7a6b321bdd4cda2164b95244323 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -275,7 +275,7 @@ interface PrintPreviewUI { +@@ -280,7 +280,7 @@ enum PrintFailureReason { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. - PrintRequestedPages(); + PrintRequestedPages(bool silent, mojo_base.mojom.DeprecatedDictionaryValue settings); - // 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 -@@ -342,7 +342,7 @@ interface PrintManagerHost { + // Requests the frame to be printed with specified parameters. This is used + // to programmatically produce PDF by request from the browser (e.g. over +@@ -362,7 +362,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] @@ -569,18 +537,18 @@ index 6cd585d597315940be144506b9bb819137a7981e..8ea9c38a46460edd237f003ddd736224 // 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 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8bdd9963fa 100644 +index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9567214a1 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -40,6 +40,7 @@ - #include "printing/metafile_skia.h" +@@ -42,6 +42,7 @@ #include "printing/mojom/print.mojom.h" + #include "printing/page_number.h" #include "printing/print_job_constants.h" +#include "printing/print_settings.h" #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" -@@ -1264,7 +1265,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1277,7 +1278,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -590,7 +558,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b if (!weak_this) return; -@@ -1295,7 +1297,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1308,7 +1310,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -599,7 +567,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1310,7 +1312,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1323,7 +1325,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -608,7 +576,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1341,7 +1343,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1389,7 +1391,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -618,7 +586,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1390,6 +1393,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1438,6 +1441,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -627,7 +595,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1942,7 +1947,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2051,7 +2056,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -637,7 +605,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b // Check if |this| is still valid. if (!weak_this) return; -@@ -1957,7 +1963,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2066,7 +2072,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -648,7 +616,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1965,7 +1973,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2074,7 +2082,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -657,7 +625,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1984,8 +1992,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -674,7 +642,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b // Check if |this| is still valid. if (!self) return; -@@ -2233,36 +2248,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2327,36 +2342,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -695,7 +663,8 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b + bool canceled = false; + int cookie = + print_pages_params_ ? print_pages_params_->params->document_cookie : 0; -+ GetPrintManagerHost()->UpdatePrintSettings(cookie, new_settings.Clone(), &settings, &canceled); ++ GetPrintManagerHost()->UpdatePrintSettings( ++ cookie, new_settings.GetDict().Clone(), &settings, &canceled); + if (canceled) + return false; + } @@ -738,7 +707,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2406,7 +2436,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2481,7 +2512,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -747,7 +716,7 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2657,18 +2687,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2725,18 +2756,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { @@ -768,19 +737,19 @@ index 36852ff8edee8da4ca43cf84c316f1f0eaff9fe0..7be102bae492701cddefc1623af4fe8b bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index cd26f9ecf888c2a321890edd378ee0f8843a7f6c..958794f95fe8830b7e494340fbd53b0e92a498e3 100644 +index 220b28a7e63625fe8b76290f0d2f40dd32cae255..72801431a5d19f31c1a7db785b0cbaee8e65cca3 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -257,7 +257,7 @@ class PrintRenderFrameHelper +@@ -255,7 +255,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; + void PrintRequestedPages(bool silent, base::Value settings) override; + void PrintWithParams(mojom::PrintPagesParamsPtr params) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; - void SetPrintPreviewUI( -@@ -324,7 +324,9 @@ class PrintRenderFrameHelper +@@ -327,7 +327,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -791,7 +760,7 @@ index cd26f9ecf888c2a321890edd378ee0f8843a7f6c..958794f95fe8830b7e494340fbd53b0e // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -333,12 +335,14 @@ class PrintRenderFrameHelper +@@ -336,12 +338,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -809,19 +778,19 @@ index cd26f9ecf888c2a321890edd378ee0f8843a7f6c..958794f95fe8830b7e494340fbd53b0e #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 d0ef2181c649afe110c3c466a565a01cf6ae63a9..2daf9f02d41e04930fc4dad6d36ccbf3006dc175 100644 +index 8a8fcefa9da92a044f5bdf6a2f242048b325d442..6dae33514675d6843736b2c9a767a4b72cb103fa 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc -@@ -119,7 +119,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { +@@ -117,7 +117,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { mojom::ResultCode PrintingContext::UpdatePrintSettings( - base::Value job_settings) { + base::Value::Dict job_settings) { - ResetSettings(); { std::unique_ptr settings = - PrintSettingsFromJobSettings(job_settings.GetDict()); + PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 3f36303105b7979a1a771bf26b42596abe5b3cce..52f740bb832db4a8d76431d9bc77cab10bb7e0c7 100644 +index 2c8ef23f7cb75a743fa18e3c613f7c719988028c..265005d6d51f861aa7ccd7e0eba7809b3c652dae 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -170,6 +170,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index e5d125cd0dbb9..0d6d8328df700 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd0493c942 100644 +index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240afa9bedeb 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -86,15 +86,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd #include #include "base/base_paths.h" -@@ -80,6 +81,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" -@@ -96,9 +98,11 @@ +@@ -96,9 +97,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" @@ -106,7 +98,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd #if defined(TOOLKIT_VIEWS) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -347,6 +351,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -347,6 +350,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -116,7 +108,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -366,6 +373,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -366,6 +372,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -124,7 +116,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd } bool IsChromeProcess(pid_t pid) { -@@ -406,6 +414,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -406,6 +413,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -146,7 +138,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -773,6 +796,10 @@ ProcessSingleton::ProcessSingleton( +@@ -773,6 +795,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -157,13 +149,13 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -945,6 +972,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -945,6 +971,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } +void ProcessSingleton::StartListeningOnSocket() { + watcher_ = base::MakeRefCounted(this); -+ base::PostTask(FROM_HERE, {BrowserThread::IO}, ++ content::GetIOThreadTaskRunner({})->PostTask(FROM_HERE, + base::BindOnce(&ProcessSingleton::LinuxWatcher::StartListening, + watcher_, sock_)); +} @@ -178,7 +170,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1044,14 +1085,32 @@ bool ProcessSingleton::Create() { +@@ -1044,14 +1084,32 @@ bool ProcessSingleton::Create() { #endif } @@ -216,7 +208,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1094,10 +1153,13 @@ bool ProcessSingleton::Create() { +@@ -1094,10 +1152,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); @@ -235,10 +227,10 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd return true; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index e2312c65623a3f54ecbc18058720ccae53822e76..ec725b44296266bea1a51aea889463a0bba8449c 100644 +index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -28,7 +28,9 @@ +@@ -29,7 +29,9 @@ #include "base/win/wmi.h" #include "chrome/browser/process_singleton_internal.h" #include "chrome/browser/shell_integration.h" diff --git a/patches/chromium/proxy_config_monitor.patch b/patches/chromium/proxy_config_monitor.patch index 155415a59b428..6b489214e651e 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 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a8bb9daae 100644 +index d05a82a9c369a42cddebb1af1546a5ba6ae59c9f..7a263e3e6cc2a6bd27ec61598d9aae81c12d16e0 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc @@ -11,7 +11,9 @@ @@ -34,7 +34,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(profile); -@@ -56,6 +59,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { +@@ -57,6 +60,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { proxy_config_service_->AddObserver(this); } @@ -42,7 +42,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_state) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || -@@ -133,9 +137,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() { +@@ -134,9 +138,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() { void ProxyConfigMonitor::OnPACScriptError(int32_t line_number, const std::string& details) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -54,7 +54,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a } void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( -@@ -149,9 +155,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( +@@ -150,9 +156,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( // controlled. return; } 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 1fb2c1b47c131..576ccc34bd1d6 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 7cda66952e0d3a67c32791ad3c7d7de8df03f876..8cb3a596593c52e776d546d25fb078003204faa6 100644 +index fcc45c987cfce94f5378d4aeee1cfe703178e133..d78ca15f4d589b6789908168c00d9e403e62d6f4 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2080,6 +2080,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2081,6 +2081,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 7cda66952e0d3a67c32791ad3c7d7de8df03f876..8cb3a596593c52e776d546d25fb07800 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index df03de0a810bbce796d5bc421b92000e02dbd449..b9309e1cbc4a8b701534aa8be2827c40d98d6678 100644 +index a96bb634eb5c5405abb62b88d576e5e3ed354caa..1b616ba52d9c77c64c7f24a0d204ce36641dce38 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4519,6 +4519,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4527,6 +4527,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index df03de0a810bbce796d5bc421b92000e02dbd449..b9309e1cbc4a8b701534aa8be2827c40 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 80aeacf4ad593a7d40dae6c9096ab0c700ab22d8..07355cb194bd429a693e587072d11432d6c0888a 100644 +index 6b6fc6881c88b72c164d786c036b2e56ccd43ac8..df1633d59070e19592a52f02a76bdd9006d7c6f0 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -954,6 +954,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index ae36800e4a5dc..66ec1ac0489e0 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,10 +12,10 @@ 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 460442d9c0f894f78b29b33c027320511511dbcc..30068c219aa497892e10290be0fe5734ded8b23c 100644 +index 49ce51acb678886e0c679caa42e616400ab3bd48..760d97e8614195c8106b07b8477cf91a5dbebc15 100644 --- a/base/callback_helpers.h +++ b/base/callback_helpers.h -@@ -95,6 +95,22 @@ class OnceCallbackHolder final { +@@ -96,6 +96,22 @@ class OnceCallbackHolder final { } // namespace internal diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 88293ba5df857..4742a2456d48e 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 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66dc8d9d5da 100644 +index aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4087ce4ff 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 -@@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -29,7 +29,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -610,6 +619,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -611,6 +620,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d return [self acceptsMouseEventsWhenInactive]; } -@@ -686,6 +698,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -687,6 +699,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d 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 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1751,9 +1771,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1769,9 +1789,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 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1762,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1780,7 +1802,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6b0998109b045..ad3734548752a 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 7203dde2f96d5e8ed44443e21a2257166b6e6f36..3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4 100644 +index 5c564fe889ca6621ff33d31d8d2fff93563093eb..99ab95668a7d3a31339b576b4a3a6038f39c2795 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1529,7 +1529,7 @@ if (is_chrome_branded && !is_android) { +@@ -1534,7 +1534,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 7203dde2f96d5e8ed44443e21a2257166b6e6f36..3c40d999a9545051e91a9f0ad3bf7ca2 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1558,6 +1558,12 @@ if (!is_android) { +@@ -1563,6 +1563,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 535a2d61a447d..38a37c6c62911 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 24b18a620f3e60ed26dddfaa5d3133b5ede972fe..0377f156a23182d1a65fe5ef82f3f5203b98aed0 100644 +index f81f1104399a42009f7705585716579d4c17ad03..d08e4c8223078230e35afd21b6f98ec839664ea9 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1320,7 +1320,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1343,7 +1343,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 e10c15ba036d4..c60a1ac2733bb 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 20a697be32f7e27a9fa33d0225c94520aa5ebf2e..927e182bbba7a3700fd20c8c964da7cc162c4210 100644 +index 36b4e75828436df4274b522bdf75e88e1112aab6..0c8d0735523d388d0e68d2ad0b20a1c2525502ed 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1786,9 +1786,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1791,9 +1791,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index 5ce4605f1e1ea..7e9b3c98af489 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_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -index 28e6c85b65b782c5b788b3e2283db070d4490c7a..87dc089b7c36d72d623c73cd5aba196f00a0d1f1 100644 +index b0279116fef365106926dd3b5e4cd5f0670c70ae..0b9e71de7a94d8b19b3534e8b8b9a5d56193567b 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -@@ -7,6 +7,7 @@ +@@ -8,6 +8,7 @@ #include "build/build_config.h" #include "content/public/common/content_switches.h" #include "sandbox/policy/mojom/sandbox.mojom.h" @@ -17,7 +17,7 @@ index 28e6c85b65b782c5b788b3e2283db070d4490c7a..87dc089b7c36d72d623c73cd5aba196f #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" -@@ -53,6 +54,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( +@@ -54,6 +55,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 645a763ee4263..a01f4031ad26c 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 c1b1bfc8333e93456178842db392eabff96bf4c9..1eee3bf88b5566b07cdb4f33fc03bf3d904ec6b9 100644 +index 0303ae1c4d8681bc1bf56eb9ff1fc13afd678706..7a38e596eededae649e8380ab99c6ce7f472aa77 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3057,6 +3057,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3065,6 +3065,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -23,12 +23,12 @@ index c1b1bfc8333e93456178842db392eabff96bf4c9..1eee3bf88b5566b07cdb4f33fc03bf3d + + if (!view_) { + - WebContentsViewDelegate* delegate = + std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3067,6 +3074,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, - view_.reset(CreateWebContentsView(this, delegate, - &render_view_host_delegate_view_)); +@@ -3075,6 +3082,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, + view_ = CreateWebContentsView(this, std::move(delegate), + &render_view_host_delegate_view_); } + } // !view_ CHECK(render_view_host_delegate_view_); diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 4821358337913..064c5466aee67 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 dad12d60cea0cd11302e38090eb9af204138b028..ee7615c26df635e433fe14d68dc0a724820f3d2a 100644 +index c842bf34f1510071875220c7d81d60300d459b82..18f26143d5b8f6d1aeb4b21ffecd4cdf50081159 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -899,10 +899,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index c63e24436accf..f6c4cbc526fed 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 b47dc4a90a0294c5d7e73f01c496fd2b4f621400..cf02dbe536eec67b77c85ceb73d285fcbde025fc 100644 +index e588b460aa32b4c984d593ed54e10310b59ace9b..2dd0997bc183685cbb0b6f34b4a254af0a09bdd5 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6324,6 +6324,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6223,6 +6223,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 4bd7a399681ec..00b3be1ea6281 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index eb8968c2a86102d0d3a21f07c394f1c360083c6c..025ef3f70a5ae34faf8c6013fbfba171 // 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 dbde0706007b8f202fcca5fc05562979617b0183..2adea2c2edabf3c401e9dcd228f1d57c08066059 100644 +index 16322f245b51465d77b08c0c5d4da0b79ba8ae03..bd63f484db056d099bada03a0d3aab7742016110 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -949,6 +949,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -966,6 +966,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index dbde0706007b8f202fcca5fc05562979617b0183..2adea2c2edabf3c401e9dcd228f1d57c 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 e7d0d3e7c08c2f6e83726e7fa2557847d148a0ed..c6e0a728150db2b5af41e12304c88d57e51faa43 100644 +index 213b0b9c28974aecbdd2dd1297dfa21cd716a337..f77763977aee112b854ade93b59172247599a16b 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; @@ -55,10 +55,10 @@ index e7d0d3e7c08c2f6e83726e7fa2557847d148a0ed..c6e0a728150db2b5af41e12304c88d57 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 0825226fae036b1e5503b66dabe4bd92ad6ee9bb..3cbb1ed9ef65cb9044a76b0a1686f6ab019c87b5 100644 +index 3f8fbe6330051d96715706801efdefcb2ee3b971..be0eb834ba868bb7f6f40e08277f4475a6a92f7d 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -714,6 +714,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -722,6 +722,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 0825226fae036b1e5503b66dabe4bd92ad6ee9bb..3cbb1ed9ef65cb9044a76b0a1686f6ab 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 68c38d2045c7c23650bd56717081bb001a4e690e..e0e08d4bdf9521ed5c1940d31665d1b675119f0d 100644 +index 265e4bed408747b5b22d2e930bc64fb2cb2c3b25..892b3e58443f1a82a6a41c6d52df7d2d701b377d 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -732,6 +732,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -734,6 +734,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 11730d37c9627..4d3c34796e359 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 025ef3f70a5ae34faf8c6013fbfba171c7f501ac..cea3f3dc05f91927f4ee8be5eec85ec2 // 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 2adea2c2edabf3c401e9dcd228f1d57c08066059..7c76b39ea82dd600b72288cccc571660b653b150 100644 +index bd63f484db056d099bada03a0d3aab7742016110..7aea168344138d6210216997047bdcd8edfab6cc 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -961,6 +961,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -978,6 +978,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 2adea2c2edabf3c401e9dcd228f1d57c08066059..7c76b39ea82dd600b72288cccc571660 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 c6e0a728150db2b5af41e12304c88d57e51faa43..7fa7dab64506ddc60e27096412ea7e93608a3394 100644 +index f77763977aee112b854ade93b59172247599a16b..f3518973a5e071bf428d928f20255c208cf4d0b9 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; @@ -65,10 +65,10 @@ index c6e0a728150db2b5af41e12304c88d57e51faa43..7fa7dab64506ddc60e27096412ea7e93 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 3cbb1ed9ef65cb9044a76b0a1686f6ab019c87b5..c7694b4a89c16d02f946598bcf66aa3d241af83e 100644 +index be0eb834ba868bb7f6f40e08277f4475a6a92f7d..00db8b6bdbf005a9aac20ede6ce810aefac4d03e 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -714,6 +714,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -722,6 +722,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/nan/.patches b/patches/nan/.patches index 5a0539df8d7b2..3b26a944836c5 100644 --- a/patches/nan/.patches +++ b/patches/nan/.patches @@ -1 +1 @@ -use_new_constructor_for_scriptorigin.patch +use_new_constructor_for_scriptorigin_when_17_x.patch diff --git a/patches/nan/use_new_constructor_for_scriptorigin.patch b/patches/nan/use_new_constructor_for_scriptorigin.patch deleted file mode 100644 index dfa36b750afc2..0000000000000 --- a/patches/nan/use_new_constructor_for_scriptorigin.patch +++ /dev/null @@ -1,42 +0,0 @@ -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/nan/use_new_constructor_for_scriptorigin_when_17_x.patch b/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch new file mode 100644 index 0000000000000..e2c18d2e64dd3 --- /dev/null +++ b/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Thu, 5 May 2022 14:14:36 -0700 +Subject: use new constructor for ScriptOrigin when >= 17.x + +https://chromium-review.googlesource.com/c/v8/v8/+/3395880 + +diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp +index a218167c7e3a5ec90c6668943cb395dba2bbe3a7..08557d5478d5400445603deffd721525ecbf746e 100644 +--- a/test/cpp/news.cpp ++++ b/test/cpp/news.cpp +@@ -115,7 +115,7 @@ NAN_METHOD(NewScript) { + + NAN_METHOD(NewScript2) { + v8::ScriptOrigin origin( +-#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION ++#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION + info.GetIsolate(), + #endif + New("x").ToLocalChecked()); +@@ -136,7 +136,7 @@ NAN_METHOD(CompileScript) { + + NAN_METHOD(CompileScript2) { + v8::ScriptOrigin origin( +-#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION ++#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION + info.GetIsolate(), + #endif + New("x").ToLocalChecked()); diff --git a/patches/node/.patches b/patches/node/.patches index e5114a032fb62..52db7b54f608f 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -40,4 +40,5 @@ process_fix_hang_after_note_exit_3521.patch feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch fix_preserve_proper_method_names_as-is_in_error_stack.patch macos_avoid_posix_spawnp_cwd_bug_3597.patch +src_update_importmoduledynamically.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch diff --git a/patches/node/src_update_importmoduledynamically.patch b/patches/node/src_update_importmoduledynamically.patch new file mode 100644 index 0000000000000..9f657d234096e --- /dev/null +++ b/patches/node/src_update_importmoduledynamically.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Camillo Bruni +Date: Mon, 15 Nov 2021 15:34:38 +0100 +Subject: src: update ImportModuleDynamically + +PR-URL: https://github.com/nodejs/node/pull/41610 +Reviewed-By: Jiawen Geng +Reviewed-By: Antoine du Hamel +Reviewed-By: Darshan Sen +Reviewed-By: Colin Ihrig + +diff --git a/src/module_wrap.cc b/src/module_wrap.cc +index aeb0d2cb37313bdbb00abe065c91362cac5dcb9a..1e049d7258d21c7d7049f393ecfa1b4f53325910 100644 +--- a/src/module_wrap.cc ++++ b/src/module_wrap.cc +@@ -46,7 +46,6 @@ using v8::PrimitiveArray; + using v8::Promise; + using v8::ScriptCompiler; + using v8::ScriptOrigin; +-using v8::ScriptOrModule; + using v8::String; + using v8::UnboundModuleScript; + using v8::Undefined; +@@ -559,7 +558,8 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( + + static MaybeLocal ImportModuleDynamically( + Local context, +- Local referrer, ++ Local host_defined_options, ++ Local resource_name, + Local specifier, + Local import_assertions) { + Isolate* isolate = context->GetIsolate(); +@@ -574,7 +574,7 @@ static MaybeLocal ImportModuleDynamically( + Local import_callback = + env->host_import_module_dynamically_callback(); + +- Local options = referrer->GetHostDefinedOptions(); ++ Local options = host_defined_options.As(); + if (options->Length() != HostDefinedOptions::kLength) { + Local resolver; + if (!Promise::Resolver::New(context).ToLocal(&resolver)) return {}; +@@ -588,11 +588,11 @@ static MaybeLocal ImportModuleDynamically( + + Local object; + +- int type = options->Get(isolate, HostDefinedOptions::kType) ++ int type = options->Get(context, HostDefinedOptions::kType) + .As() + ->Int32Value(context) + .ToChecked(); +- uint32_t id = options->Get(isolate, HostDefinedOptions::kID) ++ uint32_t id = options->Get(context, HostDefinedOptions::kID) + .As() + ->Uint32Value(context) + .ToChecked(); diff --git a/patches/v8/.patches b/patches/v8/.patches index 67b42548459b7..4e14f3e14ced3 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -7,3 +7,4 @@ do_not_export_private_v8_symbols_on_windows.patch fix_build_deprecated_attribute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch +revert_runtime_dhceck_terminating_exception_in_microtasks.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index c17d287366fd4..8ee43c0a6de39 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 fec387d31eb5842f4fb0ff617f10b2254c0ee260..2385ccc74d41c10a3f61179f31073062250afcdc 100644 +index 44b4f154b416eb9b145d2abe89f3e92d507cea77..8e8e20fcbda71ec98e949d3e5c582b30dfe67e06 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -606,7 +606,7 @@ config("internal_config") { +@@ -608,7 +608,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index fec387d31eb5842f4fb0ff617f10b2254c0ee260..2385ccc74d41c10a3f61179f31073062 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5826,7 +5826,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5876,7 +5876,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index fec387d31eb5842f4fb0ff617f10b2254c0ee260..2385ccc74d41c10a3f61179f31073062 deps = [ ":v8_libbase", -@@ -5864,6 +5864,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5914,6 +5914,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 1e2876e1fb704..0e23dc675bcc3 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,32 +6,32 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index d22910b209c614162363938accfc86696719ad12..22af6bf24d672817bf620b9411d1b678b7a9800f 100644 +index 6d478369375952e5af9bef922dba900067a79774..4c8bfb25e9fb2f9f9afcc57a61aff003f9db8e77 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9115,7 +9115,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9123,7 +9123,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { - DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy()); -+ //DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy()); - i::Isolate* isolate = reinterpret_cast(this); - isolate->default_microtask_queue()->PerformCheckpoint(this); ++ // DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy()); + i::Isolate* i_isolate = reinterpret_cast(this); + i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 509ee8574736261307d9e270b7151197c6988649..00532d4dedf67c0764ca574b40e10ff0ce184762 100644 +index a1d4680b02e9d22a3804f88b4249b10986044ade..74369f2e9fc3ecc4cc41a989ecc04cd554417b0b 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6200,9 +6200,9 @@ void Heap::TearDown() { +@@ -6230,9 +6230,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); - DCHECK(gc_prologue_callbacks_.end() == - std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(), - GCCallbackTuple(callback, gc_type, data))); -+// DCHECK(gc_prologue_callbacks_.end() == -+// std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(), -+// GCCallbackTuple(callback, gc_type, data))); ++ // DCHECK(gc_prologue_callbacks_.end() == ++ // std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(), ++ // GCCallbackTuple(callback, gc_type, data))); gc_prologue_callbacks_.emplace_back(callback, gc_type, data); } 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 01d7180fc6f13..ef5e00434e88e 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 1310890fbec222c0edfda08ec962292d39aca8d1..5ff12eaa98887826b9a962c41f69480ca1d9dd3a 100644 +index bf50ab9cf353f67cba37266a8d3ae298afb5a87c..cc2f9cca18e9229ef949183dd876db91e3021318 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -606,6 +606,10 @@ config("internal_config") { +@@ -608,6 +608,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index f3d31e645c36a..2a2002ed82572 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 2385ccc74d41c10a3f61179f31073062250afcdc..1310890fbec222c0edfda08ec962292d39aca8d1 100644 +index 8e8e20fcbda71ec98e949d3e5c582b30dfe67e06..bf50ab9cf353f67cba37266a8d3ae298afb5a87c 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5838,7 +5838,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5888,7 +5888,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { 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 267c4b8797500..9bffebef93014 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 7c6dec2b52514085a731f78a551370d54912b5e9..2e8332b9fa6a6a3f55e78f29f710afa02c268b99 100644 +index dd59d5d6afc7c8e0b309d4e8928cd2bb7e682884..f3445a71aa02683dc40221b2eee1a80071629fef 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) { diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch new file mode 100644 index 0000000000000..ee43f87b0374f --- /dev/null +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Mon, 9 May 2022 17:09:21 -0700 +Subject: Revert "[runtime] DHCECK terminating exception in Microtasks" + +This reverts commit bccb536c98181e8a6e9cf0b6342311adbbf61aca. + +diff --git a/src/builtins/builtins-microtask-queue-gen.cc b/src/builtins/builtins-microtask-queue-gen.cc +index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904af5d71f7 100644 +--- a/src/builtins/builtins-microtask-queue-gen.cc ++++ b/src/builtins/builtins-microtask-queue-gen.cc +@@ -118,7 +118,6 @@ void MicrotaskQueueBuiltinsAssembler::PrepareForContext( + void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( + TNode current_context, TNode microtask) { + CSA_DCHECK(this, TaggedIsNotSmi(microtask)); +- CSA_DCHECK(this, Word32BinaryNot(IsExecutionTerminating())); + + StoreRoot(RootIndex::kCurrentMicrotask, microtask); + TNode saved_entered_context_count = GetEnteredContextCount(); +diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc +index d1f275afcc7f8c6adcb4c8abf9aea04b6492f38f..2b82b08a6f7cf1b7023bbdb897bfdab6bd48da5e 100644 +--- a/src/codegen/code-stub-assembler.cc ++++ b/src/codegen/code-stub-assembler.cc +@@ -6170,12 +6170,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { + StoreFullTaggedNoWriteBarrier(pending_message, message); + } + +-TNode CodeStubAssembler::IsExecutionTerminating() { +- TNode pending_message = GetPendingMessage(); +- return TaggedEqual(pending_message, +- LoadRoot(RootIndex::kTerminationException)); +-} +- + TNode CodeStubAssembler::InstanceTypeEqual(TNode instance_type, + int type) { + return Word32Equal(instance_type, Int32Constant(type)); +diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h +index 123795af961c81278b947c9e8f012158d61c49df..7ac8af40f442025735498651931ab97904af6ecb 100644 +--- a/src/codegen/code-stub-assembler.h ++++ b/src/codegen/code-stub-assembler.h +@@ -2522,7 +2522,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler + + TNode GetPendingMessage(); + void SetPendingMessage(TNode message); +- TNode IsExecutionTerminating(); + + // Type checks. + // Check whether the map is for an object with special properties, such as a +diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc +index 2bea5d45bb0605877ad430882c914dddeb2c51c5..12a626900d0295be0b250cd6d4692ab4e329c681 100644 +--- a/src/execution/microtask-queue.cc ++++ b/src/execution/microtask-queue.cc +@@ -179,8 +179,6 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) { + processed_microtask_count); + } + +- DCHECK_IMPLIES(isolate->has_scheduled_exception(), +- maybe_result.is_null() && maybe_exception.is_null()); + // If execution is terminating, clean up and propagate that to TryCatch scope. + if (maybe_result.is_null() && maybe_exception.is_null()) { + delete[] ring_buffer_; diff --git a/script/lib/config.py b/script/lib/config.py index 7ba2163ab4a30..883a0374bc251 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -21,8 +21,6 @@ 'libGLESv2.so', 'libffmpeg.so', 'libvk_swiftshader.so', - 'swiftshader/libEGL.so', - 'swiftshader/libGLESv2.so', ] verbose_mode = False diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index 5bd0faa6da5e6..f7934c76a629a 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -36,7 +36,7 @@ async function main () { // file and pull cflags_cc from it instead of using bespoke code here? // I think it's unlikely to work; but if it does, it would be more futureproof const cxxflags = [ - '-std=c++14', + '-std=c++17', '-nostdinc++', `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 579502c128b9d..ba2bc83e85ac3 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -125,6 +125,8 @@ "report/test-report-uv-handles", "report/test-report-worker", "report/test-report-writereport", + "sequential/test-cpu-prof-kill", + "sequential/test-diagnostic-dir-cpu-prof", "sequential/test-tls-connect", "wpt/test-webcrypto" ] diff --git a/script/spec-runner.js b/script/spec-runner.js index 11502c2da0c23..ce16865f1089d 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -230,8 +230,13 @@ async function runMainProcessElectronTests () { } async function installSpecModules (dir) { + // v8 headers use c++17 so override the gyp default of -std=c++14, + // but don't clobber any other CXXFLAGS that were passed into spec-runner.js + const CXXFLAGS = ['-std=c++17', process.env.CXXFLAGS].filter(x => !!x).join(' '); + const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`); const env = Object.assign({}, process.env, { + CXXFLAGS, npm_config_nodedir: nodeDir, npm_config_msvs_version: '2019', npm_config_yes: 'true' diff --git a/script/zip_manifests/dist_zip.linux.arm.manifest b/script/zip_manifests/dist_zip.linux.arm.manifest index 82bcb68f4d167..224d2f036d572 100644 --- a/script/zip_manifests/dist_zip.linux.arm.manifest +++ b/script/zip_manifests/dist_zip.linux.arm.manifest @@ -69,8 +69,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.so -swiftshader/libGLESv2.so vk_swiftshader_icd.json v8_context_snapshot.bin version diff --git a/script/zip_manifests/dist_zip.linux.arm64.manifest b/script/zip_manifests/dist_zip.linux.arm64.manifest index 82bcb68f4d167..224d2f036d572 100644 --- a/script/zip_manifests/dist_zip.linux.arm64.manifest +++ b/script/zip_manifests/dist_zip.linux.arm64.manifest @@ -69,8 +69,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.so -swiftshader/libGLESv2.so vk_swiftshader_icd.json v8_context_snapshot.bin version diff --git a/script/zip_manifests/dist_zip.linux.x64.manifest b/script/zip_manifests/dist_zip.linux.x64.manifest index 82bcb68f4d167..224d2f036d572 100644 --- a/script/zip_manifests/dist_zip.linux.x64.manifest +++ b/script/zip_manifests/dist_zip.linux.x64.manifest @@ -69,8 +69,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.so -swiftshader/libGLESv2.so vk_swiftshader_icd.json v8_context_snapshot.bin version diff --git a/script/zip_manifests/dist_zip.linux.x86.manifest b/script/zip_manifests/dist_zip.linux.x86.manifest index 82bcb68f4d167..224d2f036d572 100644 --- a/script/zip_manifests/dist_zip.linux.x86.manifest +++ b/script/zip_manifests/dist_zip.linux.x86.manifest @@ -69,8 +69,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.so -swiftshader/libGLESv2.so vk_swiftshader_icd.json v8_context_snapshot.bin version diff --git a/script/zip_manifests/dist_zip.win.arm64.manifest b/script/zip_manifests/dist_zip.win.arm64.manifest index 9ae29943b772f..20a089bcd67c6 100755 --- a/script/zip_manifests/dist_zip.win.arm64.manifest +++ b/script/zip_manifests/dist_zip.win.arm64.manifest @@ -65,8 +65,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.dll -swiftshader/libGLESv2.dll vk_swiftshader_icd.json vk_swiftshader.dll vulkan-1.dll diff --git a/script/zip_manifests/dist_zip.win.ia32.manifest b/script/zip_manifests/dist_zip.win.ia32.manifest index cb7d05e9a4ec7..5d8deb41a53b8 100644 --- a/script/zip_manifests/dist_zip.win.ia32.manifest +++ b/script/zip_manifests/dist_zip.win.ia32.manifest @@ -66,8 +66,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.dll -swiftshader/libGLESv2.dll vk_swiftshader_icd.json vk_swiftshader.dll vulkan-1.dll diff --git a/script/zip_manifests/dist_zip.win.x64.manifest b/script/zip_manifests/dist_zip.win.x64.manifest index cb7d05e9a4ec7..5d8deb41a53b8 100644 --- a/script/zip_manifests/dist_zip.win.x64.manifest +++ b/script/zip_manifests/dist_zip.win.x64.manifest @@ -66,8 +66,6 @@ locales/zh-TW.pak resources.pak resources/default_app.asar snapshot_blob.bin -swiftshader/libEGL.dll -swiftshader/libGLESv2.dll vk_swiftshader_icd.json vk_swiftshader.dll vulkan-1.dll diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index a0ca93fc63e30..b757c598891bc 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -253,6 +253,8 @@ bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) { auto env = base::Environment::Create(); + gin_helper::Locker::SetIsBrowserProcess(IsBrowserProcess(command_line)); + // Enable convenient stack printing. This is enabled by default in // non-official builds. if (env->HasVar(kElectronEnableStackDumping)) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 6bd1d052e6cf0..1cff2713debe4 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -35,6 +35,7 @@ #include "crypto/crypto_buildflags.h" #include "media/audio/audio_manager.h" #include "net/dns/public/dns_over_https_config.h" +#include "net/dns/public/dns_over_https_server_config.h" #include "net/dns/public/util.h" #include "net/ssl/client_cert_identity.h" #include "net/ssl/ssl_cert_request_info.h" @@ -1680,17 +1681,18 @@ void ConfigureHostResolver(v8::Isolate* isolate, // Validate individual server templates prior to batch-assigning to // doh_config. + std::vector servers; for (const std::string& server_template : secure_dns_server_strings) { - absl::optional server_config = - net::DnsOverHttpsConfig::FromString(server_template); + absl::optional server_config = + net::DnsOverHttpsServerConfig::FromString(server_template); if (!server_config.has_value()) { thrower.ThrowTypeError(std::string("not a valid DoH template: ") + server_template); return; } + servers.push_back(*server_config); } - doh_config = *net::DnsOverHttpsConfig::FromStrings( - std::move(secure_dns_server_strings)); + doh_config = net::DnsOverHttpsConfig(std::move(servers)); } if (opts.Has("enableAdditionalDnsQueryTypes") && diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index 7651ddd0e653c..9dfc40f84bf22 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -10,7 +10,6 @@ #include #include -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "gin/handle.h" @@ -258,8 +257,8 @@ class BaseWindow : public gin_helper::TrackableObject, template void EmitEventSoon(base::StringPiece eventName) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(base::IgnoreResult(&BaseWindow::Emit), weak_factory_.GetWeakPtr(), eventName)); } diff --git a/shell/browser/api/electron_api_menu_mac.mm b/shell/browser/api/electron_api_menu_mac.mm index c57391b19487f..c61a02dca5d42 100644 --- a/shell/browser/api/electron_api_menu_mac.mm +++ b/shell/browser/api/electron_api_menu_mac.mm @@ -10,7 +10,6 @@ #include "base/mac/scoped_sending_event.h" #include "base/strings/sys_string_conversions.h" #include "base/task/current_thread.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" diff --git a/shell/browser/api/electron_api_native_theme.cc b/shell/browser/api/electron_api_native_theme.cc index 7c511685d1afa..6c60eaead4147 100644 --- a/shell/browser/api/electron_api_native_theme.cc +++ b/shell/browser/api/electron_api_native_theme.cc @@ -6,7 +6,6 @@ #include -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "gin/handle.h" @@ -39,8 +38,8 @@ void NativeTheme::OnNativeThemeUpdatedOnUI() { } void NativeTheme::OnNativeThemeUpdated(ui::NativeTheme* theme) { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&NativeTheme::OnNativeThemeUpdatedOnUI, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&NativeTheme::OnNativeThemeUpdatedOnUI, base::Unretained(this))); } diff --git a/shell/browser/api/electron_api_power_save_blocker.cc b/shell/browser/api/electron_api_power_save_blocker.cc index 34a11086d50d7..22126be69e78f 100644 --- a/shell/browser/api/electron_api_power_save_blocker.cc +++ b/shell/browser/api/electron_api_power_save_blocker.cc @@ -7,7 +7,6 @@ #include #include "base/callback_helpers.h" -#include "base/task/post_task.h" #include "base/threading/thread_task_runner_handle.h" #include "content/public/browser/device_service.h" #include "gin/dictionary.h" diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 19be4a8f3df88..d86e62dc7c8ad 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -17,7 +17,6 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" -#include "base/task/post_task.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" @@ -622,7 +621,7 @@ void Session::SetPermissionRequestHandler(v8::Local val, permission_manager->SetPermissionRequestHandler(base::BindRepeating( [](ElectronPermissionManager::RequestHandler* handler, content::WebContents* web_contents, - content::PermissionType permission_type, + blink::PermissionType permission_type, ElectronPermissionManager::StatusCallback callback, const base::Value& details) { handler->Run(web_contents, permission_type, @@ -951,8 +950,8 @@ void Session::Preconnect(const gin_helper::Dictionary& options, } DCHECK_GT(num_sockets_to_preconnect, 0); - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&StartPreconnectOnUI, base::Unretained(browser_context_), url, num_sockets_to_preconnect)); } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index f27eb39170c74..501e3cac4005d 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -18,7 +18,6 @@ #include "base/no_destructor.h" #include "base/strings/utf_string_conversions.h" #include "base/task/current_thread.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/threading/scoped_blocking_call.h" #include "base/threading/sequenced_task_runner_handle.h" @@ -995,8 +994,8 @@ void WebContents::Destroy() { if (Browser::Get()->is_shutting_down() || IsGuest()) { DeleteThisIfAlive(); } else { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce( + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( [](base::WeakPtr contents) { if (contents) contents->DeleteThisIfAlive(); @@ -3450,7 +3449,7 @@ v8::Local WebContents::TakeHeapSnapshot( void WebContents::GrantDevicePermission( const url::Origin& origin, const base::Value* device, - content::PermissionType permissionType, + blink::PermissionType permissionType, content::RenderFrameHost* render_frame_host) { granted_devices_[render_frame_host->GetFrameTreeNodeId()][permissionType] [origin] @@ -3460,7 +3459,7 @@ void WebContents::GrantDevicePermission( std::vector WebContents::GetGrantedDevices( const url::Origin& origin, - content::PermissionType permissionType, + blink::PermissionType permissionType, content::RenderFrameHost* render_frame_host) { const auto& devices_for_frame_host_it = granted_devices_.find(render_frame_host->GetFrameTreeNodeId()); diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 996c90cbbbc39..96940a3f32ea7 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -21,7 +21,6 @@ #include "content/common/frame.mojom.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/keyboard_event_processing_result.h" -#include "content/public/browser/permission_type.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" @@ -43,6 +42,7 @@ #include "shell/common/gin_helper/constructible.h" #include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/pinnable.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" #include "ui/base/models/image_model.h" #include "ui/gfx/image/image.h" @@ -61,7 +61,8 @@ class ScriptExecutor; namespace blink { struct DeviceEmulationParams; -} +// enum class PermissionType; +} // namespace blink namespace gin_helper { class Dictionary; @@ -97,7 +98,7 @@ namespace api { using DevicePermissionMap = std::map< int, - std::map>>>>; // Wrapper around the content::WebContents. @@ -439,7 +440,7 @@ class WebContents : public ExclusiveAccessContext, // To be used in place of ObjectPermissionContextBase::GrantObjectPermission. void GrantDevicePermission(const url::Origin& origin, const base::Value* device, - content::PermissionType permissionType, + blink::PermissionType permissionType, content::RenderFrameHost* render_frame_host); // Returns the list of devices that |origin| has been granted permission to @@ -447,7 +448,7 @@ class WebContents : public ExclusiveAccessContext, // ObjectPermissionContextBase::GetGrantedObjects. std::vector GetGrantedDevices( const url::Origin& origin, - content::PermissionType permissionType, + blink::PermissionType permissionType, content::RenderFrameHost* render_frame_host); // disable copy diff --git a/shell/browser/certificate_manager_model.cc b/shell/browser/certificate_manager_model.cc index e20503f20be4a..ea89a09b18901 100644 --- a/shell/browser/certificate_manager_model.cc +++ b/shell/browser/certificate_manager_model.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -72,8 +71,8 @@ net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext( void CertificateManagerModel::Create(content::BrowserContext* browser_context, CreationCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - base::PostTask(FROM_HERE, {BrowserThread::IO}, - base::BindOnce(&CertificateManagerModel::GetCertDBOnIOThread, + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&CertificateManagerModel::GetCertDBOnIOThread, browser_context->GetResourceContext(), std::move(callback))); } @@ -145,8 +144,8 @@ void CertificateManagerModel::DidGetCertDBOnIOThread( DCHECK_CURRENTLY_ON(BrowserThread::IO); bool is_user_db_available = !!cert_db->GetPublicSlot(); - base::PostTask( - FROM_HERE, {BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&CertificateManagerModel::DidGetCertDBOnUIThread, cert_db, is_user_db_available, std::move(callback))); } diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index f1d4d25077aac..b7ac2c5043709 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -21,11 +21,11 @@ #include "base/no_destructor.h" #include "base/path_service.h" #include "base/stl_util.h" +#include "base/strings/escape.h" #include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -57,7 +57,6 @@ #include "electron/shell/common/api/api.mojom.h" #include "extensions/browser/api/messaging/messaging_api_message_filter.h" #include "mojo/public/cpp/bindings/binder_map.h" -#include "net/base/escape.h" #include "net/ssl/ssl_cert_request_info.h" #include "ppapi/buildflags/buildflags.h" #include "ppapi/host/ppapi_host.h" @@ -395,9 +394,8 @@ ElectronBrowserClient* ElectronBrowserClient::Get() { // static void ElectronBrowserClient::SetApplicationLocale(const std::string& locale) { if (!BrowserThread::IsThreadInitialized(BrowserThread::IO) || - !base::PostTask( - FROM_HERE, {BrowserThread::IO}, - base::BindOnce(&SetApplicationLocaleOnIOThread, locale))) { + !content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&SetApplicationLocaleOnIOThread, locale))) { g_io_thread_application_locale.Get() = locale; } *g_application_locale = locale; @@ -964,10 +962,8 @@ ElectronBrowserClient::GetSystemNetworkContext() { } std::unique_ptr -ElectronBrowserClient::CreateBrowserMainParts( - content::MainFunctionParams params) { - auto browser_main_parts = - std::make_unique(std::move(params)); +ElectronBrowserClient::CreateBrowserMainParts(bool /* is_integration_test */) { + auto browser_main_parts = std::make_unique(); #if BUILDFLAG(IS_MAC) browser_main_parts_ = browser_main_parts.get(); @@ -1038,7 +1034,7 @@ void HandleExternalProtocolInUI( if (!permission_helper) return; - GURL escaped_url(net::EscapeExternalHandlerValue(url.spec())); + GURL escaped_url(base::EscapeExternalHandlerValue(url.spec())); auto callback = base::BindOnce(&OnOpenExternal, escaped_url); permission_helper->RequestOpenExternalPermission(std::move(callback), has_user_gesture, url); @@ -1057,8 +1053,8 @@ bool ElectronBrowserClient::HandleExternalProtocol( const absl::optional& initiating_origin, content::RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory) { - base::PostTask( - FROM_HERE, {BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&HandleExternalProtocolInUI, url, std::move(web_contents_getter), has_user_gesture)); return true; diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index a19b04c4a6851..b4b2ee87bee12 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -181,7 +181,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, std::unique_ptr CreateDevToolsManagerDelegate() override; std::unique_ptr CreateBrowserMainParts( - content::MainFunctionParams params) override; + bool /* is_integration_test */) override; base::FilePath GetDefaultDownloadDirectory() override; scoped_refptr GetSystemSharedURLLoaderFactory() override; diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 5d3c74ad3d054..a23f6a9c7fa09 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -14,8 +14,8 @@ #include "base/files/file_path.h" #include "base/no_destructor.h" #include "base/path_service.h" +#include "base/strings/escape.h" #include "base/strings/string_util.h" -#include "base/task/post_task.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/thread_restrictions.h" #include "chrome/common/chrome_paths.h" @@ -33,7 +33,6 @@ #include "content/public/browser/cors_origin_pattern_setter.h" #include "content/public/browser/shared_cors_origin_access_list.h" #include "content/public/browser/storage_partition.h" -#include "net/base/escape.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h" #include "services/network/public/mojom/network_context.mojom.h" @@ -88,7 +87,7 @@ namespace { // Convert string to lower case and escape it. std::string MakePartitionName(const std::string& input) { - return net::EscapePath(base::ToLowerASCII(input)); + return base::EscapePath(base::ToLowerASCII(input)); } } // namespace diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 5245db81376d3..2cbd8065807fd 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -74,11 +74,11 @@ #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_compat.h" // nogncheck -#include "ui/gtk/gtk_ui_factory.h" // nogncheck -#include "ui/gtk/gtk_util.h" // nogncheck +#include "ui/gtk/gtk_compat.h" // nogncheck +#include "ui/gtk/gtk_util.h" // nogncheck #include "ui/ozone/public/ozone_platform.h" #include "ui/views/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui_factory.h" #endif #if BUILDFLAG(IS_WIN) @@ -179,8 +179,7 @@ class DarkThemeObserver : public ui::NativeThemeObserver { // static ElectronBrowserMainParts* ElectronBrowserMainParts::self_ = nullptr; -ElectronBrowserMainParts::ElectronBrowserMainParts( - const content::MainFunctionParams& params) +ElectronBrowserMainParts::ElectronBrowserMainParts() : fake_browser_process_(std::make_unique()), browser_(std::make_unique()), node_bindings_( @@ -347,8 +346,8 @@ int ElectronBrowserMainParts::PreCreateThreads() { } void ElectronBrowserMainParts::PostCreateThreads() { - base::PostTask( - FROM_HERE, {content::BrowserThread::IO}, + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&tracing::TracingSamplerProfiler::CreateOnChildThread)); } @@ -366,8 +365,7 @@ void ElectronBrowserMainParts::PostDestroyThreads() { void ElectronBrowserMainParts::ToolkitInitialized() { #if BUILDFLAG(IS_LINUX) - auto linux_ui = BuildGtkUi(); - linux_ui->Initialize(); + auto linux_ui = CreateLinuxUi(); DCHECK(ui::LinuxInputMethodContextFactory::instance()); // Try loading gtk symbols used by Electron. @@ -417,11 +415,6 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { // url::Add*Scheme are not threadsafe, this helps prevent data races. url::LockSchemeRegistries(); - // The First-Party Sets feature always expects to be initialized - // CL: https://chromium-review.googlesource.com/c/chromium/src/+/3448551 - content::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets( - base::File()); - #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) extensions_client_ = std::make_unique(); extensions::ExtensionsClient::Set(extensions_client_.get()); @@ -446,8 +439,8 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { if (command_line->HasSwitch(switches::kRemoteDebuggingPipe)) { // --remote-debugging-pipe auto on_disconnect = base::BindOnce([]() { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce([]() { Browser::Get()->Quit(); })); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce([]() { Browser::Get()->Quit(); })); }); content::DevToolsAgentHost::StartRemoteDebuggingPipeHandler( std::move(on_disconnect)); diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index e41097ef35826..d0f813544f8d2 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -12,7 +12,6 @@ #include "base/timer/timer.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_main_parts.h" -#include "content/public/common/main_function_params.h" #include "electron/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/remote.h" #include "services/device/public/mojom/geolocation_control.mojom.h" @@ -67,7 +66,7 @@ class DarkThemeObserver; class ElectronBrowserMainParts : public content::BrowserMainParts { public: - explicit ElectronBrowserMainParts(const content::MainFunctionParams& params); + ElectronBrowserMainParts(); ~ElectronBrowserMainParts() override; // disable copy diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index 6640dd2e3c4b3..1eb33ae28c98f 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -15,7 +15,6 @@ #include "base/debug/leak_annotations.h" #include "base/posix/eintr_wrapper.h" -#include "base/task/post_task.h" #include "base/threading/platform_thread.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index 7558535ca29c7..917a3a466e9cd 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/files/file_util.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/threading/thread_restrictions.h" #include "chrome/common/pref_names.h" @@ -144,7 +143,8 @@ void ElectronDownloadManagerDelegate::OnDownloadPathGenerated( std::move(callback).Run( path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt, + item->GetMixedContentStatus(), path, base::FilePath(), + std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -184,7 +184,8 @@ void ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone( std::move(download_callback) .Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt, + item->GetMixedContentStatus(), path, base::FilePath(), + std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, interrupt_reason); } @@ -204,7 +205,8 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - download->GetForcedFilePath(), base::FilePath(), absl::nullopt, + download->GetForcedFilePath(), base::FilePath(), + std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } @@ -217,7 +219,8 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( save_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, save_path, - base::FilePath(), absl::nullopt, + base::FilePath(), std::string() /*mime_type*/, + absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index ad3ae6229fe0f..6970369b80432 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -13,7 +13,6 @@ #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/global_routing_id.h" #include "content/public/browser/permission_controller.h" -#include "content/public/browser/permission_type.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" @@ -30,6 +29,7 @@ #include "shell/common/gin_converters/frame_converter.h" #include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_helper/event_emitter_caller.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" namespace electron { @@ -54,7 +54,7 @@ void PermissionRequestResponseCallbackWrapper( class ElectronPermissionManager::PendingRequest { public: PendingRequest(content::RenderFrameHost* render_frame_host, - const std::vector& permissions, + const std::vector& permissions, StatusesCallback callback) : render_process_id_(render_frame_host->GetProcess()->GetID()), render_frame_id_(render_frame_host->GetGlobalId()), @@ -69,10 +69,10 @@ class ElectronPermissionManager::PendingRequest { if (status == blink::mojom::PermissionStatus::GRANTED) { const auto permission = permissions_[permission_id]; - if (permission == content::PermissionType::MIDI_SYSEX) { + if (permission == blink::PermissionType::MIDI_SYSEX) { content::ChildProcessSecurityPolicy::GetInstance() ->GrantSendMidiSysExMessage(render_process_id_); - } else if (permission == content::PermissionType::GEOLOCATION) { + } else if (permission == blink::PermissionType::GEOLOCATION) { ElectronBrowserMainParts::Get() ->GetGeolocationControl() ->UserDidOptIntoLocationServices(); @@ -99,7 +99,7 @@ class ElectronPermissionManager::PendingRequest { int render_process_id_; content::GlobalRenderFrameHostId render_frame_id_; StatusesCallback callback_; - std::vector permissions_; + std::vector permissions_; std::vector results_; size_t remaining_results_; }; @@ -133,7 +133,7 @@ void ElectronPermissionManager::SetDevicePermissionHandler( } void ElectronPermissionManager::RequestPermission( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, @@ -144,21 +144,21 @@ void ElectronPermissionManager::RequestPermission( } void ElectronPermissionManager::RequestPermissionWithDetails( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, const base::DictionaryValue* details, StatusCallback response_callback) { RequestPermissionsWithDetails( - std::vector(1, permission), render_frame_host, + std::vector(1, permission), render_frame_host, requesting_origin, user_gesture, details, base::BindOnce(PermissionRequestResponseCallbackWrapper, std::move(response_callback))); } void ElectronPermissionManager::RequestPermissions( - const std::vector& permissions, + const std::vector& permissions, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, @@ -169,7 +169,7 @@ void ElectronPermissionManager::RequestPermissions( } void ElectronPermissionManager::RequestPermissionsWithDetails( - const std::vector& permissions, + const std::vector& permissions, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, @@ -183,11 +183,11 @@ void ElectronPermissionManager::RequestPermissionsWithDetails( if (request_handler_.is_null()) { std::vector statuses; for (auto permission : permissions) { - if (permission == content::PermissionType::MIDI_SYSEX) { + if (permission == blink::PermissionType::MIDI_SYSEX) { content::ChildProcessSecurityPolicy::GetInstance() ->GrantSendMidiSysExMessage( render_frame_host->GetProcess()->GetID()); - } else if (permission == content::PermissionType::GEOLOCATION) { + } else if (permission == blink::PermissionType::GEOLOCATION) { ElectronBrowserMainParts::Get() ->GetGeolocationControl() ->UserDidOptIntoLocationServices(); @@ -234,12 +234,12 @@ void ElectronPermissionManager::OnPermissionResponse( } void ElectronPermissionManager::ResetPermission( - content::PermissionType permission, + blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) {} blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( - content::PermissionType permission, + blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { base::DictionaryValue details; @@ -252,7 +252,7 @@ blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( ElectronPermissionManager::SubscriptionId ElectronPermissionManager::SubscribePermissionStatusChange( - content::PermissionType permission, + blink::PermissionType permission, content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, @@ -264,7 +264,7 @@ void ElectronPermissionManager::UnsubscribePermissionStatusChange( SubscriptionId id) {} bool ElectronPermissionManager::CheckPermissionWithDetails( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, const base::DictionaryValue* details) const { @@ -285,10 +285,10 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( "isMainFrame", render_frame_host && render_frame_host->GetParent() == nullptr); switch (permission) { - case content::PermissionType::AUDIO_CAPTURE: + case blink::PermissionType::AUDIO_CAPTURE: mutable_details.SetStringKey("mediaType", "audio"); break; - case content::PermissionType::VIDEO_CAPTURE: + case blink::PermissionType::VIDEO_CAPTURE: mutable_details.SetStringKey("mediaType", "video"); break; default: @@ -299,7 +299,7 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( } bool ElectronPermissionManager::CheckDevicePermission( - content::PermissionType permission, + blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const { @@ -314,7 +314,7 @@ bool ElectronPermissionManager::CheckDevicePermission( for (const auto& granted_device : granted_devices) { if (permission == - static_cast( + static_cast( WebContentsPermissionHelper::PermissionType::HID)) { if (device->FindIntKey(kHidVendorIdKey) != granted_device.FindIntKey(kHidVendorIdKey) || @@ -332,7 +332,7 @@ bool ElectronPermissionManager::CheckDevicePermission( *device_serial_number == *serial_number) return true; } else if (permission == - static_cast( + static_cast( WebContentsPermissionHelper::PermissionType::SERIAL)) { #if BUILDFLAG(IS_WIN) if (device->FindStringKey(kDeviceInstanceIdKey) == @@ -374,7 +374,7 @@ bool ElectronPermissionManager::CheckDevicePermission( } void ElectronPermissionManager::GrantDevicePermission( - content::PermissionType permission, + blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const { @@ -390,7 +390,7 @@ void ElectronPermissionManager::GrantDevicePermission( blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForFrame( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin) { base::DictionaryValue details; @@ -402,7 +402,7 @@ ElectronPermissionManager::GetPermissionStatusForFrame( blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForCurrentDocument( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host) { return GetPermissionStatus( permission, render_frame_host->GetLastCommittedOrigin().GetURL(), @@ -411,7 +411,7 @@ ElectronPermissionManager::GetPermissionStatusForCurrentDocument( blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForWorker( - content::PermissionType permission, + blink::PermissionType permission, content::RenderProcessHost* render_process_host, const GURL& worker_origin) { return GetPermissionStatus(permission, worker_origin, worker_origin); diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 4afce85ad80cc..74e4ab7c5b34e 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -39,12 +39,12 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { using StatusesCallback = base::OnceCallback&)>; using RequestHandler = base::RepeatingCallback; using CheckHandler = base::RepeatingCallback; @@ -57,49 +57,48 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { void SetDevicePermissionHandler(const DeviceCheckHandler& handler); // content::PermissionControllerDelegate: - void RequestPermission(content::PermissionType permission, + void RequestPermission(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, StatusCallback callback) override; - void RequestPermissionWithDetails(content::PermissionType permission, + void RequestPermissionWithDetails(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, const base::DictionaryValue* details, StatusCallback callback); - void RequestPermissions( - const std::vector& permissions, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - StatusesCallback callback) override; + void RequestPermissions(const std::vector& permissions, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + StatusesCallback callback) override; void RequestPermissionsWithDetails( - const std::vector& permissions, + const std::vector& permissions, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, const base::DictionaryValue* details, StatusesCallback callback); blink::mojom::PermissionStatus GetPermissionStatusForFrame( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin) override; blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( - content::PermissionType permission, + blink::PermissionType permission, content::RenderFrameHost* render_frame_host) override; - bool CheckPermissionWithDetails(content::PermissionType permission, + bool CheckPermissionWithDetails(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, const base::DictionaryValue* details) const; - bool CheckDevicePermission(content::PermissionType permission, + bool CheckDevicePermission(blink::PermissionType permission, const url::Origin& origin, const base::Value* object, content::RenderFrameHost* render_frame_host) const; - void GrantDevicePermission(content::PermissionType permission, + void GrantDevicePermission(blink::PermissionType permission, const url::Origin& origin, const base::Value* object, content::RenderFrameHost* render_frame_host) const; @@ -110,19 +109,19 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { blink::mojom::PermissionStatus status); // content::PermissionControllerDelegate: - void ResetPermission(content::PermissionType permission, + void ResetPermission(blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; blink::mojom::PermissionStatus GetPermissionStatus( - content::PermissionType permission, + blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; blink::mojom::PermissionStatus GetPermissionStatusForWorker( - content::PermissionType permission, + blink::PermissionType permission, content::RenderProcessHost* render_process_host, const GURL& worker_origin) override; SubscriptionId SubscribePermissionStatusChange( - content::PermissionType permission, + blink::PermissionType permission, content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.cc b/shell/browser/extensions/api/management/electron_management_api_delegate.cc index 94eadd90b28dd..0b5558857f85e 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.cc +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.cc @@ -13,7 +13,6 @@ #include "base/strings/strcat.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "chrome/common/extensions/extension_metrics.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" #include "chrome/common/webui_url_constants.h" diff --git a/shell/browser/extensions/electron_extension_message_filter.cc b/shell/browser/extensions/electron_extension_message_filter.cc index 2da25a7627d25..e01dd2b21209f 100644 --- a/shell/browser/extensions/electron_extension_message_filter.cc +++ b/shell/browser/extensions/electron_extension_message_filter.cc @@ -14,7 +14,6 @@ #include "base/memory/ptr_util.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" @@ -78,7 +77,7 @@ void ElectronExtensionMessageFilter::OnDestruct() const { if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { delete this; } else { - base::DeleteSoon(FROM_HERE, {BrowserThread::UI}, this); + content::GetUIThreadTaskRunner({})->DeleteSoon(FROM_HERE, this); } } diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 2d757a3e99401..be8485e912e2d 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -13,7 +13,6 @@ #include "base/files/file_util.h" #include "base/json/json_string_value_serializer.h" #include "base/path_service.h" -#include "base/task/post_task.h" #include "chrome/common/chrome_paths.h" #include "chrome/grit/browser_resources.h" #include "components/value_store/value_store_factory_impl.h" @@ -204,11 +203,12 @@ AppSorting* ElectronExtensionSystem::app_sorting() { void ElectronExtensionSystem::RegisterExtensionWithRequestContexts( const Extension* extension, base::OnceClosure callback) { - base::PostTaskAndReply(FROM_HERE, {BrowserThread::IO}, - base::BindOnce(&InfoMap::AddExtension, info_map(), - base::RetainedRef(extension), - base::Time::Now(), false, false), - std::move(callback)); + content::GetIOThreadTaskRunner({})->PostTaskAndReply( + FROM_HERE, + base::BindOnce(&InfoMap::AddExtension, info_map(), + base::RetainedRef(extension), base::Time::Now(), false, + false), + std::move(callback)); } void ElectronExtensionSystem::UnregisterExtensionWithRequestContexts( diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 26007fc9069dd..30a0935db736b 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/memory/ptr_util.h" #include "base/path_service.h" -#include "base/task/post_task.h" #include "build/build_config.h" #include "chrome/browser/extensions/chrome_url_request_util.h" #include "chrome/common/chrome_paths.h" @@ -301,8 +300,8 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( std::unique_ptr args, bool dispatch_to_off_the_record_profiles) { if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { - base::PostTask( - FROM_HERE, {BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( &ElectronExtensionsBrowserClient::BroadcastEventToRenderers, base::Unretained(this), histogram_value, event_name, diff --git a/shell/browser/mac/in_app_purchase.mm b/shell/browser/mac/in_app_purchase.mm index 23c8ad22a6766..10194f49a7987 100644 --- a/shell/browser/mac/in_app_purchase.mm +++ b/shell/browser/mac/in_app_purchase.mm @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -122,8 +121,8 @@ - (void)checkout:(SKProduct*)product { */ - (void)runCallback:(bool)isProductValid { if (callback_) { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(std::move(callback_), isProductValid)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback_), isProductValid)); } // Release this delegate. [self release]; diff --git a/shell/browser/mac/in_app_purchase_observer.mm b/shell/browser/mac/in_app_purchase_observer.mm index f76093063b707..abf210960a512 100644 --- a/shell/browser/mac/in_app_purchase_observer.mm +++ b/shell/browser/mac/in_app_purchase_observer.mm @@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -75,8 +74,8 @@ - (void)runCallback:(NSArray*)transactions { } // Send the callback to the browser thread. - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(callback_, converted)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(callback_, converted)); } /** diff --git a/shell/browser/mac/in_app_purchase_product.mm b/shell/browser/mac/in_app_purchase_product.mm index 1bd4eb1664f9d..6165946261a35 100644 --- a/shell/browser/mac/in_app_purchase_product.mm +++ b/shell/browser/mac/in_app_purchase_product.mm @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -83,8 +82,8 @@ - (void)productsRequest:(SKProductsRequest*)request } // Send the callback to the browser thread. - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(std::move(callback_), converted)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback_), converted)); [self release]; } diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index e370f2e47e8ef..c23cb268b66d2 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -16,7 +16,6 @@ #include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h" #include "components/remote_cocoa/browser/scoped_cg_window_id.h" #include "content/public/browser/browser_accessibility_state.h" @@ -1000,8 +999,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { if (!is_simple_fullscreen_) return; - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&NativeWindow::UpdateFrame, GetWeakPtr())); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&NativeWindow::UpdateFrame, GetWeakPtr())); } void NativeWindowMac::SetSimpleFullScreen(bool simple_fullscreen) { @@ -1779,8 +1778,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } void NativeWindowMac::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&NativeWindow::RedrawTrafficLights, GetWeakPtr())); } diff --git a/shell/browser/net/asar/asar_url_loader.cc b/shell/browser/net/asar/asar_url_loader.cc index 7c39b2ed0b8b7..684aadc0897fc 100644 --- a/shell/browser/net/asar/asar_url_loader.cc +++ b/shell/browser/net/asar/asar_url_loader.cc @@ -11,7 +11,6 @@ #include #include "base/strings/stringprintf.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "content/public/browser/file_url_loader.h" #include "electron/fuses.h" diff --git a/shell/browser/notifications/win/windows_toast_notification.cc b/shell/browser/notifications/win/windows_toast_notification.cc index d3dc051753d34..05d508bbe59c0 100644 --- a/shell/browser/notifications/win/windows_toast_notification.cc +++ b/shell/browser/notifications/win/windows_toast_notification.cc @@ -15,7 +15,6 @@ #include "base/logging.h" #include "base/strings/string_util_win.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/notifications/notification_delegate.h" @@ -600,8 +599,8 @@ ToastEventHandler::~ToastEventHandler() = default; IFACEMETHODIMP ToastEventHandler::Invoke( ABI::Windows::UI::Notifications::IToastNotification* sender, IInspectable* args) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&Notification::NotificationClicked, notification_)); if (IsDebuggingNotifications()) LOG(INFO) << "Notification clicked"; @@ -612,8 +611,8 @@ IFACEMETHODIMP ToastEventHandler::Invoke( IFACEMETHODIMP ToastEventHandler::Invoke( ABI::Windows::UI::Notifications::IToastNotification* sender, ABI::Windows::UI::Notifications::IToastDismissedEventArgs* e) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&Notification::NotificationDismissed, notification_)); if (IsDebuggingNotifications()) LOG(INFO) << "Notification dismissed"; @@ -628,8 +627,8 @@ IFACEMETHODIMP ToastEventHandler::Invoke( e->get_ErrorCode(&error); std::string errorMessage = "Notification failed. HRESULT:" + std::to_string(error); - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&Notification::NotificationFailed, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&Notification::NotificationFailed, notification_, errorMessage)); if (IsDebuggingNotifications()) LOG(INFO) << errorMessage; diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 7edfd582b2d24..82ff89a30dbf5 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -12,7 +12,6 @@ #include "base/callback_helpers.h" #include "base/location.h" #include "base/memory/ptr_util.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" @@ -757,8 +756,8 @@ void OffScreenRenderWidgetHostView::ReleaseResize() { hold_resize_ = false; if (pending_resize_) { pending_resize_ = false; - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( &OffScreenRenderWidgetHostView::SynchronizeVisualProperties, weak_ptr_factory_.GetWeakPtr())); @@ -862,8 +861,8 @@ void OffScreenRenderWidgetHostView::SendMouseWheelEvent( // Scrolling outside of the popup widget so destroy it. // Execute asynchronously to avoid deleting the widget from inside some // other callback. - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&OffScreenRenderWidgetHostView::CancelWidget, popup_host_view_->weak_ptr_factory_.GetWeakPtr())); } diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index 18890ee0ce7c5..d1ba8734d368b 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -11,7 +11,6 @@ #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/ref_counted.h" #include "base/memory/ref_counted_memory.h" -#include "base/task/post_task.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/printing/printer_query.h" @@ -42,8 +41,8 @@ void StopWorker(int document_cookie) { std::unique_ptr printer_query = queue->PopPrinterQuery(document_cookie); if (printer_query.get()) { - base::PostTask(FROM_HERE, {BrowserThread::IO}, - base::BindOnce(&printing::PrinterQuery::StopWorker, + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&printing::PrinterQuery::StopWorker, std::move(printer_query))); } } diff --git a/shell/browser/serial/electron_serial_delegate.cc b/shell/browser/serial/electron_serial_delegate.cc index c2b6df45041d8..42b01a77f3d1b 100644 --- a/shell/browser/serial/electron_serial_delegate.cc +++ b/shell/browser/serial/electron_serial_delegate.cc @@ -81,6 +81,19 @@ void ElectronSerialDelegate::RemoveObserver(content::RenderFrameHost* frame, } } +void ElectronSerialDelegate::RevokePortPermissionWebInitiated( + content::RenderFrameHost* frame, + const base::UnguessableToken& token) { + // TODO(nornagon/jkleinsc): pass this on to the chooser context +} + +const device::mojom::SerialPortInfo* ElectronSerialDelegate::GetPortInfo( + content::RenderFrameHost* frame, + const base::UnguessableToken& token) { + // TODO(nornagon/jkleinsc): pass this on to the chooser context + return nullptr; +} + SerialChooserController* ElectronSerialDelegate::ControllerForFrame( content::RenderFrameHost* render_frame_host) { auto mapping = controller_map_.find(render_frame_host); diff --git a/shell/browser/serial/electron_serial_delegate.h b/shell/browser/serial/electron_serial_delegate.h index ef9c4af749ff4..1153bcd8ad297 100644 --- a/shell/browser/serial/electron_serial_delegate.h +++ b/shell/browser/serial/electron_serial_delegate.h @@ -39,6 +39,12 @@ class ElectronSerialDelegate : public content::SerialDelegate { Observer* observer) override; void RemoveObserver(content::RenderFrameHost* frame, Observer* observer) override; + void RevokePortPermissionWebInitiated( + content::RenderFrameHost* frame, + const base::UnguessableToken& token) override; + const device::mojom::SerialPortInfo* GetPortInfo( + content::RenderFrameHost* frame, + const base::UnguessableToken& token) override; void DeleteControllerForFrame(content::RenderFrameHost* render_frame_host); diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index 04156f3bee584..c4001b529946f 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -90,6 +90,11 @@ SerialChooserContext::SerialChooserContext() = default; SerialChooserContext::~SerialChooserContext() = default; +void SerialChooserContext::OnPermissionRevoked(const url::Origin& origin) { + for (auto& observer : port_observer_list_) + observer.OnPermissionRevoked(origin); +} + void SerialChooserContext::GrantPortPermission( const url::Origin& origin, const device::mojom::SerialPortInfo& port, @@ -116,6 +121,16 @@ bool SerialChooserContext::HasPortPermission( render_frame_host); } +void SerialChooserContext::RevokePortPermissionWebInitiated( + const url::Origin& origin, + const base::UnguessableToken& token) { + auto it = port_info_.find(token); + if (it == port_info_.end()) + return; + + return OnPermissionRevoked(origin); +} + // static bool SerialChooserContext::CanStorePersistentEntry( const device::mojom::SerialPortInfo& port) { @@ -150,6 +165,13 @@ bool SerialChooserContext::CanStorePersistentEntry( #endif // BUILDFLAG(IS_WIN) } +const device::mojom::SerialPortInfo* SerialChooserContext::GetPortInfo( + const base::UnguessableToken& token) { + DCHECK(is_initialized_); + auto it = port_info_.find(token); + return it == port_info_.end() ? nullptr : it->second.get(); +} + device::mojom::SerialPortManager* SerialChooserContext::GetPortManager() { EnsurePortManagerConnection(); return port_manager_.get(); diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index 657ee7b10016c..2296668874115 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/shell/browser/serial/serial_chooser_context.h @@ -55,6 +55,9 @@ class SerialChooserContext : public KeyedService, SerialChooserContext(const SerialChooserContext&) = delete; SerialChooserContext& operator=(const SerialChooserContext&) = delete; + // ObjectPermissionContextBase::PermissionObserver: + void OnPermissionRevoked(const url::Origin& origin); + // Serial-specific interface for granting and checking permissions. void GrantPortPermission(const url::Origin& origin, const device::mojom::SerialPortInfo& port, @@ -72,15 +75,30 @@ class SerialChooserContext : public KeyedService, base::WeakPtr AsWeakPtr(); + bool is_initialized_ = false; + + // Map from port token to port info. + std::map port_info_; + // SerialPortManagerClient implementation. void OnPortAdded(device::mojom::SerialPortInfoPtr port) override; void OnPortRemoved(device::mojom::SerialPortInfoPtr port) override; + void RevokePortPermissionWebInitiated(const url::Origin& origin, + const base::UnguessableToken& token); + // Only call this if you're sure |port_info_| has been initialized + // before-hand. The returned raw pointer is owned by |port_info_| and will be + // destroyed when the port is removed. + const device::mojom::SerialPortInfo* GetPortInfo( + const base::UnguessableToken& token); private: void EnsurePortManagerConnection(); void SetUpPortManagerConnection( mojo::PendingRemote manager); void OnPortManagerConnectionError(); + void RevokeObjectPermissionInternal(const url::Origin& origin, + const base::Value& object, + bool revoked_by_website); mojo::Remote port_manager_; mojo::Receiver client_receiver_{this}; diff --git a/shell/browser/serial/serial_chooser_controller.cc b/shell/browser/serial/serial_chooser_controller.cc index 695d1f3161c66..5adfc5e63c583 100644 --- a/shell/browser/serial/serial_chooser_controller.cc +++ b/shell/browser/serial/serial_chooser_controller.cc @@ -116,6 +116,10 @@ void SerialChooserController::OnPortRemoved( } } +void SerialChooserController::OnPortManagerConnectionError() { + // TODO(nornagon/jkleinsc): report event +} + void SerialChooserController::OnDeviceChosen(const std::string& port_id) { if (port_id.empty()) { RunCallback(/*port=*/nullptr); diff --git a/shell/browser/serial/serial_chooser_controller.h b/shell/browser/serial/serial_chooser_controller.h index 368cf18652a99..5635ea8bed743 100644 --- a/shell/browser/serial/serial_chooser_controller.h +++ b/shell/browser/serial/serial_chooser_controller.h @@ -46,7 +46,8 @@ class SerialChooserController final : public SerialChooserContext::PortObserver, // SerialChooserContext::PortObserver: void OnPortAdded(const device::mojom::SerialPortInfo& port) override; void OnPortRemoved(const device::mojom::SerialPortInfo& port) override; - void OnPortManagerConnectionError() override {} + void OnPortManagerConnectionError() override; + void OnPermissionRevoked(const url::Origin& origin) override {} private: api::Session* GetSession(); diff --git a/shell/browser/ui/cocoa/electron_bundle_mover.mm b/shell/browser/ui/cocoa/electron_bundle_mover.mm index b7e61f97059dc..881b49c9fa467 100644 --- a/shell/browser/ui/cocoa/electron_bundle_mover.mm +++ b/shell/browser/ui/cocoa/electron_bundle_mover.mm @@ -291,9 +291,10 @@ AuthorizationItem myItems = {kAuthorizationRightExecute, 0, NULL, 0}; AuthorizationRights myRights = {1, &myItems}; - AuthorizationFlags myFlags = (AuthorizationFlags)( - kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights | - kAuthorizationFlagPreAuthorize); + AuthorizationFlags myFlags = + (AuthorizationFlags)(kAuthorizationFlagInteractionAllowed | + kAuthorizationFlagExtendRights | + kAuthorizationFlagPreAuthorize); err = AuthorizationCopyRights(myAuthorizationRef, &myRights, NULL, myFlags, NULL); diff --git a/shell/browser/ui/cocoa/electron_menu_controller.mm b/shell/browser/ui/cocoa/electron_menu_controller.mm index d2ffeb77637a3..8725c8001162c 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.mm +++ b/shell/browser/ui/cocoa/electron_menu_controller.mm @@ -12,7 +12,6 @@ #include "base/mac/foundation_util.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "net/base/mac/url_conversions.h" @@ -227,7 +226,8 @@ - (void)cancel { if (model_) model_->MenuWillClose(); if (!closeCallback.is_null()) { - base::PostTask(FROM_HERE, {BrowserThread::UI}, std::move(closeCallback)); + content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE, + std::move(closeCallback)); } } } @@ -536,7 +536,8 @@ - (void)menuDidClose:(NSMenu*)menu { // Post async task so that itemSelected runs before the close callback // deletes the controller from the map which deallocates it if (!closeCallback.is_null()) { - base::PostTask(FROM_HERE, {BrowserThread::UI}, std::move(closeCallback)); + content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE, + std::move(closeCallback)); } } } diff --git a/shell/browser/ui/devtools_manager_delegate.cc b/shell/browser/ui/devtools_manager_delegate.cc index a9aac3cace877..2945d50cd5727 100644 --- a/shell/browser/ui/devtools_manager_delegate.cc +++ b/shell/browser/ui/devtools_manager_delegate.cc @@ -117,8 +117,8 @@ void DevToolsManagerDelegate::HandleCommand( // Since we only have one method and it is supposed to close Electron, // we don't need to add this complexity. Should we decide to support // methods like Browser.setWindowBounds, we'll need to do it though. - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce([]() { Browser::Get()->Quit(); })); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce([]() { Browser::Get()->Quit(); })); return; } std::move(callback).Run(message); diff --git a/shell/browser/ui/file_dialog_mac.mm b/shell/browser/ui/file_dialog_mac.mm index 94c84e9672d00..00c88c9bfe84a 100644 --- a/shell/browser/ui/file_dialog_mac.mm +++ b/shell/browser/ui/file_dialog_mac.mm @@ -16,7 +16,6 @@ #include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "base/threading/thread_restrictions.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -301,8 +300,8 @@ void ResolvePromiseInNextTick(gin_helper::Promise> promise, // users will run in the microtask, we have to delay the resolution until // next tick, otherwise crash like this may happen: // https://github.com/electron/electron/issues/26884 - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( [](gin_helper::Promise> promise, v8::Global global) { diff --git a/shell/browser/ui/gtk/app_indicator_icon.cc b/shell/browser/ui/gtk/app_indicator_icon.cc index a6ccb75cb79c4..4d45bbda91b79 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.cc +++ b/shell/browser/ui/gtk/app_indicator_icon.cc @@ -20,7 +20,6 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/ui/gtk/app_indicator_icon_menu.h" diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index f249de999c7fd..2c2594ef3ff83 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -19,7 +19,6 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "base/values.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index faad840b68c3c..7af541819db5d 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -17,7 +17,6 @@ #include "base/mac/scoped_nsobject.h" #include "base/no_destructor.h" #include "base/strings/sys_string_conversions.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/native_window.h" @@ -178,8 +177,8 @@ void ShowMessageBox(const MessageBoxSettings& settings, // users will run in the callback, we have to delay running the callback // until next tick, otherwise crash like this may happen: // https://github.com/electron/electron/issues/26884 - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback_), response, suppressed)); }; [alert beginSheetModalForWindow:window completionHandler:handler]; diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index ab494bd6d59ab..02499bf9c9c23 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -16,7 +16,6 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" -#include "base/task/post_task.h" #include "base/win/scoped_gdi_object.h" #include "shell/browser/browser.h" #include "shell/browser/native_window_views.h" diff --git a/shell/browser/ui/tray_icon_cocoa.mm b/shell/browser/ui/tray_icon_cocoa.mm index 789a993adb9f5..25776c7ca6aba 100644 --- a/shell/browser/ui/tray_icon_cocoa.mm +++ b/shell/browser/ui/tray_icon_cocoa.mm @@ -10,7 +10,6 @@ #include "base/message_loop/message_pump_mac.h" #include "base/strings/sys_string_conversions.h" #include "base/task/current_thread.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/ui/cocoa/NSString+ANSI.h" @@ -365,8 +364,8 @@ - (BOOL)performDragOperation:(id)sender { void TrayIconCocoa::PopUpContextMenu(const gfx::Point& pos, ElectronMenuModel* menu_model) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&TrayIconCocoa::PopUpOnUI, weak_factory_.GetWeakPtr(), base::Unretained(menu_model))); } diff --git a/shell/browser/ui/views/electron_views_delegate_win.cc b/shell/browser/ui/views/electron_views_delegate_win.cc index a25fb6f29abf7..e9453422ca8f4 100644 --- a/shell/browser/ui/views/electron_views_delegate_win.cc +++ b/shell/browser/ui/views/electron_views_delegate_win.cc @@ -10,7 +10,6 @@ #include #include "base/bind.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" namespace { diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index 380ce55efdf42..8e72000d131b1 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -38,8 +38,7 @@ MenuBar::MenuBar(NativeWindow* window, RootView* root_view) RefreshColorCache(theme); UpdateViewColors(); #if BUILDFLAG(IS_WIN) - SetBackground( - views::CreateThemedSolidBackground(this, ui::kColorMenuBackground)); + SetBackground(views::CreateThemedSolidBackground(ui::kColorMenuBackground)); background_color_ = GetBackground()->get_color(); #endif SetFocusBehavior(FocusBehavior::ALWAYS); diff --git a/shell/browser/ui/views/menu_delegate.cc b/shell/browser/ui/views/menu_delegate.cc index 3a088af6348c4..c6effd2707aaf 100644 --- a/shell/browser/ui/views/menu_delegate.cc +++ b/shell/browser/ui/views/menu_delegate.cc @@ -6,7 +6,6 @@ #include -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/ui/views/menu_bar.h" @@ -134,8 +133,8 @@ views::MenuItemView* MenuDelegate::GetSiblingMenu( button_to_open_ = button; // Switching menu asynchronously to avoid crash. if (!switch_in_progress) { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&views::MenuRunner::Cancel, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&views::MenuRunner::Cancel, base::Unretained(menu_runner_.get()))); } } diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 92b3d1e4a13bc..15e0b2311e433 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -13,6 +13,7 @@ #include "base/callback_helpers.h" #include "base/command_line.h" #include "base/json/json_writer.h" +#include "base/strings/escape.h" #include "base/strings/pattern.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" @@ -37,7 +38,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_ui_data_source.h" -#include "net/base/escape.h" #include "shell/browser/native_window.h" #include "shell/browser/window_list.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -95,7 +95,7 @@ std::unique_ptr BuildTargetDescriptor( target_data->SetInteger(kProcessIdField, process_id); target_data->SetInteger(kRoutingIdField, routing_id); target_data->SetString(kUrlField, url.spec()); - target_data->SetString(kNameField, net::EscapeForHTML(name)); + target_data->SetString(kNameField, base::EscapeForHTML(name)); target_data->SetInteger(kPidField, base::GetProcId(handle)); target_data->SetString(kFaviconUrlField, favicon_url.spec()); target_data->SetInteger(kAccessibilityModeField, accessibility_mode.mode()); diff --git a/shell/browser/ui/win/dialog_thread.h b/shell/browser/ui/win/dialog_thread.h index 80172d272b4a4..8984d998f3f8b 100644 --- a/shell/browser/ui/win/dialog_thread.h +++ b/shell/browser/ui/win/dialog_thread.h @@ -8,7 +8,7 @@ #include #include "base/memory/scoped_refptr.h" -#include "base/task/post_task.h" +#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" namespace dialog_thread { @@ -33,8 +33,8 @@ void Run(base::OnceCallback execute, base::OnceCallback done) { [](TaskRunner task_runner, base::OnceCallback execute, base::OnceCallback done) { R r = std::move(execute).Run(); - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( [](TaskRunner task_runner, base::OnceCallback done, R r) { diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 2fd8cb0a6c699..55e28d2ed0381 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -61,7 +61,7 @@ WebContentsPermissionHelper::WebContentsPermissionHelper( WebContentsPermissionHelper::~WebContentsPermissionHelper() = default; void WebContentsPermissionHelper::RequestPermission( - content::PermissionType permission, + blink::PermissionType permission, base::OnceCallback callback, bool user_gesture, const base::DictionaryValue* details) { @@ -75,7 +75,7 @@ void WebContentsPermissionHelper::RequestPermission( } bool WebContentsPermissionHelper::CheckPermission( - content::PermissionType permission, + blink::PermissionType permission, const base::DictionaryValue* details) const { auto* rfh = web_contents_->GetMainFrame(); auto* permission_manager = static_cast( @@ -86,7 +86,7 @@ bool WebContentsPermissionHelper::CheckPermission( } bool WebContentsPermissionHelper::CheckDevicePermission( - content::PermissionType permission, + blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const { @@ -97,7 +97,7 @@ bool WebContentsPermissionHelper::CheckDevicePermission( } void WebContentsPermissionHelper::GrantDevicePermission( - content::PermissionType permission, + blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const { @@ -110,7 +110,7 @@ void WebContentsPermissionHelper::GrantDevicePermission( void WebContentsPermissionHelper::RequestFullscreenPermission( base::OnceCallback callback) { RequestPermission( - static_cast(PermissionType::FULLSCREEN), + static_cast(PermissionType::FULLSCREEN), std::move(callback)); } @@ -135,14 +135,13 @@ void WebContentsPermissionHelper::RequestMediaAccessPermission( // The permission type doesn't matter here, AUDIO_CAPTURE/VIDEO_CAPTURE // are presented as same type in content_converter.h. - RequestPermission(content::PermissionType::AUDIO_CAPTURE, std::move(callback), + RequestPermission(blink::PermissionType::AUDIO_CAPTURE, std::move(callback), false, &details); } void WebContentsPermissionHelper::RequestWebNotificationPermission( base::OnceCallback callback) { - RequestPermission(content::PermissionType::NOTIFICATIONS, - std::move(callback)); + RequestPermission(blink::PermissionType::NOTIFICATIONS, std::move(callback)); } void WebContentsPermissionHelper::RequestPointerLockPermission( @@ -151,7 +150,7 @@ void WebContentsPermissionHelper::RequestPointerLockPermission( base::OnceCallback callback) { RequestPermission( - static_cast(PermissionType::POINTER_LOCK), + static_cast(PermissionType::POINTER_LOCK), base::BindOnce(std::move(callback), web_contents_, user_gesture, last_unlocked_by_target), user_gesture); @@ -164,7 +163,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( base::DictionaryValue details; details.SetString("externalURL", url.spec()); RequestPermission( - static_cast(PermissionType::OPEN_EXTERNAL), + static_cast(PermissionType::OPEN_EXTERNAL), std::move(callback), user_gesture, &details); } @@ -176,7 +175,7 @@ bool WebContentsPermissionHelper::CheckMediaAccessPermission( details.SetString("mediaType", MediaStreamTypeToString(type)); // The permission type doesn't matter here, AUDIO_CAPTURE/VIDEO_CAPTURE // are presented as same type in content_converter.h. - return CheckPermission(content::PermissionType::AUDIO_CAPTURE, &details); + return CheckPermission(blink::PermissionType::AUDIO_CAPTURE, &details); } bool WebContentsPermissionHelper::CheckSerialAccessPermission( @@ -184,7 +183,7 @@ bool WebContentsPermissionHelper::CheckSerialAccessPermission( base::DictionaryValue details; details.SetString("securityOrigin", embedding_origin.GetURL().spec()); return CheckPermission( - static_cast(PermissionType::SERIAL), &details); + static_cast(PermissionType::SERIAL), &details); } bool WebContentsPermissionHelper::CheckSerialPortPermission( @@ -192,7 +191,7 @@ bool WebContentsPermissionHelper::CheckSerialPortPermission( base::Value device, content::RenderFrameHost* render_frame_host) const { return CheckDevicePermission( - static_cast(PermissionType::SERIAL), origin, + static_cast(PermissionType::SERIAL), origin, &device, render_frame_host); } @@ -201,7 +200,7 @@ void WebContentsPermissionHelper::GrantSerialPortPermission( base::Value device, content::RenderFrameHost* render_frame_host) const { return GrantDevicePermission( - static_cast(PermissionType::SERIAL), origin, + static_cast(PermissionType::SERIAL), origin, &device, render_frame_host); } @@ -210,7 +209,7 @@ bool WebContentsPermissionHelper::CheckHIDAccessPermission( base::DictionaryValue details; details.SetString("securityOrigin", embedding_origin.GetURL().spec()); return CheckPermission( - static_cast(PermissionType::HID), &details); + static_cast(PermissionType::HID), &details); } bool WebContentsPermissionHelper::CheckHIDDevicePermission( @@ -218,8 +217,8 @@ bool WebContentsPermissionHelper::CheckHIDDevicePermission( base::Value device, content::RenderFrameHost* render_frame_host) const { return CheckDevicePermission( - static_cast(PermissionType::HID), origin, - &device, render_frame_host); + static_cast(PermissionType::HID), origin, &device, + render_frame_host); } void WebContentsPermissionHelper::GrantHIDDevicePermission( @@ -227,8 +226,8 @@ void WebContentsPermissionHelper::GrantHIDDevicePermission( base::Value device, content::RenderFrameHost* render_frame_host) const { return GrantDevicePermission( - static_cast(PermissionType::HID), origin, - &device, render_frame_host); + static_cast(PermissionType::HID), origin, &device, + render_frame_host); } WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper); diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 639dcd8a8829a..a34dd74a4412e 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -7,9 +7,9 @@ #include "base/values.h" #include "content/public/browser/media_stream_request.h" -#include "content/public/browser/permission_type.h" #include "content/public/browser/web_contents_user_data.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" namespace electron { @@ -25,7 +25,7 @@ class WebContentsPermissionHelper delete; enum class PermissionType { - POINTER_LOCK = static_cast(content::PermissionType::NUM) + 1, + POINTER_LOCK = static_cast(blink::PermissionType::NUM) + 1, FULLSCREEN, OPEN_EXTERNAL, SERIAL, @@ -73,20 +73,20 @@ class WebContentsPermissionHelper explicit WebContentsPermissionHelper(content::WebContents* web_contents); friend class content::WebContentsUserData; - void RequestPermission(content::PermissionType permission, + void RequestPermission(blink::PermissionType permission, base::OnceCallback callback, bool user_gesture = false, const base::DictionaryValue* details = nullptr); - bool CheckPermission(content::PermissionType permission, + bool CheckPermission(blink::PermissionType permission, const base::DictionaryValue* details) const; - bool CheckDevicePermission(content::PermissionType permission, + bool CheckDevicePermission(blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const; - void GrantDevicePermission(content::PermissionType permission, + void GrantDevicePermission(blink::PermissionType permission, const url::Origin& origin, const base::Value* device, content::RenderFrameHost* render_frame_host) const; diff --git a/shell/browser/web_contents_zoom_controller.cc b/shell/browser/web_contents_zoom_controller.cc index 0cf515f05729a..fafc0c450aa94 100644 --- a/shell/browser/web_contents_zoom_controller.cc +++ b/shell/browser/web_contents_zoom_controller.cc @@ -46,7 +46,7 @@ void WebContentsZoomController::SetEmbedderZoomController( } void WebContentsZoomController::SetZoomLevel(double level) { - if (!web_contents()->GetRenderViewHost()->IsRenderViewLive() || + if (!web_contents()->GetMainFrame()->IsRenderFrameLive() || blink::PageZoomValuesEqual(GetZoomLevel(), level) || zoom_mode_ == ZoomMode::kDisabled) return; diff --git a/shell/common/asar/archive.cc b/shell/common/asar/archive.cc index 709950fd65841..58b89d537549d 100644 --- a/shell/common/asar/archive.cc +++ b/shell/common/asar/archive.cc @@ -15,7 +15,6 @@ #include "base/logging.h" #include "base/pickle.h" #include "base/strings/string_number_conversions.h" -#include "base/task/post_task.h" #include "base/threading/thread_restrictions.h" #include "base/values.h" #include "electron/fuses.h" diff --git a/shell/common/gin_converters/content_converter.cc b/shell/common/gin_converters/content_converter.cc index 362954d8e1171..f2456f4eda450 100644 --- a/shell/common/gin_converters/content_converter.cc +++ b/shell/common/gin_converters/content_converter.cc @@ -134,67 +134,67 @@ bool Converter::FromV8( } // static -v8::Local Converter::ToV8( +v8::Local Converter::ToV8( v8::Isolate* isolate, - const content::PermissionType& val) { + const blink::PermissionType& val) { using PermissionType = electron::WebContentsPermissionHelper::PermissionType; // Based on mappings from content/browser/devtools/protocol/browser_handler.cc // Not all permissions are currently used by Electron but this will future // proof these conversions. switch (val) { - case content::PermissionType::ACCESSIBILITY_EVENTS: + case blink::PermissionType::ACCESSIBILITY_EVENTS: return StringToV8(isolate, "accessibility-events"); - case content::PermissionType::AR: + case blink::PermissionType::AR: return StringToV8(isolate, "ar"); - case content::PermissionType::BACKGROUND_FETCH: + case blink::PermissionType::BACKGROUND_FETCH: return StringToV8(isolate, "background-fetch"); - case content::PermissionType::BACKGROUND_SYNC: + case blink::PermissionType::BACKGROUND_SYNC: return StringToV8(isolate, "background-sync"); - case content::PermissionType::CLIPBOARD_READ_WRITE: + case blink::PermissionType::CLIPBOARD_READ_WRITE: return StringToV8(isolate, "clipboard-read"); - case content::PermissionType::CLIPBOARD_SANITIZED_WRITE: + case blink::PermissionType::CLIPBOARD_SANITIZED_WRITE: return StringToV8(isolate, "clipboard-sanitized-write"); - case content::PermissionType::LOCAL_FONTS: + case blink::PermissionType::LOCAL_FONTS: return StringToV8(isolate, "local-fonts"); - case content::PermissionType::IDLE_DETECTION: + case blink::PermissionType::IDLE_DETECTION: return StringToV8(isolate, "idle-detection"); - case content::PermissionType::MIDI_SYSEX: + case blink::PermissionType::MIDI_SYSEX: return StringToV8(isolate, "midiSysex"); - case content::PermissionType::NFC: + case blink::PermissionType::NFC: return StringToV8(isolate, "nfc"); - case content::PermissionType::NOTIFICATIONS: + case blink::PermissionType::NOTIFICATIONS: return StringToV8(isolate, "notifications"); - case content::PermissionType::PAYMENT_HANDLER: + case blink::PermissionType::PAYMENT_HANDLER: return StringToV8(isolate, "payment-handler"); - case content::PermissionType::PERIODIC_BACKGROUND_SYNC: + case blink::PermissionType::PERIODIC_BACKGROUND_SYNC: return StringToV8(isolate, "periodic-background-sync"); - case content::PermissionType::DURABLE_STORAGE: + case blink::PermissionType::DURABLE_STORAGE: return StringToV8(isolate, "persistent-storage"); - case content::PermissionType::GEOLOCATION: + case blink::PermissionType::GEOLOCATION: return StringToV8(isolate, "geolocation"); - case content::PermissionType::CAMERA_PAN_TILT_ZOOM: - case content::PermissionType::AUDIO_CAPTURE: - case content::PermissionType::VIDEO_CAPTURE: + case blink::PermissionType::CAMERA_PAN_TILT_ZOOM: + case blink::PermissionType::AUDIO_CAPTURE: + case blink::PermissionType::VIDEO_CAPTURE: return StringToV8(isolate, "media"); - case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: + case blink::PermissionType::PROTECTED_MEDIA_IDENTIFIER: return StringToV8(isolate, "mediaKeySystem"); - case content::PermissionType::MIDI: + case blink::PermissionType::MIDI: return StringToV8(isolate, "midi"); - case content::PermissionType::WAKE_LOCK_SCREEN: + case blink::PermissionType::WAKE_LOCK_SCREEN: return StringToV8(isolate, "screen-wake-lock"); - case content::PermissionType::SENSORS: + case blink::PermissionType::SENSORS: return StringToV8(isolate, "sensors"); - case content::PermissionType::STORAGE_ACCESS_GRANT: + case blink::PermissionType::STORAGE_ACCESS_GRANT: return StringToV8(isolate, "storage-access"); - case content::PermissionType::VR: + case blink::PermissionType::VR: return StringToV8(isolate, "vr"); - case content::PermissionType::WAKE_LOCK_SYSTEM: + case blink::PermissionType::WAKE_LOCK_SYSTEM: return StringToV8(isolate, "system-wake-lock"); - case content::PermissionType::WINDOW_PLACEMENT: + case blink::PermissionType::WINDOW_PLACEMENT: return StringToV8(isolate, "window-placement"); - case content::PermissionType::DISPLAY_CAPTURE: + case blink::PermissionType::DISPLAY_CAPTURE: return StringToV8(isolate, "display-capture"); - case content::PermissionType::NUM: + case blink::PermissionType::NUM: break; } diff --git a/shell/common/gin_converters/content_converter.h b/shell/common/gin_converters/content_converter.h index e157b9f4a05f4..5482813214629 100644 --- a/shell/common/gin_converters/content_converter.h +++ b/shell/common/gin_converters/content_converter.h @@ -7,10 +7,10 @@ #include -#include "content/public/browser/permission_type.h" #include "content/public/common/referrer.h" #include "content/public/common/stop_find_action.h" #include "gin/converter.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h" #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h" @@ -47,9 +47,9 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static v8::Local ToV8(v8::Isolate* isolate, - const content::PermissionType& val); + const blink::PermissionType& val); }; template <> diff --git a/shell/common/gin_helper/callback.cc b/shell/common/gin_helper/callback.cc index 569fc5d570bf7..4c68b5e14f4fc 100644 --- a/shell/common/gin_helper/callback.cc +++ b/shell/common/gin_helper/callback.cc @@ -15,7 +15,7 @@ namespace { struct TranslaterHolder { explicit TranslaterHolder(v8::Isolate* isolate) : handle(isolate, v8::External::New(isolate, this)) { - handle.SetWeak(this, &GC, v8::WeakCallbackType::kFinalizer); + handle.SetWeak(this, &GC, v8::WeakCallbackType::kParameter); } ~TranslaterHolder() { if (!handle.IsEmpty()) { diff --git a/shell/common/gin_helper/locker.cc b/shell/common/gin_helper/locker.cc index 0c7be54cd4ea8..dbbaf7879fc46 100644 --- a/shell/common/gin_helper/locker.cc +++ b/shell/common/gin_helper/locker.cc @@ -13,4 +13,10 @@ Locker::Locker(v8::Isolate* isolate) { Locker::~Locker() = default; +void Locker::SetIsBrowserProcess(bool is_browser_process) { + g_is_browser_process = is_browser_process; +} + +bool Locker::g_is_browser_process = false; + } // namespace gin_helper diff --git a/shell/common/gin_helper/locker.h b/shell/common/gin_helper/locker.h index 09eee5aa7ff60..9fb11ad4b358d 100644 --- a/shell/common/gin_helper/locker.h +++ b/shell/common/gin_helper/locker.h @@ -23,13 +23,17 @@ class Locker { // Returns whether current process is browser process, currently we detect it // by checking whether current has used V8 Lock, but it might be a bad idea. - static inline bool IsBrowserProcess() { return v8::Locker::WasEverUsed(); } + static inline bool IsBrowserProcess() { return g_is_browser_process; } + + static void SetIsBrowserProcess(bool is_browser_process); private: void* operator new(size_t size); void operator delete(void*, size_t); std::unique_ptr locker_; + + static bool g_is_browser_process; }; } // namespace gin_helper diff --git a/shell/common/gin_helper/promise.cc b/shell/common/gin_helper/promise.cc index 67c56cc2cf578..bc34dfa6310b9 100644 --- a/shell/common/gin_helper/promise.cc +++ b/shell/common/gin_helper/promise.cc @@ -65,8 +65,8 @@ v8::Local PromiseBase::GetInner() const { void Promise::ResolvePromise(Promise promise) { if (gin_helper::Locker::IsBrowserProcess() && !content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce([](Promise promise) { promise.Resolve(); }, std::move(promise))); } else { diff --git a/shell/common/gin_helper/promise.h b/shell/common/gin_helper/promise.h index 961ce961a65e3..c720b588d7718 100644 --- a/shell/common/gin_helper/promise.h +++ b/shell/common/gin_helper/promise.h @@ -11,7 +11,6 @@ #include #include "base/strings/string_piece.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/common/gin_converters/std_converter.h" @@ -48,8 +47,8 @@ class PromiseBase { static void RejectPromise(PromiseBase&& promise, base::StringPiece errmsg) { if (gin_helper::Locker::IsBrowserProcess() && !content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( // Note that this callback can not take StringPiece, // as StringPiece only references string internally and @@ -91,8 +90,8 @@ class Promise : public PromiseBase { static void ResolvePromise(Promise promise, RT result) { if (gin_helper::Locker::IsBrowserProcess() && !content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce([](Promise promise, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce([](Promise promise, RT result) { promise.Resolve(result); }, std::move(promise), std::move(result))); } else { diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index 7df712d8f049e..a89c1c42ba6ee 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -21,9 +21,9 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "base/stl_util.h" +#include "base/strings/escape.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/threading/scoped_blocking_call.h" #include "base/win/registry.h" @@ -32,7 +32,6 @@ #include "base/win/windows_version.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" -#include "net/base/escape.h" #include "shell/common/electron_paths.h" #include "ui/base/win/shell.h" #include "url/gurl.h" @@ -243,7 +242,7 @@ std::string OpenExternalOnWorkerThread( // parameters unexpected by the external program. This url should already // have been escaped. std::wstring escaped_url = - L"\"" + base::UTF8ToWide(net::EscapeExternalHandlerValue(url.spec())) + + L"\"" + base::UTF8ToWide(base::EscapeExternalHandlerValue(url.spec())) + L"\""; std::wstring working_dir = options.working_dir.value(); diff --git a/shell/common/v8_value_converter.cc b/shell/common/v8_value_converter.cc index 00235ec21057d..a46c4fb1a4b35 100644 --- a/shell/common/v8_value_converter.cc +++ b/shell/common/v8_value_converter.cc @@ -389,9 +389,10 @@ std::unique_ptr V8ValueConverter::FromV8Array( std::unique_ptr scope; // If val was created in a different context than our current one, change to // that context, but change back after val is converted. - if (!val->CreationContext().IsEmpty() && - val->CreationContext() != isolate->GetCurrentContext()) - scope = std::make_unique(val->CreationContext()); + if (!val->GetCreationContextChecked().IsEmpty() && + val->GetCreationContextChecked() != isolate->GetCurrentContext()) + scope = + std::make_unique(val->GetCreationContextChecked()); auto result = std::make_unique(); @@ -445,9 +446,10 @@ std::unique_ptr V8ValueConverter::FromV8Object( std::unique_ptr scope; // If val was created in a different context than our current one, change to // that context, but change back after val is converted. - if (!val->CreationContext().IsEmpty() && - val->CreationContext() != isolate->GetCurrentContext()) - scope = std::make_unique(val->CreationContext()); + if (!val->GetCreationContextChecked().IsEmpty() && + val->GetCreationContextChecked() != isolate->GetCurrentContext()) + scope = + std::make_unique(val->GetCreationContextChecked()); auto result = std::make_unique(); v8::Local property_names; diff --git a/shell/renderer/api/electron_api_context_bridge.cc b/shell/renderer/api/electron_api_context_bridge.cc index f1e93b724e993..22f8c0adada0d 100644 --- a/shell/renderer/api/electron_api_context_bridge.cc +++ b/shell/renderer/api/electron_api_context_bridge.cc @@ -188,7 +188,7 @@ v8::MaybeLocal PassValueToOtherContext( // creation context of the original method. If it's not we proceed // with the proxy logic if (maybe_original_fn.ToLocal(&proxy_func) && proxy_func->IsFunction() && - proxy_func.As()->CreationContext() == + proxy_func.As()->GetCreationContextChecked() == destination_context) { return v8::MaybeLocal(proxy_func); } @@ -408,7 +408,8 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo& info) { return; v8::Local func = func_value.As(); - v8::Local func_owning_context = func->CreationContext(); + v8::Local func_owning_context = + func->GetCreationContextChecked(); { v8::Context::Scope func_owning_context_scope(func_owning_context); @@ -636,9 +637,9 @@ void OverrideGlobalValueFromIsolatedWorld( { v8::Context::Scope main_context_scope(main_context); context_bridge::ObjectCache object_cache; - v8::MaybeLocal maybe_proxy = - PassValueToOtherContext(value->CreationContext(), main_context, value, - &object_cache, support_dynamic_properties, 1); + v8::MaybeLocal maybe_proxy = PassValueToOtherContext( + value->GetCreationContextChecked(), main_context, value, &object_cache, + support_dynamic_properties, 1); DCHECK(!maybe_proxy.IsEmpty()); auto proxy = maybe_proxy.ToLocalChecked(); @@ -672,16 +673,16 @@ bool OverrideGlobalPropertyFromIsolatedWorld( v8::Local getter_proxy; v8::Local setter_proxy; if (!getter->IsNullOrUndefined()) { - v8::MaybeLocal maybe_getter_proxy = - PassValueToOtherContext(getter->CreationContext(), main_context, - getter, &object_cache, false, 1); + v8::MaybeLocal maybe_getter_proxy = PassValueToOtherContext( + getter->GetCreationContextChecked(), main_context, getter, + &object_cache, false, 1); DCHECK(!maybe_getter_proxy.IsEmpty()); getter_proxy = maybe_getter_proxy.ToLocalChecked(); } if (!setter->IsNullOrUndefined() && setter->IsObject()) { - v8::MaybeLocal maybe_setter_proxy = - PassValueToOtherContext(getter->CreationContext(), main_context, - setter, &object_cache, false, 1); + v8::MaybeLocal maybe_setter_proxy = PassValueToOtherContext( + getter->GetCreationContextChecked(), main_context, setter, + &object_cache, false, 1); DCHECK(!maybe_setter_proxy.IsEmpty()); setter_proxy = maybe_setter_proxy.ToLocalChecked(); } diff --git a/shell/renderer/api/electron_api_ipc_renderer.cc b/shell/renderer/api/electron_api_ipc_renderer.cc index 6f24ed17c4a3d..97f7010643b6d 100644 --- a/shell/renderer/api/electron_api_ipc_renderer.cc +++ b/shell/renderer/api/electron_api_ipc_renderer.cc @@ -4,7 +4,6 @@ #include -#include "base/task/post_task.h" #include "base/values.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame_observer.h" diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 5f2ea089056a8..f48d2f4c73fea 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -102,7 +102,7 @@ struct Converter { namespace electron { content::RenderFrame* GetRenderFrame(v8::Local value) { - v8::Local context = value->CreationContext(); + v8::Local context = value->GetCreationContextChecked(); if (context.IsEmpty()) return nullptr; blink::WebLocalFrame* frame = blink::WebLocalFrame::FrameForContext(context); @@ -161,9 +161,9 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { { v8::TryCatch try_catch(isolate); context_bridge::ObjectCache object_cache; - maybe_result = PassValueToOtherContext(result->CreationContext(), - promise_.GetContext(), result, - &object_cache, false, 0); + maybe_result = PassValueToOtherContext( + result->GetCreationContextChecked(), promise_.GetContext(), result, + &object_cache, false, 0); if (maybe_result.IsEmpty() || try_catch.HasCaught()) { success = false; } @@ -206,7 +206,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { bool should_clone_value = !(value->IsObject() && promise_.GetContext() == - value.As()->CreationContext()) && + value.As()->GetCreationContextChecked()) && value->IsObject(); if (should_clone_value) { CopyResultToCallingContextAndFinalize(isolate, diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index 0302f37f7ccf3..ed5fba4a45cf7 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -601,7 +601,7 @@ void RendererClientBase::AllowGuestViewElementDefinition( v8::Local context, v8::Local register_cb) { v8::HandleScope handle_scope(isolate); - v8::Context::Scope context_scope(context->CreationContext()); + v8::Context::Scope context_scope(context->GetCreationContextChecked()); blink::WebCustomElement::EmbedderNamesAllowedScope embedder_names_scope; content::RenderFrame* render_frame = GetRenderFrame(context); @@ -609,8 +609,8 @@ void RendererClientBase::AllowGuestViewElementDefinition( return; render_frame->GetWebFrame()->RequestExecuteV8Function( - context->CreationContext(), register_cb, v8::Null(isolate), 0, nullptr, - nullptr); + context->GetCreationContextChecked(), register_cb, v8::Null(isolate), 0, + nullptr, nullptr); } } // namespace electron diff --git a/spec/package.json b/spec/package.json index 38ab98be7c26b..5102db8eab7c5 100644 --- a/spec/package.json +++ b/spec/package.json @@ -30,5 +30,8 @@ }, "dependencies": { "mocha-appveyor-reporter": "^0.4.2" + }, + "resolutions": { + "nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac" } } diff --git a/spec/yarn.lock b/spec/yarn.lock index db24b66cc2cb1..bc0113391a384 100644 --- a/spec/yarn.lock +++ b/spec/yarn.lock @@ -685,10 +685,9 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -nan@2.x, nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== +nan@2.x, nan@^2.12.1, nan@nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac: + version "2.15.0" + resolved "https://codeload.github.com/nodejs/nan/tar.gz/16fa32231e2ccd89d2804b3f765319128b20c4ac" oauth-sign@~0.9.0: version "0.9.0" From 24361525362aaa87672e8266903bd9f21a412eab Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 06:00:56 -0700 Subject: [PATCH 398/811] Bump v20.0.0-nightly.20220518 --- 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 29b78854c172d..01bb8bd7104a2 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220517 \ No newline at end of file +20.0.0-nightly.20220518 \ No newline at end of file diff --git a/package.json b/package.json index 4e2b0088f4820..0c6200f435ee3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220517", + "version": "20.0.0-nightly.20220518", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -145,4 +145,4 @@ "resolutions": { "nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac" } -} +} \ No newline at end of file diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index de054d840ebb6..19f83d73ecd7c 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 20,0,0,20220517 - PRODUCTVERSION 20,0,0,20220517 + FILEVERSION 20,0,0,20220518 + PRODUCTVERSION 20,0,0,20220518 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 455544dfb6b8fb4e3912c54d69379d88cd1250ef Mon Sep 17 00:00:00 2001 From: Sofia Nguy Date: Wed, 18 May 2022 09:39:40 -0700 Subject: [PATCH 399/811] docs: Update release dates for E20 (#34267) --- docs/tutorial/electron-timelines.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/electron-timelines.md b/docs/tutorial/electron-timelines.md index 91ea556110ee1..e98f5b14ed11d 100644 --- a/docs/tutorial/electron-timelines.md +++ b/docs/tutorial/electron-timelines.md @@ -22,11 +22,12 @@ check out our [Electron Versioning](./electron-versioning.md) doc. | 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | M89 | v14.16 | 🚫 | | 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | M91 | v14.16 | 🚫 | | 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 | ✅ | +| 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 | v16.13 | ✅ | | 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | v16.13 | ✅ | -| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | TBD | ✅ | +| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | v16.14 | ✅ | +| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | TBD | ✅ | **Notes:** From 73e0bf973d2b7835290d61cab6638309a21a2719 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 19 May 2022 10:03:02 +0200 Subject: [PATCH 400/811] fix: delayed bounds when moving/resizing and preventing default (#34204) --- shell/browser/native_window_views_win.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 12ae336acc2f3..52aedf38d62e2 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -296,6 +296,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message, &prevent_default); if (prevent_default) { ::GetWindowRect(hwnd, reinterpret_cast(l_param)); + pending_bounds_change_.reset(); return true; // Tells Windows that the Sizing is handled. } return false; @@ -334,6 +335,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message, NotifyWindowWillMove(dpi_bounds, &prevent_default); if (!movable_ || prevent_default) { ::GetWindowRect(hwnd, reinterpret_cast(l_param)); + pending_bounds_change_.reset(); return true; // Tells Windows that the Move is handled. If not true, // frameless windows can be moved using // -webkit-app-region: drag elements. From 588005a9d5a74b953961605579cf4ad6f8dc2b20 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 19 May 2022 10:05:07 +0200 Subject: [PATCH 401/811] fix: DCHECK on `webContents.print()` (#34271) --- patches/chromium/printing.patch | 56 ++++++------- .../browser/api/electron_api_web_contents.cc | 80 +++++++++---------- shell/browser/api/electron_api_web_contents.h | 2 +- 3 files changed, 67 insertions(+), 71 deletions(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index ac87ae19ab3c7..2b9df64a7bf5e 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -113,7 +113,7 @@ index dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..a082dd9ee23b6d4918c194161386b973039d3ff6 100644 +index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc9c122ae3 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,10 +30,10 @@ @@ -206,7 +206,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..a082dd9ee23b6d4918c194161386b973 -bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh, + bool silent, -+ base::Value settings, ++ base::Value::Dict settings, + CompletionCallback callback) { // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in @@ -402,12 +402,12 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..a082dd9ee23b6d4918c194161386b973 void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { - GetPrintRenderFrame(rfh)->PrintRequestedPages(); -+ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/); ++ GetPrintRenderFrame(rfh)->PrintRequestedPages(/*silent=*/true, /*job_settings=*/base::Value::Dict()); for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 746df417a23f7760818ba265d4a7d589dec8bf34..5566e7dc2929a2542c599fed91fb1eeeb866e7bb 100644 +index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0de6669400 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -41,6 +41,8 @@ namespace printing { @@ -426,7 +426,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..5566e7dc2929a2542c599fed91fb1eee - virtual bool PrintNow(content::RenderFrameHost* rfh); + virtual bool PrintNow(content::RenderFrameHost* rfh, + bool silent = true, -+ base::Value settings = {}, ++ base::Value::Dict settings = {}, + CompletionCallback callback = {}); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -466,7 +466,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..5566e7dc2929a2542c599fed91fb1eee // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc -index aa727261738698610fab5abd3618d0d0f0d29792..8f95dae637ce25a073872ecdf229f14cc6d0614c 100644 +index aa727261738698610fab5abd3618d0d0f0d29792..2793fbc33e66cf9d7e3fc5e10f0d01730f3b935d 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc @@ -21,7 +21,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( @@ -474,12 +474,12 @@ index aa727261738698610fab5abd3618d0d0f0d29792..8f95dae637ce25a073872ecdf229f14c FakePrintRenderFrame::~FakePrintRenderFrame() = default; -void FakePrintRenderFrame::PrintRequestedPages() {} -+void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value /*settings*/) {} ++void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value::Dict /*settings*/) {} void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params) { NOTREACHED(); diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h -index 5f4d6e314b21351e3e5912e3a43ef87774343085..2a93fe0139025d1a40b3f8e81378ee4213ac27c1 100644 +index 5f4d6e314b21351e3e5912e3a43ef87774343085..8627c8305686654dca7cd9c26433592e934d4eb0 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h @@ -25,7 +25,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { @@ -487,7 +487,7 @@ index 5f4d6e314b21351e3e5912e3a43ef87774343085..2a93fe0139025d1a40b3f8e81378ee42 private: // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; -+ void PrintRequestedPages(bool silent, ::base::Value settings) override; ++ void PrintRequestedPages(bool silent, ::base::Value::Dict settings) override; void PrintWithParams(mojom::PrintPagesParamsPtr params) override; void PrintForSystemDialog() override; void SetPrintPreviewUI( @@ -515,7 +515,7 @@ index 82591f8c2abbc1a180ef62f7264a68ca279e9b9c..ad27a15ba3028af1046482192dec789d void PdfPrintManager::ShowInvalidPrinterSettingsError() { diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..fa53eb1c9dd4e7a6b321bdd4cda2164b95244323 100644 +index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc95172537 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -280,7 +280,7 @@ enum PrintFailureReason { @@ -523,7 +523,7 @@ index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..fa53eb1c9dd4e7a6b321bdd4cda2164b // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. - PrintRequestedPages(); -+ PrintRequestedPages(bool silent, mojo_base.mojom.DeprecatedDictionaryValue settings); ++ PrintRequestedPages(bool silent, mojo_base.mojom.DictionaryValue settings); // Requests the frame to be printed with specified parameters. This is used // to programmatically produce PDF by request from the browser (e.g. over @@ -537,7 +537,7 @@ index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..fa53eb1c9dd4e7a6b321bdd4cda2164b // 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 db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9567214a1 100644 +index db8913ae41d46d14fd15c6127e126e4b129dc4b8..ddbc3b0d5a00af9de84e1b0aadc44adb6ff84495 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -554,7 +554,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 - Print(web_frame, blink::WebNode(), PrintRequestType::kScripted); + Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, -+ false /* silent */, base::DictionaryValue() /* new_settings */); ++ false /* silent */, base::Value::Dict() /* new_settings */); if (!weak_this) return; @@ -563,7 +563,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 } -void PrintRenderFrameHelper::PrintRequestedPages() { -+void PrintRenderFrameHelper::PrintRequestedPages(bool silent, base::Value settings) { ++void PrintRenderFrameHelper::PrintRequestedPages(bool silent, base::Value::Dict settings) { ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -582,7 +582,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 Print(frame, print_preview_context_.source_node(), - PrintRequestType::kRegular); + PrintRequestType::kRegular, false, -+ base::DictionaryValue()); ++ base::Value::Dict()); if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and @@ -601,7 +601,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, - PrintRequestType::kRegular); + PrintRequestType::kRegular, false /* silent */, -+ base::DictionaryValue() /* new_settings */); ++ base::Value::Dict() /* new_settings */); // Check if |this| is still valid. if (!weak_this) return; @@ -612,7 +612,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 - PrintRequestType print_request_type) { + PrintRequestType print_request_type, + bool silent, -+ base::Value settings) { ++ base::Value::Dict settings) { // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; @@ -621,7 +621,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 uint32_t expected_page_count = 0; - if (!CalculateNumberOfPages(frame, node, &expected_page_count)) { -+ if (!CalculateNumberOfPages(frame, node, &expected_page_count, base::Value::AsDictionaryValue(settings))) { ++ if (!CalculateNumberOfPages(frame, node, &expected_page_count, std::move(settings))) { DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } @@ -652,10 +652,10 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 - GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params); +bool PrintRenderFrameHelper::InitPrintSettings( + bool fit_to_paper_size, -+ const base::DictionaryValue& new_settings) { ++ base::Value::Dict new_settings) { + mojom::PrintPagesParamsPtr settings; + -+ if (new_settings.DictEmpty()) { ++ if (new_settings.empty()) { + settings = mojom::PrintPagesParams::New(); + settings->params = mojom::PrintParams::New(); + GetPrintManagerHost()->GetDefaultPrintSettings(&settings->params); @@ -664,7 +664,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 + int cookie = + print_pages_params_ ? print_pages_params_->params->document_cookie : 0; + GetPrintManagerHost()->UpdatePrintSettings( -+ cookie, new_settings.GetDict().Clone(), &settings, &canceled); ++ cookie, std::move(new_settings), &settings, &canceled); + if (canceled) + return false; + } @@ -699,11 +699,11 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 + blink::WebLocalFrame* frame, + const blink::WebNode& node, + uint32_t* number_of_pages, -+ const base::DictionaryValue& settings) { ++ base::Value::Dict settings) { DCHECK(frame); bool fit_to_paper_size = !IsPrintingPdfFrame(frame, node); - if (!InitPrintSettings(fit_to_paper_size)) { -+ if (!InitPrintSettings(fit_to_paper_size, settings)) { ++ if (!InitPrintSettings(fit_to_paper_size, std::move(settings))) { notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; @@ -737,7 +737,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..64ee08e9091e4d67ff55097bc22177d9 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 220b28a7e63625fe8b76290f0d2f40dd32cae255..72801431a5d19f31c1a7db785b0cbaee8e65cca3 100644 +index 220b28a7e63625fe8b76290f0d2f40dd32cae255..cff9e35fab9df680c3c39467c50ddb033c2e6cba 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -255,7 +255,7 @@ class PrintRenderFrameHelper @@ -745,7 +745,7 @@ index 220b28a7e63625fe8b76290f0d2f40dd32cae255..72801431a5d19f31c1a7db785b0cbaee // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; -+ void PrintRequestedPages(bool silent, base::Value settings) override; ++ void PrintRequestedPages(bool silent, base::Value::Dict settings) override; void PrintWithParams(mojom::PrintPagesParamsPtr params) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; @@ -756,7 +756,7 @@ index 220b28a7e63625fe8b76290f0d2f40dd32cae255..72801431a5d19f31c1a7db785b0cbaee - PrintRequestType print_request_type); + PrintRequestType print_request_type, + bool silent, -+ base::Value settings); ++ base::Value::Dict settings); // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); @@ -766,14 +766,14 @@ index 220b28a7e63625fe8b76290f0d2f40dd32cae255..72801431a5d19f31c1a7db785b0cbaee // Used only for native printing workflow. - bool InitPrintSettings(bool fit_to_paper_size); + bool InitPrintSettings(bool fit_to_paper_size, -+ const base::DictionaryValue& settings); ++ base::Value::Dict new_settings); // Calculate number of pages in source document. bool CalculateNumberOfPages(blink::WebLocalFrame* frame, const blink::WebNode& node, - uint32_t* number_of_pages); + uint32_t* number_of_pages, -+ const base::DictionaryValue& settings); ++ base::Value::Dict settings); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 501e3cac4005d..60a8a5846d60a 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2586,7 +2586,7 @@ bool WebContents::IsCurrentlyAudible() { #if BUILDFLAG(ENABLE_PRINTING) void WebContents::OnGetDefaultPrinter( - base::Value print_settings, + base::Value::Dict print_settings, printing::CompletionCallback print_callback, std::u16string device_name, bool silent, @@ -2616,7 +2616,7 @@ void WebContents::OnGetDefaultPrinter( return; } - print_settings.SetStringKey(printing::kSettingDeviceName, printer_name); + print_settings.Set(printing::kSettingDeviceName, printer_name); auto* print_view_manager = PrintViewManagerElectron::FromWebContents(web_contents()); @@ -2635,7 +2635,7 @@ void WebContents::OnGetDefaultPrinter( void WebContents::Print(gin::Arguments* args) { gin_helper::Dictionary options = gin::Dictionary::CreateEmpty(args->isolate()); - base::Value settings(base::Value::Type::DICTIONARY); + base::Value::Dict settings; if (args->Length() >= 1 && !args->GetNext(&options)) { gin_helper::ErrorThrower(args->isolate()) @@ -2656,8 +2656,7 @@ void WebContents::Print(gin::Arguments* args) { bool print_background = false; options.Get("printBackground", &print_background); - settings.SetBoolKey(printing::kSettingShouldPrintBackgrounds, - print_background); + settings.Set(printing::kSettingShouldPrintBackgrounds, print_background); // Set custom margin settings gin_helper::Dictionary margins = @@ -2666,28 +2665,26 @@ void WebContents::Print(gin::Arguments* args) { printing::mojom::MarginType margin_type = printing::mojom::MarginType::kDefaultMargins; margins.Get("marginType", &margin_type); - settings.SetIntKey(printing::kSettingMarginsType, - static_cast(margin_type)); + settings.Set(printing::kSettingMarginsType, static_cast(margin_type)); if (margin_type == printing::mojom::MarginType::kCustomMargins) { - base::Value custom_margins(base::Value::Type::DICTIONARY); + base::Value::Dict custom_margins; int top = 0; margins.Get("top", &top); - custom_margins.SetIntKey(printing::kSettingMarginTop, top); + custom_margins.Set(printing::kSettingMarginTop, top); int bottom = 0; margins.Get("bottom", &bottom); - custom_margins.SetIntKey(printing::kSettingMarginBottom, bottom); + custom_margins.Set(printing::kSettingMarginBottom, bottom); int left = 0; margins.Get("left", &left); - custom_margins.SetIntKey(printing::kSettingMarginLeft, left); + custom_margins.Set(printing::kSettingMarginLeft, left); int right = 0; margins.Get("right", &right); - custom_margins.SetIntKey(printing::kSettingMarginRight, right); - settings.SetPath(printing::kSettingMarginsCustom, - std::move(custom_margins)); + custom_margins.Set(printing::kSettingMarginRight, right); + settings.Set(printing::kSettingMarginsCustom, std::move(custom_margins)); } } else { - settings.SetIntKey( + settings.Set( printing::kSettingMarginsType, static_cast(printing::mojom::MarginType::kDefaultMargins)); } @@ -2697,12 +2694,12 @@ void WebContents::Print(gin::Arguments* args) { options.Get("color", &print_color); auto const color_model = print_color ? printing::mojom::ColorModel::kColor : printing::mojom::ColorModel::kGray; - settings.SetIntKey(printing::kSettingColor, static_cast(color_model)); + settings.Set(printing::kSettingColor, static_cast(color_model)); // Is the orientation landscape or portrait. bool landscape = false; options.Get("landscape", &landscape); - settings.SetBoolKey(printing::kSettingLandscape, landscape); + settings.Set(printing::kSettingLandscape, landscape); // We set the default to the system's default printer and only update // if at the Chromium level if the user overrides. @@ -2717,21 +2714,21 @@ void WebContents::Print(gin::Arguments* args) { int scale_factor = 100; options.Get("scaleFactor", &scale_factor); - settings.SetIntKey(printing::kSettingScaleFactor, scale_factor); + settings.Set(printing::kSettingScaleFactor, scale_factor); int pages_per_sheet = 1; options.Get("pagesPerSheet", &pages_per_sheet); - settings.SetIntKey(printing::kSettingPagesPerSheet, pages_per_sheet); + settings.Set(printing::kSettingPagesPerSheet, pages_per_sheet); // True if the user wants to print with collate. bool collate = true; options.Get("collate", &collate); - settings.SetBoolKey(printing::kSettingCollate, collate); + settings.Set(printing::kSettingCollate, collate); // The number of individual copies to print int copies = 1; options.Get("copies", &copies); - settings.SetIntKey(printing::kSettingCopies, copies); + settings.Set(printing::kSettingCopies, copies); // Strings to be printed as headers and footers if requested by the user. std::string header; @@ -2740,53 +2737,52 @@ void WebContents::Print(gin::Arguments* args) { options.Get("footer", &footer); if (!(header.empty() && footer.empty())) { - settings.SetBoolKey(printing::kSettingHeaderFooterEnabled, true); + settings.Set(printing::kSettingHeaderFooterEnabled, true); - settings.SetStringKey(printing::kSettingHeaderFooterTitle, header); - settings.SetStringKey(printing::kSettingHeaderFooterURL, footer); + settings.Set(printing::kSettingHeaderFooterTitle, header); + settings.Set(printing::kSettingHeaderFooterURL, footer); } else { - settings.SetBoolKey(printing::kSettingHeaderFooterEnabled, false); + settings.Set(printing::kSettingHeaderFooterEnabled, false); } // We don't want to allow the user to enable these settings // but we need to set them or a CHECK is hit. - settings.SetIntKey(printing::kSettingPrinterType, - static_cast(printing::mojom::PrinterType::kLocal)); - settings.SetBoolKey(printing::kSettingShouldPrintSelectionOnly, false); - settings.SetBoolKey(printing::kSettingRasterizePdf, false); + settings.Set(printing::kSettingPrinterType, + static_cast(printing::mojom::PrinterType::kLocal)); + settings.Set(printing::kSettingShouldPrintSelectionOnly, false); + settings.Set(printing::kSettingRasterizePdf, false); // Set custom page ranges to print std::vector page_ranges; if (options.Get("pageRanges", &page_ranges)) { - base::Value page_range_list(base::Value::Type::LIST); + base::Value::List page_range_list; for (auto& range : page_ranges) { int from, to; if (range.Get("from", &from) && range.Get("to", &to)) { - base::Value range(base::Value::Type::DICTIONARY); + base::Value::Dict range; // Chromium uses 1-based page ranges, so increment each by 1. - range.SetIntKey(printing::kSettingPageRangeFrom, from + 1); - range.SetIntKey(printing::kSettingPageRangeTo, to + 1); + range.Set(printing::kSettingPageRangeFrom, from + 1); + range.Set(printing::kSettingPageRangeTo, to + 1); page_range_list.Append(std::move(range)); } else { continue; } } - if (!page_range_list.GetListDeprecated().empty()) - settings.SetPath(printing::kSettingPageRange, std::move(page_range_list)); + if (!page_range_list.empty()) + settings.Set(printing::kSettingPageRange, std::move(page_range_list)); } // Duplex type user wants to use. printing::mojom::DuplexMode duplex_mode = printing::mojom::DuplexMode::kSimplex; options.Get("duplexMode", &duplex_mode); - settings.SetIntKey(printing::kSettingDuplexMode, - static_cast(duplex_mode)); + settings.Set(printing::kSettingDuplexMode, static_cast(duplex_mode)); // We've already done necessary parameter sanitization at the // JS level, so we can simply pass this through. base::Value media_size(base::Value::Type::DICTIONARY); if (options.Get("mediaSize", &media_size)) - settings.SetKey(printing::kSettingMediaSize, std::move(media_size)); + settings.Set(printing::kSettingMediaSize, std::move(media_size)); // Set custom dots per inch (dpi) gin_helper::Dictionary dpi_settings; @@ -2794,13 +2790,13 @@ void WebContents::Print(gin::Arguments* args) { if (options.Get("dpi", &dpi_settings)) { int horizontal = 72; dpi_settings.Get("horizontal", &horizontal); - settings.SetIntKey(printing::kSettingDpiHorizontal, horizontal); + settings.Set(printing::kSettingDpiHorizontal, horizontal); int vertical = 72; dpi_settings.Get("vertical", &vertical); - settings.SetIntKey(printing::kSettingDpiVertical, vertical); + settings.Set(printing::kSettingDpiVertical, vertical); } else { - settings.SetIntKey(printing::kSettingDpiHorizontal, dpi); - settings.SetIntKey(printing::kSettingDpiVertical, dpi); + settings.Set(printing::kSettingDpiHorizontal, dpi); + settings.Set(printing::kSettingDpiVertical, dpi); } print_task_runner_->PostTaskAndReplyWithResult( diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 96940a3f32ea7..c4311007d34fe 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -223,7 +223,7 @@ class WebContents : public ExclusiveAccessContext, void HandleNewRenderFrame(content::RenderFrameHost* render_frame_host); #if BUILDFLAG(ENABLE_PRINTING) - void OnGetDefaultPrinter(base::Value print_settings, + void OnGetDefaultPrinter(base::Value::Dict print_settings, printing::CompletionCallback print_callback, std::u16string device_name, bool silent, From 17c8ec765bd40add42e22bd72a56317bfb9b2dbd Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 06:00:53 -0700 Subject: [PATCH 402/811] Bump v20.0.0-nightly.20220519 --- 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 01bb8bd7104a2..73fa88d8e382b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220518 \ No newline at end of file +20.0.0-nightly.20220519 \ No newline at end of file diff --git a/package.json b/package.json index 0c6200f435ee3..0cc61420d5ac7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220518", + "version": "20.0.0-nightly.20220519", "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 19f83d73ecd7c..c287fb7a5eca4 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 20,0,0,20220518 - PRODUCTVERSION 20,0,0,20220518 + FILEVERSION 20,0,0,20220519 + PRODUCTVERSION 20,0,0,20220519 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 5ff94e7f2becc435e4e7c66e112686461b74e95b Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Thu, 19 May 2022 14:34:58 -0400 Subject: [PATCH 403/811] fix: crash when creating interface for speculative frame (#33919) --- .../browser/api/electron_api_web_contents.cc | 2 +- .../api/electron_api_web_frame_main.cc | 33 +++++++++++-------- .../browser/api/electron_api_web_frame_main.h | 5 +-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 60a8a5846d60a..639f20eda2717 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1505,7 +1505,7 @@ void WebContents::HandleNewRenderFrame( auto* web_frame = WebFrameMain::FromRenderFrameHost(render_frame_host); if (web_frame) - web_frame->Connect(); + web_frame->MaybeSetupMojoConnection(); } void WebContents::OnBackgroundColorChanged() { diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index d39943e4d64cb..f8bc7c9efcd11 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -96,13 +96,15 @@ void WebFrameMain::Destroyed() { void WebFrameMain::MarkRenderFrameDisposed() { render_frame_ = nullptr; render_frame_disposed_ = true; + TeardownMojoConnection(); } void WebFrameMain::UpdateRenderFrameHost(content::RenderFrameHost* rfh) { // Should only be called when swapping frames. render_frame_disposed_ = false; render_frame_ = rfh; - renderer_api_.reset(); + TeardownMojoConnection(); + MaybeSetupMojoConnection(); } bool WebFrameMain::CheckRenderFrame() const { @@ -181,20 +183,30 @@ void WebFrameMain::Send(v8::Isolate* isolate, } const mojo::Remote& WebFrameMain::GetRendererApi() { + MaybeSetupMojoConnection(); + return renderer_api_; +} + +void WebFrameMain::MaybeSetupMojoConnection() { if (!renderer_api_) { pending_receiver_ = renderer_api_.BindNewPipeAndPassReceiver(); - if (render_frame_->IsRenderFrameCreated()) { - render_frame_->GetRemoteInterfaces()->GetInterface( - std::move(pending_receiver_)); - } renderer_api_.set_disconnect_handler(base::BindOnce( &WebFrameMain::OnRendererConnectionError, weak_factory_.GetWeakPtr())); } - return renderer_api_; + // Wait for RenderFrame to be created in renderer before accessing remote. + if (pending_receiver_ && render_frame_->IsRenderFrameCreated()) { + render_frame_->GetRemoteInterfaces()->GetInterface( + std::move(pending_receiver_)); + } } -void WebFrameMain::OnRendererConnectionError() { +void WebFrameMain::TeardownMojoConnection() { renderer_api_.reset(); + pending_receiver_.reset(); +} + +void WebFrameMain::OnRendererConnectionError() { + TeardownMojoConnection(); } void WebFrameMain::PostMessage(v8::Isolate* isolate, @@ -314,13 +326,6 @@ std::vector WebFrameMain::FramesInSubtree() const { return frame_hosts; } -void WebFrameMain::Connect() { - if (pending_receiver_) { - render_frame_->GetRemoteInterfaces()->GetInterface( - std::move(pending_receiver_)); - } -} - void WebFrameMain::DOMContentLoaded() { Emit("dom-ready"); } diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index 23a3b657fd45c..b45264db59627 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -82,6 +82,9 @@ class WebFrameMain : public gin::Wrappable, void UpdateRenderFrameHost(content::RenderFrameHost* rfh); const mojo::Remote& GetRendererApi(); + void MaybeSetupMojoConnection(); + void TeardownMojoConnection(); + void OnRendererConnectionError(); // WebFrameMain can outlive its RenderFrameHost pointer so we need to check // whether its been disposed of prior to accessing it. @@ -112,8 +115,6 @@ class WebFrameMain : public gin::Wrappable, std::vector Frames() const; std::vector FramesInSubtree() const; - void OnRendererConnectionError(); - void Connect(); void DOMContentLoaded(); mojo::Remote renderer_api_; From ba7dedcc6f8b91c1fb4950d66217818394059272 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 20 May 2022 06:00:58 -0700 Subject: [PATCH 404/811] Bump v20.0.0-nightly.20220520 --- 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 73fa88d8e382b..6192d2481c149 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220519 \ No newline at end of file +20.0.0-nightly.20220520 \ No newline at end of file diff --git a/package.json b/package.json index 0cc61420d5ac7..d00836e491354 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220519", + "version": "20.0.0-nightly.20220520", "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 c287fb7a5eca4..2913518590be8 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 20,0,0,20220519 - PRODUCTVERSION 20,0,0,20220519 + FILEVERSION 20,0,0,20220520 + PRODUCTVERSION 20,0,0,20220520 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ff13fa8f0a9ea589830ad2868011f510e652fb16 Mon Sep 17 00:00:00 2001 From: Varun Sharma Date: Sat, 21 May 2022 17:35:26 -0700 Subject: [PATCH 405/811] ci: Add GitHub token permissions for workflows (#34298) ci: add GitHub token permissions --- .github/workflows/semantic.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml index 11d62c9d62855..6158b510bb03b 100644 --- a/.github/workflows/semantic.yml +++ b/.github/workflows/semantic.yml @@ -7,8 +7,14 @@ on: - edited - synchronize +permissions: + contents: read + jobs: main: + permissions: + pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs + statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR name: Validate PR Title runs-on: ubuntu-latest steps: From 38c21b7acad9f7ee234a190addad5f25f59440de Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Sun, 22 May 2022 22:20:54 -0700 Subject: [PATCH 406/811] revert: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow (#34297) fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow" --- docs/api/app.md | 40 +- patches/chromium/.patches | 2 +- ...d_data_parameter_to_processsingleton.patch | 347 ++++++++++ ...ransfer_to_requestsingleinstancelock.patch | 640 ------------------ shell/browser/api/electron_api_app.cc | 69 +- shell/browser/api/electron_api_app.h | 9 +- spec-main/api-app-spec.ts | 114 +--- spec/fixtures/api/singleton-data/main.js | 41 +- 8 files changed, 400 insertions(+), 862 deletions(-) create mode 100644 patches/chromium/feat_add_data_parameter_to_processsingleton.patch delete mode 100644 patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch diff --git a/docs/api/app.md b/docs/api/app.md index 16207e255c60e..94b8c954fc443 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -484,7 +484,6 @@ Returns: * `argv` string[] - An array of the second instance's command line arguments * `workingDirectory` string - The second instance's working directory * `additionalData` unknown - A JSON object of additional data passed from the second instance -* `ackCallback` unknown - A function that can be used to send data back to the second instance This event will be emitted inside the primary instance of your application when a second instance has been executed and calls `app.requestSingleInstanceLock()`. @@ -496,35 +495,12 @@ non-minimized. **Note:** If the second instance is started by a different user than the first, the `argv` array will not include the arguments. -**Note:** `ackCallback` allows the user to send data back to the -second instance during the `app.requestSingleInstanceLock()` flow. -This callback can be used for cases where the second instance -needs to obtain additional information from the first instance -before quitting. - -Currently, the limit on the message size is kMaxMessageLength, -or around 32kB. To be safe, keep the amount of data passed to 31kB at most. - -In order to call the callback, `event.preventDefault()` must be called, first. -If the callback is not called in either case, `null` will be sent back. -If `event.preventDefault()` is not called, but `ackCallback` is called -by the user in the event, then the behaviour is undefined. - This event is guaranteed to be emitted after the `ready` event of `app` gets emitted. **Note:** Extra command line arguments might be added by Chromium, such as `--original-process-start-time`. -### Event: 'first-instance-ack' - -Returns: - -* `event` Event -* `additionalData` unknown - A JSON object of additional data passed from the first instance, in response to the first instance's `second-instance` event. - -This event will be emitted within the second instance during the call to `app.requestSingleInstanceLock()`, when the first instance calls the `ackCallback` provided by the `second-instance` event handler. - ## Methods The `app` object has the following methods: @@ -998,33 +974,21 @@ starts: const { app } = require('electron') let myWindow = null -app.on('first-instance-ack', (event, additionalData) => { - // Print out the ack received from the first instance. - // Note this event handler must come before the requestSingleInstanceLock call. - // Expected output: '{"myAckKey":"myAckValue"}' - console.log(JSON.stringify(additionalData)) -}) - const additionalData = { myKey: 'myValue' } const gotTheLock = app.requestSingleInstanceLock(additionalData) if (!gotTheLock) { app.quit() } else { - app.on('second-instance', (event, commandLine, workingDirectory, additionalData, ackCallback) => { - // We must call preventDefault if we're sending back data. - event.preventDefault() + app.on('second-instance', (event, commandLine, workingDirectory, additionalData) => { // Print out data received from the second instance. - // Expected output: '{"myKey":"myValue"}' - console.log(JSON.stringify(additionalData)) + console.log(additionalData) // Someone tried to run a second instance, we should focus our window. if (myWindow) { if (myWindow.isMinimized()) myWindow.restore() myWindow.focus() } - const ackData = { myAckKey: 'myAckValue' } - ackCallback(ackData) }) // Create myWindow, load the rest of the app, etc... diff --git a/patches/chromium/.patches b/patches/chromium/.patches index f4512709cbcc5..cc794e8aec179 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -96,11 +96,11 @@ chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch process_singleton.patch fix_expose_decrementcapturercount_in_web_contents_impl.patch add_ui_scopedcliboardwriter_writeunsaferawdata.patch +feat_add_data_parameter_to_processsingleton.patch load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch fix_aspect_ratio_with_max_size.patch fix_dont_delete_SerialPortManager_on_main_thread.patch -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 diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch new file mode 100644 index 0000000000000..8a8f913281124 --- /dev/null +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -0,0 +1,347 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Raymond Zhao +Date: Tue, 7 Sep 2021 14:54:25 -0700 +Subject: feat: Add data parameter to ProcessSingleton + +This patch adds an additional_data parameter to the constructor of +ProcessSingleton, so that the second instance can send additional +data over to the first instance while requesting the ProcessSingleton +lock. + +On the Electron side, we then expose an extra parameter to the +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 5a64220aaf1309832dc0ad543e353de67fe0a779..55a2a78ce166a65cd11b26e0aa31968f6a10bec8 100644 +--- a/chrome/browser/process_singleton.h ++++ b/chrome/browser/process_singleton.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 BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) +@@ -99,22 +100,25 @@ class ProcessSingleton { + // handled within the current browser instance or false if the remote process + // should handle it (i.e., because the current process is shutting down). + using NotificationCallback = +- base::RepeatingCallback; ++ base::RepeatingCallback additional_data)>; + + #if BUILDFLAG(IS_WIN) + ProcessSingleton(const std::string& program_name, + const base::FilePath& user_data_dir, ++ const base::span additional_data, + bool is_sandboxed, + const NotificationCallback& notification_callback); + #else + ProcessSingleton(const base::FilePath& user_data_dir, ++ const base::span additional_data, + const NotificationCallback& notification_callback); ++#endif + + ProcessSingleton(const ProcessSingleton&) = delete; + ProcessSingleton& operator=(const ProcessSingleton&) = delete; + +-#endif + ~ProcessSingleton(); + + // Notify another process, if available. Otherwise sets ourselves as the +@@ -177,7 +181,10 @@ class ProcessSingleton { + #endif + + private: ++ // A callback to run when the first instance receives data from the second. + NotificationCallback notification_callback_; // Handler for notifications. ++ // Custom data to pass to the other instance during notify. ++ base::span additional_data_; + + #if BUILDFLAG(IS_WIN) + bool EscapeVirtualization(const base::FilePath& user_data_dir); +diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc +index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc4e2f5751 100644 +--- a/chrome/browser/process_singleton_posix.cc ++++ b/chrome/browser/process_singleton_posix.cc +@@ -611,6 +611,7 @@ class ProcessSingleton::LinuxWatcher + // |reader| is for sending back ACK message. + void HandleMessage(const std::string& current_dir, + const std::vector& argv, ++ const std::vector additional_data, + SocketReader* reader); + + private: +@@ -665,13 +666,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { + } + + void ProcessSingleton::LinuxWatcher::HandleMessage( +- const std::string& current_dir, const std::vector& argv, ++ const std::string& current_dir, ++ const std::vector& argv, ++ const std::vector additional_data, + SocketReader* reader) { + DCHECK(ui_task_runner_->BelongsToCurrentThread()); + DCHECK(reader); + + if (parent_->notification_callback_.Run(base::CommandLine(argv), +- base::FilePath(current_dir))) { ++ base::FilePath(current_dir), ++ std::move(additional_data))) { + // Send back "ACK" message to prevent the client process from starting up. + reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1); + } else { +@@ -719,7 +723,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: + } + } + +- // Validate the message. The shortest message is kStartToken\0x\0x ++ // Validate the message. The shortest message kStartToken\0\00 ++ // The shortest message with additional data is kStartToken\0\00\00\0. + const size_t kMinMessageLength = std::size(kStartToken) + 4; + if (bytes_read_ < kMinMessageLength) { + buf_[bytes_read_] = 0; +@@ -749,10 +754,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: + tokens.erase(tokens.begin()); + tokens.erase(tokens.begin()); + ++ size_t num_args; ++ base::StringToSizeT(tokens[0], &num_args); ++ std::vector command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args); ++ ++ std::vector additional_data; ++ if (tokens.size() >= 3 + num_args) { ++ size_t additional_data_size; ++ base::StringToSizeT(tokens[1 + num_args], &additional_data_size); ++ std::string remaining_args = base::JoinString( ++ base::make_span(tokens.begin() + 2 + num_args, tokens.end()), ++ std::string(1, kTokenDelimiter)); ++ const uint8_t* additional_data_bits = ++ reinterpret_cast(remaining_args.c_str()); ++ additional_data = std::vector( ++ additional_data_bits, additional_data_bits + additional_data_size); ++ } ++ + // Return to the UI thread to handle opening a new browser tab. + ui_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&ProcessSingleton::LinuxWatcher::HandleMessage, +- parent_, current_dir, tokens, this)); ++ parent_, current_dir, command_line, ++ std::move(additional_data), this)); + fd_watch_controller_.reset(); + + // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader +@@ -781,8 +804,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( + // + ProcessSingleton::ProcessSingleton( + const base::FilePath& user_data_dir, ++ const base::span additional_data, + const NotificationCallback& notification_callback) + : notification_callback_(notification_callback), ++ additional_data_(additional_data), + current_pid_(base::GetCurrentProcId()), + watcher_(new LinuxWatcher(this)) { + socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); +@@ -901,7 +926,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( + sizeof(socket_timeout)); + + // Found another process, prepare our command line +- // format is "START\0\0\0...\0". ++ // format is "START\0\0\0\0...\0 ++ // \0\0". + std::string to_send(kStartToken); + to_send.push_back(kTokenDelimiter); + +@@ -911,11 +937,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( + to_send.append(current_dir.value()); + + const std::vector& argv = cmd_line.argv(); ++ to_send.push_back(kTokenDelimiter); ++ to_send.append(base::NumberToString(argv.size())); + for (auto it = argv.begin(); it != argv.end(); ++it) { + to_send.push_back(kTokenDelimiter); + to_send.append(*it); + } + ++ size_t data_to_send_size = additional_data_.size_bytes(); ++ if (data_to_send_size) { ++ to_send.push_back(kTokenDelimiter); ++ to_send.append(base::NumberToString(data_to_send_size)); ++ to_send.push_back(kTokenDelimiter); ++ to_send.append(reinterpret_cast(additional_data_.data()), data_to_send_size); ++ } ++ + // 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. +diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc +index 0c87fc8ccb4511904f19b76ae5e03a5df6664391..c34d4fe10781e6b9286a43176f7312da4e815caf 100644 +--- a/chrome/browser/process_singleton_win.cc ++++ b/chrome/browser/process_singleton_win.cc +@@ -80,10 +80,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { + + bool ParseCommandLine(const COPYDATASTRUCT* cds, + base::CommandLine* parsed_command_line, +- base::FilePath* current_directory) { ++ base::FilePath* current_directory, ++ std::vector* parsed_additional_data) { + // We should have enough room for the shortest command (min_message_size) + // and also be a multiple of wchar_t bytes. The shortest command +- // possible is L"START\0\0" (empty current directory and command line). ++ // possible is L"START\0\0" (empty command line, current directory, ++ // and additional data). + static const int min_message_size = 7; + if (cds->cbData < min_message_size * sizeof(wchar_t) || + cds->cbData % sizeof(wchar_t) != 0) { +@@ -133,6 +135,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); ++ ++ const std::wstring::size_type fourth_null = ++ msg.find_first_of(L'\0', third_null + 1); ++ if (fourth_null == std::wstring::npos || ++ fourth_null == msg.length()) { ++ // No additional data was provided. ++ return true; ++ } ++ ++ // Get length of the additional data. ++ const std::wstring additional_data_length_string = ++ msg.substr(third_null + 1, fourth_null - third_null); ++ size_t additional_data_length; ++ base::StringToSizeT(additional_data_length_string, &additional_data_length); ++ ++ const std::wstring::size_type fifth_null = ++ msg.find_first_of(L'\0', fourth_null + 1); ++ if (fifth_null == std::wstring::npos || ++ fifth_null == msg.length()) { ++ LOG(WARNING) << "Invalid format for start command, we need a string in 6 " ++ "parts separated by NULLs"; ++ } ++ ++ // Get the actual additional data. ++ const std::wstring additional_data = ++ msg.substr(fourth_null + 1, fifth_null - fourth_null); ++ const uint8_t* additional_data_bytes = ++ reinterpret_cast(additional_data.c_str()); ++ *parsed_additional_data = std::vector(additional_data_bytes, ++ additional_data_bytes + additional_data_length); ++ + return true; + } + return false; +@@ -154,13 +187,14 @@ bool ProcessLaunchNotification( + + base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); + base::FilePath current_directory; +- if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) { ++ std::vector additional_data; ++ if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, &additional_data)) { + *result = TRUE; + return true; + } + +- *result = notification_callback.Run(parsed_command_line, current_directory) ? +- TRUE : FALSE; ++ *result = notification_callback.Run(parsed_command_line, ++ current_directory, std::move(additional_data)) ? TRUE : FALSE; + return true; + } + +@@ -261,9 +295,11 @@ bool ProcessSingleton::EscapeVirtualization( + ProcessSingleton::ProcessSingleton( + const std::string& program_name, + const base::FilePath& user_data_dir, ++ const base::span additional_data, + bool is_app_sandboxed, + const NotificationCallback& notification_callback) + : notification_callback_(notification_callback), ++ additional_data_(additional_data), + program_name_(program_name), + is_app_sandboxed_(is_app_sandboxed), + is_virtualized_(false), +@@ -290,7 +326,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { + return PROCESS_NONE; + } + +- switch (chrome::AttemptToNotifyRunningChrome(remote_window_)) { ++ switch (chrome::AttemptToNotifyRunningChrome(remote_window_, additional_data_)) { + case chrome::NOTIFY_SUCCESS: + return PROCESS_NOTIFIED; + case chrome::NOTIFY_FAILED: +diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc +index b64ed1d155a30582e48c9cdffcee9d0f25a53a6a..cfdb2d75532d270e3dd548eb7475a6cdbddf1016 100644 +--- a/chrome/browser/win/chrome_process_finder.cc ++++ b/chrome/browser/win/chrome_process_finder.cc +@@ -36,7 +36,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { + return base::win::MessageWindow::FindWindow(user_data_dir.value()); + } + +-NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { ++NotifyChromeResult AttemptToNotifyRunningChrome( ++ HWND remote_window, ++ const base::span additional_data) { + TRACE_EVENT0("startup", "AttemptToNotifyRunningChrome"); + + DCHECK(remote_window); +@@ -50,7 +52,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + } + + // Send the command line to the remote chrome window. +- // Format is "START\0<<>>\0<<>>". ++ // Format is ++ // "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)) { +@@ -64,6 +67,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + base::CommandLine::ForCurrentProcess()->GetCommandLineString()); + to_send.append(L"\0", 1); // Null separator. + ++ size_t additional_data_size = additional_data.size_bytes(); ++ if (additional_data_size) { ++ // Send over the size, because the reinterpret cast to wchar_t could ++ // add padding. ++ to_send.append(base::UTF8ToWide(base::NumberToString(additional_data_size))); ++ to_send.append(L"\0", 1); // Null separator. ++ ++ size_t padded_size = additional_data_size / sizeof(wchar_t); ++ if (additional_data_size % sizeof(wchar_t) != 0) { ++ padded_size++; ++ } ++ to_send.append(reinterpret_cast(additional_data.data()), ++ padded_size); ++ to_send.append(L"\0", 1); // Null separator. ++ } ++ + // Allow the current running browser window to make itself the foreground + // window (otherwise it will just flash in the taskbar). + ::AllowSetForegroundWindow(process_id); +diff --git a/chrome/browser/win/chrome_process_finder.h b/chrome/browser/win/chrome_process_finder.h +index 5516673cee019f6060077091e59498bf9038cd6e..8edea5079b46c2cba67833114eb9c21d85cfc22d 100644 +--- a/chrome/browser/win/chrome_process_finder.h ++++ b/chrome/browser/win/chrome_process_finder.h +@@ -7,6 +7,7 @@ + + #include + ++#include "base/containers/span.h" + #include "base/time/time.h" + + namespace base { +@@ -27,7 +28,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir); + // Attempts to send the current command line to an already running instance of + // Chrome via a WM_COPYDATA message. + // Returns true if a running Chrome is found and successfully notified. +-NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window); ++NotifyChromeResult AttemptToNotifyRunningChrome( ++ HWND remote_window, ++ const base::span additional_data); + + // Changes the notification timeout to |new_timeout|, returns the old timeout. + base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout); diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch deleted file mode 100644 index cd4f452726579..0000000000000 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ /dev/null @@ -1,640 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Raymond Zhao -Date: Tue, 7 Sep 2021 14:54:25 -0700 -Subject: feat: Add data transfer mechanism to requestSingleInstanceLock flow - -This patch adds code that allows for the second instance to send -additional data to the first instance, and for the first instance -to send additional data back to the second instance, during the -app.requestSingleInstanceLock call. - -Firstly, this patch adds an additional_data parameter -to the constructor of ProcessSingleton, so that the second instance -can send additional data over to the first instance -while requesting the ProcessSingleton lock. - -Then, we add additional processing to the second-instance event, both -so the first instance can receive additional data from the second -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 5a64220aaf1309832dc0ad543e353de67fe0a779..5b701b1361707b610ed60c344e441e67ca701362 100644 ---- a/chrome/browser/process_singleton.h -+++ b/chrome/browser/process_singleton.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 BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) -@@ -93,6 +94,9 @@ class ProcessSingleton { - - static constexpr int kNumNotifyResults = LAST_VALUE + 1; - -+ using NotificationAckCallback = -+ base::RepeatingCallback* ack_data)>; -+ - // Implement this callback to handle notifications from other processes. The - // callback will receive the command line and directory with which the other - // Chrome process was launched. Return true if the command line will be -@@ -100,21 +104,27 @@ class ProcessSingleton { - // should handle it (i.e., because the current process is shutting down). - using NotificationCallback = - base::RepeatingCallback; -+ const base::FilePath& current_directory, -+ const std::vector additional_data, -+ const NotificationAckCallback& ack_callback)>; - - #if BUILDFLAG(IS_WIN) - ProcessSingleton(const std::string& program_name, - const base::FilePath& user_data_dir, -+ const base::span additional_data, - bool is_sandboxed, -- const NotificationCallback& notification_callback); -+ const NotificationCallback& notification_callback, -+ const NotificationAckCallback& ack_notification_callback); - #else - ProcessSingleton(const base::FilePath& user_data_dir, -- const NotificationCallback& notification_callback); -+ const base::span additional_data, -+ const NotificationCallback& notification_callback, -+ const NotificationAckCallback& ack_notification_callback); -+#endif - - ProcessSingleton(const ProcessSingleton&) = delete; - ProcessSingleton& operator=(const ProcessSingleton&) = delete; - --#endif - ~ProcessSingleton(); - - // Notify another process, if available. Otherwise sets ourselves as the -@@ -177,7 +187,13 @@ class ProcessSingleton { - #endif - - private: -- NotificationCallback notification_callback_; // Handler for notifications. -+ // A callback to run when the first instance receives data from the second. -+ NotificationCallback notification_callback_; -+ // A callback to run when the second instance -+ // receives an acknowledgement from the first. -+ NotificationAckCallback notification_ack_callback_; -+ // Custom data to pass to the other instance during notify. -+ base::span additional_data_; - - #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 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 9bb12894da06fc7d281daced754b240afa9bedeb..52717600e7346daeb0726c177162c718da53500a 100644 ---- a/chrome/browser/process_singleton_posix.cc -+++ b/chrome/browser/process_singleton_posix.cc -@@ -145,7 +145,7 @@ const char kACKToken[] = "ACK"; - const char kShutdownToken[] = "SHUTDOWN"; - const char kTokenDelimiter = '\0'; - const int kMaxMessageLength = 32 * 1024; --const int kMaxACKMessageLength = std::size(kShutdownToken) - 1; -+const int kMaxACKMessageLength = kMaxMessageLength; - - bool g_disable_prompt = false; - bool g_skip_is_chrome_process_check = false; -@@ -611,6 +611,7 @@ class ProcessSingleton::LinuxWatcher - // |reader| is for sending back ACK message. - void HandleMessage(const std::string& current_dir, - const std::vector& argv, -+ const std::vector additional_data, - SocketReader* reader); - - private: -@@ -635,6 +636,9 @@ class ProcessSingleton::LinuxWatcher - // The ProcessSingleton that owns us. - ProcessSingleton* const parent_; - -+ bool ack_callback_called_ = false; -+ void AckCallback(SocketReader* reader, const base::span* response); -+ - std::set, base::UniquePtrComparator> readers_; - }; - -@@ -665,16 +669,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { - } - - void ProcessSingleton::LinuxWatcher::HandleMessage( -- const std::string& current_dir, const std::vector& argv, -+ const std::string& current_dir, -+ const std::vector& argv, -+ const std::vector additional_data, - SocketReader* reader) { - DCHECK(ui_task_runner_->BelongsToCurrentThread()); - DCHECK(reader); - -- if (parent_->notification_callback_.Run(base::CommandLine(argv), -- base::FilePath(current_dir))) { -- // Send back "ACK" message to prevent the client process from starting up. -- reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1); -- } else { -+ auto wrapped_ack_callback = -+ base::BindRepeating(&ProcessSingleton::LinuxWatcher::AckCallback, -+ base::Unretained(this), reader); -+ ack_callback_called_ = false; -+ if (!parent_->notification_callback_.Run(base::CommandLine(argv), -+ base::FilePath(current_dir), -+ std::move(additional_data), -+ wrapped_ack_callback)) { - LOG(WARNING) << "Not handling interprocess notification as browser" - " is shutting down"; - // Send back "SHUTDOWN" message, so that the client process can start up -@@ -684,6 +693,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( - } - } - -+void ProcessSingleton::LinuxWatcher::AckCallback( -+ SocketReader* reader, -+ const base::span* response) { -+ // Send back "ACK" message to prevent the client process from starting up. -+ if (!ack_callback_called_) { -+ ack_callback_called_ = true; -+ std::string ack_message; -+ ack_message.append(kACKToken, std::size(kACKToken) - 1); -+ if (response && response->size_bytes()) { -+ ack_message.append(reinterpret_cast(response->data()), -+ response->size_bytes()); -+ } -+ reader->FinishWithACK(ack_message.c_str(), ack_message.size()); -+ } -+} -+ - void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - DCHECK(reader); -@@ -719,7 +744,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: - } - } - -- // Validate the message. The shortest message is kStartToken\0x\0x -+ // Validate the message. The shortest message kStartToken\0\00 -+ // The shortest message with additional data is kStartToken\0\00\00\0. - const size_t kMinMessageLength = std::size(kStartToken) + 4; - if (bytes_read_ < kMinMessageLength) { - buf_[bytes_read_] = 0; -@@ -749,10 +775,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: - tokens.erase(tokens.begin()); - tokens.erase(tokens.begin()); - -+ size_t num_args; -+ base::StringToSizeT(tokens[0], &num_args); -+ std::vector command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args); -+ -+ std::vector additional_data; -+ if (tokens.size() >= 3 + num_args) { -+ size_t additional_data_size; -+ base::StringToSizeT(tokens[1 + num_args], &additional_data_size); -+ std::string remaining_args = base::JoinString( -+ base::make_span(tokens.begin() + 2 + num_args, tokens.end()), -+ std::string(1, kTokenDelimiter)); -+ const uint8_t* additional_data_bits = -+ reinterpret_cast(remaining_args.c_str()); -+ additional_data = std::vector(additional_data_bits, -+ additional_data_bits + additional_data_size); -+ } -+ - // Return to the UI thread to handle opening a new browser tab. - ui_task_runner_->PostTask( - FROM_HERE, base::BindOnce(&ProcessSingleton::LinuxWatcher::HandleMessage, -- parent_, current_dir, tokens, this)); -+ parent_, current_dir, command_line, -+ std::move(additional_data), this)); - fd_watch_controller_.reset(); - - // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -781,8 +825,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( - // - ProcessSingleton::ProcessSingleton( - const base::FilePath& user_data_dir, -- const NotificationCallback& notification_callback) -+ const base::span additional_data, -+ const NotificationCallback& notification_callback, -+ const NotificationAckCallback& notification_ack_callback) - : notification_callback_(notification_callback), -+ notification_ack_callback_(notification_ack_callback), -+ additional_data_(additional_data), - current_pid_(base::GetCurrentProcId()), - watcher_(new LinuxWatcher(this)) { - socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -901,7 +949,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( - sizeof(socket_timeout)); - - // Found another process, prepare our command line -- // format is "START\0\0\0...\0". -+ // format is "START\0\0\0\0...\0 -+ // \0\0". - std::string to_send(kStartToken); - to_send.push_back(kTokenDelimiter); - -@@ -911,11 +960,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( - to_send.append(current_dir.value()); - - const std::vector& argv = cmd_line.argv(); -+ to_send.push_back(kTokenDelimiter); -+ to_send.append(base::NumberToString(argv.size())); - for (auto it = argv.begin(); it != argv.end(); ++it) { - to_send.push_back(kTokenDelimiter); - to_send.append(*it); - } - -+ size_t data_to_send_size = additional_data_.size_bytes(); -+ if (data_to_send_size) { -+ to_send.push_back(kTokenDelimiter); -+ to_send.append(base::NumberToString(data_to_send_size)); -+ to_send.push_back(kTokenDelimiter); -+ to_send.append(reinterpret_cast(additional_data_.data()), data_to_send_size); -+ } -+ - // 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. -@@ -957,6 +1016,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( - linux_ui->NotifyWindowManagerStartupComplete(); - #endif - -+ size_t ack_data_len = len - (std::size(kACKToken) - 1); -+ if (ack_data_len) { -+ const uint8_t* raw_ack_data = -+ reinterpret_cast(buf + std::size(kACKToken) - 1); -+ base::span ack_data = -+ base::make_span(raw_ack_data, raw_ack_data + ack_data_len); -+ notification_ack_callback_.Run(&ack_data); -+ } else { -+ notification_ack_callback_.Run(nullptr); -+ } -+ - // Assume the other process is handling the request. - return PROCESS_NOTIFIED; - } -diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 0c87fc8ccb4511904f19b76ae5e03a5df6664391..83ede77121c5dadbde8b0a4132de1dba6eeb5b52 100644 ---- a/chrome/browser/process_singleton_win.cc -+++ b/chrome/browser/process_singleton_win.cc -@@ -13,15 +13,18 @@ - #include "base/command_line.h" - #include "base/debug/activity_tracker.h" - #include "base/files/file_path.h" -+#include "base/files/file_util.h" - #include "base/logging.h" - #include "base/metrics/histogram_functions.h" - #include "base/metrics/histogram_macros.h" - #include "base/process/process.h" - #include "base/process/process_info.h" - #include "base/strings/escape.h" -+#include "base/rand_util.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/utf_string_conversions.h" - #include "base/time/time.h" -+#include "base/timer/timer.h" - #include "base/trace_event/base_tracing.h" - #include "base/win/registry.h" - #include "base/win/scoped_handle.h" -@@ -45,6 +48,13 @@ - namespace { - - const char kLockfile[] = "lockfile"; -+const DWORD kPipeTimeout = 10000; -+const DWORD kMaxMessageLength = 32 * 1024; -+ -+std::unique_ptr> g_ack_data; -+base::OneShotTimer g_ack_timer; -+HANDLE g_write_ack_pipe; -+bool g_write_ack_callback_called = false; - - // A helper class that acquires the given |mutex| while the AutoLockMutex is in - // scope. -@@ -80,10 +90,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { - - bool ParseCommandLine(const COPYDATASTRUCT* cds, - base::CommandLine* parsed_command_line, -- base::FilePath* current_directory) { -+ base::FilePath* current_directory, -+ std::vector* parsed_additional_data) { - // We should have enough room for the shortest command (min_message_size) - // and also be a multiple of wchar_t bytes. The shortest command -- // possible is L"START\0\0" (empty current directory and command line). -+ // possible is L"START\0\0" (empty command line, current directory, -+ // and additional data). - static const int min_message_size = 7; - if (cds->cbData < min_message_size * sizeof(wchar_t) || - cds->cbData % sizeof(wchar_t) != 0) { -@@ -133,11 +145,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); -+ -+ const std::wstring::size_type fourth_null = -+ msg.find_first_of(L'\0', third_null + 1); -+ if (fourth_null == std::wstring::npos || -+ fourth_null == msg.length()) { -+ // No additional data was provided. -+ return true; -+ } -+ -+ // Get length of the additional data. -+ const std::wstring additional_data_length_string = -+ msg.substr(third_null + 1, fourth_null - third_null); -+ size_t additional_data_length; -+ base::StringToSizeT(additional_data_length_string, &additional_data_length); -+ -+ const std::wstring::size_type fifth_null = -+ msg.find_first_of(L'\0', fourth_null + 1); -+ if (fifth_null == std::wstring::npos || -+ fifth_null == msg.length()) { -+ LOG(WARNING) << "Invalid format for start command, we need a string in 6 " -+ "parts separated by NULLs"; -+ } -+ -+ // Get the actual additional data. -+ const std::wstring additional_data = -+ msg.substr(fourth_null + 1, fifth_null - fourth_null); -+ const uint8_t* additional_data_bytes = -+ reinterpret_cast(additional_data.c_str()); -+ *parsed_additional_data = std::vector(additional_data_bytes, -+ additional_data_bytes + additional_data_length); -+ - return true; - } - return false; - } - -+void StoreAck(const base::span* ack_data) { -+ if (ack_data) { -+ g_ack_data = std::make_unique>(ack_data->begin(), -+ ack_data->end()); -+ } else { -+ g_ack_data = nullptr; -+ } -+} -+ -+void SendBackAck() { -+ // This is the first instance sending the ack back to the second instance. -+ if (!g_write_ack_callback_called) { -+ g_write_ack_callback_called = true; -+ const uint8_t* data_buffer = nullptr; -+ DWORD data_to_send_size = 0; -+ if (g_ack_data) { -+ data_buffer = g_ack_data->data(); -+ DWORD ack_data_size = g_ack_data->size() * sizeof(uint8_t); -+ data_to_send_size = (ack_data_size < kMaxMessageLength) ? ack_data_size : kMaxMessageLength; -+ } -+ -+ ::ConnectNamedPipe(g_write_ack_pipe, NULL); -+ -+ DWORD bytes_written = 0; -+ ::WriteFile(g_write_ack_pipe, -+ (LPCVOID)data_buffer, -+ data_to_send_size, -+ &bytes_written, -+ NULL); -+ DCHECK(bytes_written == data_to_send_size); -+ -+ ::FlushFileBuffers(g_write_ack_pipe); -+ ::DisconnectNamedPipe(g_write_ack_pipe); -+ -+ if (g_ack_data) { -+ g_ack_data.reset(); -+ } -+ } -+} -+ - bool ProcessLaunchNotification( - const ProcessSingleton::NotificationCallback& notification_callback, - UINT message, -@@ -151,16 +234,35 @@ bool ProcessLaunchNotification( - - // Handle the WM_COPYDATA message from another process. - const COPYDATASTRUCT* cds = reinterpret_cast(lparam); -- - base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); - base::FilePath current_directory; -- if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) { -+ std::vector additional_data; -+ if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, -+ &additional_data)) { - *result = TRUE; - return true; - } - -- *result = notification_callback.Run(parsed_command_line, current_directory) ? -- TRUE : FALSE; -+ // notification_callback.Run waits for StoreAck to -+ // run to completion before moving onwards. -+ // Therefore, we cannot directly send the SendBackAck -+ // callback instead, as it would hang the program -+ // during the ConnectNamedPipe call. -+ g_write_ack_callback_called = false; -+ *result = notification_callback.Run(parsed_command_line, current_directory, -+ std::move(additional_data), -+ base::BindRepeating(&StoreAck)) -+ ? TRUE -+ : FALSE; -+ if (*result) { -+ // If *result is TRUE, we return NOTIFY_SUCCESS. -+ // Only for that case does the second process read -+ // the acknowledgement. Therefore, only send back -+ // the acknowledgement if *result is TRUE, -+ // otherwise the program hangs during the ConnectNamedPipe call. -+ g_ack_timer.Start(FROM_HERE, base::Seconds(0), -+ base::BindOnce(&SendBackAck)); -+ } - return true; - } - -@@ -261,9 +363,13 @@ bool ProcessSingleton::EscapeVirtualization( - ProcessSingleton::ProcessSingleton( - const std::string& program_name, - const base::FilePath& user_data_dir, -+ const base::span additional_data, - bool is_app_sandboxed, -- const NotificationCallback& notification_callback) -+ const NotificationCallback& notification_callback, -+ const NotificationAckCallback& notification_ack_callback) - : notification_callback_(notification_callback), -+ notification_ack_callback_(notification_ack_callback), -+ additional_data_(additional_data), - program_name_(program_name), - is_app_sandboxed_(is_app_sandboxed), - is_virtualized_(false), -@@ -278,6 +384,47 @@ ProcessSingleton::~ProcessSingleton() { - ::CloseHandle(lock_file_); - } - -+void ReadAck(const ProcessSingleton::NotificationAckCallback& ack_callback, -+ const std::string program_name, -+ base::FilePath& user_data_dir) { -+ // We are reading the ack from the first instance. -+ // First, wait for the pipe. -+ HWND remote_window = chrome::FindRunningChromeWindow(user_data_dir); -+ DWORD process_id; -+ DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id); -+ std::string identifier = base::NumberToString(process_id) + -+ base::NumberToString(thread_id); -+ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier + -+ program_name); -+ const LPCWSTR w_pipe_name = pipe_name.c_str(); -+ ::WaitNamedPipe(w_pipe_name, NMPWAIT_USE_DEFAULT_WAIT); -+ -+ HANDLE read_ack_pipe = ::CreateFile(w_pipe_name, -+ GENERIC_READ, -+ FILE_SHARE_READ, -+ NULL, -+ OPEN_EXISTING, -+ FILE_ATTRIBUTE_NORMAL, -+ NULL); -+ CHECK(read_ack_pipe != INVALID_HANDLE_VALUE); -+ -+ DWORD bytes_read; -+ uint8_t read_ack_buffer[kMaxMessageLength]; -+ ::ReadFile(read_ack_pipe, -+ (LPVOID)read_ack_buffer, -+ kMaxMessageLength, -+ &bytes_read, -+ NULL); -+ -+ if (!bytes_read) { -+ ack_callback.Run(nullptr); -+ } else { -+ base::span out_span(read_ack_buffer, read_ack_buffer + bytes_read); -+ ack_callback.Run(&out_span); -+ } -+ ::CloseHandle(read_ack_pipe); -+} -+ - // Code roughly based on Mozilla. - ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { - TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); -@@ -290,8 +437,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { - return PROCESS_NONE; - } - -- switch (chrome::AttemptToNotifyRunningChrome(remote_window_)) { -+ switch (chrome::AttemptToNotifyRunningChrome(remote_window_, additional_data_)) { - case chrome::NOTIFY_SUCCESS: -+ ReadAck(notification_ack_callback_, program_name_, user_data_dir_); - return PROCESS_NOTIFIED; - case chrome::NOTIFY_FAILED: - remote_window_ = NULL; -@@ -429,6 +577,26 @@ bool ProcessSingleton::Create() { - << "Lock file can not be created! Error code: " << error; - - if (lock_file_ != INVALID_HANDLE_VALUE) { -+ // We are the first instance. Create a pipe to send out ack data. -+ // Create a per-process pipename using a combination of the -+ // username, process id, thread id, and program name. Pipe names max -+ // at 256 characters, can include any character other than a backslash -+ std::string identifier = base::NumberToString(::GetCurrentProcessId()) + -+ base::NumberToString(::GetCurrentThreadId()); -+ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier + -+ program_name_); -+ const LPCWSTR w_pipe_name = pipe_name.c_str(); -+ ack_pipe_ = ::CreateNamedPipe(w_pipe_name, -+ PIPE_ACCESS_OUTBOUND, -+ PIPE_TYPE_BYTE | PIPE_REJECT_REMOTE_CLIENTS, -+ PIPE_UNLIMITED_INSTANCES, -+ kMaxMessageLength, -+ 0, -+ kPipeTimeout, -+ NULL); -+ CHECK(ack_pipe_ != INVALID_HANDLE_VALUE); -+ g_write_ack_pipe = ack_pipe_; -+ - // 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. - TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); -@@ -456,6 +624,7 @@ bool ProcessSingleton::Create() { - } - - void ProcessSingleton::Cleanup() { -+ ::CloseHandle(ack_pipe_); - } - - void ProcessSingleton::OverrideShouldKillRemoteProcessCallbackForTesting( -diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc -index b64ed1d155a30582e48c9cdffcee9d0f25a53a6a..ce851d09d501ebcc6d6c4065e746e869d5275b2b 100644 ---- a/chrome/browser/win/chrome_process_finder.cc -+++ b/chrome/browser/win/chrome_process_finder.cc -@@ -36,9 +36,10 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { - return base::win::MessageWindow::FindWindow(user_data_dir.value()); - } - --NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { -+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); -@@ -50,7 +51,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { - } - - // Send the command line to the remote chrome window. -- // Format is "START\0<<>>\0<<>>". -+ // Format is -+ // "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)) { -@@ -64,6 +66,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { - base::CommandLine::ForCurrentProcess()->GetCommandLineString()); - to_send.append(L"\0", 1); // Null separator. - -+ size_t additional_data_size = additional_data.size_bytes(); -+ if (additional_data_size) { -+ // Send over the size, because the reinterpret cast to wchar_t could -+ // add padding. -+ to_send.append(base::UTF8ToWide(base::NumberToString(additional_data_size))); -+ to_send.append(L"\0", 1); // Null separator. -+ -+ size_t padded_size = additional_data_size / sizeof(wchar_t); -+ if (additional_data_size % sizeof(wchar_t) != 0) { -+ padded_size++; -+ } -+ to_send.append(reinterpret_cast(additional_data.data()), -+ padded_size); -+ to_send.append(L"\0", 1); // Null separator. -+ } -+ - // Allow the current running browser window to make itself the foreground - // window (otherwise it will just flash in the taskbar). - ::AllowSetForegroundWindow(process_id); -diff --git a/chrome/browser/win/chrome_process_finder.h b/chrome/browser/win/chrome_process_finder.h -index 5516673cee019f6060077091e59498bf9038cd6e..8edea5079b46c2cba67833114eb9c21d85cfc22d 100644 ---- a/chrome/browser/win/chrome_process_finder.h -+++ b/chrome/browser/win/chrome_process_finder.h -@@ -7,6 +7,7 @@ - - #include - -+#include "base/containers/span.h" - #include "base/time/time.h" - - namespace base { -@@ -27,7 +28,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir); - // Attempts to send the current command line to an already running instance of - // Chrome via a WM_COPYDATA message. - // Returns true if a running Chrome is found and successfully notified. --NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window); -+NotifyChromeResult AttemptToNotifyRunningChrome( -+ HWND remote_window, -+ const base::span additional_data); - - // Changes the notification timeout to |new_timeout|, returns the old timeout. - base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout); diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 1cff2713debe4..975cb94a33d57 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -522,24 +522,21 @@ bool NotificationCallbackWrapper( const base::RepeatingCallback< void(const base::CommandLine& command_line, const base::FilePath& current_directory, - const std::vector additional_data, - const ProcessSingleton::NotificationAckCallback& ack_callback)>& - callback, + const std::vector additional_data)>& callback, const base::CommandLine& cmd, const base::FilePath& cwd, - const std::vector additional_data, - const ProcessSingleton::NotificationAckCallback& ack_callback) { + const std::vector additional_data) { // Make sure the callback is called after app gets ready. if (Browser::Get()->is_ready()) { - callback.Run(cmd, cwd, std::move(additional_data), ack_callback); + callback.Run(cmd, cwd, std::move(additional_data)); } else { scoped_refptr task_runner( base::ThreadTaskRunnerHandle::Get()); // Make a copy of the span so that the data isn't lost. - task_runner->PostTask( - FROM_HERE, base::BindOnce(base::IgnoreResult(callback), cmd, cwd, - std::move(additional_data), ack_callback)); + task_runner->PostTask(FROM_HERE, + base::BindOnce(base::IgnoreResult(callback), cmd, cwd, + std::move(additional_data))); } // ProcessSingleton needs to know whether current process is quiting. return !Browser::Get()->is_shutting_down(); @@ -1084,52 +1081,14 @@ std::string App::GetLocaleCountryCode() { return region.size() == 2 ? region : std::string(); } -void App::OnFirstInstanceAck( - const base::span* first_instance_data) { - v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::HandleScope handle_scope(isolate); - base::Value data_to_send; - if (first_instance_data) { - // Don't send back the local directly, because it might be empty. - v8::Local data_local; - data_local = DeserializeV8Value(isolate, *first_instance_data); - if (!data_local.IsEmpty()) { - gin::ConvertFromV8(isolate, data_local, &data_to_send); - } - } - Emit("first-instance-ack", data_to_send); -} - -// This function handles the user calling -// the callback parameter sent out by the second-instance event. -static void AckCallbackWrapper( - const ProcessSingleton::NotificationAckCallback& ack_callback, - gin::Arguments* args) { - blink::CloneableMessage ack_message; - args->GetNext(&ack_message); - if (!ack_message.encoded_message.empty()) { - ack_callback.Run(&ack_message.encoded_message); - } else { - ack_callback.Run(nullptr); - } -} - -void App::OnSecondInstance( - const base::CommandLine& cmd, - const base::FilePath& cwd, - const std::vector additional_data, - const ProcessSingleton::NotificationAckCallback& ack_callback) { +void App::OnSecondInstance(const base::CommandLine& cmd, + const base::FilePath& cwd, + const std::vector additional_data) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope handle_scope(isolate); v8::Local data_value = DeserializeV8Value(isolate, std::move(additional_data)); - auto cb = base::BindRepeating(&AckCallbackWrapper, ack_callback); - bool prevent_default = - Emit("second-instance", cmd.argv(), cwd, data_value, cb); - if (!prevent_default) { - // Call the callback ourselves, and send back nothing. - ack_callback.Run(nullptr); - } + Emit("second-instance", cmd.argv(), cwd, data_value); } bool App::HasSingleInstanceLock() const { @@ -1150,9 +1109,6 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) { base::CreateDirectoryAndGetError(user_dir, nullptr); auto cb = base::BindRepeating(&App::OnSecondInstance, base::Unretained(this)); - auto wrapped_cb = base::BindRepeating(NotificationCallbackWrapper, cb); - auto ack_cb = - base::BindRepeating(&App::OnFirstInstanceAck, base::Unretained(this)); blink::CloneableMessage additional_data_message; args->GetNext(&additional_data_message); @@ -1161,10 +1117,11 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) { IsSandboxEnabled(base::CommandLine::ForCurrentProcess()); process_singleton_ = std::make_unique( program_name, user_dir, additional_data_message.encoded_message, - app_is_sandboxed, wrapped_cb, ack_cb); + app_is_sandboxed, base::BindRepeating(NotificationCallbackWrapper, cb)); #else process_singleton_ = std::make_unique( - user_dir, additional_data_message.encoded_message, wrapped_cb, ack_cb); + user_dir, additional_data_message.encoded_message, + base::BindRepeating(NotificationCallbackWrapper, cb)); #endif switch (process_singleton_->NotifyOtherProcessOrCreate()) { diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index ebf3cf247b67c..d7ff219e0871f 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -193,12 +193,9 @@ class App : public ElectronBrowserClient::Delegate, void SetDesktopName(const std::string& desktop_name); std::string GetLocale(); std::string GetLocaleCountryCode(); - void OnFirstInstanceAck(const base::span* first_instance_data); - void OnSecondInstance( - const base::CommandLine& cmd, - const base::FilePath& cwd, - const std::vector additional_data, - const ProcessSingleton::NotificationAckCallback& ack_callback); + void OnSecondInstance(const base::CommandLine& cmd, + const base::FilePath& cwd, + const std::vector additional_data); bool HasSingleInstanceLock() const; bool RequestSingleInstanceLock(gin::Arguments* args); void ReleaseSingleInstanceLock(); diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index f1af0bc512159..51c202366a51f 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -208,23 +208,18 @@ describe('app module', () => { interface SingleInstanceLockTestArgs { args: string[]; expectedAdditionalData: unknown; - expectedAck: unknown; } it('prevents the second launch of app', async function () { - this.timeout(60000); - const appPath = path.join(fixturesPath, 'api', 'singleton'); + this.timeout(120000); + const appPath = path.join(fixturesPath, 'api', 'singleton-data'); const first = cp.spawn(process.execPath, [appPath]); - const firstExited = emittedOnce(first, 'exit'); await emittedOnce(first.stdout, 'data'); - // Start second app when received output. const second = cp.spawn(process.execPath, [appPath]); - const secondExited = emittedOnce(second, 'exit'); - - const [code2] = await secondExited; + const [code2] = await emittedOnce(second, 'exit'); expect(code2).to.equal(1); - const [code1] = await firstExited; + const [code1] = await emittedOnce(first, 'exit'); expect(code1).to.equal(0); }); @@ -250,11 +245,6 @@ describe('app module', () => { const secondInstanceArgs = [process.execPath, appPath, ...testArgs.args, '--some-switch', 'some-arg']; const second = cp.spawn(secondInstanceArgs[0], secondInstanceArgs.slice(1)); const secondExited = emittedOnce(second, 'exit'); - const secondStdoutLines = second.stdout.pipe(split()); - let ackData; - while ((ackData = await emittedOnce(secondStdoutLines, 'data'))[0].toString().length === 0) { - // This isn't valid data. - } const [code2] = await secondExited; expect(code2).to.equal(1); @@ -264,7 +254,6 @@ describe('app module', () => { const [args, additionalData] = dataFromSecondInstance[0].toString('ascii').split('||'); const secondInstanceArgsReceived: string[] = JSON.parse(args.toString('ascii')); const secondInstanceDataReceived = JSON.parse(additionalData.toString('ascii')); - const dataAckReceived = JSON.parse(ackData[0].toString('ascii')); // Ensure secondInstanceArgs is a subset of secondInstanceArgsReceived for (const arg of secondInstanceArgs) { @@ -273,113 +262,69 @@ describe('app module', () => { } expect(secondInstanceDataReceived).to.be.deep.equal(testArgs.expectedAdditionalData, `received data ${JSON.stringify(secondInstanceDataReceived)} is not equal to expected data ${JSON.stringify(testArgs.expectedAdditionalData)}.`); - expect(dataAckReceived).to.be.deep.equal(testArgs.expectedAck, - `received data ${JSON.stringify(dataAckReceived)} is not equal to expected data ${JSON.stringify(testArgs.expectedAck)}.`); } - const expectedAdditionalData = { - level: 1, - testkey: 'testvalue1', - inner: { - level: 2, - testkey: 'testvalue2' - } - }; - - const expectedAck = { - level: 1, - testkey: 'acktestvalue1', - inner: { - level: 2, - testkey: 'acktestvalue2' - } - }; - - it('passes arguments to the second-instance event with no additional data', async () => { + it('passes arguments to the second-instance event no additional data', async () => { await testArgumentPassing({ args: [], - expectedAdditionalData: null, - expectedAck: null + expectedAdditionalData: null }); }); - it('passes arguments to the second-instance event', async () => { + it('sends and receives JSON object data', async () => { + const expectedAdditionalData = { + level: 1, + testkey: 'testvalue1', + inner: { + level: 2, + testkey: 'testvalue2' + } + }; await testArgumentPassing({ args: ['--send-data'], - expectedAdditionalData, - expectedAck: null - }); - }); - - it('gets back an ack after preventing default', async () => { - await testArgumentPassing({ - args: ['--send-ack', '--prevent-default'], - expectedAdditionalData: null, - expectedAck - }); - }); - - it('is able to send back empty ack after preventing default', async () => { - await testArgumentPassing({ - args: ['--prevent-default'], - expectedAdditionalData: null, - expectedAck: null - }); - }); - - it('sends and receives data', async () => { - await testArgumentPassing({ - args: ['--send-ack', '--prevent-default', '--send-data'], - expectedAdditionalData, - expectedAck + expectedAdditionalData }); }); it('sends and receives numerical data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content=1', '--prevent-default', '--send-data', '--data-content=2'], - expectedAdditionalData: 2, - expectedAck: 1 + args: ['--send-data', '--data-content=2'], + expectedAdditionalData: 2 }); }); it('sends and receives string data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content="ack"', '--prevent-default', '--send-data', '--data-content="data"'], - expectedAdditionalData: 'data', - expectedAck: 'ack' + args: ['--send-data', '--data-content="data"'], + expectedAdditionalData: 'data' }); }); it('sends and receives boolean data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content=true', '--prevent-default', '--send-data', '--data-content=false'], - expectedAdditionalData: false, - expectedAck: true + args: ['--send-data', '--data-content=false'], + expectedAdditionalData: false }); }); it('sends and receives array data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content=[1, 2, 3]', '--prevent-default', '--send-data', '--data-content=[2, 3, 4]'], - expectedAdditionalData: [2, 3, 4], - expectedAck: [1, 2, 3] + args: ['--send-data', '--data-content=[2, 3, 4]'], + expectedAdditionalData: [2, 3, 4] }); }); it('sends and receives mixed array data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content=["1", true, 3]', '--prevent-default', '--send-data', '--data-content=["2", false, 4]'], - expectedAdditionalData: ['2', false, 4], - expectedAck: ['1', true, 3] + args: ['--send-data', '--data-content=["2", true, 4]'], + expectedAdditionalData: ['2', true, 4] }); }); it('sends and receives null data', async () => { await testArgumentPassing({ - args: ['--send-ack', '--ack-content=null', '--prevent-default', '--send-data', '--data-content=null'], - expectedAdditionalData: null, - expectedAck: null + args: ['--send-data', '--data-content=null'], + expectedAdditionalData: null }); }); @@ -387,8 +332,7 @@ describe('app module', () => { try { await testArgumentPassing({ args: ['--send-ack', '--ack-content="undefined"', '--prevent-default', '--send-data', '--data-content="undefined"'], - expectedAdditionalData: undefined, - expectedAck: undefined + expectedAdditionalData: undefined }); assert(false); } catch (e) { diff --git a/spec/fixtures/api/singleton-data/main.js b/spec/fixtures/api/singleton-data/main.js index f79ed9ccc9bce..50a623410ea89 100644 --- a/spec/fixtures/api/singleton-data/main.js +++ b/spec/fixtures/api/singleton-data/main.js @@ -1,17 +1,11 @@ const { app } = require('electron'); -app.whenReady().then(() => { - console.log('started'); // ping parent -}); - // Send data from the second instance to the first instance. const sendAdditionalData = app.commandLine.hasSwitch('send-data'); -// Prevent the default behaviour of second-instance, which sends back an empty ack. -const preventDefault = app.commandLine.hasSwitch('prevent-default'); - -// Send an object back for the ack rather than undefined. -const sendAck = app.commandLine.hasSwitch('send-ack'); +app.whenReady().then(() => { + console.log('started'); // ping parent +}); let obj = { level: 1, @@ -21,45 +15,20 @@ let obj = { testkey: 'testvalue2' } }; -let ackObj = { - level: 1, - testkey: 'acktestvalue1', - inner: { - level: 2, - testkey: 'acktestvalue2' - } -}; - if (app.commandLine.hasSwitch('data-content')) { obj = JSON.parse(app.commandLine.getSwitchValue('data-content')); if (obj === 'undefined') { obj = undefined; } } -if (app.commandLine.hasSwitch('ack-content')) { - ackObj = JSON.parse(app.commandLine.getSwitchValue('ack-content')); - if (ackObj === 'undefined') { - ackObj = undefined; - } -} - -app.on('first-instance-ack', (event, additionalData) => { - console.log(JSON.stringify(additionalData)); -}); const gotTheLock = sendAdditionalData ? app.requestSingleInstanceLock(obj) : app.requestSingleInstanceLock(); -app.on('second-instance', (event, args, workingDirectory, data, ackCallback) => { - if (preventDefault) { - event.preventDefault(); - } +app.on('second-instance', (event, args, workingDirectory, data) => { setImmediate(() => { console.log([JSON.stringify(args), JSON.stringify(data)].join('||')); - sendAck ? ackCallback(ackObj) : ackCallback(); - setImmediate(() => { - app.exit(0); - }); + app.exit(0); }); }); From 1639ccf98fd64b80e7685e11452ec4fb68f27df4 Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 23 May 2022 16:42:37 +0900 Subject: [PATCH 407/811] fix: service worker registration with custom protocols (#34290) Refs https://github.com/electron/electron/issues/32664 --- patches/chromium/.patches | 1 + .../custom_protocols_plzserviceworker.patch | 53 +++++++++++++++++++ shell/browser/electron_browser_client.cc | 5 ++ spec-main/api-protocol-spec.ts | 5 +- 4 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 patches/chromium/custom_protocols_plzserviceworker.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index cc794e8aec179..feb74c1e343bf 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -109,3 +109,4 @@ build_make_libcxx_abi_unstable_false_for_electron.patch introduce_ozoneplatform_electron_can_call_x11_property.patch make_gtk_getlibgtk_public.patch build_disable_print_content_analysis.patch +custom_protocols_plzserviceworker.patch diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch new file mode 100644 index 0000000000000..5c67bca44ddeb --- /dev/null +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Fri, 20 May 2022 00:29:34 +0900 +Subject: custom_protocols_plzserviceworker.patch + +Allow registering custom protocols to handle service worker main script fetching with PlzServiceWorker. + +Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 + +diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc +index 9aba6deb9e11ec2803f163088d1c321dd256787f..1dc24bb4c83acd2ff618b085059c918261b2a3d4 100644 +--- a/content/browser/service_worker/service_worker_context_wrapper.cc ++++ b/content/browser/service_worker/service_worker_context_wrapper.cc +@@ -1616,6 +1616,28 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( + loader_factory_bundle_info = + context()->loader_factory_bundle_for_update_check()->Clone(); + ++ // Give the embedder a chance to register custom schemes that can ++ // handle loading the service worker main script. ++ // Previous registration triggered by ++ // ServiceWorkerContextWrapper::CreateNonNetworkPendingURLLoaderFactoryBundleForUpdateCheck ++ // happens early on browser startup before the JS in the main process ++ // is run by the embedder. ++ auto* factory_bundle = static_cast( ++ loader_factory_bundle_info.get()); ++ ContentBrowserClient::NonNetworkURLLoaderFactoryMap non_network_factories; ++ GetContentClient() ++ ->browser() ++ ->RegisterNonNetworkServiceWorkerUpdateURLLoaderFactories( ++ storage_partition_->browser_context(), &non_network_factories); ++ for (auto& pair : non_network_factories) { ++ const std::string& scheme = pair.first; ++ mojo::PendingRemote& factory_remote = ++ pair.second; ++ ++ factory_bundle->pending_scheme_specific_factories().emplace( ++ scheme, std::move(factory_remote)); ++ } ++ + if (base::FeatureList::IsEnabled( + features::kEnableServiceWorkersForChromeUntrusted) && + scope.scheme_piece() == kChromeUIUntrustedScheme) { +@@ -1636,9 +1658,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( + browser_context(), scope_origin)) { + config->RegisterURLDataSource(browser_context()); + +- static_cast( +- loader_factory_bundle_info.get()) +- ->pending_scheme_specific_factories() ++ factory_bundle->pending_scheme_specific_factories() + .emplace(kChromeUIUntrustedScheme, + CreateWebUIServiceWorkerLoaderFactory( + browser_context(), kChromeUIUntrustedScheme, diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index b7ac2c5043709..3d3b19384a091 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1328,6 +1328,11 @@ void ElectronBrowserClient:: DCHECK(browser_context); DCHECK(factories); + auto* protocol_registry = + ProtocolRegistry::FromBrowserContext(browser_context); + protocol_registry->RegisterURLLoaderFactories(factories, + false /* allow_file_access */); + #if BUILDFLAG(ENABLE_EXTENSIONS) factories->emplace( extensions::kExtensionScheme, diff --git a/spec-main/api-protocol-spec.ts b/spec-main/api-protocol-spec.ts index 4ffaa3e047d68..980c289cb1e7f 100644 --- a/spec-main/api-protocol-spec.ts +++ b/spec-main/api-protocol-spec.ts @@ -764,10 +764,7 @@ describe('protocol module', () => { await expect(contents.executeJavaScript(`navigator.serviceWorker.register('${v4()}.notjs', {scope: './'})`)).to.be.rejected(); }); - // TODO(nornagon): I'm not sure why this isn't working, but I'm choosing to - // disable this test for now to land the roll. See - // https://github.com/electron/electron/issues/32664. - it.skip('should be able to register service worker for custom scheme', async () => { + it('should be able to register service worker for custom scheme', async () => { await contents.loadURL(`${serviceWorkerScheme}://${v4()}.com`); await contents.executeJavaScript(`navigator.serviceWorker.register('${v4()}.js', {scope: './'})`); }); From aa3e852a732c374f64490de2fe7098f63199e149 Mon Sep 17 00:00:00 2001 From: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com> Date: Mon, 23 May 2022 07:01:22 -0400 Subject: [PATCH 408/811] docs: add height option and color transparency info (#34278) --- docs/tutorial/window-customization.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/window-customization.md b/docs/tutorial/window-customization.md index 7a3a98616770b..a724c72d3f021 100644 --- a/docs/tutorial/window-customization.md +++ b/docs/tutorial/window-customization.md @@ -115,9 +115,9 @@ const win = new BrowserWindow({ }) ``` -On Windows, you can also specify the color of the overlay and its symbols by setting -`titleBarOverlay` to an object with the `color` and `symbolColor` properties. If an option -is not specified, the color will default to its system color for the window control buttons: +On Windows, you can also specify additional parameters. The color of the overlay and its symbols can be specified by setting `titleBarOverlay` to an object and using the `color` and `symbolColor` properties respectively. The height of the overlay can also be specified with the `height` property. + +If a color option is not specified, the color will default to its system color for the window control buttons. Similarly, if the height option is not specified it will default to the default height: ```javascript title='main.js' // on Windows @@ -126,7 +126,8 @@ const win = new BrowserWindow({ titleBarStyle: 'hidden', titleBarOverlay: { color: '#2f3241', - symbolColor: '#74b1be' + symbolColor: '#74b1be', + height: 60 } }) ``` @@ -135,6 +136,10 @@ const win = new BrowserWindow({ > color and dimension values from a renderer using a set of readonly > [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. +### Limitations + +* Transparent colors are currently not supported. Progress updates for this feature can be found in PR [#33567](https://github.com/electron/electron/issues/33567). + ## Create transparent windows By setting the `transparent` option to `true`, you can make a fully transparent window. From 291eb609160948b1c9e8572cd3b5b4612f128c7c Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 23 May 2022 13:04:08 +0200 Subject: [PATCH 409/811] fix: building node modules with Visual Studio 2017 (#34217) --- ...deprecated_attribute_for_older_msvc_versions.patch | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 547b2778ac3c0..1bd502768257c 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef74c2ab57 100644 +index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..644f921f970d214b4d93b1e4c384e7475740b485 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -454,10 +454,13 @@ path. Add it with -I to the command line @@ -25,7 +25,7 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef #else # define V8_DEPRECATED(message) #endif -@@ -465,7 +468,11 @@ path. Add it with -I to the command line +@@ -465,13 +468,17 @@ 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) @@ -38,3 +38,10 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef #else # define V8_DEPRECATE_SOON(message) #endif + + +-#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6) ++#if !defined(__clang__) && (defined(__GNUC__) && __GNUC__ < 6) || (defined(_MSC_VER) && _MSC_VER < 1920) + # define V8_ENUM_DEPRECATED(message) + # define V8_ENUM_DEPRECATE_SOON(message) + #else From 89fab6a549ca084c771765d4cd7313e729f4cb25 Mon Sep 17 00:00:00 2001 From: FantasqueX Date: Mon, 23 May 2022 20:49:38 +0800 Subject: [PATCH 410/811] docs: remove X-Content-Security-Policy header in quick-start.md (#34307) reference: Note: It is known that having both Content-Security-Policy and X-Content-Security-Policy or X-Webkit-CSP causes unexpected behaviours on certain versions of browsers. Please avoid using deprecated X-* headers. https://content-security-policy.com/ also: https://github.com/electron/electron-quick-start/commit/1ad18486ed9be39612fdfe7b8fe265e602846ab3 --- docs/tutorial/quick-start.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index cd54e26e9b9b2..f74c570faac73 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -131,7 +131,6 @@ folder of your project: - Hello World! @@ -427,7 +426,6 @@ window.addEventListener('DOMContentLoaded', () => { - Hello World! From c3fa6005db8754bafba8e65f6811d73bbc659e54 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 06:02:11 -0700 Subject: [PATCH 411/811] Bump v20.0.0-nightly.20220523 --- 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 6192d2481c149..04df7831c1786 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220520 \ No newline at end of file +20.0.0-nightly.20220523 \ No newline at end of file diff --git a/package.json b/package.json index d00836e491354..727202feaccae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220520", + "version": "20.0.0-nightly.20220523", "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 2913518590be8..e1a52014d366f 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 20,0,0,20220520 - PRODUCTVERSION 20,0,0,20220520 + FILEVERSION 20,0,0,20220523 + PRODUCTVERSION 20,0,0,20220523 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 887b5a7dc7ec7020310db210685f920a12c6c033 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 23 May 2022 10:33:39 -0400 Subject: [PATCH 412/811] fix: crash on navigator.serial.getPorts() (#34280) * fix: crash on navigator.serial.getPorts() * test: fixup BrowserWindow.setTitlebarOverlay test --- shell/browser/electron_permission_manager.cc | 22 +++++++++---- spec-main/api-browser-window-spec.ts | 31 +++++++++++------- spec-main/chromium-spec.ts | 33 ++++++++++++++++++-- 3 files changed, 66 insertions(+), 20 deletions(-) diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 6970369b80432..a6235561a1aae 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -335,22 +335,32 @@ bool ElectronPermissionManager::CheckDevicePermission( static_cast( WebContentsPermissionHelper::PermissionType::SERIAL)) { #if BUILDFLAG(IS_WIN) - if (device->FindStringKey(kDeviceInstanceIdKey) == - granted_device.FindStringKey(kDeviceInstanceIdKey)) + const auto* instance_id = device->FindStringKey(kDeviceInstanceIdKey); + const auto* port_instance_id = + granted_device.FindStringKey(kDeviceInstanceIdKey); + if (instance_id && port_instance_id && + *instance_id == *port_instance_id) return true; #else + const auto* serial_number = + granted_device.FindStringKey(kSerialNumberKey); + const auto* port_serial_number = + device->FindStringKey(kSerialNumberKey); if (device->FindIntKey(kVendorIdKey) != granted_device.FindIntKey(kVendorIdKey) || device->FindIntKey(kProductIdKey) != granted_device.FindIntKey(kProductIdKey) || - *device->FindStringKey(kSerialNumberKey) != - *granted_device.FindStringKey(kSerialNumberKey)) { + (serial_number && port_serial_number && + *port_serial_number != *serial_number)) { continue; } #if BUILDFLAG(IS_MAC) - if (*device->FindStringKey(kUsbDriverKey) != - *granted_device.FindStringKey(kUsbDriverKey)) { + const auto* usb_driver_key = device->FindStringKey(kUsbDriverKey); + const auto* port_usb_driver_key = + granted_device.FindStringKey(kUsbDriverKey); + if (usb_driver_key && port_usb_driver_key && + *usb_driver_key != *port_usb_driver_key) { continue; } #endif // BUILDFLAG(IS_MAC) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 4d348bb924c47..0de2068f9590c 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2187,8 +2187,10 @@ describe('BrowserWindow module', () => { const [, newOverlayRect] = await geometryChange; expect(newOverlayRect.width).to.equal(overlayRect.width + 400); }; - afterEach(closeAllWindows); - afterEach(() => { ipcMain.removeAllListeners('geometrychange'); }); + afterEach(async () => { + await closeAllWindows(); + ipcMain.removeAllListeners('geometrychange'); + }); it('creates browser window with hidden title bar', () => { const w = new BrowserWindow({ show: false, @@ -2266,16 +2268,20 @@ describe('BrowserWindow module', () => { // Confirm that maximization only affected the height of the buttons and not the title bar expect(overlayRectPostMax.height).to.equal(size); }; - afterEach(closeAllWindows); - afterEach(() => { ipcMain.removeAllListeners('geometrychange'); }); + afterEach(async () => { + await closeAllWindows(); + ipcMain.removeAllListeners('geometrychange'); + }); it('sets Window Control Overlay with title bar height of 40', async () => { await testWindowsOverlayHeight(40); }); }); ifdescribe(process.platform === 'win32')('BrowserWindow.setTitlebarOverlay', () => { - afterEach(closeAllWindows); - afterEach(() => { ipcMain.removeAllListeners('geometrychange'); }); + afterEach(async () => { + await closeAllWindows(); + ipcMain.removeAllListeners('geometrychange'); + }); it('does not crash when an invalid titleBarStyle was initially set', () => { const win = new BrowserWindow({ @@ -2299,10 +2305,13 @@ describe('BrowserWindow module', () => { }); it('correctly updates the height of the overlay', async () => { - const testOverlay = async (w: BrowserWindow, size: Number) => { + const testOverlay = async (w: BrowserWindow, size: Number, firstRun: boolean) => { const overlayHTML = path.join(__dirname, 'fixtures', 'pages', 'overlay.html'); - w.loadFile(overlayHTML); - await emittedOnce(ipcMain, 'geometrychange'); + const overlayReady = emittedOnce(ipcMain, 'geometrychange'); + await w.loadFile(overlayHTML); + if (firstRun) { + await overlayReady; + } const overlayEnabled = await w.webContents.executeJavaScript('navigator.windowControlsOverlay.visible'); expect(overlayEnabled).to.be.true('overlayEnabled'); @@ -2339,13 +2348,13 @@ describe('BrowserWindow module', () => { } }); - await testOverlay(w, INITIAL_SIZE); + await testOverlay(w, INITIAL_SIZE, true); w.setTitleBarOverlay({ height: INITIAL_SIZE + 10 }); - await testOverlay(w, INITIAL_SIZE + 10); + await testOverlay(w, INITIAL_SIZE + 10, false); }); }); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index ca93d5e0954bd..a69e1b4cc433f 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -1678,11 +1678,39 @@ describe('navigator.serial', () => { }); it('returns a port when select-serial-port event is defined', async () => { + let havePorts = false; w.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { - callback(portList[0].portId); + if (portList.length > 0) { + havePorts = true; + callback(portList[0].portId); + } else { + callback(''); + } }); const port = await getPorts(); - expect(port).to.equal('[object SerialPort]'); + if (havePorts) { + expect(port).to.equal('[object SerialPort]'); + } else { + expect(port).to.equal('NotFoundError: No port selected by the user.'); + } + }); + + it('navigator.serial.getPorts() returns values', async () => { + let havePorts = false; + + w.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { + if (portList.length > 0) { + havePorts = true; + callback(portList[0].portId); + } else { + callback(''); + } + }); + await getPorts(); + if (havePorts) { + const grantedPorts = await w.webContents.executeJavaScript('navigator.serial.getPorts()'); + expect(grantedPorts).to.not.be.empty(); + } }); }); @@ -2005,7 +2033,6 @@ describe('navigator.hid', () => { if (details.deviceList.length > 0) { details.deviceList.find((device) => { if (device.name && device.name !== '' && device.serialNumber && device.serialNumber !== '') { - console.log('device is: ', device); if (checkForExcludedDevice) { const compareDevice = { vendorId: device.vendorId, From 09a80ea48c53b7b16bbd798077e4550ee5ffa8f3 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 23 May 2022 16:39:50 +0200 Subject: [PATCH 413/811] test: use webContents.setWindowOpenHandler() in specs (#34310) --- spec-main/api-web-contents-spec.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index c2f6151fd2d4f..29ff9e5f60996 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -1563,9 +1563,10 @@ describe('webContents module', () => { server.listen(0, '127.0.0.1', () => { const url = 'http://127.0.0.1:' + (server.address() as AddressInfo).port + '/'; w.webContents.once('did-finish-load', () => { - w.webContents.once('new-window', (event, newUrl, frameName, disposition, options, features, referrer) => { - expect(referrer.url).to.equal(url); - expect(referrer.policy).to.equal('strict-origin-when-cross-origin'); + w.webContents.setWindowOpenHandler(details => { + expect(details.referrer.url).to.equal(url); + expect(details.referrer.policy).to.equal('strict-origin-when-cross-origin'); + return { action: 'allow' }; }); w.webContents.executeJavaScript('a.click()'); }); @@ -1591,9 +1592,10 @@ describe('webContents module', () => { server.listen(0, '127.0.0.1', () => { const url = 'http://127.0.0.1:' + (server.address() as AddressInfo).port + '/'; w.webContents.once('did-finish-load', () => { - w.webContents.once('new-window', (event, newUrl, frameName, disposition, options, features, referrer) => { - expect(referrer.url).to.equal(url); - expect(referrer.policy).to.equal('no-referrer-when-downgrade'); + w.webContents.setWindowOpenHandler(details => { + expect(details.referrer.url).to.equal(url); + expect(details.referrer.policy).to.equal('no-referrer-when-downgrade'); + return { action: 'allow' }; }); w.webContents.executeJavaScript('window.open(location.href + "should_have_referrer")'); }); From df9383cb3cc8d18ce21acd9bcb520fab92813aaa Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Mon, 23 May 2022 21:08:03 +0530 Subject: [PATCH 414/811] chore: add a TRACE call for `crash_reporter::Start()` (#34268) chore: add a TRACE call for crash_reporter::Start() Initializing the crashReporter takes around 620 milliseconds on Intel macOS. I have sent a CL to crashpad to partially fix the performance issue in https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386. It would be beneficial to log the performance impact of this function in the traces in case this slows down in the future. Signed-off-by: Darshan Sen --- shell/browser/api/electron_api_crash_reporter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index 7740441b3a0bc..984c412bb6b71 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/shell/browser/api/electron_api_crash_reporter.cc @@ -16,6 +16,7 @@ #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" +#include "base/trace_event/trace_event.h" #include "chrome/common/chrome_paths.h" #include "components/upload_list/crash_upload_list.h" #include "components/upload_list/text_log_upload_list.h" @@ -135,6 +136,7 @@ void Start(const std::string& submit_url, const std::map& global_extra, const std::map& extra, bool is_node_process) { + TRACE_EVENT0("electron", "crash_reporter::Start"); #if !defined(MAS_BUILD) if (g_crash_reporter_initialized) return; From ba573f558305a6448f67ca1db51730cdd1559f58 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 23 May 2022 15:13:18 -0400 Subject: [PATCH 415/811] feat: add support for HIDDevice.forget() (#34210) * feat: add support for HIDDevice.forget() * chore: remove whitespace * chore: use `SetGetter` to serialize the render_frame_host Co-authored-by: Samuel Maddock * fixup chore: use `SetGetter` to serialize the render_frame_host * fixup after rebase * fixup for crash on navigator.serial.getPorts() * fixup for lint Co-authored-by: Samuel Maddock --- docs/api/session.md | 13 ++ filenames.gni | 1 + .../browser/api/electron_api_web_contents.cc | 114 ++++++++++++++++-- shell/browser/api/electron_api_web_contents.h | 19 ++- shell/browser/electron_permission_manager.cc | 77 +++--------- shell/browser/electron_permission_manager.h | 6 + shell/browser/hid/electron_hid_delegate.cc | 7 +- shell/browser/hid/hid_chooser_context.cc | 66 ++++++++++ shell/browser/hid/hid_chooser_context.h | 12 ++ shell/browser/hid/hid_chooser_controller.cc | 41 +++---- shell/browser/hid/hid_chooser_controller.h | 4 + .../browser/web_contents_permission_helper.cc | 20 +++ .../browser/web_contents_permission_helper.h | 10 ++ .../hid_device_info_converter.h | 31 +++++ spec-main/chromium-spec.ts | 52 ++++++-- 15 files changed, 359 insertions(+), 114 deletions(-) create mode 100644 shell/common/gin_converters/hid_device_info_converter.h diff --git a/docs/api/session.md b/docs/api/session.md index ab2ecdb701de7..8475302e9422b 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -274,6 +274,19 @@ from `select-hid-device` is called. This event is intended for use when using a UI to ask users to pick a device so that the UI can be updated to remove the specified device. +#### Event: 'hid-device-revoked' + +Returns: + +* `event` Event +* `details` Object + * `device` [HIDDevice[]](structures/hid-device.md) + * `frame` [WebFrameMain](web-frame-main.md) + +Emitted after `HIDDevice.forget()` has been called. This event can be used +to help maintain persistent storage of permissions when +`setDevicePermissionHandler` is used. + #### Event: 'select-serial-port' Returns: diff --git a/filenames.gni b/filenames.gni index f7c6ce5dff438..e2f6aa294f8a9 100644 --- a/filenames.gni +++ b/filenames.gni @@ -566,6 +566,7 @@ filenames = { "shell/common/gin_converters/gfx_converter.h", "shell/common/gin_converters/guid_converter.h", "shell/common/gin_converters/gurl_converter.h", + "shell/common/gin_converters/hid_device_info_converter.h", "shell/common/gin_converters/image_converter.cc", "shell/common/gin_converters/image_converter.h", "shell/common/gin_converters/message_box_converter.cc", diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 639f20eda2717..eda5983d56c8c 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3445,37 +3445,127 @@ v8::Local WebContents::TakeHeapSnapshot( void WebContents::GrantDevicePermission( const url::Origin& origin, const base::Value* device, - blink::PermissionType permissionType, + blink::PermissionType permission_type, content::RenderFrameHost* render_frame_host) { - granted_devices_[render_frame_host->GetFrameTreeNodeId()][permissionType] + granted_devices_[render_frame_host->GetFrameTreeNodeId()][permission_type] [origin] .push_back( std::make_unique(device->Clone())); } -std::vector WebContents::GetGrantedDevices( +void WebContents::RevokeDevicePermission( const url::Origin& origin, - blink::PermissionType permissionType, + const base::Value* device, + blink::PermissionType permission_type, + content::RenderFrameHost* render_frame_host) { + const auto& devices_for_frame_host_it = + granted_devices_.find(render_frame_host->GetFrameTreeNodeId()); + if (devices_for_frame_host_it == granted_devices_.end()) + return; + + const auto& current_devices_it = + devices_for_frame_host_it->second.find(permission_type); + if (current_devices_it == devices_for_frame_host_it->second.end()) + return; + + const auto& origin_devices_it = current_devices_it->second.find(origin); + if (origin_devices_it == current_devices_it->second.end()) + return; + + for (auto it = origin_devices_it->second.begin(); + it != origin_devices_it->second.end();) { + if (DoesDeviceMatch(device, it->get(), permission_type)) { + it = origin_devices_it->second.erase(it); + } else { + ++it; + } + } +} + +bool WebContents::DoesDeviceMatch(const base::Value* device, + const base::Value* device_to_compare, + blink::PermissionType permission_type) { + if (permission_type == + static_cast( + WebContentsPermissionHelper::PermissionType::HID)) { + if (device->GetDict().FindInt(kHidVendorIdKey) != + device_to_compare->GetDict().FindInt(kHidVendorIdKey) || + device->GetDict().FindInt(kHidProductIdKey) != + device_to_compare->GetDict().FindInt(kHidProductIdKey)) { + return false; + } + + const auto* serial_number = + device_to_compare->GetDict().FindString(kHidSerialNumberKey); + const auto* device_serial_number = + device->GetDict().FindString(kHidSerialNumberKey); + + if (serial_number && device_serial_number && + *device_serial_number == *serial_number) + return true; + } else if (permission_type == + static_cast( + WebContentsPermissionHelper::PermissionType::SERIAL)) { +#if BUILDFLAG(IS_WIN) + const auto* instance_id = + device->GetDict().FindString(kDeviceInstanceIdKey); + const auto* port_instance_id = + device_to_compare->GetDict().FindString(kDeviceInstanceIdKey); + if (instance_id && port_instance_id && *instance_id == *port_instance_id) + return true; +#else + const auto* serial_number = device->GetDict().FindString(kSerialNumberKey); + const auto* port_serial_number = + device_to_compare->GetDict().FindString(kSerialNumberKey); + if (device->GetDict().FindInt(kVendorIdKey) != + device_to_compare->GetDict().FindInt(kVendorIdKey) || + device->GetDict().FindInt(kProductIdKey) != + device_to_compare->GetDict().FindInt(kProductIdKey) || + (serial_number && port_serial_number && + *port_serial_number != *serial_number)) { + return false; + } + +#if BUILDFLAG(IS_MAC) + const auto* usb_driver_key = device->GetDict().FindString(kUsbDriverKey); + const auto* port_usb_driver_key = + device_to_compare->GetDict().FindString(kUsbDriverKey); + if (usb_driver_key && port_usb_driver_key && + *usb_driver_key != *port_usb_driver_key) { + return false; + } +#endif // BUILDFLAG(IS_MAC) + return true; +#endif // BUILDFLAG(IS_WIN) + } + return false; +} + +bool WebContents::CheckDevicePermission( + const url::Origin& origin, + const base::Value* device, + blink::PermissionType permission_type, content::RenderFrameHost* render_frame_host) { const auto& devices_for_frame_host_it = granted_devices_.find(render_frame_host->GetFrameTreeNodeId()); if (devices_for_frame_host_it == granted_devices_.end()) - return {}; + return false; const auto& current_devices_it = - devices_for_frame_host_it->second.find(permissionType); + devices_for_frame_host_it->second.find(permission_type); if (current_devices_it == devices_for_frame_host_it->second.end()) - return {}; + return false; const auto& origin_devices_it = current_devices_it->second.find(origin); if (origin_devices_it == current_devices_it->second.end()) - return {}; + return false; - std::vector results; - for (const auto& object : origin_devices_it->second) - results.push_back(object->Clone()); + for (const auto& device_to_compare : origin_devices_it->second) { + if (DoesDeviceMatch(device, device_to_compare.get(), permission_type)) + return true; + } - return results; + return false; } void WebContents::UpdatePreferredSize(content::WebContents* web_contents, diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index c4311007d34fe..8925e14db4f5c 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -443,13 +443,20 @@ class WebContents : public ExclusiveAccessContext, blink::PermissionType permissionType, content::RenderFrameHost* render_frame_host); + // Revokes |origin| access to |device|. + // To be used in place of ObjectPermissionContextBase::RevokeObjectPermission. + void RevokeDevicePermission(const url::Origin& origin, + const base::Value* device, + blink::PermissionType permission_type, + content::RenderFrameHost* render_frame_host); + // Returns the list of devices that |origin| has been granted permission to // access. To be used in place of // ObjectPermissionContextBase::GetGrantedObjects. - std::vector GetGrantedDevices( - const url::Origin& origin, - blink::PermissionType permissionType, - content::RenderFrameHost* render_frame_host); + bool CheckDevicePermission(const url::Origin& origin, + const base::Value* device, + blink::PermissionType permissionType, + content::RenderFrameHost* render_frame_host); // disable copy WebContents(const WebContents&) = delete; @@ -746,6 +753,10 @@ class WebContents : public ExclusiveAccessContext, // Update the html fullscreen flag in both browser and renderer. void UpdateHtmlApiFullscreen(bool fullscreen); + bool DoesDeviceMatch(const base::Value* device, + const base::Value* device_to_compare, + blink::PermissionType permission_type); + v8::Global session_; v8::Global devtools_web_contents_; v8::Global debugger_; diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index a6235561a1aae..a4b27a0fee7fd 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -21,8 +21,6 @@ #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/electron_browser_client.h" #include "shell/browser/electron_browser_main_parts.h" -#include "shell/browser/hid/hid_chooser_context.h" -#include "shell/browser/serial/serial_chooser_context.h" #include "shell/browser/web_contents_permission_helper.h" #include "shell/browser/web_contents_preferences.h" #include "shell/common/gin_converters/content_converter.h" @@ -308,66 +306,8 @@ bool ElectronPermissionManager::CheckDevicePermission( api::WebContents* api_web_contents = api::WebContents::From(web_contents); if (device_permission_handler_.is_null()) { if (api_web_contents) { - std::vector granted_devices = - api_web_contents->GetGrantedDevices(origin, permission, - render_frame_host); - - for (const auto& granted_device : granted_devices) { - if (permission == - static_cast( - WebContentsPermissionHelper::PermissionType::HID)) { - if (device->FindIntKey(kHidVendorIdKey) != - granted_device.FindIntKey(kHidVendorIdKey) || - device->FindIntKey(kHidProductIdKey) != - granted_device.FindIntKey(kHidProductIdKey)) { - continue; - } - - const auto* serial_number = - granted_device.FindStringKey(kHidSerialNumberKey); - const auto* device_serial_number = - device->FindStringKey(kHidSerialNumberKey); - - if (serial_number && device_serial_number && - *device_serial_number == *serial_number) - return true; - } else if (permission == - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL)) { -#if BUILDFLAG(IS_WIN) - const auto* instance_id = device->FindStringKey(kDeviceInstanceIdKey); - const auto* port_instance_id = - granted_device.FindStringKey(kDeviceInstanceIdKey); - if (instance_id && port_instance_id && - *instance_id == *port_instance_id) - return true; -#else - const auto* serial_number = - granted_device.FindStringKey(kSerialNumberKey); - const auto* port_serial_number = - device->FindStringKey(kSerialNumberKey); - if (device->FindIntKey(kVendorIdKey) != - granted_device.FindIntKey(kVendorIdKey) || - device->FindIntKey(kProductIdKey) != - granted_device.FindIntKey(kProductIdKey) || - (serial_number && port_serial_number && - *port_serial_number != *serial_number)) { - continue; - } - -#if BUILDFLAG(IS_MAC) - const auto* usb_driver_key = device->FindStringKey(kUsbDriverKey); - const auto* port_usb_driver_key = - granted_device.FindStringKey(kUsbDriverKey); - if (usb_driver_key && port_usb_driver_key && - *usb_driver_key != *port_usb_driver_key) { - continue; - } -#endif // BUILDFLAG(IS_MAC) - return true; -#endif // BUILDFLAG(IS_WIN) - } - } + return api_web_contents->CheckDevicePermission(origin, device, permission, + render_frame_host); } return false; } else { @@ -398,6 +338,19 @@ void ElectronPermissionManager::GrantDevicePermission( } } +void ElectronPermissionManager::RevokeDevicePermission( + blink::PermissionType permission, + const url::Origin& origin, + const base::Value* device, + content::RenderFrameHost* render_frame_host) const { + auto* web_contents = + content::WebContents::FromRenderFrameHost(render_frame_host); + api::WebContents* api_web_contents = api::WebContents::From(web_contents); + if (api_web_contents) + api_web_contents->RevokeDevicePermission(origin, device, permission, + render_frame_host); +} + blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForFrame( blink::PermissionType permission, diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 74e4ab7c5b34e..10b9b820b0609 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -103,6 +103,12 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { const base::Value* object, content::RenderFrameHost* render_frame_host) const; + void RevokeDevicePermission( + blink::PermissionType permission, + const url::Origin& origin, + const base::Value* object, + content::RenderFrameHost* render_frame_host) const; + protected: void OnPermissionResponse(int request_id, int permission_id, diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index efad257969a74..75298a5870046 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -80,8 +80,11 @@ bool ElectronHidDelegate::HasDevicePermission( void ElectronHidDelegate::RevokeDevicePermission( content::RenderFrameHost* render_frame_host, const device::mojom::HidDeviceInfo& device) { - // TODO(jkleinsc) implement this for - // https://chromium-review.googlesource.com/c/chromium/src/+/3297868 + auto* chooser_context = GetChooserContext(render_frame_host); + const auto& origin = + render_frame_host->GetMainFrame()->GetLastCommittedOrigin(); + return chooser_context->RevokeDevicePermission(origin, device, + render_frame_host); } device::mojom::HidManager* ElectronHidDelegate::GetHidManager( diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index ca793e6ff22dc..84231d6eb5dbe 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -19,7 +19,13 @@ #include "content/public/browser/device_service.h" #include "services/device/public/cpp/hid/hid_blocklist.h" #include "services/device/public/cpp/hid/hid_switches.h" +#include "shell/browser/api/electron_api_session.h" #include "shell/browser/web_contents_permission_helper.h" +#include "shell/common/gin_converters/content_converter.h" +#include "shell/common/gin_converters/frame_converter.h" +#include "shell/common/gin_converters/hid_device_info_converter.h" +#include "shell/common/gin_converters/value_converter.h" +#include "shell/common/gin_helper/dictionary.h" #include "ui/base/l10n/l10n_util.h" namespace electron { @@ -99,6 +105,66 @@ void HidChooserContext::GrantDevicePermission( } } +void HidChooserContext::RevokeDevicePermission( + const url::Origin& origin, + const device::mojom::HidDeviceInfo& device, + content::RenderFrameHost* render_frame_host) { + DCHECK(base::Contains(devices_, device.guid)); + if (CanStorePersistentEntry(device)) { + RevokePersistentDevicePermission(origin, device, render_frame_host); + } else { + RevokeEphemeralDevicePermission(origin, device); + } + auto* web_contents = + content::WebContents::FromRenderFrameHost(render_frame_host); + + api::Session* session = + api::Session::FromBrowserContext(web_contents->GetBrowserContext()); + if (session) { + v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); + v8::HandleScope scope(isolate); + gin_helper::Dictionary details = + gin_helper::Dictionary::CreateEmpty(isolate); + details.Set("device", device.Clone()); + details.SetGetter("frame", render_frame_host); + session->Emit("hid-device-revoked", details); + } +} + +void HidChooserContext::RevokePersistentDevicePermission( + const url::Origin& origin, + const device::mojom::HidDeviceInfo& device, + content::RenderFrameHost* render_frame_host) { + auto* web_contents = + content::WebContents::FromRenderFrameHost(render_frame_host); + auto* permission_helper = + WebContentsPermissionHelper::FromWebContents(web_contents); + permission_helper->RevokeHIDDevicePermission( + origin, DeviceInfoToValue(device), render_frame_host); + RevokeEphemeralDevicePermission(origin, device); +} + +void HidChooserContext::RevokeEphemeralDevicePermission( + const url::Origin& origin, + const device::mojom::HidDeviceInfo& device) { + auto it = ephemeral_devices_.find(origin); + if (it != ephemeral_devices_.end()) { + std::set& devices = it->second; + for (auto guid = devices.begin(); guid != devices.end();) { + DCHECK(base::Contains(devices_, *guid)); + + if (devices_[*guid]->physical_device_id != device.physical_device_id) { + ++guid; + continue; + } + + guid = devices.erase(guid); + if (devices.empty()) + ephemeral_devices_.erase(it); + } + } +} + bool HidChooserContext::HasDevicePermission( const url::Origin& origin, const device::mojom::HidDeviceInfo& device, diff --git a/shell/browser/hid/hid_chooser_context.h b/shell/browser/hid/hid_chooser_context.h index a9c2f7e1def98..544984004e654 100644 --- a/shell/browser/hid/hid_chooser_context.h +++ b/shell/browser/hid/hid_chooser_context.h @@ -76,6 +76,9 @@ class HidChooserContext : public KeyedService, void GrantDevicePermission(const url::Origin& origin, const device::mojom::HidDeviceInfo& device, content::RenderFrameHost* render_frame_host); + void RevokeDevicePermission(const url::Origin& origin, + const device::mojom::HidDeviceInfo& device, + content::RenderFrameHost* render_frame_host); bool HasDevicePermission(const url::Origin& origin, const device::mojom::HidDeviceInfo& device, content::RenderFrameHost* render_frame_host); @@ -111,6 +114,15 @@ class HidChooserContext : public KeyedService, std::vector devices); void OnHidManagerConnectionError(); + // HID-specific interface for revoking device permissions. + void RevokePersistentDevicePermission( + const url::Origin& origin, + const device::mojom::HidDeviceInfo& device, + content::RenderFrameHost* render_frame_host); + void RevokeEphemeralDevicePermission( + const url::Origin& origin, + const device::mojom::HidDeviceInfo& device); + ElectronBrowserContext* browser_context_; bool is_initialized_ = false; diff --git a/shell/browser/hid/hid_chooser_controller.cc b/shell/browser/hid/hid_chooser_controller.cc index 039d7074b528d..69f660fa03016 100644 --- a/shell/browser/hid/hid_chooser_controller.cc +++ b/shell/browser/hid/hid_chooser_controller.cc @@ -20,6 +20,7 @@ #include "shell/browser/javascript_environment.h" #include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/content_converter.h" +#include "shell/common/gin_converters/hid_device_info_converter.h" #include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/node_includes.h" @@ -28,18 +29,6 @@ namespace { -std::string PhysicalDeviceIdFromDeviceInfo( - const device::mojom::HidDeviceInfo& device) { - // A single physical device may expose multiple HID interfaces, each - // represented by a HidDeviceInfo object. When a device exposes multiple - // HID interfaces, the HidDeviceInfo objects will share a common - // |physical_device_id|. Group these devices so that a single chooser item - // is shown for each physical device. If a device's physical device ID is - // empty, use its GUID instead. - return device.physical_device_id.empty() ? device.guid - : device.physical_device_id; -} - bool FilterMatch(const blink::mojom::HidDeviceFilterPtr& filter, const device::mojom::HidDeviceInfo& device) { if (filter->device_ids) { @@ -83,21 +72,6 @@ bool FilterMatch(const blink::mojom::HidDeviceFilterPtr& filter, } // namespace -namespace gin { - -template <> -struct Converter { - static v8::Local ToV8( - v8::Isolate* isolate, - const device::mojom::HidDeviceInfoPtr& device) { - base::Value value = electron::HidChooserContext::DeviceInfoToValue(*device); - value.SetStringKey("deviceId", PhysicalDeviceIdFromDeviceInfo(*device)); - return gin::ConvertToV8(isolate, value); - } -}; - -} // namespace gin - namespace electron { HidChooserController::HidChooserController( @@ -131,6 +105,19 @@ HidChooserController::~HidChooserController() { std::move(callback_).Run(std::vector()); } +// static +std::string HidChooserController::PhysicalDeviceIdFromDeviceInfo( + const device::mojom::HidDeviceInfo& device) { + // A single physical device may expose multiple HID interfaces, each + // represented by a HidDeviceInfo object. When a device exposes multiple + // HID interfaces, the HidDeviceInfo objects will share a common + // |physical_device_id|. Group these devices so that a single chooser item + // is shown for each physical device. If a device's physical device ID is + // empty, use its GUID instead. + return device.physical_device_id.empty() ? device.guid + : device.physical_device_id; +} + api::Session* HidChooserController::GetSession() { if (!web_contents()) { return nullptr; diff --git a/shell/browser/hid/hid_chooser_controller.h b/shell/browser/hid/hid_chooser_controller.h index dde678ff981fb..63411c9f65b78 100644 --- a/shell/browser/hid/hid_chooser_controller.h +++ b/shell/browser/hid/hid_chooser_controller.h @@ -53,6 +53,10 @@ class HidChooserController HidChooserController& operator=(HidChooserController&) = delete; ~HidChooserController() override; + // static + static std::string PhysicalDeviceIdFromDeviceInfo( + const device::mojom::HidDeviceInfo& device); + // HidChooserContext::DeviceObserver: void OnDeviceAdded(const device::mojom::HidDeviceInfo& device_info) override; void OnDeviceRemoved( diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 55e28d2ed0381..093f6504d3e99 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -107,6 +107,17 @@ void WebContentsPermissionHelper::GrantDevicePermission( render_frame_host); } +void WebContentsPermissionHelper::RevokeDevicePermission( + blink::PermissionType permission, + const url::Origin& origin, + const base::Value* device, + content::RenderFrameHost* render_frame_host) const { + auto* permission_manager = static_cast( + web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); + permission_manager->RevokeDevicePermission(permission, origin, device, + render_frame_host); +} + void WebContentsPermissionHelper::RequestFullscreenPermission( base::OnceCallback callback) { RequestPermission( @@ -230,6 +241,15 @@ void WebContentsPermissionHelper::GrantHIDDevicePermission( render_frame_host); } +void WebContentsPermissionHelper::RevokeHIDDevicePermission( + const url::Origin& origin, + base::Value device, + content::RenderFrameHost* render_frame_host) const { + return RevokeDevicePermission( + static_cast(PermissionType::HID), origin, &device, + render_frame_host); +} + WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper); } // namespace electron diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index a34dd74a4412e..847093d559950 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -68,6 +68,10 @@ class WebContentsPermissionHelper const url::Origin& origin, base::Value device, content::RenderFrameHost* render_frame_host) const; + void RevokeHIDDevicePermission( + const url::Origin& origin, + base::Value device, + content::RenderFrameHost* render_frame_host) const; private: explicit WebContentsPermissionHelper(content::WebContents* web_contents); @@ -91,6 +95,12 @@ class WebContentsPermissionHelper const base::Value* device, content::RenderFrameHost* render_frame_host) const; + void RevokeDevicePermission( + blink::PermissionType permission, + const url::Origin& origin, + const base::Value* device, + content::RenderFrameHost* render_frame_host) const; + // TODO(clavin): refactor to use the WebContents provided by the // WebContentsUserData base class instead of storing a duplicate ref content::WebContents* web_contents_; diff --git a/shell/common/gin_converters/hid_device_info_converter.h b/shell/common/gin_converters/hid_device_info_converter.h new file mode 100644 index 0000000000000..6175b77ab0d3c --- /dev/null +++ b/shell/common/gin_converters/hid_device_info_converter.h @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Microsoft, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_HID_DEVICE_INFO_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_HID_DEVICE_INFO_CONVERTER_H_ + +#include "gin/converter.h" +#include "services/device/public/mojom/hid.mojom.h" +#include "shell/browser/hid/hid_chooser_context.h" +#include "shell/browser/hid/hid_chooser_controller.h" + +namespace gin { + +template <> +struct Converter { + static v8::Local ToV8( + v8::Isolate* isolate, + const device::mojom::HidDeviceInfoPtr& device) { + base::Value value = electron::HidChooserContext::DeviceInfoToValue(*device); + value.SetStringKey( + "deviceId", + electron::HidChooserController::PhysicalDeviceIdFromDeviceInfo( + *device)); + return gin::ConvertToV8(isolate, value); + } +}; + +} // namespace gin + +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_HID_DEVICE_INFO_CONVERTER_H_ diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index a69e1b4cc433f..3ebadfe1bf2ca 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -1918,7 +1918,7 @@ describe('navigator.hid', () => { serverUrl = `http://localhost:${(server.address() as any).port}`; }); - const getDevices: any = () => { + const requestDevices: any = () => { return w.webContents.executeJavaScript(` navigator.hid.requestDevice({filters: []}).then(device => device.toString()).catch(err => err.toString()); `, true); @@ -1936,7 +1936,7 @@ describe('navigator.hid', () => { it('does not return a device if select-hid-device event is not defined', async () => { w.loadFile(path.join(fixturesPath, 'pages', 'blank.html')); - const device = await getDevices(); + const device = await requestDevices(); expect(device).to.equal(''); }); @@ -1947,7 +1947,7 @@ describe('navigator.hid', () => { callback(); }); session.defaultSession.setPermissionCheckHandler(() => false); - const device = await getDevices(); + const device = await requestDevices(); expect(selectFired).to.be.false(); expect(device).to.equal(''); }); @@ -1965,7 +1965,7 @@ describe('navigator.hid', () => { callback(); } }); - const device = await getDevices(); + const device = await requestDevices(); expect(selectFired).to.be.true(); if (haveDevices) { expect(device).to.contain('[object HIDDevice]'); @@ -2014,7 +2014,7 @@ describe('navigator.hid', () => { return true; }); await w.webContents.executeJavaScript('navigator.hid.getDevices();', true); - const device = await getDevices(); + const device = await requestDevices(); expect(selectFired).to.be.true(); if (haveDevices) { expect(device).to.contain('[object HIDDevice]'); @@ -2024,7 +2024,7 @@ describe('navigator.hid', () => { } }); - it('returns excludes a device when a exclusionFilter is specified', async () => { + it('excludes a device when a exclusionFilter is specified', async () => { const exclusionFilters = []; let haveDevices = false; let checkForExcludedDevice = false; @@ -2053,13 +2053,51 @@ describe('navigator.hid', () => { callback(); }); - await getDevices(); + await requestDevices(); if (haveDevices) { // We have devices to exclude, so check if exculsionFilters work checkForExcludedDevice = true; await w.webContents.executeJavaScript(` navigator.hid.requestDevice({filters: [], exclusionFilters: ${JSON.stringify(exclusionFilters)}}).then(device => device.toString()).catch(err => err.toString()); + `, true); } }); + + it('supports device.forget()', async () => { + let deletedDeviceFromEvent; + let haveDevices = false; + w.webContents.session.on('select-hid-device', (event, details, callback) => { + if (details.deviceList.length > 0) { + haveDevices = true; + callback(details.deviceList[0].deviceId); + } else { + callback(); + } + }); + w.webContents.session.on('hid-device-revoked', (event, details) => { + deletedDeviceFromEvent = details.device; + }); + await requestDevices(); + if (haveDevices) { + const grantedDevices = await w.webContents.executeJavaScript('navigator.hid.getDevices()'); + if (grantedDevices.length > 0) { + const deletedDevice = await w.webContents.executeJavaScript(` + navigator.hid.getDevices().then(devices => { + devices[0].forget(); + return { + vendorId: devices[0].vendorId, + productId: devices[0].productId, + name: devices[0].productName + } + }) + `); + const grantedDevices2 = await w.webContents.executeJavaScript('navigator.hid.getDevices()'); + expect(grantedDevices2.length).to.be.lessThan(grantedDevices.length); + if (deletedDevice.name !== '' && deletedDevice.productId && deletedDevice.vendorId) { + expect(deletedDeviceFromEvent).to.include(deletedDevice); + } + } + } + }); }); From 9d3fc9c794172ad90f5f2cb0fdde130cc94f5e87 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 24 May 2022 10:23:16 +0200 Subject: [PATCH 416/811] refactor: return options directly in makeBrowserWindowOptions() helper (#34309) --- lib/browser/guest-window-manager.ts | 34 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/browser/guest-window-manager.ts b/lib/browser/guest-window-manager.ts index 76da71b15abcf..fb6ae6edf00b0 100644 --- a/lib/browser/guest-window-manager.ts +++ b/lib/browser/guest-window-manager.ts @@ -41,7 +41,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition outlivesOpener: boolean, }): BrowserWindow | undefined { const { url, frameName, features } = windowOpenArgs; - const { options: browserWindowOptions } = makeBrowserWindowOptions({ + const browserWindowOptions = makeBrowserWindowOptions({ embedder, features, overrideOptions: overrideBrowserWindowOptions @@ -211,23 +211,21 @@ function makeBrowserWindowOptions ({ embedder, features, overrideOptions }: { const { options: parsedOptions, webPreferences: parsedWebPreferences } = parseFeatures(features); return { - options: { - show: true, - width: 800, - height: 600, - ...parsedOptions, - ...overrideOptions, - // Note that for normal code path an existing WebContents created by - // Chromium will be used, with web preferences parsed in the - // |-will-add-new-contents| event. - // The |webPreferences| here is only used by the |new-window| event. - webPreferences: makeWebPreferences({ - embedder, - insecureParsedWebPreferences: parsedWebPreferences, - secureOverrideWebPreferences: overrideOptions && overrideOptions.webPreferences - }) - } as Electron.BrowserViewConstructorOptions - }; + show: true, + width: 800, + height: 600, + ...parsedOptions, + ...overrideOptions, + // Note that for normal code path an existing WebContents created by + // Chromium will be used, with web preferences parsed in the + // |-will-add-new-contents| event. + // The |webPreferences| here is only used by the |new-window| event. + webPreferences: makeWebPreferences({ + embedder, + insecureParsedWebPreferences: parsedWebPreferences, + secureOverrideWebPreferences: overrideOptions && overrideOptions.webPreferences + }) + } as Electron.BrowserViewConstructorOptions; } export function makeWebPreferences ({ embedder, secureOverrideWebPreferences = {}, insecureParsedWebPreferences: parsedWebPreferences = {} }: { From 6667de28e31e3a333240743b1926d5b76f22da6d Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 24 May 2022 10:23:56 +0200 Subject: [PATCH 417/811] chore: use webContents.setWindowOpenHandler() in default-app (#34308) --- default_app/default_app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/default_app/default_app.ts b/default_app/default_app.ts index 44bc2ebd9affc..0bac020331730 100644 --- a/default_app/default_app.ts +++ b/default_app/default_app.ts @@ -66,9 +66,9 @@ async function createWindow (backgroundColor?: string) { mainWindow = new BrowserWindow(options); mainWindow.on('ready-to-show', () => mainWindow!.show()); - mainWindow.webContents.on('new-window', (event, url) => { - event.preventDefault(); - shell.openExternal(decorateURL(url)); + mainWindow.webContents.setWindowOpenHandler(details => { + shell.openExternal(decorateURL(details.url)); + return { action: 'deny' }; }); mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, done) => { From b8abf5e38adaaf5f051ad1690f51c4a4082caa02 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 06:00:37 -0700 Subject: [PATCH 418/811] Bump v20.0.0-nightly.20220524 --- 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 04df7831c1786..a0026224c4b61 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220523 \ No newline at end of file +20.0.0-nightly.20220524 \ No newline at end of file diff --git a/package.json b/package.json index 727202feaccae..ee1370fd439b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220523", + "version": "20.0.0-nightly.20220524", "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 e1a52014d366f..995e3bbae9e71 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 20,0,0,20220523 - PRODUCTVERSION 20,0,0,20220523 + FILEVERSION 20,0,0,20220524 + PRODUCTVERSION 20,0,0,20220524 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6cb2b9eab7e04d5b08ed0a75a78c5c6a28d4f1d0 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 24 May 2022 14:04:49 -0700 Subject: [PATCH 419/811] build: do not checkout chromium for ts docs check (#34331) --- .circleci/config/base.yml | 52 ++++++++++++++------------------------- yarn.lock | 7 +++--- 2 files changed, 21 insertions(+), 38 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 454a7a59152b9..a579069c96e93 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -473,6 +473,13 @@ step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac node script/yarn install fi +step-install-npm-deps: &step-install-npm-deps + run: + name: Install node_modules + command: | + cd src/electron + node script/yarn install --frozen-lockfile + # This step handles the differences between the linux "gclient sync" # and the expected state on macOS step-fix-sync: &step-fix-sync @@ -987,9 +994,16 @@ 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 + cd src/electron + node script/yarn create-typescript-definitions + node script/yarn tsc -p tsconfig.default_app.json --noEmit + for f in build/webpack/*.js + do + out="${f:29}" + if [ "$out" != "base.js" ]; then + node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env.mode=development + fi + done # List of all steps. steps-electron-gn-check: &steps-electron-gn-check @@ -1011,37 +1025,7 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha 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-install-python2-on-mac - - *step-get-more-space-on-mac - - *step-setup-goma-for-build - - *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-wait-for-goma - - *step-get-more-space-on-mac - - *step-install-npm-deps-on-mac - - *step-fix-sync - - *step-gn-gen-default + - *step-install-npm-deps #Compile ts/js to verify doc change didn't break anything - *step-ts-compile diff --git a/yarn.lock b/yarn.lock index ca7df59b03cf9..226aae6f5b92c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5050,10 +5050,9 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== +nan@^2.12.1, nan@nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac: + version "2.15.0" + resolved "https://codeload.github.com/nodejs/nan/tar.gz/16fa32231e2ccd89d2804b3f765319128b20c4ac" nanomatch@^1.2.9: version "1.2.13" From 7bc4b919dcb978426b2cb7114ced85801ec3f776 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 25 May 2022 06:38:38 +0200 Subject: [PATCH 420/811] fix: esc not working on Windows during fullscreen (#34317) * fix: esc not working on Windows during fullscreen * chore: fix lint --- patches/chromium/.patches | 2 +- ...exclusive_access_for_electron_needs.patch} | 30 +++++++++++++++---- .../browser/api/electron_api_web_contents.cc | 5 ++-- 3 files changed, 28 insertions(+), 9 deletions(-) rename patches/chromium/{fix_patch_out_permissions_checks_in_exclusive_access.patch => fix_adapt_exclusive_access_for_electron_needs.patch} (81%) diff --git a/patches/chromium/.patches b/patches/chromium/.patches index feb74c1e343bf..6dc083326fbdd 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -98,7 +98,7 @@ fix_expose_decrementcapturercount_in_web_contents_impl.patch add_ui_scopedcliboardwriter_writeunsaferawdata.patch feat_add_data_parameter_to_processsingleton.patch load_v8_snapshot_in_browser_process.patch -fix_patch_out_permissions_checks_in_exclusive_access.patch +fix_adapt_exclusive_access_for_electron_needs.patch fix_aspect_ratio_with_max_size.patch fix_dont_delete_SerialPortManager_on_main_thread.patch fix_crash_when_saving_edited_pdf_files.patch diff --git a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch similarity index 81% rename from patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch rename to patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index 0d8d675b6f839..ad32e434ee6bd 100644 --- a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -1,20 +1,22 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 25 Oct 2021 21:45:57 +0200 -Subject: fix: patch out permissions checks in exclusive_access +Subject: fix: adapt exclusive_access for electron needs This patch is necessary in order to properly enable navigator.keyboard.{(un)?lock}() functionality. We don't have a concept of PermissionManager nor of a Profile, so this would not affect usage of the API. -We might consider potentially using our own permissions handler, -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 +We also need to ensure that NotifyExclusiveTabAccessLost is called +on all platforms in FullscreenController::ExitFullscreenModeInternal() +and not just macOS, since Electron's native window impls report state +change fairly instantly as well, and so pressing escape won't work on +Linux or Windows to un-fullscreen in some circumstances without this +change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..9fb77b8d7c3d9cb49dcb3ac1f2495fa52f53932e 100644 +index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e415735e4 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -16,12 +16,16 @@ @@ -112,6 +114,22 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..9fb77b8d7c3d9cb49dcb3ac1f2495fa5 if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); +@@ -507,12 +517,12 @@ void FullscreenController::ExitFullscreenModeInternal() { + RecordExitingUMA(); + toggled_into_fullscreen_ = false; + started_fullscreen_transition_ = true; +-#if BUILDFLAG(IS_MAC) +- // Mac windows report a state change instantly, and so we must also clear ++ ++ // Electron native windows report a state change instantly, and so we must also clear + // state_prior_to_tab_fullscreen_ to match them else other logic using + // state_prior_to_tab_fullscreen_ will be incorrect. + NotifyTabExclusiveAccessLost(); +-#endif ++ + exclusive_access_manager()->context()->ExitFullscreen(); + extension_caused_fullscreen_ = GURL(); + diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h index f0841982cb296079c8b943067564d74bc1b7067c..49f59fc2c12c98faada52e0e7c8c9c6e6251b599 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index eda5983d56c8c..b48a45bb8bcc2 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1308,8 +1308,6 @@ void WebContents::EnterFullscreenModeForTab( base::BindRepeating(&WebContents::OnEnterFullscreenModeForTab, base::Unretained(this), requesting_frame, options); permission_helper->RequestFullscreenPermission(callback); - exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( - requesting_frame, options.display_id); } void WebContents::OnEnterFullscreenModeForTab( @@ -1325,6 +1323,9 @@ void WebContents::OnEnterFullscreenModeForTab( return; } + exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( + requesting_frame, options.display_id); + SetHtmlApiFullscreen(true); if (native_fullscreen_) { From fd559d8516d856c462f4454c85e737f5d79695b4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 06:01:00 -0700 Subject: [PATCH 421/811] Bump v20.0.0-nightly.20220525 --- 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 a0026224c4b61..7f65a9514cc90 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220524 \ No newline at end of file +20.0.0-nightly.20220525 \ No newline at end of file diff --git a/package.json b/package.json index ee1370fd439b1..46e473640c793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220524", + "version": "20.0.0-nightly.20220525", "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 995e3bbae9e71..24374579aa433 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 20,0,0,20220524 - PRODUCTVERSION 20,0,0,20220524 + FILEVERSION 20,0,0,20220525 + PRODUCTVERSION 20,0,0,20220525 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a6a2bb65a4129e9f9fe529dd5b36b712e9c19174 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 06:16:08 -0700 Subject: [PATCH 422/811] Revert "Bump v20.0.0-nightly.20220525" This reverts commit fd559d8516d856c462f4454c85e737f5d79695b4. --- 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 7f65a9514cc90..a0026224c4b61 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220525 \ No newline at end of file +20.0.0-nightly.20220524 \ No newline at end of file diff --git a/package.json b/package.json index 46e473640c793..ee1370fd439b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220525", + "version": "20.0.0-nightly.20220524", "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 24374579aa433..995e3bbae9e71 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 20,0,0,20220525 - PRODUCTVERSION 20,0,0,20220525 + FILEVERSION 20,0,0,20220524 + PRODUCTVERSION 20,0,0,20220524 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4b3a7b77625541960786d741c1d4a24c459ac2ed Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 06:18:50 -0700 Subject: [PATCH 423/811] Bump v20.0.0-nightly.20220525 --- 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 a0026224c4b61..7f65a9514cc90 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220524 \ No newline at end of file +20.0.0-nightly.20220525 \ No newline at end of file diff --git a/package.json b/package.json index ee1370fd439b1..46e473640c793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220524", + "version": "20.0.0-nightly.20220525", "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 995e3bbae9e71..24374579aa433 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 20,0,0,20220524 - PRODUCTVERSION 20,0,0,20220524 + FILEVERSION 20,0,0,20220525 + PRODUCTVERSION 20,0,0,20220525 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From afca3519fda5e66d6ff7bcf9a9d52453377f8fb9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 06:24:48 -0700 Subject: [PATCH 424/811] Revert "Bump v20.0.0-nightly.20220525" This reverts commit 4b3a7b77625541960786d741c1d4a24c459ac2ed. --- 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 7f65a9514cc90..a0026224c4b61 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220525 \ No newline at end of file +20.0.0-nightly.20220524 \ No newline at end of file diff --git a/package.json b/package.json index 46e473640c793..ee1370fd439b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220525", + "version": "20.0.0-nightly.20220524", "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 24374579aa433..995e3bbae9e71 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 20,0,0,20220525 - PRODUCTVERSION 20,0,0,20220525 + FILEVERSION 20,0,0,20220524 + PRODUCTVERSION 20,0,0,20220524 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4accf67d2b5ca09af0b61f8d17ee119c3f83f0b4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 25 May 2022 20:52:41 +0200 Subject: [PATCH 425/811] build: trigger mksnapshot/chromedriver releases automatically (#34346) --- .../workflows/release_dependency_versions.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release_dependency_versions.yml diff --git a/.github/workflows/release_dependency_versions.yml b/.github/workflows/release_dependency_versions.yml new file mode 100644 index 0000000000000..7039b9028629b --- /dev/null +++ b/.github/workflows/release_dependency_versions.yml @@ -0,0 +1,31 @@ +name: Trigger Major Release Dependency Updates + +on: + release: + types: [published] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + check_tag: + runs-on: ubuntu-latest + id: check_tag + - uses: actions/checkout@v3 + - name: Check Tag + run: | + if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.0\.0$ ]]; then + echo ::set-output name=should_release::true + fi + trigger: + runs-on: ubuntu-latest + needs: check_tag + if: jobs.check_tag.outputs.should_release == 'true' + steps: + - uses: actions/checkout@v3 + - name: Trigger New chromedriver Release + run: | + gh api /repos/:owner/chromedriver/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}' + - name: Trigger New mksnapshot Release + run: | + gh api /repos/:owner/mksnapshot/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}' From 2ffa31832e40602dea3b8ae9cfaad69bfddf73aa Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 06:01:46 -0700 Subject: [PATCH 426/811] Bump v21.0.0-nightly.20220526 --- 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 a0026224c4b61..f087fa4c20fc3 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -20.0.0-nightly.20220524 \ No newline at end of file +21.0.0-nightly.20220526 \ No newline at end of file diff --git a/package.json b/package.json index ee1370fd439b1..c522a1d42e6f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "20.0.0-nightly.20220524", + "version": "21.0.0-nightly.20220526", "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 995e3bbae9e71..a31c6f4c6b86b 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 20,0,0,20220524 - PRODUCTVERSION 20,0,0,20220524 + FILEVERSION 21,0,0,20220526 + PRODUCTVERSION 21,0,0,20220526 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "20.0.0" + VALUE "FileVersion", "21.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", "20.0.0" + VALUE "ProductVersion", "21.0.0" VALUE "SquirrelAwareVersion", "1" END END From 03d9615f999acab396267131b44d3bf0d7bc5f0b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 06:02:05 -0700 Subject: [PATCH 427/811] Bump v21.0.0-nightly.20220527 --- 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 f087fa4c20fc3..6ee6d87b0d7c1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220526 \ No newline at end of file +21.0.0-nightly.20220527 \ No newline at end of file diff --git a/package.json b/package.json index c522a1d42e6f5..5dbc562fc464a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220526", + "version": "21.0.0-nightly.20220527", "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 a31c6f4c6b86b..043e140d9fe9a 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 21,0,0,20220526 - PRODUCTVERSION 21,0,0,20220526 + FILEVERSION 21,0,0,20220527 + PRODUCTVERSION 21,0,0,20220527 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 34a9268e97592afcb662f5cc6d5c1b1489549387 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 30 May 2022 01:28:33 -0700 Subject: [PATCH 428/811] ci: re-enable CalculateNativeWinOcclusion (#34374) --- appveyor.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 540fd50f0df75..25aeea817e440 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -211,10 +211,9 @@ test_script: echo "Skipping tests for $env:GN_CONFIG build" } - cd electron - # CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022 - - 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 ) + - 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 ) + - 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 ) + - 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 ) - 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" From fd88908457a986f06e310e80499e4b2775d8ba70 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 30 May 2022 05:13:48 -0700 Subject: [PATCH 429/811] fix: hide content protected windows during screen capture with `ScreenCaptureKitMac` (#34362) fix: hide content protected windows during screen capture --- patches/chromium/.patches | 1 + ...indows_in_the_current_application_in.patch | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 6dc083326fbdd..547c0b5e6240e 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -110,3 +110,4 @@ introduce_ozoneplatform_electron_can_call_x11_property.patch make_gtk_getlibgtk_public.patch build_disable_print_content_analysis.patch custom_protocols_plzserviceworker.patch +feat_filter_out_non-shareable_windows_in_the_current_application_in.patch diff --git a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch new file mode 100644 index 0000000000000..c72abdbc38363 --- /dev/null +++ b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Thu, 26 May 2022 15:38:32 -0700 +Subject: feat: filter out non-shareable windows in the current application in + ScreenCaptureKitDevice + +This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases. + +diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm +index 50a779be2e7d3a95496e2791187a6b56266786eb..5876babb99b5e98b151e13e4091305763a417a9e 100644 +--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm ++++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm +@@ -100,7 +100,15 @@ void OnShareableContentCreated( + case DesktopMediaID::TYPE_SCREEN: + for (SCDisplay* display : [content displays]) { + if (source_.id == [display displayID]) { +- NSArray* exclude_windows = nil; ++ NSArray* exclude_ns_windows = [[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) { ++ return [win sharingType] == NSWindowSharingNone; ++ }]]; ++ NSArray* exclude_windows = [[content windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SCWindow* win, NSDictionary *bindings) { ++ for (NSWindow* excluded : exclude_ns_windows) { ++ if ((CGWindowID)[excluded windowNumber] == [win windowID]) return true; ++ } ++ return false; ++ }]]; + filter.reset([[SCContentFilter alloc] + initWithDisplay:display + excludingWindows:exclude_windows]); From 0d69067dee3f05db568820e480f7db3aa8b724aa Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 06:01:33 -0700 Subject: [PATCH 430/811] Bump v21.0.0-nightly.20220530 --- 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 6ee6d87b0d7c1..d26213de57bfa 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220527 \ No newline at end of file +21.0.0-nightly.20220530 \ No newline at end of file diff --git a/package.json b/package.json index 5dbc562fc464a..1abee71072b9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220527", + "version": "21.0.0-nightly.20220530", "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 043e140d9fe9a..41ec4c7402d4c 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 21,0,0,20220527 - PRODUCTVERSION 21,0,0,20220527 + FILEVERSION 21,0,0,20220530 + PRODUCTVERSION 21,0,0,20220530 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 93b39b92b5078071f870b8e97c31e24c1974a49f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 31 May 2022 08:21:25 +0200 Subject: [PATCH 431/811] refactor: printToPDF should be headless (#33654) --- BUILD.gn | 2 - chromium_src/BUILD.gn | 2 + docs/api/web-contents.md | 53 ++-- docs/api/webview-tag.md | 30 +-- docs/breaking-changes.md | 55 ++++ lib/browser/api/web-contents.ts | 236 ++++++++--------- patches/chromium/printing.patch | 105 ++------ .../browser/api/electron_api_web_contents.cc | 86 +++++- shell/browser/api/electron_api_web_contents.h | 6 +- .../electron_extensions_api_client.cc | 2 - .../printing/print_preview_message_handler.h | 108 -------- .../printing/print_view_manager_electron.cc | 247 +++++++++++++++++- .../printing/print_view_manager_electron.h | 69 ++++- spec-main/api-web-contents-spec.ts | 19 +- spec/ts-smoke/electron/main.ts | 7 +- spec/webview-spec.js | 14 +- typings/internal-electron.d.ts | 5 + 17 files changed, 640 insertions(+), 406 deletions(-) delete mode 100644 shell/browser/printing/print_preview_message_handler.h diff --git a/BUILD.gn b/BUILD.gn index 107f317be548f..5c5f4d27e01e6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -667,8 +667,6 @@ source_set("electron_lib") { if (enable_basic_printing) { sources += [ - "shell/browser/printing/print_preview_message_handler.cc", - "shell/browser/printing/print_preview_message_handler.h", "shell/browser/printing/print_view_manager_electron.cc", "shell/browser/printing/print_view_manager_electron.h", "shell/renderer/printing/print_render_frame_helper_delegate.cc", diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 41aad0ed3b942..f5a8939902246 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -216,6 +216,8 @@ static_library("chrome") { "//chrome/browser/printing/printer_query.h", "//chrome/browser/printing/printing_service.cc", "//chrome/browser/printing/printing_service.h", + "//components/printing/browser/print_to_pdf/pdf_print_utils.cc", + "//components/printing/browser/print_to_pdf/pdf_print_utils.h", ] if (enable_oop_printing) { diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index bdfa225332567..d3f5b82a773fd 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -1428,7 +1428,7 @@ Returns `Promise` - Resolves with a [`PrinterInfo[]`](structures/ * `header` string (optional) - string to be printed as page header. * `footer` string (optional) - string to be printed as page footer. * `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`, - `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`. + `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width`. * `callback` Function (optional) * `success` boolean - Indicates success of the print call. * `failureReason` string - Error description called back if the print fails. @@ -1459,43 +1459,28 @@ win.webContents.print(options, (success, errorType) => { #### `contents.printToPDF(options)` * `options` Object - * `headerFooter` Record (optional) - the header and footer for the PDF. - * `title` string - The title for the PDF header. - * `url` string - the url for the PDF footer. - * `landscape` boolean (optional) - `true` for landscape, `false` for portrait. - * `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for - default margin, 1 for no margin, and 2 for minimum margin. - * `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100. - * `pageRanges` Record (optional) - The page range to print. - * `from` number - Index of the first page to print (0-based). - * `to` number - Index of the last page to print (inclusive) (0-based). - * `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`, - `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width` in microns. - * `printBackground` boolean (optional) - Whether to print CSS backgrounds. - * `printSelectionOnly` boolean (optional) - Whether to print selection only. + * `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false. + * `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false. + * `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false. + * `scale` number(optional) - Scale of the webpage rendering. Defaults to 1. + * `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`, + `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`. + * `margins` Object (optional) + * `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches). + * `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches). + * `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches). + * `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches). + * `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. + * `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `` would generate span containing the title. + * `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`. + * `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. Returns `Promise` - Resolves with the generated PDF data. -Prints window's web page as PDF with Chromium's preview printing custom -settings. +Prints the window's web page as PDF. The `landscape` will be ignored if `@page` CSS at-rule is used in the web page. -By default, an empty `options` will be regarded as: - -```javascript -{ - marginsType: 0, - printBackground: false, - printSelectionOnly: false, - landscape: false, - pageSize: 'A4', - scaleFactor: 100 -} -``` - -Use `page-break-before: always;` CSS style to force to print to a new page. - An example of `webContents.printToPDF`: ```javascript @@ -1504,7 +1489,7 @@ const fs = require('fs') const path = require('path') const os = require('os') -const win = new BrowserWindow({ width: 800, height: 600 }) +const win = new BrowserWindow() win.loadURL('http://github.com') win.webContents.on('did-finish-load', () => { @@ -1521,6 +1506,8 @@ win.webContents.on('did-finish-load', () => { }) ``` +See [Page.printToPdf](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) for more information. + #### `contents.addWorkSpace(path)` * `path` string diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index 865b101168ad6..cc86a05d5be4d 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -565,21 +565,21 @@ Prints `webview`'s web page. Same as `webContents.print([options])`. ### `.printToPDF(options)` * `options` Object - * `headerFooter` Record (optional) - the header and footer for the PDF. - * `title` string - The title for the PDF header. - * `url` string - the url for the PDF footer. - * `landscape` boolean (optional) - `true` for landscape, `false` for portrait. - * `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for - default margin, 1 for no margin, and 2 for minimum margin. - and `width` in microns. - * `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100. - * `pageRanges` Record (optional) - The page range to print. On macOS, only the first range is honored. - * `from` number - Index of the first page to print (0-based). - * `to` number - Index of the last page to print (inclusive) (0-based). - * `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`, - `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` - * `printBackground` boolean (optional) - Whether to print CSS backgrounds. - * `printSelectionOnly` boolean (optional) - Whether to print selection only. + * `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false. + * `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false. + * `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false. + * `scale` number(optional) - Scale of the webpage rendering. Defaults to 1. + * `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`, + `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`. + * `margins` Object (optional) + * `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches). + * `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches). + * `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches). + * `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches). + * `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. + * `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `` would generate span containing the title. + * `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`. + * `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. Returns `Promise` - Resolves with the generated PDF data. diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index cf0e48d0df670..e0dea89dfd9a2 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -14,6 +14,61 @@ This document uses the following convention to categorize breaking changes: ## Planned Breaking API Changes (20.0) +### API Changed: `webContents.printToPDF()` + +`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to +address changes upstream that made our previous implementation untenable and rife with bugs. + +**Arguments Changed** + +* `pageRanges` + +**Arguments Removed** + +* `printSelectionOnly` +* `marginsType` +* `headerFooter` +* `scaleFactor` + +**Arguments Added** + +* `headerTemplate` +* `footerTemplate` +* `displayHeaderFooter` +* `margins` +* `scale` +* `preferCSSPageSize` + +```js +// Main process +const { webContents } = require('electron') + +webContents.printToPDF({ + landscape: true, + displayHeaderFooter: true, + printBackground: true, + scale: 2, + pageSize: 'Ledger', + margins: { + top: 2, + bottom: 2, + left: 2, + right: 2 + }, + pageRanges: '1-5, 8, 11-13', + headerTemplate: '

Title

', + footerTemplate: '
', + preferCSSPageSize: true +}).then(data => { + fs.writeFile(pdfPath, data, (error) => { + if (error) throw error + console.log(`Wrote PDF successfully to ${pdfPath}`) + }) +}).catch(error => { + console.log(`Failed to write PDF to ${pdfPath}: `, error) +}) +``` + ### Default Changed: renderers without `nodeIntegration: true` are sandboxed by default Previously, renderers that specified a preload script defaulted to being diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index b2407ee7e0a37..f54b6369a4447 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -63,6 +63,20 @@ const PDFPageSizes: Record = { } } as const; +const paperFormats: Record = { + letter: { width: 8.5, height: 11 }, + legal: { width: 8.5, height: 14 }, + tabloid: { width: 11, height: 17 }, + ledger: { width: 17, height: 11 }, + a0: { width: 33.1, height: 46.8 }, + a1: { width: 23.4, height: 33.1 }, + a2: { width: 16.54, height: 23.4 }, + a3: { width: 11.7, height: 16.54 }, + a4: { width: 8.27, height: 11.7 }, + a5: { width: 5.83, height: 8.27 }, + a6: { width: 4.13, height: 5.83 } +} as const; + // The minimum micron size Chromium accepts is that where: // Per printing/units.h: // * kMicronsPerInch - Length of an inch in 0.001mm unit. @@ -76,42 +90,6 @@ const isValidCustomPageSize = (width: number, height: number) => { return [width, height].every(x => x > 352); }; -// Default printing setting -const defaultPrintingSetting = { - // Customizable. - pageRange: [] as {from: number, to: number}[], - mediaSize: {} as ElectronInternal.MediaSize, - landscape: false, - headerFooterEnabled: false, - marginsType: 0, - scaleFactor: 100, - shouldPrintBackgrounds: false, - shouldPrintSelectionOnly: false, - // Non-customizable. - printWithCloudPrint: false, - printWithPrivet: false, - printWithExtension: false, - pagesPerSheet: 1, - isFirstRequest: false, - previewUIID: 0, - // True, if the document source is modifiable. e.g. HTML and not PDF. - previewModifiable: true, - printToPDF: true, - deviceName: 'Save as PDF', - generateDraftData: true, - dpiHorizontal: 72, - dpiVertical: 72, - rasterizePDF: false, - duplex: 0, - copies: 1, - // 2 = color - see ColorModel in //printing/print_job_constants.h - color: 2, - collate: true, - printerType: 2, - title: undefined as string | undefined, - url: undefined as string | undefined -} as const; - // JavaScript implementations of WebContents. const binding = process._linkedBinding('electron_browser_web_contents'); const printing = process._linkedBinding('electron_browser_printing'); @@ -193,136 +171,136 @@ WebContents.prototype.executeJavaScriptInIsolatedWorld = async function (worldId let pendingPromise: Promise | undefined; WebContents.prototype.printToPDF = async function (options) { const printSettings: Record = { - ...defaultPrintingSetting, - requestID: getNextId() + requestID: getNextId(), + landscape: false, + displayHeaderFooter: false, + headerTemplate: '', + footerTemplate: '', + printBackground: false, + scale: 1, + paperWidth: 8.5, + paperHeight: 11, + marginTop: 0, + marginBottom: 0, + marginLeft: 0, + marginRight: 0, + pageRanges: '', + preferCSSPageSize: false }; if (options.landscape !== undefined) { if (typeof options.landscape !== 'boolean') { - const error = new Error('landscape must be a Boolean'); - return Promise.reject(error); + return Promise.reject(new Error('landscape must be a Boolean')); } printSettings.landscape = options.landscape; } - if (options.scaleFactor !== undefined) { - if (typeof options.scaleFactor !== 'number') { - const error = new Error('scaleFactor must be a Number'); - return Promise.reject(error); + if (options.displayHeaderFooter !== undefined) { + if (typeof options.displayHeaderFooter !== 'boolean') { + return Promise.reject(new Error('displayHeaderFooter must be a Boolean')); } - printSettings.scaleFactor = options.scaleFactor; + printSettings.displayHeaderFooter = options.displayHeaderFooter; } - if (options.marginsType !== undefined) { - if (typeof options.marginsType !== 'number') { - const error = new Error('marginsType must be a Number'); - return Promise.reject(error); + if (options.printBackground !== undefined) { + if (typeof options.printBackground !== 'boolean') { + return Promise.reject(new Error('printBackground must be a Boolean')); } - printSettings.marginsType = options.marginsType; + printSettings.shouldPrintBackgrounds = options.printBackground; } - if (options.printSelectionOnly !== undefined) { - if (typeof options.printSelectionOnly !== 'boolean') { - const error = new Error('printSelectionOnly must be a Boolean'); - return Promise.reject(error); + if (options.scale !== undefined) { + if (typeof options.scale !== 'number') { + return Promise.reject(new Error('scale must be a Number')); } - printSettings.shouldPrintSelectionOnly = options.printSelectionOnly; + printSettings.scaleFactor = options.scale; } - if (options.printBackground !== undefined) { - if (typeof options.printBackground !== 'boolean') { - const error = new Error('printBackground must be a Boolean'); - return Promise.reject(error); + const { pageSize } = options; + if (pageSize !== undefined) { + if (typeof pageSize === 'string') { + const format = paperFormats[pageSize.toLowerCase()]; + if (!format) { + return Promise.reject(new Error(`Invalid pageSize ${pageSize}`)); + } + + printSettings.paperWidth = format.width; + printSettings.paperHeight = format.height; + } else if (typeof options.pageSize === 'object') { + if (!pageSize.height || !pageSize.width) { + return Promise.reject(new Error('height and width properties are required for pageSize')); + } + + printSettings.paperWidth = pageSize.width; + printSettings.paperHeight = pageSize.height; + } else { + return Promise.reject(new Error('pageSize must be a String or Object')); } - printSettings.shouldPrintBackgrounds = options.printBackground; } - if (options.pageRanges !== undefined) { - const pageRanges = options.pageRanges; - if (!Object.prototype.hasOwnProperty.call(pageRanges, 'from') || !Object.prototype.hasOwnProperty.call(pageRanges, 'to')) { - const error = new Error('pageRanges must be an Object with \'from\' and \'to\' properties'); - return Promise.reject(error); + const { margins } = options; + if (margins !== undefined) { + if (typeof margins !== 'object') { + return Promise.reject(new Error('margins must be an Object')); } - if (typeof pageRanges.from !== 'number') { - const error = new Error('pageRanges.from must be a Number'); - return Promise.reject(error); + if (margins.top !== undefined) { + if (typeof margins.top !== 'number') { + return Promise.reject(new Error('margins.top must be a Number')); + } + printSettings.marginTop = margins.top; } - if (typeof pageRanges.to !== 'number') { - const error = new Error('pageRanges.to must be a Number'); - return Promise.reject(error); + if (margins.bottom !== undefined) { + if (typeof margins.bottom !== 'number') { + return Promise.reject(new Error('margins.bottom must be a Number')); + } + printSettings.marginBottom = margins.bottom; } - // Chromium uses 1-based page ranges, so increment each by 1. - printSettings.pageRange = [{ - from: pageRanges.from + 1, - to: pageRanges.to + 1 - }]; - } - - if (options.headerFooter !== undefined) { - const headerFooter = options.headerFooter; - printSettings.headerFooterEnabled = true; - if (typeof headerFooter === 'object') { - if (!headerFooter.url || !headerFooter.title) { - const error = new Error('url and title properties are required for headerFooter'); - return Promise.reject(error); - } - if (typeof headerFooter.title !== 'string') { - const error = new Error('headerFooter.title must be a String'); - return Promise.reject(error); + if (margins.left !== undefined) { + if (typeof margins.left !== 'number') { + return Promise.reject(new Error('margins.left must be a Number')); } - printSettings.title = headerFooter.title; + printSettings.marginLeft = margins.left; + } - if (typeof headerFooter.url !== 'string') { - const error = new Error('headerFooter.url must be a String'); - return Promise.reject(error); + if (margins.right !== undefined) { + if (typeof margins.right !== 'number') { + return Promise.reject(new Error('margins.right must be a Number')); } - printSettings.url = headerFooter.url; - } else { - const error = new Error('headerFooter must be an Object'); - return Promise.reject(error); + printSettings.marginRight = margins.right; } } - // Optionally set size for PDF. - if (options.pageSize !== undefined) { - const pageSize = options.pageSize; - if (typeof pageSize === 'object') { - if (!pageSize.height || !pageSize.width) { - const error = new Error('height and width properties are required for pageSize'); - return Promise.reject(error); - } + if (options.pageRanges !== undefined) { + if (typeof options.pageRanges !== 'string') { + return Promise.reject(new Error('printBackground must be a String')); + } + printSettings.pageRanges = options.pageRanges; + } - // Dimensions in Microns - 1 meter = 10^6 microns - const height = Math.ceil(pageSize.height); - const width = Math.ceil(pageSize.width); - if (!isValidCustomPageSize(width, height)) { - const error = new Error('height and width properties must be minimum 352 microns.'); - return Promise.reject(error); - } + if (options.headerTemplate !== undefined) { + if (typeof options.headerTemplate !== 'string') { + return Promise.reject(new Error('headerTemplate must be a String')); + } + printSettings.headerTemplate = options.headerTemplate; + } - printSettings.mediaSize = { - name: 'CUSTOM', - custom_display_name: 'Custom', - height_microns: height, - width_microns: width - }; - } else if (Object.prototype.hasOwnProperty.call(PDFPageSizes, pageSize)) { - printSettings.mediaSize = PDFPageSizes[pageSize]; - } else { - const error = new Error(`Unsupported pageSize: ${pageSize}`); - return Promise.reject(error); + if (options.footerTemplate !== undefined) { + if (typeof options.footerTemplate !== 'string') { + return Promise.reject(new Error('footerTemplate must be a String')); } - } else { - printSettings.mediaSize = PDFPageSizes.A4; + printSettings.footerTemplate = options.footerTemplate; + } + + if (options.preferCSSPageSize !== undefined) { + if (typeof options.preferCSSPageSize !== 'boolean') { + return Promise.reject(new Error('footerTemplate must be a String')); + } + printSettings.preferCSSPageSize = options.preferCSSPageSize; } - // Chromium expects this in a 0-100 range number, not as float - printSettings.scaleFactor = Math.ceil(printSettings.scaleFactor) % 100; - // PrinterType enum from //printing/print_job_constants.h - printSettings.printerType = 2; if (this._printToPDF) { if (pendingPromise) { pendingPromise = pendingPromise.then(() => this._printToPDF(printSettings)); diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 2b9df64a7bf5e..edeed181bef81 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -113,31 +113,19 @@ index dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc9c122ae3 100644 +index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df6588392418 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc -@@ -30,10 +30,10 @@ +@@ -30,8 +30,6 @@ #include "chrome/browser/printing/print_view_manager_common.h" #include "chrome/browser/printing/printer_query.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/simple_message_box.h" -#include "chrome/browser/ui/webui/print_preview/printer_handler.h" #include "chrome/common/pref_names.h" -+#if 0 #include "chrome/grit/generated_resources.h" -+#endif #include "components/prefs/pref_service.h" - #include "components/printing/browser/print_composite_client.h" - #include "components/printing/browser/print_manager_utils.h" -@@ -48,6 +48,7 @@ - #include "content/public/browser/render_frame_host.h" - #include "content/public/browser/render_process_host.h" - #include "content/public/browser/web_contents.h" -+#include "chrome/grit/generated_resources.h" - #include "mojo/public/cpp/system/buffer.h" - #include "printing/buildflags/buildflags.h" - #include "printing/metafile_skia.h" -@@ -87,6 +88,8 @@ using PrintSettingsCallback = +@@ -87,6 +85,8 @@ using PrintSettingsCallback = base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { @@ -146,7 +134,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -95,6 +98,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -95,6 +95,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -154,7 +142,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -192,7 +196,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -192,7 +193,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -165,7 +153,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -245,6 +251,7 @@ void ScriptedPrintReplyOnIO( +@@ -245,6 +248,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -173,7 +161,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -254,8 +261,9 @@ void ScriptedPrintReplyOnIO( +@@ -254,8 +258,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -184,7 +172,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -293,12 +301,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -293,12 +298,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -199,7 +187,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -306,7 +316,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -306,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -211,7 +199,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -332,6 +345,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -332,6 +342,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -221,7 +209,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -500,7 +516,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -500,7 +513,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -231,7 +219,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -513,16 +530,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -513,16 +527,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -255,7 +243,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc } void PrintViewManagerBase::NavigationStopped() { -@@ -638,11 +658,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -638,11 +655,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -270,7 +258,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -672,18 +695,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -672,18 +692,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -292,7 +280,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -693,6 +718,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -693,6 +715,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -300,7 +288,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -718,14 +744,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -718,14 +741,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -317,7 +305,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc return; } #endif -@@ -763,7 +789,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -763,7 +786,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -325,7 +313,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc #endif ReleasePrinterQuery(); -@@ -778,6 +803,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -778,6 +800,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -337,7 +325,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -788,10 +818,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -788,10 +815,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -350,7 +338,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc } void PrintViewManagerBase::DidStartLoading() { -@@ -851,6 +883,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -851,6 +880,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -362,7 +350,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -908,7 +945,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -908,7 +942,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -374,7 +362,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc if (!weak_this) return false; -@@ -987,6 +1027,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -987,6 +1024,13 @@ void PrintViewManagerBase::ReleasePrintJob() { UnregisterSystemPrintClient(); #endif @@ -388,7 +376,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc if (!print_job_) return; -@@ -1036,7 +1083,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1036,7 +1080,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -397,7 +385,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc return true; if (!cookie) { -@@ -1144,7 +1191,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1144,7 +1188,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -491,29 +479,6 @@ index 5f4d6e314b21351e3e5912e3a43ef87774343085..8627c8305686654dca7cd9c26433592e void PrintWithParams(mojom::PrintPagesParamsPtr params) override; void PrintForSystemDialog() override; void SetPrintPreviewUI( -diff --git a/components/printing/browser/print_to_pdf/pdf_print_manager.cc b/components/printing/browser/print_to_pdf/pdf_print_manager.cc -index 82591f8c2abbc1a180ef62f7264a68ca279e9b9c..ad27a15ba3028af1046482192dec789df5dda7b2 100644 ---- a/components/printing/browser/print_to_pdf/pdf_print_manager.cc -+++ b/components/printing/browser/print_to_pdf/pdf_print_manager.cc -@@ -132,7 +132,8 @@ void PdfPrintManager::PrintToPdf( - set_cookie(print_pages_params->params->document_cookie); - callback_ = std::move(callback); - -- GetPrintRenderFrame(rfh)->PrintWithParams(std::move(print_pages_params)); -+ // TODO(electron-maintainers): do something with job_settings here? -+ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/); - } - - void PdfPrintManager::GetDefaultPrintSettings( -@@ -147,7 +148,7 @@ void PdfPrintManager::ScriptedPrint( - auto default_param = printing::mojom::PrintPagesParams::New(); - default_param->params = printing::mojom::PrintParams::New(); - DLOG(ERROR) << "Scripted print is not supported"; -- std::move(callback).Run(std::move(default_param)); -+ std::move(callback).Run(std::move(default_param), true/*canceled*/); - } - - void PdfPrintManager::ShowInvalidPrinterSettingsError() { diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc95172537 100644 --- a/components/printing/common/print.mojom @@ -537,7 +502,7 @@ index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc // 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 db8913ae41d46d14fd15c6127e126e4b129dc4b8..ddbc3b0d5a00af9de84e1b0aadc44adb6ff84495 100644 +index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1df2f1a86 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -716,26 +681,6 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..ddbc3b0d5a00af9de84e1b0aadc44adb *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2725,18 +2756,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, - } - - bool PrintRenderFrameHelper::CheckForCancel() { -- const mojom::PrintParams& print_params = *print_pages_params_->params; -- bool cancel = false; -- -- if (!GetPrintManagerHost()->CheckForCancel(print_params.preview_ui_id, -- print_params.preview_request_id, -- &cancel)) { -- cancel = true; -- } -- -- if (cancel) -- notify_browser_of_print_failure_ = false; -- return cancel; -+ return false; - } - - bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h index 220b28a7e63625fe8b76290f0d2f40dd32cae255..cff9e35fab9df680c3c39467c50ddb033c2e6cba 100644 --- a/components/printing/renderer/print_render_frame_helper.h diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index b48a45bb8bcc2..1422083e5d511 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -25,6 +25,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/printing/print_view_manager_base.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" #include "chrome/browser/ui/views/eye_dropper/eye_dropper.h" #include "chrome/common/pref_names.h" @@ -165,9 +166,10 @@ #if BUILDFLAG(ENABLE_PRINTING) #include "components/printing/browser/print_manager_utils.h" +#include "components/printing/browser/print_to_pdf/pdf_print_utils.h" #include "printing/backend/print_backend.h" // nogncheck #include "printing/mojom/print.mojom.h" // nogncheck -#include "shell/browser/printing/print_preview_message_handler.h" +#include "printing/page_range.h" #include "shell/browser/printing/print_view_manager_electron.h" #if BUILDFLAG(IS_WIN) @@ -919,10 +921,7 @@ void WebContents::InitWithWebContents( web_contents->SetDelegate(this); #if BUILDFLAG(ENABLE_PRINTING) - PrintPreviewMessageHandler::CreateForWebContents(web_contents.get()); PrintViewManagerElectron::CreateForWebContents(web_contents.get()); - printing::CreateCompositeClientIfNeeded(web_contents.get(), - browser_context->GetUserAgent()); #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) @@ -2807,14 +2806,87 @@ void WebContents::Print(gin::Arguments* args) { std::move(callback), device_name, silent)); } -v8::Local WebContents::PrintToPDF(base::DictionaryValue settings) { +// Partially duplicated and modified from +// headless/lib/browser/protocol/page_handler.cc;l=41 +v8::Local WebContents::PrintToPDF(const base::Value& settings) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); gin_helper::Promise> promise(isolate); v8::Local handle = promise.GetHandle(); - PrintPreviewMessageHandler::FromWebContents(web_contents()) - ->PrintToPDF(std::move(settings), std::move(promise)); + + // This allows us to track headless printing calls. + auto unique_id = settings.GetDict().FindInt(printing::kPreviewRequestID); + auto landscape = settings.GetDict().FindBool("landscape"); + auto display_header_footer = + settings.GetDict().FindBool("displayHeaderFooter"); + auto print_background = settings.GetDict().FindBool("shouldPrintBackgrounds"); + auto scale = settings.GetDict().FindDouble("scale"); + auto paper_width = settings.GetDict().FindInt("paperWidth"); + auto paper_height = settings.GetDict().FindInt("paperHeight"); + auto margin_top = settings.GetDict().FindIntByDottedPath("margins.top"); + auto margin_bottom = settings.GetDict().FindIntByDottedPath("margins.bottom"); + auto margin_left = settings.GetDict().FindIntByDottedPath("margins.left"); + auto margin_right = settings.GetDict().FindIntByDottedPath("margins.right"); + auto page_ranges = *settings.GetDict().FindString("pageRanges"); + auto header_template = *settings.GetDict().FindString("headerTemplate"); + auto footer_template = *settings.GetDict().FindString("footerTemplate"); + auto prefer_css_page_size = settings.GetDict().FindBool("preferCSSPageSize"); + + absl::variant + print_pages_params = print_to_pdf::GetPrintPagesParams( + web_contents()->GetMainFrame()->GetLastCommittedURL(), landscape, + display_header_footer, print_background, scale, paper_width, + paper_height, margin_top, margin_bottom, margin_left, margin_right, + absl::make_optional(header_template), + absl::make_optional(footer_template), prefer_css_page_size); + + if (absl::holds_alternative(print_pages_params)) { + auto error = absl::get(print_pages_params); + promise.RejectWithErrorMessage("Invalid print parameters: " + error); + return handle; + } + + auto* manager = PrintViewManagerElectron::FromWebContents(web_contents()); + if (!manager) { + promise.RejectWithErrorMessage("Failed to find print manager"); + return handle; + } + + auto params = std::move( + absl::get(print_pages_params)); + params->params->document_cookie = unique_id.value_or(0); + + manager->PrintToPdf(web_contents()->GetMainFrame(), page_ranges, + std::move(params), + base::BindOnce(&WebContents::OnPDFCreated, GetWeakPtr(), + std::move(promise))); + return handle; } + +void WebContents::OnPDFCreated( + gin_helper::Promise> promise, + PrintViewManagerElectron::PrintResult print_result, + scoped_refptr data) { + if (print_result != PrintViewManagerElectron::PrintResult::PRINT_SUCCESS) { + promise.RejectWithErrorMessage( + "Failed to generate PDF: " + + PrintViewManagerElectron::PrintResultToString(print_result)); + return; + } + + v8::Isolate* isolate = promise.isolate(); + gin_helper::Locker locker(isolate); + v8::HandleScope handle_scope(isolate); + v8::Context::Scope context_scope( + v8::Local::New(isolate, promise.GetContext())); + + v8::Local buffer = + node::Buffer::Copy(isolate, reinterpret_cast(data->front()), + data->size()) + .ToLocalChecked(); + + promise.Resolve(buffer); +} #endif void WebContents::AddWorkSpace(gin::Arguments* args, diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 8925e14db4f5c..c85708f45cd16 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -47,7 +47,6 @@ #include "ui/gfx/image/image.h" #if BUILDFLAG(ENABLE_PRINTING) -#include "shell/browser/printing/print_preview_message_handler.h" #include "shell/browser/printing/print_view_manager_electron.h" #endif @@ -231,7 +230,10 @@ class WebContents : public ExclusiveAccessContext, std::pair info); void Print(gin::Arguments* args); // Print current page as PDF. - v8::Local PrintToPDF(base::DictionaryValue settings); + v8::Local PrintToPDF(const base::Value& settings); + void OnPDFCreated(gin_helper::Promise> promise, + PrintViewManagerElectron::PrintResult print_result, + scoped_refptr data); #endif void SetNextChildWebPreferences(const gin_helper::Dictionary); diff --git a/shell/browser/extensions/electron_extensions_api_client.cc b/shell/browser/extensions/electron_extensions_api_client.cc index b8ac568e10722..1a4c24700b9fc 100644 --- a/shell/browser/extensions/electron_extensions_api_client.cc +++ b/shell/browser/extensions/electron_extensions_api_client.cc @@ -19,7 +19,6 @@ #if BUILDFLAG(ENABLE_PRINTING) #include "components/printing/browser/print_manager_utils.h" -#include "shell/browser/printing/print_preview_message_handler.h" #include "shell/browser/printing/print_view_manager_electron.h" #endif @@ -86,7 +85,6 @@ MessagingDelegate* ElectronExtensionsAPIClient::GetMessagingDelegate() { void ElectronExtensionsAPIClient::AttachWebContentsHelpers( content::WebContents* web_contents) const { #if BUILDFLAG(ENABLE_PRINTING) - electron::PrintPreviewMessageHandler::CreateForWebContents(web_contents); electron::PrintViewManagerElectron::CreateForWebContents(web_contents); #endif diff --git a/shell/browser/printing/print_preview_message_handler.h b/shell/browser/printing/print_preview_message_handler.h deleted file mode 100644 index 57d84767d7759..0000000000000 --- a/shell/browser/printing/print_preview_message_handler.h +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2018 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ -#define ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ - -#include - -#include "base/memory/ref_counted_memory.h" -#include "base/memory/weak_ptr.h" -#include "components/printing/common/print.mojom.h" -#include "components/services/print_compositor/public/mojom/print_compositor.mojom.h" -#include "content/public/browser/web_contents_user_data.h" -#include "mojo/public/cpp/bindings/associated_receiver.h" -#include "mojo/public/cpp/bindings/associated_remote.h" -#include "printing/mojom/print.mojom.h" -#include "shell/common/gin_helper/promise.h" -#include "v8/include/v8.h" - -namespace content { -class RenderFrameHost; -} - -namespace electron { - -// Manages the print preview handling for a WebContents. -class PrintPreviewMessageHandler - : public printing::mojom::PrintPreviewUI, - public content::WebContentsUserData { - public: - ~PrintPreviewMessageHandler() override; - - // disable copy - PrintPreviewMessageHandler(const PrintPreviewMessageHandler&) = delete; - PrintPreviewMessageHandler& operator=(const PrintPreviewMessageHandler&) = - delete; - - void PrintToPDF(base::DictionaryValue options, - gin_helper::Promise> promise); - - private: - friend class content::WebContentsUserData; - - explicit PrintPreviewMessageHandler(content::WebContents* web_contents); - - void OnCompositeDocumentToPdfDone( - int32_t request_id, - printing::mojom::PrintCompositor::Status status, - base::ReadOnlySharedMemoryRegion region); - void OnPrepareForDocumentToPdfDone( - int32_t request_id, - printing::mojom::PrintCompositor::Status status); - void OnCompositePdfPageDone(int page_number, - int document_cookie, - int32_t request_id, - printing::mojom::PrintCompositor::Status status, - base::ReadOnlySharedMemoryRegion region); - - // printing::mojo::PrintPreviewUI: - void SetOptionsFromDocument( - const printing::mojom::OptionsFromDocumentParamsPtr params, - int32_t request_id) override {} - void PrintPreviewFailed(int32_t document_cookie, int32_t request_id) override; - void PrintPreviewCancelled(int32_t document_cookie, - int32_t request_id) override; - void PrinterSettingsInvalid(int32_t document_cookie, - int32_t request_id) override {} - void DidPrepareDocumentForPreview(int32_t document_cookie, - int32_t request_id) override; - void DidPreviewPage(printing::mojom::DidPreviewPageParamsPtr params, - int32_t request_id) override; - void MetafileReadyForPrinting( - printing::mojom::DidPreviewDocumentParamsPtr params, - int32_t request_id) override; - void DidGetDefaultPageLayout( - printing::mojom::PageSizeMarginsPtr page_layout_in_points, - const gfx::Rect& printable_area_in_points, - bool has_custom_page_size_style, - int32_t request_id) override {} - void DidStartPreview(printing::mojom::DidStartPreviewParamsPtr params, - int32_t request_id) override {} - - gin_helper::Promise> GetPromise(int request_id); - - void ResolvePromise(int request_id, - scoped_refptr data_bytes); - void RejectPromise(int request_id); - - using PromiseMap = std::map>>; - PromiseMap promise_map_; - - // TODO(clavin): refactor to use the WebContents provided by the - // WebContentsUserData base class instead of storing a duplicate ref - content::WebContents* web_contents_ = nullptr; - - mojo::AssociatedRemote print_render_frame_; - - mojo::AssociatedReceiver receiver_{this}; - - base::WeakPtrFactory weak_ptr_factory_{this}; - - WEB_CONTENTS_USER_DATA_KEY_DECL(); -}; - -} // namespace electron - -#endif // ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index 505073093a7ca..866f439f5aec4 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -7,13 +7,39 @@ #include #include "build/build_config.h" -#include "content/public/browser/web_contents_user_data.h" +#include "components/printing/browser/print_to_pdf/pdf_print_utils.h" +#include "printing/mojom/print.mojom.h" +#include "printing/page_range.h" +#include "third_party/abseil-cpp/absl/types/variant.h" + +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) +#include "mojo/public/cpp/bindings/message.h" +#endif namespace electron { +namespace { + +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) +constexpr char kInvalidUpdatePrintSettingsCall[] = + "Invalid UpdatePrintSettings Call"; +constexpr char kInvalidSetupScriptedPrintPreviewCall[] = + "Invalid SetupScriptedPrintPreview Call"; +constexpr char kInvalidShowScriptedPrintPreviewCall[] = + "Invalid ShowScriptedPrintPreview Call"; +constexpr char kInvalidRequestPrintPreviewCall[] = + "Invalid RequestPrintPreview Call"; +#endif + +} // namespace + +// This file subclasses printing::PrintViewManagerBase +// but the implementations are duplicated from +// components/printing/browser/print_to_pdf/pdf_print_manager.cc. + PrintViewManagerElectron::PrintViewManagerElectron( content::WebContents* web_contents) - : PrintViewManagerBase(web_contents), + : printing::PrintViewManagerBase(web_contents), content::WebContentsUserData(*web_contents) {} PrintViewManagerElectron::~PrintViewManagerElectron() = default; @@ -25,26 +51,237 @@ void PrintViewManagerElectron::BindPrintManagerHost( auto* web_contents = content::WebContents::FromRenderFrameHost(rfh); if (!web_contents) return; + auto* print_manager = PrintViewManagerElectron::FromWebContents(web_contents); if (!print_manager) return; + print_manager->BindReceiver(std::move(receiver), rfh); } +// static +std::string PrintViewManagerElectron::PrintResultToString(PrintResult result) { + switch (result) { + case PRINT_SUCCESS: + return std::string(); // no error message + case PRINTING_FAILED: + return "Printing failed"; + case INVALID_PRINTER_SETTINGS: + return "Show invalid printer settings error"; + case INVALID_MEMORY_HANDLE: + return "Invalid memory handle"; + case METAFILE_MAP_ERROR: + return "Map to shared memory error"; + case METAFILE_INVALID_HEADER: + return "Invalid metafile header"; + case METAFILE_GET_DATA_ERROR: + return "Get data from metafile error"; + case SIMULTANEOUS_PRINT_ACTIVE: + return "The previous printing job hasn't finished"; + case PAGE_RANGE_SYNTAX_ERROR: + return "Page range syntax error"; + case PAGE_RANGE_INVALID_RANGE: + return "Page range is invalid (start > end)"; + case PAGE_COUNT_EXCEEDED: + return "Page range exceeds page count"; + default: + NOTREACHED(); + return "Unknown PrintResult"; + } +} + +void PrintViewManagerElectron::PrintToPdf( + content::RenderFrameHost* rfh, + const std::string& page_ranges, + printing::mojom::PrintPagesParamsPtr print_pages_params, + PrintToPDFCallback callback) { + DCHECK(callback); + + if (callback_) { + std::move(callback).Run(SIMULTANEOUS_PRINT_ACTIVE, + base::MakeRefCounted()); + return; + } + + if (!rfh->IsRenderFrameLive()) { + std::move(callback).Run(PRINTING_FAILED, + base::MakeRefCounted()); + return; + } + + absl::variant + parsed_ranges = print_to_pdf::TextPageRangesToPageRanges(page_ranges); + if (absl::holds_alternative(parsed_ranges)) { + PrintResult print_result; + switch (absl::get(parsed_ranges)) { + case print_to_pdf::PageRangeError::kSyntaxError: + print_result = PAGE_RANGE_SYNTAX_ERROR; + break; + case print_to_pdf::PageRangeError::kInvalidRange: + print_result = PAGE_RANGE_INVALID_RANGE; + break; + } + std::move(callback).Run(print_result, + base::MakeRefCounted()); + return; + } + + printing_rfh_ = rfh; + print_pages_params->pages = absl::get(parsed_ranges); + auto cookie = print_pages_params->params->document_cookie; + set_cookie(cookie); + headless_jobs_.emplace_back(cookie); + callback_ = std::move(callback); + + GetPrintRenderFrame(rfh)->PrintWithParams(std::move(print_pages_params)); +} + +void PrintViewManagerElectron::GetDefaultPrintSettings( + GetDefaultPrintSettingsCallback callback) { + if (printing_rfh_) { + LOG(ERROR) << "Scripted print is not supported"; + std::move(callback).Run(printing::mojom::PrintParams::New()); + } else { + PrintViewManagerBase::GetDefaultPrintSettings(std::move(callback)); + } +} + +void PrintViewManagerElectron::ScriptedPrint( + printing::mojom::ScriptedPrintParamsPtr params, + ScriptedPrintCallback callback) { + auto entry = + std::find(headless_jobs_.begin(), headless_jobs_.end(), params->cookie); + if (entry == headless_jobs_.end()) { + PrintViewManagerBase::ScriptedPrint(std::move(params), std::move(callback)); + return; + } + + auto default_param = printing::mojom::PrintPagesParams::New(); + default_param->params = printing::mojom::PrintParams::New(); + LOG(ERROR) << "Scripted print is not supported"; + std::move(callback).Run(std::move(default_param), /*cancelled*/ false); +} + +void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() { + ReleaseJob(INVALID_PRINTER_SETTINGS); +} + +void PrintViewManagerElectron::PrintingFailed( + int32_t cookie, + printing::mojom::PrintFailureReason reason) { + ReleaseJob(reason == printing::mojom::PrintFailureReason::kInvalidPageRange + ? PAGE_COUNT_EXCEEDED + : PRINTING_FAILED); +} + +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) +void PrintViewManagerElectron::UpdatePrintSettings( + int32_t cookie, + base::Value::Dict job_settings, + UpdatePrintSettingsCallback callback) { + auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), cookie); + if (entry == headless_jobs_.end()) { + PrintViewManagerBase::UpdatePrintSettings(cookie, std::move(job_settings), + std::move(callback)); + return; + } + + mojo::ReportBadMessage(kInvalidUpdatePrintSettingsCall); +} + void PrintViewManagerElectron::SetupScriptedPrintPreview( SetupScriptedPrintPreviewCallback callback) { - std::move(callback).Run(); + mojo::ReportBadMessage(kInvalidSetupScriptedPrintPreviewCall); } void PrintViewManagerElectron::ShowScriptedPrintPreview( - bool source_is_modifiable) {} + bool source_is_modifiable) { + mojo::ReportBadMessage(kInvalidShowScriptedPrintPreviewCall); +} void PrintViewManagerElectron::RequestPrintPreview( - printing::mojom::RequestPrintPreviewParamsPtr params) {} + printing::mojom::RequestPrintPreviewParamsPtr params) { + mojo::ReportBadMessage(kInvalidRequestPrintPreviewCall); +} void PrintViewManagerElectron::CheckForCancel(int32_t preview_ui_id, int32_t request_id, CheckForCancelCallback callback) { + std::move(callback).Run(false); +} +#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) + +void PrintViewManagerElectron::RenderFrameDeleted( + content::RenderFrameHost* render_frame_host) { + PrintViewManagerBase::RenderFrameDeleted(render_frame_host); + + if (printing_rfh_ != render_frame_host) + return; + + if (callback_) { + std::move(callback_).Run(PRINTING_FAILED, + base::MakeRefCounted()); + } + + Reset(); +} + +void PrintViewManagerElectron::DidGetPrintedPagesCount(int32_t cookie, + uint32_t number_pages) { + auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), cookie); + if (entry == headless_jobs_.end()) { + PrintViewManagerBase::DidGetPrintedPagesCount(cookie, number_pages); + } +} + +void PrintViewManagerElectron::DidPrintDocument( + printing::mojom::DidPrintDocumentParamsPtr params, + DidPrintDocumentCallback callback) { + auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), + params->document_cookie); + if (entry == headless_jobs_.end()) { + PrintViewManagerBase::DidPrintDocument(std::move(params), + std::move(callback)); + return; + } + + auto& content = *params->content; + if (!content.metafile_data_region.IsValid()) { + ReleaseJob(INVALID_MEMORY_HANDLE); + std::move(callback).Run(false); + return; + } + + base::ReadOnlySharedMemoryMapping map = content.metafile_data_region.Map(); + if (!map.IsValid()) { + ReleaseJob(METAFILE_MAP_ERROR); + std::move(callback).Run(false); + return; + } + + data_ = std::string(static_cast(map.memory()), map.size()); + headless_jobs_.erase(entry); + std::move(callback).Run(true); + ReleaseJob(PRINT_SUCCESS); +} + +void PrintViewManagerElectron::Reset() { + printing_rfh_ = nullptr; + callback_.Reset(); + data_.clear(); +} + +void PrintViewManagerElectron::ReleaseJob(PrintResult result) { + if (callback_) { + DCHECK(result == PRINT_SUCCESS || data_.empty()); + std::move(callback_).Run(result, + base::RefCountedString::TakeString(&data_)); + if (printing_rfh_ && printing_rfh_->IsRenderFrameLive()) { + GetPrintRenderFrame(printing_rfh_)->PrintingDone(result == PRINT_SUCCESS); + } + + Reset(); + } } WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintViewManagerElectron); diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index 2127219f953ce..197b3c77adfa4 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -5,9 +5,19 @@ #ifndef ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ #define ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ +#include +#include +#include + +#include "base/memory/raw_ptr.h" +#include "base/memory/ref_counted_memory.h" #include "build/build_config.h" #include "chrome/browser/printing/print_view_manager_base.h" +#include "components/printing/common/print.mojom.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" +#include "printing/print_settings.h" namespace electron { @@ -15,9 +25,26 @@ class PrintViewManagerElectron : public printing::PrintViewManagerBase, public content::WebContentsUserData { public: + enum PrintResult { + PRINT_SUCCESS, + PRINTING_FAILED, + INVALID_PRINTER_SETTINGS, + INVALID_MEMORY_HANDLE, + METAFILE_MAP_ERROR, + METAFILE_INVALID_HEADER, + METAFILE_GET_DATA_ERROR, + SIMULTANEOUS_PRINT_ACTIVE, + PAGE_RANGE_SYNTAX_ERROR, + PAGE_RANGE_INVALID_RANGE, + PAGE_COUNT_EXCEEDED, + }; + + using PrintToPDFCallback = + base::OnceCallback)>; + ~PrintViewManagerElectron() override; - // disable copy PrintViewManagerElectron(const PrintViewManagerElectron&) = delete; PrintViewManagerElectron& operator=(const PrintViewManagerElectron&) = delete; @@ -26,6 +53,35 @@ class PrintViewManagerElectron receiver, content::RenderFrameHost* rfh); + static std::string PrintResultToString(PrintResult result); + + void PrintToPdf(content::RenderFrameHost* rfh, + const std::string& page_ranges, + printing::mojom::PrintPagesParamsPtr print_page_params, + PrintToPDFCallback callback); + + private: + explicit PrintViewManagerElectron(content::WebContents* web_contents); + friend class content::WebContentsUserData; + + // WebContentsObserver overrides (via PrintManager): + void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; + + // printing::mojom::PrintManagerHost: + void DidPrintDocument(printing::mojom::DidPrintDocumentParamsPtr params, + DidPrintDocumentCallback callback) override; + void DidGetPrintedPagesCount(int32_t cookie, uint32_t number_pages) override; + void GetDefaultPrintSettings( + GetDefaultPrintSettingsCallback callback) override; + void ScriptedPrint(printing::mojom::ScriptedPrintParamsPtr params, + ScriptedPrintCallback callback) override; + void ShowInvalidPrinterSettingsError() override; + void PrintingFailed(int32_t cookie, + printing::mojom::PrintFailureReason reason) override; +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) + void UpdatePrintSettings(int32_t cookie, + base::Value::Dict job_settings, + UpdatePrintSettingsCallback callback) override; void SetupScriptedPrintPreview( SetupScriptedPrintPreviewCallback callback) override; void ShowScriptedPrintPreview(bool source_is_modifiable) override; @@ -34,10 +90,15 @@ class PrintViewManagerElectron void CheckForCancel(int32_t preview_ui_id, int32_t request_id, CheckForCancelCallback callback) override; +#endif - private: - friend class content::WebContentsUserData; - explicit PrintViewManagerElectron(content::WebContents* web_contents); + void Reset(); + void ReleaseJob(PrintResult result); + + raw_ptr printing_rfh_ = nullptr; + PrintToPDFCallback callback_; + std::string data_; + std::vector headless_jobs_; WEB_CONTENTS_USER_DATA_KEY_DECL(); }; diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 29ff9e5f60996..c340d309c83ac 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -1813,14 +1813,16 @@ describe('webContents module', () => { it('rejects on incorrectly typed parameters', async () => { const badTypes = { - marginsType: 'terrible', - scaleFactor: 'not-a-number', landscape: [], - pageRanges: { oops: 'im-not-the-right-key' }, - headerFooter: '123', - printSelectionOnly: 1, + displayHeaderFooter: '123', printBackground: 2, - pageSize: 'IAmAPageSize' + scale: 'not-a-number', + pageSize: 'IAmAPageSize', + margins: 'terrible', + pageRanges: { oops: 'im-not-the-right-key' }, + headerTemplate: [1, 2, 3], + footerTemplate: [4, 5, 6], + preferCSSPageSize: 'no' }; // These will hard crash in Chromium unless we type-check @@ -1869,10 +1871,7 @@ describe('webContents module', () => { it('respects custom settings', async () => { const data = await w.webContents.printToPDF({ - pageRanges: { - from: 0, - to: 2 - }, + pageRanges: '1-3', landscape: true }); diff --git a/spec/ts-smoke/electron/main.ts b/spec/ts-smoke/electron/main.ts index 6992f92e8b2f8..5d1b6dd6b66a3 100644 --- a/spec/ts-smoke/electron/main.ts +++ b/spec/ts-smoke/electron/main.ts @@ -86,10 +86,11 @@ app.whenReady().then(() => { mainWindow.webContents.print() mainWindow.webContents.printToPDF({ - marginsType: 1, - pageSize: 'A3', + margins: { + top: 1 + }, printBackground: true, - printSelectionOnly: true, + pageRanges: '1-3', landscape: true }).then((data: Buffer) => console.log(data)) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index f4af0158f2c85..377d96b396660 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -1110,14 +1110,16 @@ describe(' tag', function () { ifdescribe(features.isPrintingEnabled())('.printToPDF()', () => { it('rejects on incorrectly typed parameters', async () => { const badTypes = { - marginsType: 'terrible', - scaleFactor: 'not-a-number', landscape: [], - pageRanges: { oops: 'im-not-the-right-key' }, - headerFooter: '123', - printSelectionOnly: 1, + displayHeaderFooter: '123', printBackground: 2, - pageSize: 'IAmAPageSize' + scale: 'not-a-number', + pageSize: 'IAmAPageSize', + margins: 'terrible', + pageRanges: { oops: 'im-not-the-right-key' }, + headerTemplate: [1, 2, 3], + footerTemplate: [4, 5, 6], + preferCSSPageSize: 'no' }; // These will hard crash in Chromium unless we type-check diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 49568925fa80b..891966d8e3e44 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -264,6 +264,11 @@ declare namespace ElectronInternal { is_default?: 'true', } + type PageSize = { + width: number, + height: number, + } + type ModuleLoader = () => any; interface ModuleEntry { From 2cb53c5db1751170816959d6d89db58dc638b155 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 31 May 2022 10:43:42 +0200 Subject: [PATCH 432/811] fix: zombie windows when fullscreening and closing (#34378) --- shell/browser/native_window_mac.h | 10 +++++++++ shell/browser/native_window_mac.mm | 14 +++++++++++++ .../ui/cocoa/electron_ns_window_delegate.mm | 6 ++++++ spec-main/webview-spec.ts | 21 ++++++++++++++----- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index ae1e845c8a182..9b6fcb14dda59 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -176,6 +176,10 @@ class NativeWindowMac : public NativeWindow, // Handle fullscreen transitions. void SetFullScreenTransitionState(FullScreenTransitionState state); void HandlePendingFullscreenTransitions(); + bool HandleDeferredClose(); + void SetHasDeferredWindowClose(bool defer_close) { + has_deferred_window_close_ = defer_close; + } enum class VisualEffectState { kFollowWindow, @@ -249,6 +253,12 @@ class NativeWindowMac : public NativeWindow, FullScreenTransitionState fullscreen_transition_state_ = FullScreenTransitionState::NONE; + // Trying to close an NSWindow during a fullscreen transition will cause the + // window to lock up. Use this to track if CloseWindow was called during a + // fullscreen transition, to defer the -[NSWindow close] call until the + // transition is complete. + bool has_deferred_window_close_ = false; + NSInteger attention_request_id_ = 0; // identifier from requestUserAttention // The presentation options before entering kiosk mode. diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index c23cb268b66d2..d236ca72aa1a5 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -474,6 +474,11 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { return; } + if (fullscreen_transition_state() != FullScreenTransitionState::NONE) { + SetHasDeferredWindowClose(true); + return; + } + // If a sheet is attached to the window when we call // [window_ performClose:nil], the window won't close properly // even after the user has ended the sheet. @@ -678,6 +683,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { SetFullScreen(next_transition); } +bool NativeWindowMac::HandleDeferredClose() { + if (has_deferred_window_close_) { + SetHasDeferredWindowClose(false); + Close(); + return true; + } + return false; +} + void NativeWindowMac::SetFullScreen(bool fullscreen) { // [NSWindow -toggleFullScreen] is an asynchronous operation, which means // that it's possible to call it while a fullscreen transition is currently diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index f9b7a1170d1de..9d5633a0f95b8 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -248,6 +248,9 @@ - (void)windowDidEnterFullScreen:(NSNotification*)notification { shell_->NotifyWindowEnterFullScreen(); + if (shell_->HandleDeferredClose()) + return; + shell_->HandlePendingFullscreenTransitions(); } @@ -263,6 +266,9 @@ - (void)windowDidExitFullScreen:(NSNotification*)notification { shell_->SetResizable(is_resizable_); shell_->NotifyWindowLeaveFullScreen(); + if (shell_->HandleDeferredClose()) + return; + shell_->HandlePendingFullscreenTransitions(); } diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index 7c7315eca85b6..ce5a64ef4754f 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -434,15 +434,15 @@ describe(' tag', function () { return [w, webview]; }; - afterEach(closeAllWindows); afterEach(async () => { // The leaving animation is un-observable but can interfere with future tests // Specifically this is async on macOS but can be on other platforms too await delay(1000); + + closeAllWindows(); }); - // TODO(jkleinsc) fix this test on arm64 macOS. It causes the tests following it to fail/be flaky - ifit(process.platform !== 'darwin' || process.arch !== 'arm64')('should make parent frame element fullscreen too', async () => { + it('should make parent frame element fullscreen too', async () => { const [w, webview] = await loadWebViewWindow(); expect(await w.webContents.executeJavaScript('isIframeFullscreen()')).to.be.false(); @@ -450,11 +450,13 @@ describe(' tag', function () { await webview.executeJavaScript('document.getElementById("div").requestFullscreen()', true); await parentFullscreen; expect(await w.webContents.executeJavaScript('isIframeFullscreen()')).to.be.true(); + + w.close(); + await emittedOnce(w, 'closed'); }); // FIXME(zcbenz): Fullscreen events do not work on Linux. - // This test is flaky on arm64 macOS. - ifit(process.platform !== 'linux' && process.arch !== 'arm64')('exiting fullscreen should unfullscreen window', async () => { + ifit(process.platform !== 'linux')('exiting fullscreen should unfullscreen window', async () => { const [w, webview] = await loadWebViewWindow(); const enterFullScreen = emittedOnce(w, 'enter-full-screen'); await webview.executeJavaScript('document.getElementById("div").requestFullscreen()', true); @@ -465,6 +467,9 @@ describe(' tag', function () { await leaveFullScreen; await delay(0); expect(w.isFullScreen()).to.be.false(); + + w.close(); + await emittedOnce(w, 'closed'); }); // Sending ESC via sendInputEvent only works on Windows. @@ -479,6 +484,9 @@ describe(' tag', function () { await leaveFullScreen; await delay(0); expect(w.isFullScreen()).to.be.false(); + + w.close(); + await emittedOnce(w, 'closed'); }); it('pressing ESC should emit the leave-html-full-screen event', async () => { @@ -507,6 +515,9 @@ describe(' tag', function () { webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Escape' }); await leaveFSWindow; await leaveFSWebview; + + w.close(); + await emittedOnce(w, 'closed'); }); }); From 3849d19e1476764d175587c88c8fbc6ffa9e224a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 06:01:31 -0700 Subject: [PATCH 433/811] Bump v21.0.0-nightly.20220531 --- 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 d26213de57bfa..7085745b647a1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220530 \ No newline at end of file +21.0.0-nightly.20220531 \ No newline at end of file diff --git a/package.json b/package.json index 1abee71072b9f..23f3239067292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220530", + "version": "21.0.0-nightly.20220531", "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 41ec4c7402d4c..2ab0cf4c6a7f6 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 21,0,0,20220530 - PRODUCTVERSION 21,0,0,20220530 + FILEVERSION 21,0,0,20220531 + PRODUCTVERSION 21,0,0,20220531 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 470396d6aceb53817f003e7a0a8cf21eb673bb99 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 08:12:47 +0200 Subject: [PATCH 434/811] chore: bump chromium to 104.0.5073.0 (main) (#34272) --- BUILD.gn | 2 +- DEPS | 2 +- build/args/all.gn | 2 + docs/api/browser-window.md | 2 +- electron_paks.gni | 2 - patches/chromium/accelerator.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 24 +++--- ..._scheduler_throttling_per_renderview.patch | 22 ++--- ...leges_in_unsandboxed_child_processes.patch | 4 +- patches/chromium/blink_local_frame.patch | 4 +- patches/chromium/boringssl_build_gn.patch | 2 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 18 ++-- patches/chromium/can_create_window.patch | 52 +++++------ ..._v8_initialization_isolate_callbacks.patch | 2 +- ...screationoverridden_with_full_params.patch | 36 ++++---- patches/chromium/chrome_key_systems.patch | 14 +-- patches/chromium/command-ismediakey.patch | 4 +- .../crash_allow_setting_more_options.patch | 8 +- patches/chromium/disable-redraw-lock.patch | 18 ++-- .../disable_color_correct_rendering.patch | 46 +++++----- .../disable_compositor_recycling.patch | 14 +-- patches/chromium/disable_hidden.patch | 8 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 2 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...xpose_setuseragent_on_networkcontext.patch | 2 +- .../extend_apply_webpreferences.patch | 6 +- ...d_data_parameter_to_processsingleton.patch | 16 ++-- ..._raw_response_headers_from_urlloader.patch | 2 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- .../chromium/fix_export_zlib_symbols.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 4 +- ..._properly_honor_printing_page_ranges.patch | 2 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 6 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...nse_interceptor_to_point_to_electron.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 4 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- ...as_avoid_usage_of_private_macos_apis.patch | 57 ++++++------ .../mas_disable_custom_window_frame.patch | 8 +- .../mas_disable_remote_accessibility.patch | 30 +++---- .../chromium/mas_disable_remote_layer.patch | 51 +++++++++-- patches/chromium/mas_no_private_api.patch | 14 +-- ...determine_if_a_font_is_a_system_font.patch | 4 +- ...emote_certificate_verification_logic.patch | 4 +- .../chromium/notification_provenance.patch | 8 +- patches/chromium/picture-in-picture.patch | 2 +- patches/chromium/printing.patch | 68 +++++++-------- patches/chromium/process_singleton.patch | 20 ++--- ...r_changes_to_the_webcontentsobserver.patch | 10 +-- .../render_widget_host_view_base.patch | 10 +-- .../render_widget_host_view_mac.patch | 18 ++-- patches/chromium/resource_file_conflict.patch | 6 +- .../support_mixed_sandbox_with_zygote.patch | 16 ++-- patches/chromium/web_contents.patch | 8 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- patches/node/.patches | 1 + ...json_parse_errors_made_user-friendly.patch | 39 +++++++++ .../squirrel.mac/build_add_gn_config.patch | 9 +- patches/v8/.patches | 2 + ...w_disabling_of_v8_sandboxed_pointers.patch | 32 +++++++ patches/v8/build_gn.patch | 8 +- ...able_is_execution_terminating_dcheck.patch | 22 +++++ patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 8 +- ...ort_symbols_needed_for_windows_build.patch | 2 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attribute_for_older_msvc_versions.patch | 2 +- ..._terminating_exception_in_microtasks.patch | 4 +- ...workaround_an_undefined_symbol_error.patch | 4 +- .../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 +- .../api/electron_api_data_pipe_holder.cc | 13 +++ .../api/electron_api_global_shortcut.cc | 2 +- .../api/electron_api_web_contents_mac.mm | 2 +- shell/browser/electron_browser_main_parts.cc | 3 - shell/browser/electron_permission_manager.cc | 30 +++---- shell/browser/electron_permission_manager.h | 13 +-- .../electron_extensions_browser_client.cc | 10 ++- .../electron_extensions_browser_client.h | 2 +- shell/browser/javascript_environment.cc | 86 ++----------------- .../media/media_capture_devices_dispatcher.cc | 6 +- .../media/media_capture_devices_dispatcher.h | 8 +- .../media/media_stream_devices_controller.cc | 47 +++++----- shell/browser/native_window_mac.mm | 15 ++-- shell/browser/net/asar/asar_url_loader.cc | 4 +- .../net/electron_url_loader_factory.cc | 18 ++-- shell/browser/net/node_stream_loader.cc | 4 +- .../net/proxying_url_loader_factory.cc | 5 -- .../browser/net/proxying_url_loader_factory.h | 2 - shell/browser/net/url_pipe_loader.cc | 4 +- .../osr/osr_render_widget_host_view.cc | 10 +-- .../browser/osr/osr_web_contents_view_mac.mm | 2 +- .../printing/print_preview_message_handler.cc | 2 +- .../electron_inspectable_web_contents_view.mm | 5 +- .../ui/cocoa/electron_ns_window_delegate.mm | 2 +- .../ui/cocoa/event_dispatching_window.mm | 4 +- shell/browser/ui/drag_util_mac.mm | 7 +- shell/browser/ui/file_dialog_mac.mm | 10 +-- shell/browser/ui/message_box_mac.mm | 10 +-- .../ui/views/client_frame_view_linux.cc | 19 ++-- .../ui/views/client_frame_view_linux.h | 4 +- shell/common/api/electron_api_native_image.cc | 9 ++ spec-main/api-session-spec.ts | 3 +- spec/fixtures/api/cookie-app/main.js | 2 +- 112 files changed, 662 insertions(+), 588 deletions(-) create mode 100644 patches/node/json_parse_errors_made_user-friendly.patch create mode 100644 patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch create mode 100644 patches/v8/chore_disable_is_execution_terminating_dcheck.patch diff --git a/BUILD.gn b/BUILD.gn index 5c5f4d27e01e6..9b62fb12029d4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -37,7 +37,7 @@ if (is_mac) { import("build/rules.gni") assert( - mac_deployment_target == "10.11.0", + mac_deployment_target == "10.13", "Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change") } diff --git a/DEPS b/DEPS index 8d2532547f4fd..bc96d86bcb6cd 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '103.0.5044.0', + '104.0.5073.0', 'node_version': 'v16.15.0', 'nan_version': diff --git a/build/args/all.gn b/build/args/all.gn index f1de439d833fc..e12aca35a29b1 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -45,3 +45,5 @@ enable_cet_shadow_stack = false # V8 in the browser process. # Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281 is_cfi = false + +v8_enable_sandboxed_pointers = false diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 4adb22ec0e6ea..2f00cd1f5feb7 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -427,7 +427,7 @@ Possible values are: `notification`. * On macOS, possible types are `desktop`, `textured`. * The `textured` type adds metal gradient appearance - (`NSTexturedBackgroundWindowMask`). + (`NSWindowStyleMaskTexturedBackground`). * The `desktop` type places the window at the desktop background window level (`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive focus, keyboard or mouse events, but you can use `globalShortcut` to receive diff --git a/electron_paks.gni b/electron_paks.gni index 2c5ae0b0c8c10..107feff5a86d5 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -19,14 +19,12 @@ template("electron_repack_percent") { # All sources should also have deps for completeness. sources = [ "$root_gen_dir/components/components_resources_${percent}_percent.pak", - "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak", "$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_${percent}_percent.pak", "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak", ] deps = [ "//components/resources", - "//content/app/resources", "//third_party/blink/public:scaled_resources_${percent}_percent", "//ui/resources", ] diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 58c927f03d6bb..2582196629449 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 783202623cc15168c726180fe232751551c43798..7cf5449a61a31bebbaffd920129daf1866211d7c 100644 +index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a1f702d8b 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -44,7 +44,7 @@ index 783202623cc15168c726180fe232751551c43798..7cf5449a61a31bebbaffd920129daf18 } #if BUILDFLAG(IS_MAC) -@@ -451,7 +461,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -447,7 +457,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( const std::u16string& shortcut) const { std::u16string result = shortcut; @@ -53,7 +53,7 @@ index 783202623cc15168c726180fe232751551c43798..7cf5449a61a31bebbaffd920129daf18 result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY); // Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut. -@@ -459,7 +469,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -455,7 +465,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( // more information. if (IsCtrlDown()) result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY); diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 52a2c7249d7d4..bd92d7ecb804e 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 eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93356b2862 100644 +index d921125d153742dd09e34418c19195a3d61bef1f..5348c3289a94c86bbbc9bb07be26cc56b4986788 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -132,6 +132,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -136,6 +136,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 eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index abcd95ad39d8d66e1a7149e89bc6bfe2a8197d19..1b021461f214287c94fb22b17d980c19e3f07dde 100644 +index 831db39365764d4001b8d602b225f157d3562ca8..4aabe0781d9e4150dddce76a50b993d0b8da8068 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4489,6 +4489,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4502,6 +4502,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index abcd95ad39d8d66e1a7149e89bc6bfe2a8197d19..1b021461f214287c94fb22b17d980c19 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index d8ffccc148622d4eb0388e03c78ff1def4290701..5a3162cc88e5a48b04fbbb74a5c2ba4b7dd8a5d3 100644 +index e903ba9ec4f8d32c5d3a6795f0a20f2addf95743..bb9755b981cf96e131e6545f778f73607fabdd02 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -599,6 +599,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -604,6 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index d8ffccc148622d4eb0388e03c78ff1def4290701..5a3162cc88e5a48b04fbbb74a5c2ba4b 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 5adee94f81c0e98db976ac1c6c55fb5eab8c2e65..9d3e43f4394ad9a4377b47a001c4baf4027cbe7c 100644 +index 595441198b5253e5f36f97303e952e642998be39..1b17db7b9285cb874e74abdd896888c12b288565 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -584,6 +584,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -598,6 +598,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,7 +79,7 @@ index a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b09415 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 810726792cba326f66df5a8d0d833eaee4975594..635fb45b0a9d1716bd45d8b6c5dbc5f9fbf0ffa8 100644 +index 6fb24096d3a5415f59cba2a8a5a6f36fe838dcc1..a4089fb3989ecd37d5b01baeb03c2ac1f4f05b53 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h @@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { @@ -92,7 +92,7 @@ index 810726792cba326f66df5a8d0d833eaee4975594..635fb45b0a9d1716bd45d8b6c5dbc5f9 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 772748673a5854349ba2be28abe21b7ff3f8541f..b3ebd622a61187f718ca16ac8cfeb189d35584d2 100644 +index 40042e1fa2622a871d0ed512f1f6fda1cdda56a6..a377548b36712bd4971bae6b4c0afdc5c8fdbdfc 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( @@ -110,7 +110,7 @@ index 772748673a5854349ba2be28abe21b7ff3f8541f..b3ebd622a61187f718ca16ac8cfeb189 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 200f0c57df1f15428b45a228adfee8fd5465ecbf..ec8cad0a94b31561096fdaba1a75fb54c96d3f7e 100644 +index 1f929d9535ca19a2c443e13f2bafce179f5870df..fe7605585501fcc1fd515f1d94fda7e27d5ba632 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 @@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,7 +123,7 @@ index 200f0c57df1f15428b45a228adfee8fd5465ecbf..ec8cad0a94b31561096fdaba1a75fb54 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 acd3b33c64f1534555c14047e29c18f31a1e8f92..63a9e0695efb0f357c0c3298175da9bbdc78a41c 100644 +index a9bd5283d3c65728dd3293abe88ffd02d3eee4fc..f5e4a927f2f5114e62d76fec86d6a5d2d2321166 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -352,6 +352,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { 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 5d2aae9b16dfa..785bc29c679d7 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 f19a15f85afe2d754833667d8c272c75da3de0b2..18de1a2533b479a6090ed412987f0b5c3922c711 100644 +index 1f6d9be10432416f591a616805494b5d78975df1..e73f70c62ac2e69c918bdf39bd53f74a47066f4e 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -661,6 +661,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -665,6 +665,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index f19a15f85afe2d754833667d8c272c75da3de0b2..18de1a2533b479a6090ed412987f0b5c 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 64f6ebe2a86a659da70f32cdbdb961384adca43f..2fc1062eb798a233f0eede6dd945f25d633e5f8f 100644 +index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d10b35bf4 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 +@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl void EnablePreferredSizeMode() override; void WriteIntoTrace(perfetto::TracedProto context) const override; @@ -48,7 +48,7 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da // 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 fd145f0aa562d6b63fb1d3a8a9241ae1aa1ce7a0..54d30fb9db8b48b94abdb815c487f618f9bb6525 100644 +index 99978b33c294ebe37192baccb29f0a34a25aed17..ef6e9ae24979538b8746aca898d1f302827491d8 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -151,6 +151,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, @@ -85,10 +85,10 @@ index 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de // 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 9704d8d8a4ee9e36c1a61c6723ce1039320014b6..cd14dd54e3c7bb56e82cbd6c566c11018b4deb94 100644 +index 229d9f2112e70f3bbff6e6986ab01c67483a1ae9..0529b4399959a2a2b9b0131dd8736a87fb973b0b 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3698,6 +3698,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3711,6 +3711,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 9704d8d8a4ee9e36c1a61c6723ce1039320014b6..cd14dd54e3c7bb56e82cbd6c566c1101 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3709,7 +3716,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3722,7 +3729,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index 9704d8d8a4ee9e36c1a61c6723ce1039320014b6..cd14dd54e3c7bb56e82cbd6c566c1101 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 51ab4f029e467fa5ea2663af38445d9565e19fe4..18005ca7a272d7731a4b8eeeac92ce163c2a262e 100644 +index 2f8e971ab224b36c6e464eb7524dd3d4c6b76f8c..4a9664d0ce5de431d9638e4145a21091cea78fd1 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -419,6 +419,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 51ab4f029e467fa5ea2663af38445d9565e19fe4..18005ca7a272d7731a4b8eeeac92ce16 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -854,6 +855,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -865,6 +866,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_new_privileges_in_unsandboxed_child_processes.patch b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch index 233e57bce4f26..31c19ddc9a29f 100644 --- a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch +++ b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch @@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes This allows unsandboxed renderers to launch setuid processes on Linux. diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 80db4cb5941ee84db1534c070c4daefef76d0faf..cf40ac56a9ce4bd4a28eb511b5f37d148e4be6ac 100644 +index b2b29e715d6e5ea427faf6829e935e91dd87d471..138b5da2e5ae85760faaeeff92168d1070b6f562 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc @@ -54,6 +54,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -27,4 +27,4 @@ index 80db4cb5941ee84db1534c070c4daefef76d0faf..cf40ac56a9ce4bd4a28eb511b5f37d14 + } } - options->environment = delegate_->GetEnvironment(); + for (const auto& remapped_fd : file_data_->additional_remapped_fds) { diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index b682f15b7e390..931e0185041f2 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 c136ea03ea961ce419d42c60efc646e4ddfe5693..4e635c3775df0f1b3b3d7551fba8f8d59d1b541b 100644 +index f370d230361c3ab524c0fc74facf8954840aa29f..0e62d29e44a971d49d70e485509d0b59f5cb31c7 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,7 +49,7 @@ index c136ea03ea961ce419d42c60efc646e4ddfe5693..4e635c3775df0f1b3b3d7551fba8f8d5 // 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 019b87a77fb7306bacdcda20e388cdfb8d3a6be8..f972ae236566248d3179d147e9692322153e326d 100644 +index d5ef00cb9870c2dc767d80595a39af4302c3e3c3..f3a2a9527f97902f357782eb445cf63777c77398 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 05fde5454844e..ff94bf807a8e2 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index f222ae94a5a10ced84e41ef84560af46a910577f..c18d26de9a63befca3c77fe5ecd93975a016797f 100644 +index efcbdf378b61af0a4b0f2cd784160d95439e84e1..fc6bba3fdd71ee40bb38f7d95a2f4dccd82d3e17 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -44,6 +44,20 @@ config("no_asm_config") { diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index ff503b7c6cb89..f650856864da7 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 7528d88c5d40571f1dcbd02201128ba2eed0cf08..ae50430c441539eb6152a926d382fb0552f3c358 100644 +index a1a93418b0b0d56f92647aa1087bb4485c354201..191bfe2d3922d2e65f0be10d6436c50efc3b0880 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -80,6 +80,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 cfbf7076545a7..93c0696100b5a 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,10 +11,10 @@ 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 99ab95668a7d3a31339b576b4a3a6038f39c2795..92f43eac6d654ff8ebe57d291c4f77aa1b029895 100644 +index dc59a88bc930d4d7b8e606434d940cac5b834bd0..6a583029436f033dc2736b9d7407f26637936add 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -173,11 +173,16 @@ if (!is_android && !is_mac) { +@@ -175,11 +175,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index 99ab95668a7d3a31339b576b4a3a6038f39c2795..92f43eac6d654ff8ebe57d291c4f77aa "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index cb28e691fb863fe7739a7ca536170e6c7a76a315..eacc853e2b9fc3c9e448f419e02d7378da310e9e 100644 +index 79aa50fbb9944052163bfdf958c5add60a0151f8..9fce5f07a79f801253c6bd8658ed7dba902856ad 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4588,7 +4588,7 @@ static_library("browser") { +@@ -4479,7 +4479,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 cb28e691fb863fe7739a7ca536170e6c7a76a315..eacc853e2b9fc3c9e448f419e02d7378 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938da14aab9 100644 +index 65bee9c9d02c6f95cce6ba60d69e2a1b879a1c2f..e26897337f8c96a493936ab1342eb6b7c2c63ffe 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5841,7 +5841,6 @@ test("unit_tests") { +@@ -5870,7 +5870,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5864,6 +5863,10 @@ test("unit_tests") { +@@ -5893,6 +5892,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6757,7 +6760,6 @@ test("unit_tests") { +@@ -6786,7 +6789,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938 "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6856,6 +6858,10 @@ test("unit_tests") { +@@ -6887,6 +6889,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 7844ee1c891a6..7f3714ced8c89 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 aa0be995df8c2f9fa0d84922d30c7e1cdf9025c8..e588b460aa32b4c984d593ed54e10310b59ace9b 100644 +index c983b5f4c20acba8a7d779a634cd1593ef69b1ae..e612764997277da3411d8040850756eb38996cca 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6840,6 +6840,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6922,6 +6922,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 aa0be995df8c2f9fa0d84922d30c7e1cdf9025c8..e588b460aa32b4c984d593ed54e10310 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6da28755d61f8957b0e6b6d0f1e669c2dbb347fa..a96bb634eb5c5405abb62b88d576e5e3ed354caa 100644 +index b94e87b6f90c986f115a87baf8214baeb8103826..987e437641b7978290aa2633755b67f9099e1d04 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3951,6 +3951,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3912,6 +3912,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 6da28755d61f8957b0e6b6d0f1e669c2dbb347fa..a96bb634eb5c5405abb62b88d576e5e3 new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3995,12 +4003,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3956,12 +3964,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index 6da28755d61f8957b0e6b6d0f1e669c2dbb347fa..a96bb634eb5c5405abb62b88d576e5e3 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 a7f36529608011013dab96a803ad3187c940fc81..2bbcea3efede2fda4ff2c5b270e1db0135c54290 100644 +index 5aca51ea4154941512e989048295c7de0475c14c..278accd8c6f14a4d91cc2ff4e336e365279c7b9b 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -569,6 +569,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index a7f36529608011013dab96a803ad3187c940fc81..2bbcea3efede2fda4ff2c5b270e1db01 // 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 984205b3d1bb4acfde6c5d106118a88f866af341..e33a5c9c6d493cd4ac2664ea10390193e3e53fcc 100644 +index 82d33875526759dda05a1818543c0605382597f4..ec89c920f0e0ad3638749b1468bcd54f74b3cce5 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -581,6 +581,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -594,6 +594,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 984205b3d1bb4acfde6c5d106118a88f866af341..e33a5c9c6d493cd4ac2664ea10390193 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 7e22f3e0b84f3e6b1ef7b1c5176665b38bd53629..f6d98708c436447ee6c93acb5d476719c238ca9c 100644 +index e2c88a7e692406c9774a0e9783df612cbc38d7cd..4e069af9256eb106b50e84d1243c92353daf2015 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -168,6 +168,7 @@ class NetworkService; +@@ -165,6 +165,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index 7e22f3e0b84f3e6b1ef7b1c5176665b38bd53629..f6d98708c436447ee6c93acb5d476719 } // namespace network namespace sandbox { -@@ -959,6 +960,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -968,6 +969,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ index 7e22f3e0b84f3e6b1ef7b1c5176665b38bd53629..f6d98708c436447ee6c93acb5d476719 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 9bbc7cf6d9542a3f013313e0c497839da2beb9d1..c01e06b08b1cca7a663e30476a551904ce9c6db8 100644 +index daf9b4566396c6d681760329cf4ba6869bbb55e4..321d5cfc36e40f2a649e8ea5910f4082b71b62e1 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -26,6 +26,17 @@ namespace content { @@ -150,28 +150,28 @@ index 04aa4d993b331396ee20464f6e1d2da10c91c834..2556c044b6e28501a5fac9b0040e623b // 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 89b07508aef80680a847c106fea0e2fa58ff964b..6630af3583a6bac6135d46644280d6444fe981b8 100644 +index 03b637c4d3a68a2bff5a4e06f421f23f97f40911..6235fd626a377643851dbb98d4d089e5a59366db 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -33,6 +33,7 @@ - #include "third_party/blink/public/platform/impression_conversions.h" +@@ -32,6 +32,7 @@ + #include "third_party/blink/public/mojom/page/page.mojom.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" +#include "third_party/blink/public/platform/web_url_request_util.h" #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" -@@ -295,6 +296,10 @@ WebView* RenderViewImpl::CreateView( - params->impression = blink::ConvertWebImpressionToImpression(*impression); - } +@@ -302,6 +303,10 @@ WebView* RenderViewImpl::CreateView( + /*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(), + creator->IsAdSubframe()); + params->raw_features = features.raw_features.Utf8( + WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD); + params->body = GetRequestBodyForWebURLRequest(request); + - params->download_policy.ApplyDownloadFramePolicy( - /*is_opener_navigation=*/false, request.HasUserGesture(), - // `openee_can_access_opener_origin` only matters for opener navigations, + // We preserve this information before sending the message since |params| is + // moved on send. + bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc index 2e7c332565ebe33b00ab7fff96a6a8dfc61422a6..0ab061f51d1d0c93f23bfcf5ba051172cea37eb8 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc @@ -199,13 +199,13 @@ index 00e2a8c21d4f0ef00c942498251fa44065da63c0..0fc4b092fa276063e05f990bf920fecd bool opener_suppressed, bool* no_javascript_access) override; diff --git a/third_party/blink/public/web/web_window_features.h b/third_party/blink/public/web/web_window_features.h -index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc0bbfa4a9 100644 +index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e4daf3420 100644 --- a/third_party/blink/public/web/web_window_features.h +++ b/third_party/blink/public/web/web_window_features.h @@ -34,6 +34,7 @@ #include "third_party/abseil-cpp/absl/types/optional.h" - #include "third_party/blink/public/platform/web_impression.h" + #include "third_party/blink/public/common/navigation/impression.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" namespace blink { @@ -213,17 +213,17 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc @@ -68,6 +69,8 @@ struct WebWindowFeatures { // Represents the attribution source declared by Attribution Reporting related // window features, if any. - absl::optional impression; + absl::optional impression; + + String raw_features; }; } // 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 ea47699384318126fef1a8c4cc3cb881cdc8e624..22d63b9f89913878518294f19afc85550196ca3e 100644 +index a25203186cc2df437fe3f9fe309599d86284aefb..b288472c5a00d76077859f02c0e1abca826aa8be 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2088,6 +2088,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2093,6 +2093,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 dfbf2c9b770cd..e44f77536c7f9 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,7 +9,7 @@ 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 90d3a635eec331130b738d0839cc9fdfa60ce451..9eb900ff4449f277f8c5ab3ccc29b0aa725be356 100644 +index f417dca0103ddfd8ce6e3b3a4d033ea42133604e..d0ee37d147243858d997be230c12ea3e41e6c873 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -448,8 +448,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 492d73768b2f9..a72ce1e616d02 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 27452df45433e4aeb7b9008f8e5b91dd4b5f50db..5c6f9936e6d3d2647d7efbc70efda8551c5516c7 100644 +index 370a2eaf18f86e16d4198a4f0001f96abfebad07..72f7032a8fe2011a0bd80d557e661fc487c3b876 100644 --- a/chrome/browser/media/offscreen_tab.cc +++ b/chrome/browser/media/offscreen_tab.cc @@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( @@ -63,10 +63,10 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc -index 46e5ec4d834e9478db523a5a078218104c161a57..e584921a6d575740fc0331a8bac05904558efc15 100644 +index 2c877ddbb8c1448a73c0f0e0af27c7fecb1b7848..e1dfc70c951dd004dd8b37607dc8840b804a1e54 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc -@@ -83,10 +83,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( +@@ -84,10 +84,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -94,7 +94,7 @@ index f0333177f885000fb22818ffa30a0c4ad520a161..03e82957f9d7bf009dcbf5fcd43718c9 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 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e29191d8f 100644 +index caa6c2dbc6dbf87081da9a2e5c42e9ac2e60c77f..ac0b7dbee8195be8c165444a141629475e97a107 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc @@ -71,8 +71,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, @@ -108,10 +108,10 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 1837aac53e6e13aebb0eee00249b305e0c7192c9..cf0b500239f635decc718fb9cfceb3f3f5be23c6 100644 +index 706684de51b047abf2a355416a6361b7ed8542c9..5ccbde951b833bd9413a5c3506da5d982fb3b58e 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1795,12 +1795,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index 1837aac53e6e13aebb0eee00249b305e0c7192c9..cf0b500239f635decc718fb9cfceb3f3 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 631c30c8f153e72cd92de457d8ba6f44574edbe6..a24181efacd35c3d7b9b0bcdc066dd0a0f7bc43a 100644 +index 1f02e2e3d3f510b52089fbc835c6401ed693f1b9..6116970cb65bb7699759fad4351497ab057e25c0 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -828,8 +828,7 @@ class Browser : public TabStripModelObserver, +@@ -836,8 +836,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -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 2834e3ee5778185741779a473cf5157788a76cc5..64fcddc952065e574a84edd99e5b1b80febd3d26 100644 +index 9f46f0b26a0ea42d6bd36e7ec7459a1b2d9c789e..874b7c8d779f471214507417e35449c66b70c97d 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.cc +++ b/components/offline_pages/content/background_loader/background_loader_contents.cc -@@ -81,8 +81,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( +@@ -83,8 +83,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 1b616ba52d9c77c64c7f24a0d204ce36641dce38..0303ae1c4d8681bc1bf56eb9ff1fc13afd678706 100644 +index 6f09c04cc612d2ac58b62d44516eefa1b66d145c..407f734b77d1ed4876f01327df958847d60e9128 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3899,8 +3899,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3860,8 +3860,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,7 +260,7 @@ index 1b616ba52d9c77c64c7f24a0d204ce36641dce38..0303ae1c4d8681bc1bf56eb9ff1fc13a 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 c01e06b08b1cca7a663e30476a551904ce9c6db8..9f50a8721560f734270308776f2f37ad49a8cb91 100644 +index 321d5cfc36e40f2a649e8ea5910f4082b71b62e1..e78e2aad4f13d7810027b65f321691091611fd2d 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -344,10 +344,10 @@ index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec48 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 d2497be79bb5d7943589bb928e2fbe13f76aa3e3..54adf30432cf178f2d00630420e45cfa95551b54 100644 +index d815a972b079676e900be8e312909832ae81bde8..ae28b864fcc2f10007ce33774d2d787c91d65f41 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -404,8 +404,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -406,8 +406,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -358,10 +358,10 @@ index d2497be79bb5d7943589bb928e2fbe13f76aa3e3..54adf30432cf178f2d00630420e45cfa // 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 f2054bca778784c223beb02de150cfeb31c52907..53bf6bc205e9c631597bfbda46f4a0b5b4bb72ed 100644 +index 50631a4db62448699e7701f7b4e950e8058896ae..13ba38e1cae39ea46e64313c6a9312e504603bbb 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -307,8 +307,7 @@ class FrameImpl : public fuchsia::web::Frame, +@@ -309,8 +309,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -386,7 +386,7 @@ index 899b8beabdf1131a08583470ace5b468576eeab6..21ab4ae22c54846af78518e897dc23eb ->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 749200efec166e0c29402a3d5e079f2e94460363..2cbc96e911291fb0b31c3f4a1444ded0be4521f5 100644 +index fb5239100bdc35d2d5cf47765c1bf1b285b20cf5..b4b2609ddbe0a0adfccffb4f4a0a56849579dd2d 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc @@ -427,8 +427,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 62e2ef85c1b9f..831959365e6b5 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 587144562fffda66cee9cbd23b16fb4e8607d208..a41bb82f8dcf292cf23aa8781bd5a5c52f11e578 100644 +index f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867e9f75cce 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ @@ -20,18 +20,18 @@ index 587144562fffda66cee9cbd23b16fb4e8607d208..a41bb82f8dcf292cf23aa8781bd5a5c5 #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" -@@ -183,12 +185,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { +@@ -184,12 +186,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { - // Returns persistent-license session support. - EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) { + // Returns whether persistent-license session can be supported. + bool CanSupportPersistentLicense() { +#if 0 // Do not support persistent-license if the process cannot persist data. // TODO(crbug.com/457487): Have a better plan on this. See bug for details. if (ChromeRenderThreadObserver::is_incognito_process()) { DVLOG(2) << __func__ << ": Not supported in incognito process."; - return EmeSessionTypeSupport::NOT_SUPPORTED; + return false; } +#endif - if (!supported_by_the_cdm) { - DVLOG(2) << __func__ << ": Not supported by the CDM."; + // On ChromeOS, platform verification is similar to CDM host verification. + #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) || BUILDFLAG(IS_CHROMEOS) diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index ab63b9153c409..275b2e7299f2c 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -66,7 +66,7 @@ index eb3f3431a3774c3a05afd4c7350f3801e9c8c684..b8970ef9ddb69d6a9fc6d106293e7605 bool is_listening_ = false; diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc -index 0f344ee352a48497e77a72bb298146c61e7fcf2a..3bad4263ea552fc63445bf5613f8add746a3a374 100644 +index 2778a18b6c28f3342c6b43d1de71fbbd46c72f06..85af551f87b8b0f9aed7a2a395ecf79f81f5a0a1 100644 --- a/chrome/browser/extensions/global_shortcut_listener_win.cc +++ b/chrome/browser/extensions/global_shortcut_listener_win.cc @@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, @@ -117,7 +117,7 @@ index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc } // namespace ui diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm -index ada705fb42e88d4bfa05b212c84111be9057a50e..a866b975687dd08ad88031a63f161b3164e82455 100644 +index 0bed8d1e2e2ed4a8cfc9d51ec3d68ac75bd9ff82..6914758849ca485f0f882d0b4a9ded9b02b197a8 100644 --- a/ui/base/accelerators/media_keys_listener_mac.mm +++ b/ui/base/accelerators/media_keys_listener_mac.mm @@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index fb4565d06bf81..0a049f6b24aad 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -75,7 +75,7 @@ index 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4 // 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 32e2038e15adae14aa218a353f074cd6654bdc16..72bec9c08d7ec50257a86b0ee7173864d879d7d9 100644 +index 39fb479eba509f7ba1528cafecd1c6b21f3b0e76..a28b88d078560f05fa295f29dcf8b1865839285c 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc @@ -170,6 +170,7 @@ bool PlatformCrashpadInitialization( @@ -128,10 +128,10 @@ index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index d2354b84f3a184ad53571518198055a0a91cbc25..c05529257dda2acf0fa588d49e2b902736d9b02f 100644 +index 80f33dc5e2f2ed330e0726a5735b247ea8e99fd7..b96bf703f6b691886d6e4d5cd6d775945a8995e1 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -88,6 +88,7 @@ bool PlatformCrashpadInitialization( +@@ -90,6 +90,7 @@ bool PlatformCrashpadInitialization( std::map process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -139,7 +139,7 @@ index d2354b84f3a184ad53571518198055a0a91cbc25..c05529257dda2acf0fa588d49e2b9027 std::string url = crash_reporter_client->GetUploadUrl(); -@@ -126,6 +127,13 @@ bool PlatformCrashpadInitialization( +@@ -128,6 +129,13 @@ bool PlatformCrashpadInitialization( std::vector arguments(start_arguments); diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index a102ba88e4f8d..5944ac0d05cdc 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 2b69f4767e9073ea5f12acddf842c7f1dc82e2c1..a2f053c3e2588451458682aa6e86da52a591e1e7 100644 +index 15e33123f633b29db9937b76374ef9c03853defa..c24f24d7f53a8ed1c5614244a938f972706bdc61 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; @@ -29,15 +29,17 @@ index 2b69f4767e9073ea5f12acddf842c7f1dc82e2c1..a2f053c3e2588451458682aa6e86da52 // 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,7 +362,8 @@ class HWNDMessageHandler::ScopedRedrawLock { + hwnd_(owner_->hwnd()), cancel_unlock_(false), should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() && - ::IsWindow(hwnd_) && -+ !owner_->HasNativeFrame() && +- ::IsWindow(hwnd_) && !owner_->IsHeadless() && ++ ::IsWindow(hwnd_) && !owner_->HasNativeFrame() && ++ !owner_->IsHeadless() && (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -986,6 +991,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -1015,6 +1020,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -49,10 +51,10 @@ index 2b69f4767e9073ea5f12acddf842c7f1dc82e2c1..a2f053c3e2588451458682aa6e86da52 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index f4efdc7174b90e57fb332f031530545e493a2e0d..9d45f97b930831a703efab2bbdf10afb61140c7f 100644 +index 3779c5028db164c70432d042876692822c7dd75c..98d4b486f978ba6e8c1641c759dc9002cea7c345 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, +@@ -206,6 +206,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, using TouchIDs = std::set; enum class DwmFrameState { kOff, kOn }; @@ -62,7 +64,7 @@ index f4efdc7174b90e57fb332f031530545e493a2e0d..9d45f97b930831a703efab2bbdf10afb HICON GetDefaultWindowIcon() const override; HICON GetSmallWindowIcon() const override; diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index d8e0f1d3131aef80c9fcb6069df7d7f986af6605..5dbb192d0840ca0ded61397c399b774a8cb05cce 100644 +index caff85f683b7a67f14f4e66b588e40b9704c2bc3..210f39f68b839684c4ba0a4c57a76df44ddad7dc 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h @@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index f5a01a7b3ca69..6c05f861afee5 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 f3f1d19619717f0f0493ab1ec90f47fd16bdd574..10bdf83528295d50cde496ade386a3546aa7bfc2 100644 +index bae9dd70c7657bf2bf66ab237d35440c14e7f6fb..796c3101103465bac8a7c177185c570dcc757fc1 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1880,6 +1880,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1863,6 +1863,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -34,7 +34,7 @@ index f3f1d19619717f0f0493ab1ec90f47fd16bdd574..10bdf83528295d50cde496ade386a354 // 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 f6094a5defe12c34564020b0779626b3e5bff99e..a068a9ba33d3f8c8cdc74ae63ab5e16caa0b90c3 100644 +index 14a2e02d9a6edc3a7002ca43bc82c8ef98eb32b5..10abba0f0610719cc4be0ce792ce64aba43bbe04 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -80,7 +80,7 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb06c19c4d6 100644 +index e0a8510a9e1d1475bfe92153db8cf860fbba74b5..5c01d58b3121ecf81d0971179ada834ca37d54a1 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -87,6 +87,9 @@ @@ -194,9 +194,9 @@ index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb0 + DCHECK(dst_color_space.IsValid()); + } 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 -@@ -4084,9 +4096,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( + + ProgramKey program_key = program_key_no_color; +@@ -4075,9 +4087,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -209,7 +209,7 @@ index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb0 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -4305,8 +4317,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4296,8 +4308,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -221,17 +221,17 @@ index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb0 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4512,3 +4525,5 @@ bool GLRenderer::ColorTransformKey::operator<( +@@ -4503,3 +4516,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 11e2a00aaffeba9379c0f2c41e6300d3020c7a88..9cfd058861a506bc3d6f72e5ed4a37b60ff4454b 100644 +index e0df775b22507336c249ed10fc0251dbbca088b8..2ba12303c28c39aa2e8f88b4a0e14a60e65b9df8 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( +@@ -229,6 +229,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( // Command-line switches to propagate to the GPU process. static const char* const kSwitchNames[] = { @@ -240,10 +240,10 @@ index 11e2a00aaffeba9379c0f2c41e6300d3020c7a88..9cfd058861a506bc3d6f72e5ed4a37b6 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 0c8d0735523d388d0e68d2ad0b20a1c2525502ed..089b8e85776874938cfdafad0c3576562a78c1b0 100644 +index 8aa14d7cdb7edc5d53736fb959e3f9992d4fd896..da4830ccc3c3a160754dd9c89fc6292d7333ac67 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -198,6 +198,7 @@ +@@ -199,6 +199,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 0c8d0735523d388d0e68d2ad0b20a1c2525502ed..089b8e85776874938cfdafad0c357656 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3217,6 +3218,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3175,6 +3176,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[] = { @@ -260,7 +260,7 @@ index 0c8d0735523d388d0e68d2ad0b20a1c2525502ed..089b8e85776874938cfdafad0c357656 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 648f25d99884b99f49e26cd9f280a8a6ae63e1c7..0f87961ecd8c24e3ba82c6bae187a12c9b112bd4 100644 +index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..b4ddafdd126edd16172f00448bbbd56eaf509b1f 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 @@ @@ -292,7 +292,7 @@ index 648f25d99884b99f49e26cd9f280a8a6ae63e1c7..0f87961ecd8c24e3ba82c6bae187a12c } 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 4187a703f62f36ff14d3a95f4b116febd5242c09..8d3b82e802bbd011380df21915427aba26193952 100644 +index 9a5903820308299a1a480ecaaa1cbca9655f4093..705f1fce4d05694b92b4eb6de1044ae2232bb8ed 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 @@ @@ -303,7 +303,7 @@ index 4187a703f62f36ff14d3a95f4b116febd5242c09..8d3b82e802bbd011380df21915427aba #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -183,6 +184,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -185,6 +186,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -314,7 +314,7 @@ index 4187a703f62f36ff14d3a95f4b116febd5242c09..8d3b82e802bbd011380df21915427aba // 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 e36187917ecec5d9e40009d1c394a07e72281919..de9698d577ab48358d06362fc78575fd0ad98d30 100644 +index e030f01e72d18ef08d04ffbc72a5abb9a7b485c5..25155263bede8a465eb3f3bc2960f173c8f14935 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -20,6 +20,7 @@ @@ -332,7 +332,7 @@ index e36187917ecec5d9e40009d1c394a07e72281919..de9698d577ab48358d06362fc78575fd + auto* cmd_line = base::CommandLine::ForCurrentProcess(); + if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) { + base::ScopedCFTypeRef system_icc( -+ CGColorSpaceCopyICCProfile(base::mac::GetSystemColorSpace())); ++ CGColorSpaceCopyICCData(base::mac::GetSystemColorSpace())); + IOSurfaceSetValue(io_surface, CFSTR("IOSurfaceColorSpace"), system_icc); + return true; + } @@ -340,7 +340,7 @@ index e36187917ecec5d9e40009d1c394a07e72281919..de9698d577ab48358d06362fc78575fd // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -312,6 +321,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -311,6 +320,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } @@ -348,14 +348,14 @@ index e36187917ecec5d9e40009d1c394a07e72281919..de9698d577ab48358d06362fc78575fd + if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) { + CGColorSpaceRef color_space = base::mac::GetSystemColorSpace(); + base::ScopedCFTypeRef color_space_icc( -+ CGColorSpaceCopyICCProfile(color_space)); ++ CGColorSpaceCopyICCData(color_space)); + IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc); + return surface; + } + // Ensure that all IOSurfaces start as sRGB. - if (__builtin_available(macos 10.12, *)) { - IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); + IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); + diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc index 0e8044c6d87008c51fd165c6ef8bdc3687d6cc29..78015868927602b5225f252f0a9182f61b8431dc 100644 --- a/ui/gfx/switches.cc diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 522db3317eff0..ecc594be91742 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,19 +6,19 @@ 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 c37193c2207fb4f20993a35e2ac6fde8f0727a45..8e81312b1424d37c756bbb93cb4020a693c9b380 100644 +index f36e046b2879c3cd24eac04b1cf5f5c62338a11f..06ca0f25bc575fa8508934fe498d599964a7f05d 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -531,7 +531,11 @@ - browser_compositor_->GetDelegatedFrameHost()->HasSavedFrame(); - if (has_saved_frame) - TRACE_EVENT_BEGIN("cc", "RWHVMac::WasOccluded with saved frame"); +@@ -513,7 +513,11 @@ + return; + + host()->WasHidden(); - browser_compositor_->SetRenderWidgetHostIsHidden(true); + // Consider the RWHV occluded only if it is not attached to a window + // (e.g. unattached BrowserView). Otherwise we treat it as visible to + // prevent unnecessary compositor recycling. + const bool unattached = ![GetInProcessNSView() window]; + browser_compositor_->SetRenderWidgetHostIsHidden(unattached); - if (has_saved_frame) - TRACE_EVENT_END("cc"); } + + void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 5073b1291fd86..7b943409e321a 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 730ac0aaf36da1842c7add66fbaea58baadf2e74..fcc45c987cfce94f5378d4aeee1cfe703178e133 100644 +index 18133ca75853394e616c3a816c1eb74b7da23fd9..273750752cdef18ccd7d54b9b28c524375bb3e8d 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index 730ac0aaf36da1842c7add66fbaea58baadf2e74..fcc45c987cfce94f5378d4aeee1cfe70 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 2ae96b816427148f4f0adf39c549d37fe3d02619..0288d36642629d7ec1846cd977f378ff9c0afd40 100644 +index 65297e78ee11fb3e7f662408f65a263f9ae8c550..62d3bef655580b1bad1077de797cdadc04721f8e 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -879,6 +879,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -34,10 +34,10 @@ index 2ae96b816427148f4f0adf39c549d37fe3d02619..0288d36642629d7ec1846cd977f378ff // |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 a3eb86299d8d34262347ee093940e61af6eab348..cb99fd2eb69bba9b133664fb68076eeeb9576818 100644 +index dc52cc54d2a6078bef1cf9f09e8063011b4f5191..d9b9f49ea7fe9b0b6dec4ad49c112af4fc832691 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); 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 c5f653eb03980..75b2567794e49 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 @@ -49,7 +49,7 @@ index d51b37c8a2df11f71fa6056193100d00883db43d..b44002788cf4d4f5d754dd35dd193be2 #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 5b179a2d15cfc4997410d9467bf9484f5cae0b9f..98296aa4e8d75e94b141694c592dfa83627861ff 100644 +index 5d01f8802e2144b9bb94d05b154bc5f5fa378b40..a872defd1c92f2ea590e5da1ecf34a6800dd4484 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -30,6 +30,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 ca244bbc8639c..7893453256944 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 1b021461f214287c94fb22b17d980c19e3f07dde..76691715d09a62a1edc0306dcac1d3e7e312fb1d 100644 +index 4aabe0781d9e4150dddce76a50b993d0b8da8068..4961f2db5bf80ad2b926617fe933bca4db5c82b7 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2398,7 +2398,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2400,7 +2400,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index b69182027c9db..6f0014385b6f9 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 ece3dfbee04cf941689e4f21f5176db010fda564..9fd052c00a484cd1acd2031fda79e6307fd01b60 100644 +index 28d01a952a31bc7df63dd70df167421c453a581c..172e250660d30d703c0c104c73f627d13797e2f4 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 ece3dfbee04cf941689e4f21f5176db010fda564..9fd052c00a484cd1acd2031fda79e630 aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index a2f053c3e2588451458682aa6e86da52a591e1e7..9e38d55d7156986e48ed6dcb3522d77358bfdb75 100644 +index c24f24d7f53a8ed1c5614244a938f972706bdc61..ee465b298240a21929abd438d930b9ce8afa6ffe 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -936,8 +936,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -965,8 +965,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 714a99251bbb5..e2256f4f742e5 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 6a331146e6fbf23e4177176f67fe534141579eb7..7f6974b8fbfe052902e6c0a55d386fb3a8b26558 100644 +index e351c6625fac1037040f639e55e0a2e48abf2538..1bb2e5b1d6d061961933b49bdcbe689efaeaa8f7 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1407,6 +1407,13 @@ void NetworkContext::SetNetworkConditions( diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index c6d16910db2d2..216c2d3cb749a 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 cd14dd54e3c7bb56e82cbd6c566c11018b4deb94..0b0b3a03a64ae6a321eeb27619f4f0ae5ee388cc 100644 +index 0529b4399959a2a2b9b0131dd8736a87fb973b0b..6870692202c40179870d7f00e20c7ce19bdb85ce 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 @@ +@@ -161,6 +161,7 @@ #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" @@ -23,7 +23,7 @@ index cd14dd54e3c7bb56e82cbd6c566c11018b4deb94..0b0b3a03a64ae6a321eeb27619f4f0ae #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" -@@ -1785,6 +1786,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -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); diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index 8a8f913281124..ae14136ebb6ad 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -65,10 +65,10 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..55a2a78ce166a65cd11b26e0aa31968f #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc4e2f5751 100644 +index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508263d4ed3 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -611,6 +611,7 @@ class ProcessSingleton::LinuxWatcher +@@ -606,6 +606,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector& argv, @@ -76,7 +76,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc SocketReader* reader); private: -@@ -665,13 +666,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -660,13 +661,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -95,7 +95,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc // Send back "ACK" message to prevent the client process from starting up. reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1); } else { -@@ -719,7 +723,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -714,7 +718,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -105,7 +105,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc const size_t kMinMessageLength = std::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -749,10 +754,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -744,10 +749,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -135,7 +135,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -781,8 +804,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -776,8 +799,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -146,7 +146,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -901,7 +926,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -896,7 +921,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -156,7 +156,7 @@ index 9bb12894da06fc7d281daced754b240afa9bedeb..5762d0778c2f368019b75364e81b66fc std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -911,11 +937,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -906,11 +932,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); 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 d48c35ad8194c..10e839cd9d536 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -103,7 +103,7 @@ index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d6 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 44ea9794a42eb9d2f0bcff722a05e530dbfff10c..318da554d3326b376898689c80b576979c564c5e 100644 +index 8137159de740809e44bc3a3dc18c842455a6795d..7292a40382fffcc96998b04696f4a2934a2da9ee 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -468,6 +468,7 @@ URLLoader::URLLoader( diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index a562bd5cd3b15..fb9b97974a5f3 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 9e38d55d7156986e48ed6dcb3522d77358bfdb75..01ff95be00b3911749f66a136b2b5a6c02156bd3 100644 +index ee465b298240a21929abd438d930b9ce8afa6ffe..83702d83078b68047f4464613033bc25cee21791 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3596,6 +3596,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3625,6 +3625,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 832bba5787c3e..022773554260c 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.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 22f7a86817fe4a2dc39913db349e81d93eef4874..c9509d84e25fd88d6ef13933099d582561fe5660 100644 +index 41e9cb083e2abfc48976f21e4ca45d175671f69f..90cd537d117894cb73af61787d7085fcedeaebbd 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -858,26 +858,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -859,26 +859,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -48,7 +48,7 @@ index 22f7a86817fe4a2dc39913db349e81d93eef4874..c9509d84e25fd88d6ef13933099d5825 } /** -@@ -985,30 +971,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -986,30 +972,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index 154bc672224a3..5effa32d57758 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,10 +6,10 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index 999b1de1b2ba1fff5dd92173300dc22b9aa5a865..2132d8ef92acd39bffe3bebddb80b4317e1f52b8 100644 +index ca58b86f7b5b760b8088eddfb2ab923290771e4d..5c786bccae90cfb6263cae2148a6d00c8e618b3f 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn -@@ -313,6 +313,10 @@ component("zlib") { +@@ -314,6 +314,10 @@ component("zlib") { defines = [] deps = [] 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 6fa77fb4b861a..4180c938c9330 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ 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 df1633d59070e19592a52f02a76bdd9006d7c6f0..e599e866d2f5e72259e5b34b65510a06b3209784 100644 +index 13253163b54c86b37c7b5654b674c5f920c81272..82c4963605707a0fa56b01b572c0ef9b0d093565 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1820,7 +1820,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, @@ -21,7 +21,7 @@ index df1633d59070e19592a52f02a76bdd9006d7c6f0..e599e866d2f5e72259e5b34b65510a06 // 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 2f14f906b51ce73a69cd780d70ad6264285138ac..b14695646fe75d213b4affa60a6d775ce2474238 100644 +index d5c2a922bba0ff0d5a4a22d9cd25be46fd09d4e1..86eefb4d6e2d571965be9f40269b7f4fc633d26e 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -673,6 +673,10 @@ class WebContents : public PageNavigator, diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index d174f13c97b6c..6d21c86fbadcf 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -100,7 +100,7 @@ index b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5b } 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 d0143dc64f818ee662694576ce2aa9488114f1c7..e3cbaa1b9c91805f8a4f81e110c8a85591b5f380 100644 +index 8ff9cf6dec605d5f56f0325fb3a03826b425970c..20d06930e81ad4b2b1ee789599ba84c6ff83682d 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc @@ -242,6 +242,24 @@ void PrintDialogGtk::UpdateSettings( diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index ab8887f56ccd2..76157c2e242da 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 2b8e23df6545ca438c4af8434120cc40c70e09ec..049350bc63d627e85b239d23b976c3a62381fd57 100644 +index c8f2abaf2991b415b117604d37e8fb8abded00a3..41b09cb5c3a73f72178db9efcf883bd04fe68d6d 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3206,6 +3206,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3217,6 +3217,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 2b8e23df6545ca438c4af8434120cc40c70e09ec..049350bc63d627e85b239d23b976c3a6 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index f6d98708c436447ee6c93acb5d476719c238ca9c..505279149690d469fa979010435373e40a5c8c43 100644 +index 4e069af9256eb106b50e84d1243c92353daf2015..8e8ba0a946c3382045691b788566885fb0e41ce5 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 { +@@ -271,6 +271,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 cf2e47b7c03da..3de96009621ac 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745 // 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 072387786cc70f7d0b7d3d31cebf86af69f98a30..9df4d0aa257e7b4ecacd8c7a4ad392c4a33ff177 100644 +index ec8de596ca5028e9d8c722cda082f0df668359ed..899ebbb1c2ba8d57532a1af43fcd5d44ac3a2de0 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -352,7 +352,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -353,7 +353,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index 072387786cc70f7d0b7d3d31cebf86af69f98a30..9df4d0aa257e7b4ecacd8c7a4ad392c4 static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -362,7 +363,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -363,7 +364,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 9ac43a88997b6..b9b2c2bd509dd 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 6cda63d5c6a0b7b2b41d01382b73dbdeea3651de..174e6a5265ec4186934a0bd0619ecf02073f4fe1 100644 +index 4ab466ef86340e97707bc5b14e0f0e67997c52a6..03d0b2f126c69df7af42095725a4f89880f0d634 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -962,6 +962,11 @@ +@@ -955,6 +955,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 af8133b783c0f..392a9b6b9be46 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,7 +8,7 @@ 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 9d7479bff662ca3c482e4672a9129e1f83100ebd..cfcc14087d9d5d9ab08ff9a5349a096ec75f4b6a 100644 +index 570359f62ce2ae59f2fe24cd56edf7e222b3d0bd..1d1fa2e2222435c88448b2577bbbd9c697196394 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 @@ 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 78f43d3d3642d..44ac6e99b22d1 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 36786064cd26faf4968e8ee90fb382e95247e4de..ce9f4b6a0d4f3350f89e9ba4f02a5cbb064524c4 100755 +index 3a4bbeb6233f2735d5354c3faaeaef71c0f892a1..2a6891fb0af06d418fd3dc9ff7595f4b898c55df 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -298,6 +298,8 @@ def GetDefaultHostOs(): +@@ -302,6 +302,8 @@ def GetDefaultHostOs(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index a068b1a12a451..280c955d156f0 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 0a0c6eb9567a96f569c25bad8ea98b4cd165b04a..0ce83c22636fce72e613893df30ca52b142077fd 100644 +index 4ea2ad7697bd4531f9538c16778b76ed7b439d74..bdc2e97e41705abe0f7b259635842c4f2e122b41 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -252,11 +252,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -251,11 +251,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/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 2793f24611e78..8f74c3cf1c77e 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 335e8a576f9a66a20b5720dfd083708bf490587e..0abf4ae5c58bd841c013775f6df0b6065d6d77b1 100644 +index 596084265973b955a02c87babdefd43c7a1fc8e3..747718d5a0f58911e3f5f6e7a04a0a8d22238627 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -156,7 +156,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 825fccf47cfa2..39aae9ea0f7b5 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -76,10 +76,19 @@ index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46ca if ([ns_val isKindOfClass:[NSFont class]]) { return (CTFontRef)(cf_val); diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644 +index e12c36384ddc05554ed362bba2c0a8b418634f0a..1c740410de70ee5a888ee7cf406dfa3bccc28c9b 100644 --- a/base/process/launch_mac.cc +++ b/base/process/launch_mac.cc -@@ -26,8 +26,10 @@ extern "C" { +@@ -19,14 +19,19 @@ + #include "base/threading/scoped_blocking_call.h" + #include "base/threading/thread_restrictions.h" + #include "base/trace_event/base_tracing.h" ++#if defined(MAS_BUILD) ++#include ++#endif + + extern "C" { + // Changes the current thread's directory to a path or directory file // descriptor. libpthread only exposes a syscall wrapper starting in // macOS 10.12, but the system call dates back to macOS 10.5. On older OSes, // the syscall is issued directly. @@ -90,37 +99,35 @@ index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd5 int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) API_AVAILABLE(macosx(10.14)); -@@ -96,21 +98,29 @@ class PosixSpawnFileActions { +@@ -95,13 +100,27 @@ class PosixSpawnFileActions { }; int ChangeCurrentThreadDirectory(const char* path) { -+ #if defined(MAS_BUILD) ++#if defined(MAS_BUILD) ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wdeprecated-declarations" + return syscall(SYS___pthread_chdir, path); -+ #else - if (__builtin_available(macOS 10.12, *)) { - return pthread_chdir_np(path); - } else { - return syscall(SYS___pthread_chdir, path); - } -+ #endif ++ #pragma clang diagnostic pop ++#else + return pthread_chdir_np(path); ++#endif } // The recommended way to unset a per-thread cwd is to set a new value to an // invalid file descriptor, per libpthread-218.1.3/private/private.h. int ResetCurrentThreadDirectory() { -+ #if defined(MAS_BUILD) ++#if defined(MAS_BUILD) ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wdeprecated-declarations" + return syscall(SYS___pthread_fchdir, -1); -+ #else - if (__builtin_available(macOS 10.12, *)) { - return pthread_fchdir_np(-1); - } else { - return syscall(SYS___pthread_fchdir, -1); - } -+ #endif ++ #pragma clang diagnostic pop ++#else + return pthread_fchdir_np(-1); ++#endif } struct GetAppOutputOptions { -@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, +@@ -221,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, file_actions.Inherit(STDERR_FILENO); } @@ -163,7 +170,7 @@ index 0e842caf7b6487d94978c7b68fb5b222e330581f..5eafcd163ee1a05203a5eb76592a449f } // namespace diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc -index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e3a9f81d4 100644 +index f071b192208fdfb1b9da932fcbbf64f0712d8f8b..7481ec29aaaa7b9f40af4a1180dd779e60131ea5 100644 --- a/sandbox/mac/sandbox_logging.cc +++ b/sandbox/mac/sandbox_logging.cc @@ -32,9 +32,11 @@ @@ -176,11 +183,11 @@ index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e } +#endif - namespace sandbox { + namespace sandbox::logging { + +@@ -71,9 +73,11 @@ void SendOsLog(Level level, const char* message) { -@@ -104,9 +106,11 @@ void SendAslLog(Level level, const char* message) { - asl_set(asl_message.get(), ASL_KEY_MSG, message); - asl_send(asl_client.get(), asl_message.get()); + os_log_with_type(log.get(), os_log_type, "%{public}s", message); +#if !defined(MAS_BUILD) if (level == Level::FATAL) { diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 7579f306131a4..06cd665d2e11d 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -7,7 +7,7 @@ Disable private window frame APIs (NSNextStepFrame and NSThemeFrame) for MAS build. diff --git a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm -index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc6a4b11f6 100644 +index 4d8f9f89f03653221fc0b509aa0e15ff20e73574..7bd5094db9b1a8e9af4ecc118fed7b78178e1e58 100644 --- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm +++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm @@ -9,6 +9,7 @@ @@ -18,7 +18,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc @interface NSWindow (PrivateBrowserNativeWidgetAPI) + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle; @end -@@ -63,10 +64,13 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) { +@@ -55,10 +56,13 @@ - (BOOL)_shouldCenterTrafficLights { @end @@ -32,7 +32,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle { // - NSThemeFrame and its subclasses will be nil if it's missing at runtime. if ([BrowserWindowFrame class]) -@@ -81,6 +85,8 @@ - (BOOL)_usesCustomDrawing { +@@ -73,6 +77,8 @@ - (BOOL)_usesCustomDrawing { return NO; } @@ -95,7 +95,7 @@ index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 622b25c637ba14f287cbcdb4781967564d7e9eff..a21fe0aa19069a748b41e7d0781e20031c40fbfc 100644 +index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565aeb8bfb01 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -16,7 +16,9 @@ diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 426b8591f4b1c..1d607671a6b66 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063 } // 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 26a2fa4c0f39ea0254bee322f355d92a55ba3b4e..e42de9720456161c187d41d39487ee3272fa1cf9 100644 +index 4c76aafff03b76d78ab8c84e962cf96f8fefc091..32ac66e9ac5a643f5e4ddea979bf4239d441d23f 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 -@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -579,10 +579,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -114,10 +114,10 @@ index 0048862cb89d519b8c1c111f923e6dd960c855d6..c7b9124462b0779ed4d1b27fe167e653 // 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 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8f0727a45 100644 +index b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c62338a11f 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -255,8 +255,10 @@ +@@ -254,8 +254,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -128,7 +128,7 @@ index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1541,8 +1543,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1521,8 +1523,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8 return [GetInProcessNSView() window]; } -@@ -1586,9 +1590,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1566,9 +1570,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2083,12 +2089,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2063,12 +2069,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,10 +167,10 @@ index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 2e39255bdb26664e8bc2d0abb26c2359c9b84bd3..1425e9935b599b01fd53f43d0415a77002c92f00 100644 +index 4c996a80ae71aee8c2d259a7eb294fe3257ad9ac..5e897496539a365a5de15073f1dccb16db3987dd 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -329,6 +329,13 @@ component("base") { +@@ -337,6 +337,13 @@ component("base") { sources += [ "resource/resource_bundle_lacros.cc" ] } @@ -205,7 +205,7 @@ 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 c93aedbce83c398a55c478df60d5ba6dd5324a0b..dfa1983e5605d14e44efae3c1418b4e53c392333 100644 +index 1ca8dab6cec9f4160f557d034deda9f3b98b9459..e6d3656c0a66d94cdbdb0141e7e44439e84aa8dd 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -31,7 +31,9 @@ @@ -218,7 +218,7 @@ index c93aedbce83c398a55c478df60d5ba6dd5324a0b..dfa1983e5605d14e44efae3c1418b4e5 @class NSView; namespace remote_cocoa { -@@ -452,11 +454,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -445,11 +447,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +233,10 @@ index c93aedbce83c398a55c478df60d5ba6dd5324a0b..dfa1983e5605d14e44efae3c1418b4e5 // 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 1c4c4a774e4d5e199ae50e8df4499a497d3b0674..b2265079021d10e2944b9474fafe32ccca95d3de 100644 +index e0a337647572929882c8dc4fdb6c1bcad54071df..2a18cbed5933419e2f8c830376bfee6ab1db9a9f 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -296,14 +296,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 1c4c4a774e4d5e199ae50e8df4499a497d3b0674..b2265079021d10e2944b9474fafe32cc } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1287,6 +1295,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1257,6 +1265,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 1c4c4a774e4d5e199ae50e8df4499a497d3b0674..b2265079021d10e2944b9474fafe32cc remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1294,14 +1303,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1264,14 +1273,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 d9abef548d026..093c692d94b8f 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,7 +16,7 @@ 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 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b42394474 100644 +index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc717317ba48e6 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h @@ -21,7 +21,9 @@ @@ -29,7 +29,17 @@ index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b @class CALayer; namespace ui { -@@ -116,7 +118,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass, +@@ -115,7 +117,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface, + base::WeakPtr delegate_; + + bool use_remote_layer_api_; ++#ifndef MAS_BUILD + base::scoped_nsobject ca_context_; ++#endif + std::unique_ptr ca_layer_tree_coordinator_; + + gfx::Size pixel_size_; +@@ -210,7 +214,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -40,27 +50,52 @@ index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b 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 547a5c4260b28d651d470e06c4c4e6bfa77ef966..01fee4e6b104aad68d52f30c9af3e9072f078e0c 100644 +index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d121828ce85 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -60,7 +60,7 @@ +@@ -59,6 +59,7 @@ + ca_layer_tree_coordinator_ = std::make_unique( + use_remote_layer_api_, allow_av_sample_buffer_display_layer); ++#ifndef MAS_BUILD + // Create the CAContext to send this to the GPU process, and the layer for + // the context. + if (use_remote_layer_api_) { +@@ -67,6 +68,7 @@ + options:@{}] retain]); + [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; + } ++#endif + } + + ImageTransportSurfaceOverlayMac::~ImageTransportSurfaceOverlayMac() { +@@ -146,7 +148,9 @@ + "GLImpl", static_cast(gl::GetGLImplementation()), + "width", pixel_size_.width()); + if (use_remote_layer_api_) { ++#ifndef MAS_BUILD + params.ca_layer_params.ca_context_id = [ca_context_ contextId]; ++#endif + } else { + IOSurfaceRef io_surface = + ca_layer_tree_coordinator_->GetIOSurfaceForDisplay(); +@@ -408,6 +412,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); -- + +#ifndef MAS_BUILD // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -69,6 +69,7 @@ +@@ -416,6 +421,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } +#endif } - template -@@ -160,7 +161,9 @@ + ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { +@@ -496,7 +502,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index b28e29487b800..124bb9afbc651 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -122,7 +122,7 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index d342eb4e9fc94de4365d86c2d1af4b85a8bf63a3..012f9ce97d9ed6b00deb718a88f432e053cb3bd1 100644 +index 69e60d498941c34cfac9e79c7517765bf93849f5..b998ad7cf01c21e93c57e1283cfdcb1e02ac49cf 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm @@ -42,6 +42,7 @@ @@ -141,8 +141,8 @@ index d342eb4e9fc94de4365d86c2d1af4b85a8bf63a3..012f9ce97d9ed6b00deb718a88f432e0 namespace { -@@ -123,8 +125,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { - controller_state_function_( +@@ -114,8 +116,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) { + : controller_state_function_( base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState, base::Unretained(this))), +#ifndef MAS_BUILD @@ -152,7 +152,7 @@ index d342eb4e9fc94de4365d86c2d1af4b85a8bf63a3..012f9ce97d9ed6b00deb718a88f432e0 classic_discovery_manager_( BluetoothDiscoveryManagerMac::CreateClassic(this)), low_energy_discovery_manager_( -@@ -365,8 +369,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { +@@ -356,8 +360,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) { } bool BluetoothAdapterMac::SetPoweredImpl(bool powered) { @@ -166,7 +166,7 @@ index d342eb4e9fc94de4365d86c2d1af4b85a8bf63a3..012f9ce97d9ed6b00deb718a88f432e0 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index ebe37172d254e8441fe2b8c290bd5a59af38d754..6a131f5c41f3e43a1467efeec2ce63f6903691b7 100644 +index 1b849df0ee4c40a765a14bfaa75720f5570d4846..1f7a4fe36a96d076ddcfd9c9f092f95132d579dc 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -173,6 +173,12 @@ source_set("audio") { @@ -183,10 +183,10 @@ index ebe37172d254e8441fe2b8c290bd5a59af38d754..6a131f5c41f3e43a1467efeec2ce63f6 "AudioToolbox.framework", "AudioUnit.framework", diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index b8805f9174818ac086a5d6542c9962050f00aee8..5491b62a2e180b2f6e48e243e2ac78c3b1a16892 100644 +index eb0aff29b2f4fd2b035ef96186fd58d976876b05..8a68a8885ec42715c9b9dab0f04d1b90eb9baa6e 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -887,7 +887,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -885,7 +885,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); diff --git a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch index 4a2895266232f..6ba1e0d11fdad 100644 --- a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch +++ b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch @@ -9,7 +9,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm -index 99b4dffbd41dd5d53e4f8e7e0bfbbf3ecc6fcb43..db57e78efa22a26b71426d2960aeb7919ae6cf47 100644 +index 88262d4dd82b3a954ed09492c508ad83dece0256..81fad8ca63479737885f09be7cf05b8eada1f104 100644 --- a/ui/gfx/platform_font_mac.mm +++ b/ui/gfx/platform_font_mac.mm @@ -25,9 +25,11 @@ @@ -24,7 +24,7 @@ index 99b4dffbd41dd5d53e4f8e7e0bfbbf3ecc6fcb43..db57e78efa22a26b71426d2960aeb791 namespace { -@@ -232,7 +234,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { +@@ -220,7 +222,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { // TODO(avi, etienneb): Figure out this font stuff. base::ScopedCFTypeRef descriptor( CTFontCopyFontDescriptor(font)); 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 0bfd677514878..af9c65ee153b1 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 12d74d8751802b06198952682bfc99f18e5f8df8..6a331146e6fbf23e4177176f67fe534141579eb7 100644 +index 812cfebfbe4f95cf38ce2fcd115a5a363f51363e..e351c6625fac1037040f639e55e0a2e48abf2538 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -128,6 +128,11 @@ @@ -128,7 +128,7 @@ index 12d74d8751802b06198952682bfc99f18e5f8df8..6a331146e6fbf23e4177176f67fe5341 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2301,6 +2398,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2302,6 +2399,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 5df86e0449e32..4f582c7187ca0 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index 362fedd0a0b654db546a73ff84c7e0676097e824..f1f6e2a36a6764ef12827fdab16818061b007959 100644 +index 17b9ed63bd839632a5eed5bcbaa3e990472761ef..09c266f1a99e42d6c417c294d7db1d6621ec0365 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc -@@ -195,6 +195,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( +@@ -197,6 +197,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -130,10 +130,10 @@ index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b 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 36830abdfa49fed9b8294ca33065816faa672e18..36b4e75828436df4274b522bdf75e88e1112aab6 100644 +index b661376d97f515574385dde451ed21fb3f3e4f7b..733931cf9f2b55b63c0611cca673250696f1300d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2085,7 +2085,8 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2051,7 +2051,8 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index c7f550e631fc7..57f571ce58cc4 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -138,7 +138,7 @@ index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d1 #include "ui/aura/window.h" #include "ui/aura/window_tree_host.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 c1d2614f3ae3e7256db95a2cd3c5253ab6b25bd0..cabe6f261c863c35882deb8f850194e27f78a4f9 100644 +index 0d5857b5f3afa823a7a2aff68f833623ec2e7b1c..fb6217f28c306921a86afc9b854a60b4e38e1584 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 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index edeed181bef81..a3d13a71f28b9 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -100,10 +100,10 @@ index ee713c5686d4ea8a5d73cebf74e67381b685cff6..375ce3294727b84bf0071681c7bc35c7 #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 dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a2c5e15c7 100644 +index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf06d4852f5 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -345,7 +345,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -362,7 +362,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -113,7 +113,7 @@ index dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df6588392418 100644 +index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0adb5365a94 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -199,7 +199,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -332,6 +342,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -334,6 +344,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -209,7 +209,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -500,7 +513,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -502,7 +515,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -219,7 +219,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -513,16 +527,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -517,16 +531,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -243,7 +243,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 } void PrintViewManagerBase::NavigationStopped() { -@@ -638,11 +655,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -642,11 +659,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -258,7 +258,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -672,18 +692,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -676,18 +696,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -280,7 +280,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -693,6 +715,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -697,6 +719,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -288,7 +288,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -718,14 +741,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -722,14 +745,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -305,7 +305,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 return; } #endif -@@ -763,7 +786,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -767,7 +790,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -313,7 +313,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 #endif ReleasePrinterQuery(); -@@ -778,6 +800,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -782,6 +804,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -325,7 +325,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -788,10 +815,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -792,10 +819,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -338,7 +338,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 } void PrintViewManagerBase::DidStartLoading() { -@@ -851,6 +880,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -855,6 +884,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -350,7 +350,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -908,7 +942,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -912,7 +946,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -362,8 +362,8 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 if (!weak_this) return false; -@@ -987,6 +1024,13 @@ void PrintViewManagerBase::ReleasePrintJob() { - UnregisterSystemPrintClient(); +@@ -993,6 +1030,13 @@ void PrintViewManagerBase::ReleasePrintJob() { + } #endif + if (!callback_.is_null()) { @@ -376,7 +376,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 if (!print_job_) return; -@@ -1036,7 +1080,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1042,7 +1086,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -385,7 +385,7 @@ index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..203ca9b0c4bf048016023fc3d260df65 return true; if (!cookie) { -@@ -1144,7 +1188,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1150,7 +1194,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -454,7 +454,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0d // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc -index aa727261738698610fab5abd3618d0d0f0d29792..2793fbc33e66cf9d7e3fc5e10f0d01730f3b935d 100644 +index b2bd74f28f70bc601ec47820030ad965b19cf068..027e4c0b78d44b69504d248755bf7f25ff423361 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc @@ -21,7 +21,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( @@ -467,7 +467,7 @@ index aa727261738698610fab5abd3618d0d0f0d29792..2793fbc33e66cf9d7e3fc5e10f0d0173 void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params) { NOTREACHED(); diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h -index 5f4d6e314b21351e3e5912e3a43ef87774343085..8627c8305686654dca7cd9c26433592e934d4eb0 100644 +index 42f9f296e6ef65a934167c2d4773e504020378bc..3ac69d39e4eb380f97cb779be1e9ad8706ce8243 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h @@ -25,7 +25,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { @@ -480,7 +480,7 @@ index 5f4d6e314b21351e3e5912e3a43ef87774343085..8627c8305686654dca7cd9c26433592e void PrintForSystemDialog() override; void SetPrintPreviewUI( diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc95172537 100644 +index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d183ce10c0f 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -280,7 +280,7 @@ enum PrintFailureReason { @@ -502,7 +502,7 @@ index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc // 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 db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1df2f1a86 100644 +index 1664ac8233e74cadcf19ebc53e41cef37d13019c..aa341dd9a6f2b6e2ebb6e8048d2d9a3e5c3e89ea 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -513,7 +513,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 #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" -@@ -1277,7 +1278,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1279,7 +1280,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -523,7 +523,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 if (!weak_this) return; -@@ -1308,7 +1310,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1310,7 +1312,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -532,7 +532,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1323,7 +1325,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1325,7 +1327,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -541,7 +541,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1389,7 +1391,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1391,7 +1393,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -551,7 +551,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1438,6 +1441,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1440,6 +1443,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -682,7 +682,7 @@ index db8913ae41d46d14fd15c6127e126e4b129dc4b8..eaddc1bbc59bad9cc885fb8532d4f8c1 std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 220b28a7e63625fe8b76290f0d2f40dd32cae255..cff9e35fab9df680c3c39467c50ddb033c2e6cba 100644 +index f118cae62de1cebb78c8193365bafcaba3b863a8..6c8bb35f6ea00b8366134a3f00d1a43fa22d81b5 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -255,7 +255,7 @@ class PrintRenderFrameHelper @@ -723,10 +723,10 @@ index 220b28a7e63625fe8b76290f0d2f40dd32cae255..cff9e35fab9df680c3c39467c50ddb03 #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 8a8fcefa9da92a044f5bdf6a2f242048b325d442..6dae33514675d6843736b2c9a767a4b72cb103fa 100644 +index 93db1a80a360702a36f2d3113c9a83105bf7fffe..c3e012ec8d9a1c19434240d27553e486c0729d43 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc -@@ -117,7 +117,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { +@@ -128,7 +128,6 @@ void PrintingContext::UsePdfSettings() { mojom::ResultCode PrintingContext::UpdatePrintSettings( base::Value::Dict job_settings) { @@ -735,10 +735,10 @@ index 8a8fcefa9da92a044f5bdf6a2f242048b325d442..6dae33514675d6843736b2c9a767a4b7 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 2c8ef23f7cb75a743fa18e3c613f7c719988028c..265005d6d51f861aa7ccd7e0eba7809b3c652dae 100644 +index 58fcf619add5093bd99fd9c561e8686b060a01c6..76db2a2438cef84fcb6dfd4a67d2e171428e4be0 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -170,6 +170,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -171,6 +171,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { bool PrintingAborted() const { return abort_printing_; } @@ -748,7 +748,7 @@ index 2c8ef23f7cb75a743fa18e3c613f7c719988028c..265005d6d51f861aa7ccd7e0eba7809b int job_id() const { return job_id_; } protected: -@@ -180,9 +183,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -181,9 +184,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 0d6d8328df700..a44f1930965f3 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240afa9bedeb 100644 +index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d72d847433 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -96,9 +96,9 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a #endif +#endif - #if defined(TOOLKIT_VIEWS) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -347,6 +350,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { + using content::BrowserThread; + +@@ -342,6 +345,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -108,7 +108,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -366,6 +372,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -361,6 +367,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -116,7 +116,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a } bool IsChromeProcess(pid_t pid) { -@@ -406,6 +413,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -401,6 +408,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -138,7 +138,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -773,6 +795,10 @@ ProcessSingleton::ProcessSingleton( +@@ -768,6 +790,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -149,7 +149,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -945,6 +971,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -932,6 +958,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -170,7 +170,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1044,14 +1084,32 @@ bool ProcessSingleton::Create() { +@@ -1031,14 +1071,32 @@ bool ProcessSingleton::Create() { #endif } @@ -208,7 +208,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240a // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1094,10 +1152,13 @@ bool ProcessSingleton::Create() { +@@ -1081,10 +1139,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); 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 576ccc34bd1d6..288bb9200db53 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 fcc45c987cfce94f5378d4aeee1cfe703178e133..d78ca15f4d589b6789908168c00d9e403e62d6f4 100644 +index 273750752cdef18ccd7d54b9b28c524375bb3e8d..3eec2e5c14186b39a67ca8ad410a3268841e5f4e 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2081,6 +2081,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2075,6 +2075,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 fcc45c987cfce94f5378d4aeee1cfe703178e133..d78ca15f4d589b6789908168c00d9e40 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index a96bb634eb5c5405abb62b88d576e5e3ed354caa..1b616ba52d9c77c64c7f24a0d204ce36641dce38 100644 +index 987e437641b7978290aa2633755b67f9099e1d04..6f09c04cc612d2ac58b62d44516eefa1b66d145c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4527,6 +4527,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4491,6 +4491,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,7 +59,7 @@ index a96bb634eb5c5405abb62b88d576e5e3ed354caa..1b616ba52d9c77c64c7f24a0d204ce36 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 6b6fc6881c88b72c164d786c036b2e56ccd43ac8..df1633d59070e19592a52f02a76bdd9006d7c6f0 100644 +index 36888689fe38e7873f09b1bc64a901f0771cbd5b..13253163b54c86b37c7b5654b674c5f920c81272 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -954,6 +954,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index ad382863c801c..579052a1a0d70 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 1bdeb27db614d3ab535e536e7e433d9ee27fd9da..e478228a5729a2a2fa0a816e25a4f1a6fe996bac 100644 +index bdaae69dbeac280dcc83baa217d6c4ab0039ba35..14e7b4386d8d8bf020abf5a1037761eac1068223 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -668,6 +668,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -691,6 +691,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 1bdeb27db614d3ab535e536e7e433d9ee27fd9da..e478228a5729a2a2fa0a816e25a4f1a6 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 5f2abc1943e2f25aa31c499ed7fd870a49ba5732..d3d6800e0920380bc9efe8dba35e03efe10e6a50 100644 +index 8f76edf316a075bddb2963ff1baf3ba0481b5fa7..2604d55c46e4ef3e512554a645d3db4b5670995c 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 @@ @@ -50,7 +50,7 @@ index 5f2abc1943e2f25aa31c499ed7fd870a49ba5732..d3d6800e0920380bc9efe8dba35e03ef class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -139,6 +143,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -144,6 +148,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -60,7 +60,7 @@ index 5f2abc1943e2f25aa31c499ed7fd870a49ba5732..d3d6800e0920380bc9efe8dba35e03ef // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -290,6 +297,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -295,6 +302,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 4742a2456d48e..c70ffd75bc488 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ 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 aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4087ce4ff 100644 +index 0282cf6bb6674b10e6a92897ec8c5b2bb9c4a4a0..6ce9f338bb92390b355a7cc124e8fa869a3cb4ac 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 @@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -29,7 +29,7 @@ index aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4 // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -611,6 +620,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -602,6 +611,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4 return [self acceptsMouseEventsWhenInactive]; } -@@ -687,6 +699,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -678,6 +690,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,18 +50,18 @@ index aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1006,6 +1022,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { - eventType == NSKeyDown && - !(modifierFlags & NSCommandKeyMask); +@@ -997,6 +1013,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { + eventType == NSEventTypeKeyDown && + !(modifierFlags & NSEventModifierFlagCommand); + if ([theEvent.window respondsToSelector:@selector(disableAutoHideCursor)] && + [theEvent.window disableAutoHideCursor]) + shouldAutohideCursor = NO; + // We only handle key down events and just simply forward other events. - if (eventType != NSKeyDown) { + if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1769,9 +1789,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1761,9 +1781,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 aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1780,7 +1802,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1772,7 +1794,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index ad3734548752a..64adbef1380b8 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 5c564fe889ca6621ff33d31d8d2fff93563093eb..99ab95668a7d3a31339b576b4a3a6038f39c2795 100644 +index b1c9b0c7e7d6d8694f123d057e415676cab607c7..dc59a88bc930d4d7b8e606434d940cac5b834bd0 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1534,7 +1534,7 @@ if (is_chrome_branded && !is_android) { +@@ -1538,7 +1538,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 5c564fe889ca6621ff33d31d8d2fff93563093eb..99ab95668a7d3a31339b576b4a3a6038 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1563,6 +1563,12 @@ if (!is_android) { +@@ -1567,6 +1567,12 @@ if (!is_android) { } } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index c60a1ac2733bb..c0ca856c45100 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 36b4e75828436df4274b522bdf75e88e1112aab6..0c8d0735523d388d0e68d2ad0b20a1c2525502ed 100644 +index 733931cf9f2b55b63c0611cca673250696f1300d..8aa14d7cdb7edc5d53736fb959e3f9992d4fd896 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1791,9 +1791,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1750,9 +1750,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); @@ -39,13 +39,13 @@ index 36b4e75828436df4274b522bdf75e88e1112aab6..0c8d0735523d388d0e68d2ad0b20a1c2 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 + + auto file_data = std::make_unique(); 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 e8d6ef94664bb37996871c0cc0db7c815783b786..0d56fa0aebee80883019a100900119972bf02edd 100644 +index 2c4bd947eca08223c541de53390a18d19208397e..6ef28fe7ebfd3dfa60995184772e3e2dd6f7f0d8 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 { +@@ -31,6 +31,9 @@ namespace content { #if BUILDFLAG(USE_ZYGOTE_HANDLE) ZygoteHandle RendererSandboxedProcessLauncherDelegate::GetZygote() { @@ -55,7 +55,7 @@ index e8d6ef94664bb37996871c0cc0db7c815783b786..0d56fa0aebee80883019a10090011997 const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -52,6 +55,9 @@ RendererSandboxedProcessLauncherDelegateWin:: +@@ -58,6 +61,9 @@ RendererSandboxedProcessLauncherDelegateWin:: bool is_jit_disabled) : renderer_code_integrity_enabled_( GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { @@ -66,7 +66,7 @@ index e8d6ef94664bb37996871c0cc0db7c815783b786..0d56fa0aebee80883019a10090011997 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 463df70c55df932427c761a67dbc89d7657f9703..d6d8094e31129eb7ca1f0bf36523d48204281795 100644 +index 576a2c0782bf49cb57c973434b5d1f2ec9fdcbc5..24d1854c261372353c9bf69a6cb0cf2d24e9ebef 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 diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index a01f4031ad26c..9239a84e8dd6a 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 0303ae1c4d8681bc1bf56eb9ff1fc13afd678706..7a38e596eededae649e8380ab99c6ce7f472aa77 100644 +index 407f734b77d1ed4876f01327df958847d60e9128..ddfa7cf439244a6d58ab73dea014b341912f503f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3065,6 +3065,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3026,6 +3026,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 0303ae1c4d8681bc1bf56eb9ff1fc13afd678706..7a38e596eededae649e8380ab99c6ce7 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3075,6 +3082,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3036,6 +3043,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index 0303ae1c4d8681bc1bf56eb9ff1fc13afd678706..7a38e596eededae649e8380ab99c6ce7 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index c062c66f596f513e46da04fc9ea5f5969e7ee632..2f14f906b51ce73a69cd780d70ad6264285138ac 100644 +index e82a5b71eb8a6ee2df8478ccd3432b4afbb096aa..d5c2a922bba0ff0d5a4a22d9cd25be46fd09d4e1 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 064c5466aee67..913a437ac1e98 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 c842bf34f1510071875220c7d81d60300d459b82..18f26143d5b8f6d1aeb4b21ffecd4cdf50081159 100644 +index bb9b9d0ce53ce427075fd92ab1da119c08f6e591..6792e64b2f0f4a5080beb57804f861d8297524d2 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -899,10 +899,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index f6c4cbc526fed..1653f6c8f33ce 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 e588b460aa32b4c984d593ed54e10310b59ace9b..2dd0997bc183685cbb0b6f34b4a254af0a09bdd5 100644 +index e612764997277da3411d8040850756eb38996cca..f0341511d7d00f03a52bdead457f1f9d60ac5486 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6223,6 +6223,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6284,6 +6284,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/node/.patches b/patches/node/.patches index 52db7b54f608f..2c31d38101c8a 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -42,3 +42,4 @@ fix_preserve_proper_method_names_as-is_in_error_stack.patch macos_avoid_posix_spawnp_cwd_bug_3597.patch src_update_importmoduledynamically.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch +json_parse_errors_made_user-friendly.patch diff --git a/patches/node/json_parse_errors_made_user-friendly.patch b/patches/node/json_parse_errors_made_user-friendly.patch new file mode 100644 index 0000000000000..5fe3fdf8ff49b --- /dev/null +++ b/patches/node/json_parse_errors_made_user-friendly.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 26 May 2022 17:08:33 -0400 +Subject: JSON.parse errors made user-friendly + +Update tests for https://chromium-review.googlesource.com/c/v8/v8/+/3513684 + +diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js +index 9d0deb70a1568c93ccdecbef59327ecb2a17ae5e..2ab8f2bdcf7cca1437df33668c4177a76b4dc3ca 100644 +--- a/test/es-module/test-esm-data-urls.js ++++ b/test/es-module/test-esm-data-urls.js +@@ -75,7 +75,7 @@ function createBase64URL(mime, body) { + import('data:application/json;foo="test,",0', + { assert: { type: 'json' } }), { + name: 'SyntaxError', +- message: /Unexpected end of JSON input/ ++ message: 'data:application/json;foo="test,",0: Unterminated string in JSON at position 3' + }); + } + { +diff --git a/test/es-module/test-esm-invalid-pjson.js b/test/es-module/test-esm-invalid-pjson.js +index cdbebb17b4bb34421a2f98c384650d495908885c..12247f15dbaddc0e06f1e6aff09faf7a035cf43a 100644 +--- a/test/es-module/test-esm-invalid-pjson.js ++++ b/test/es-module/test-esm-invalid-pjson.js +@@ -17,11 +17,13 @@ child.stderr.on('data', (data) => { + child.on('close', mustCall((code, signal) => { + strictEqual(code, 1); + strictEqual(signal, null); ++ console.log('STDERR is: ', stderr); ++ console.log('DONE STDERR'); + ok( + stderr.includes( + `[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` + + `while importing "invalid-pjson" from ${entry}. ` + +- `Unexpected token } in JSON at position ${12 + checkoutEOL.length * 2}` ++ `Expected ':' after property name in JSON at position ${12 + checkoutEOL.length * 2}` + ), + stderr); + })); diff --git a/patches/squirrel.mac/build_add_gn_config.patch b/patches/squirrel.mac/build_add_gn_config.patch index 4f6e3a0db339a..d2c9ef6b4d975 100644 --- a/patches/squirrel.mac/build_add_gn_config.patch +++ b/patches/squirrel.mac/build_add_gn_config.patch @@ -23,10 +23,10 @@ index 89c499e451ecb48655cfd42b01ffa1da56998c2e..98f80aad43a87ed75ca1660ad6a178db +vendor diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..d43e6d6be5c8e2b3a5f715721e61589be493718d +index 0000000000000000000000000000000000000000..68beb3d10580cdb747a78407c7f5bbb205825c4b --- /dev/null +++ b/BUILD.gn -@@ -0,0 +1,239 @@ +@@ -0,0 +1,242 @@ +assert(is_mac) + +import("//build/config/mac/rules.gni") @@ -148,7 +148,10 @@ index 0000000000000000000000000000000000000000..d43e6d6be5c8e2b3a5f715721e61589b + "$dtrace_header_dir", + ] + -+ cflags_objc = [ "-fobjc-arc" ] ++ cflags_objc = [ ++ "-fobjc-arc", ++ "-Wno-deprecated-declarations", ++ ] + + ldflags = [ "-Wl,-install_name,@rpath/$output_name.framework/$output_name" ] +} diff --git a/patches/v8/.patches b/patches/v8/.patches index 4e14f3e14ced3..aa4ed2c39d565 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -8,3 +8,5 @@ fix_build_deprecated_attribute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch +allow_disabling_of_v8_sandboxed_pointers.patch +chore_disable_is_execution_terminating_dcheck.patch diff --git a/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch b/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch new file mode 100644 index 0000000000000..2c98e2ad7c6d2 --- /dev/null +++ b/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 26 May 2022 10:45:49 -0400 +Subject: allow disabling of v8 sandboxed pointers + +V8 sandboxed pointers are incompatible with Node due to changes like +https://chromium-review.googlesource.com/c/v8/v8/+/3114136, so for +now we need a way to disable v8 sandboxed pointers. + +diff --git a/BUILD.gn b/BUILD.gn +index 114cfd757b60c14cfb7a6bc9f9f69765363c9c6c..5e8a6bb2c26c3e5701e628cbf4bfcf9b2eb6b82f 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -501,18 +501,6 @@ if (v8_enable_sandbox == "") { + v8_enable_external_code_space + } + +-# Enable sandboxed pointers on desktop when the sandbox is enabled. +-if (v8_enable_sandbox) { +- # When sanitizers are enabled, PartitionAlloc forwards allocations to malloc +- # instead of allocating from its Pools and so isn't compatible with the +- # sandbox. As such, disable the sandbox there. See https://crbug.com/1323174 +- if (!is_asan && !is_hwasan && !is_lsan && !is_tsan && !is_msan) { +- v8_enable_sandboxed_pointers = +- target_os != "fuchsia" && target_os != "android" && +- target_os != "chromeos" +- } +-} +- + # Enable all available sandbox features if sandbox future is enabled. + if (v8_enable_sandbox_future) { + v8_enable_sandboxed_pointers = true diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 8ee43c0a6de39..aec7148bcd45c 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 44b4f154b416eb9b145d2abe89f3e92d507cea77..8e8e20fcbda71ec98e949d3e5c582b30dfe67e06 100644 +index 744ae6a11ffff47872da4141b3f0e4af5130fff9..31dfdf8a3facd470c3f92c58a5a12566af96521a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -608,7 +608,7 @@ config("internal_config") { +@@ -620,7 +620,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 44b4f154b416eb9b145d2abe89f3e92d507cea77..8e8e20fcbda71ec98e949d3e5c582b30 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5876,7 +5876,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5905,7 +5905,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 44b4f154b416eb9b145d2abe89f3e92d507cea77..8e8e20fcbda71ec98e949d3e5c582b30 deps = [ ":v8_libbase", -@@ -5914,6 +5914,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5943,6 +5943,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/chore_disable_is_execution_terminating_dcheck.patch b/patches/v8/chore_disable_is_execution_terminating_dcheck.patch new file mode 100644 index 0000000000000..dc3e18c332412 --- /dev/null +++ b/patches/v8/chore_disable_is_execution_terminating_dcheck.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Tue, 31 May 2022 19:58:01 +0200 +Subject: chore: disable is_execution_terminating DCHECK + +This causes a slew of crashes in Node.js. + +Upstream issue opened at https://github.com/nodejs/node-v8/issues/227. + +diff --git a/src/api/api-macros.h b/src/api/api-macros.h +index 149dd0555a69be576fd1eb97aa79b8aedafcac04..233e6d2ac511c4a7fa45d47bb7448beead52faf1 100644 +--- a/src/api/api-macros.h ++++ b/src/api/api-macros.h +@@ -97,8 +97,6 @@ + + // Lightweight version for APIs that don't require an active context. + #define DCHECK_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ +- /* Embedders should never enter V8 after terminating it */ \ +- DCHECK(!i_isolate->is_execution_terminating()); \ + DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) + + #define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 0e23dc675bcc3..156ab2298be93 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 6d478369375952e5af9bef922dba900067a79774..4c8bfb25e9fb2f9f9afcc57a61aff003f9db8e77 100644 +index 03bb3f062c5510292c2c983508d284f8cfde5b41..6d0622863ae436dfae6413126884e0f941a3f0b6 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9123,7 +9123,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9168,7 +9168,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 6d478369375952e5af9bef922dba900067a79774..4c8bfb25e9fb2f9f9afcc57a61aff003 i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index a1d4680b02e9d22a3804f88b4249b10986044ade..74369f2e9fc3ecc4cc41a989ecc04cd554417b0b 100644 +index a2a22674d1d50926fefac037f837d0e33d9b5220..214c0ac8d83fc74d40eb00d4d2641f329500e33c 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6230,9 +6230,9 @@ void Heap::TearDown() { +@@ -6208,9 +6208,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 ef5e00434e88e..70f4cab7eb7fe 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 bf50ab9cf353f67cba37266a8d3ae298afb5a87c..cc2f9cca18e9229ef949183dd876db91e3021318 100644 +index 29ce9b289eb33526abd6a430428b82e9dc8c7027..114cfd757b60c14cfb7a6bc9f9f69765363c9c6c 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -608,6 +608,10 @@ config("internal_config") { +@@ -620,6 +620,10 @@ config("internal_config") { ":cppgc_header_features", ] @@ -27,10 +27,10 @@ index bf50ab9cf353f67cba37266a8d3ae298afb5a87c..cc2f9cca18e9229ef949183dd876db91 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index 61644ffe0582787578dc3848f87cc8c2a0e88bb7..cd3e11e4ff77a388d2325a015e1a71641a4924a0 100644 +index 3a94093a14b0b3eabfff7063dd87049da56d62bc..641fb6a8d3dd80a23143e7f25bebe03e50681112 100644 --- a/src/base/macros.h +++ b/src/base/macros.h -@@ -387,13 +387,17 @@ bool is_inbounds(float_t v) { +@@ -389,13 +389,17 @@ bool is_inbounds(float_t v) { #ifdef V8_OS_WIN // Setup for Windows shared library export. diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index a38ff09275019..c9836854ec41a 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -19,7 +19,7 @@ index 316f870e31f33c990793fdfe7ecb69bb120bb024..5db324b2bf0169657fc6e9dc3b15fa3c 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 ec304170542f8a6053c60cbebb22c536cb56ac6c..be8f33d5e8bc2ff388f199dacebd408ccd32dda5 100644 +index 60a6343bb0698902074741c860f3af0f398a85a5..5699fd042e8e3fa19d155de5162a18e24b87f90c 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 2a2002ed82572..f69f6226168e5 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 8e8e20fcbda71ec98e949d3e5c582b30dfe67e06..bf50ab9cf353f67cba37266a8d3ae298afb5a87c 100644 +index 31dfdf8a3facd470c3f92c58a5a12566af96521a..29ce9b289eb33526abd6a430428b82e9dc8c7027 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5888,7 +5888,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5917,7 +5917,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 1bd502768257c..b3c635d8135de 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..644f921f970d214b4d93b1e4c384e7475740b485 100644 +index 0e5bb1558d096d152fd9388f081c5c9d150a3c7a..6aa16106c088c0a7e590c62eb3d06e0418cb5ebc 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -454,10 +454,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index ee43f87b0374f..04f2010a887b9 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,7 +18,7 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index d1f275afcc7f8c6adcb4c8abf9aea04b6492f38f..2b82b08a6f7cf1b7023bbdb897bfdab6bd48da5e 100644 +index 400d8cb85ea3b45448e79903b05936998b1941b3..2405b99a5badd2ee266459d17d2ec352b4ef71c5 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc @@ -6170,12 +6170,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { @@ -35,7 +35,7 @@ index d1f275afcc7f8c6adcb4c8abf9aea04b6492f38f..2b82b08a6f7cf1b7023bbdb897bfdab6 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index 123795af961c81278b947c9e8f012158d61c49df..7ac8af40f442025735498651931ab97904af6ecb 100644 +index d49403e9326b85ae4e52e7bc3e232834038fbe09..64f554332b1241aa22f1e292ebf9d0bc667a647a 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h @@ -2522,7 +2522,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 5ced839d89dbf..ee905e4f0f881 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 1edc2bd6cb05ec1000c0cc651ad10ee40a71e1ec..87b7ed6862c8bfa25b63ac0dbd9e97028bbeb17d 100644 +index 2511a0752037939562e861a8f492f6c9496453c6..8762c4dfa25dd17d7f36962410aeb9846593073e 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,7 +39,7 @@ index 1edc2bd6cb05ec1000c0cc651ad10ee40a71e1ec..87b7ed6862c8bfa25b63ac0dbd9e9702 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 f9e991a57b3294b0ed786b8a0b3f540d9ab5cd49..3352d8d5f3f1e4971498aafd45b9dbac447a1b4b 100644 +index f12e1ef130451afa1cb334a4ba07bdb2588ccc24..703e4bba9381c57849882e7cb2cdeb751064dd2a 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h @@ -2119,11 +2119,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { diff --git a/script/zip_manifests/dist_zip.mac.arm64.manifest b/script/zip_manifests/dist_zip.mac.arm64.manifest index d09ff34e0e259..26e7b9b957c3c 100644 --- a/script/zip_manifests/dist_zip.mac.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac.arm64.manifest @@ -19,9 +19,7 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ diff --git a/script/zip_manifests/dist_zip.mac.x64.manifest b/script/zip_manifests/dist_zip.mac.x64.manifest index a72fbeb79ea64..3e42bf0f614ec 100644 --- a/script/zip_manifests/dist_zip.mac.x64.manifest +++ b/script/zip_manifests/dist_zip.mac.x64.manifest @@ -19,9 +19,7 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest index ba4303603e46d..eb63a730528bb 100644 --- a/script/zip_manifests/dist_zip.mac_mas.arm64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.arm64.manifest @@ -16,9 +16,7 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ diff --git a/script/zip_manifests/dist_zip.mac_mas.x64.manifest b/script/zip_manifests/dist_zip.mac_mas.x64.manifest index a62f594edae6f..29c698600badb 100644 --- a/script/zip_manifests/dist_zip.mac_mas.x64.manifest +++ b/script/zip_manifests/dist_zip.mac_mas.x64.manifest @@ -16,9 +16,7 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/ -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib -Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects.nib +Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/ diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index ebe585b88bd46..1c74cee891155 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -108,21 +108,34 @@ class DataPipeReader { // Note that the lifetime of the native buffer belongs to us, and we will // free memory when JS buffer gets garbage collected. v8::HandleScope handle_scope(promise_.isolate()); +#if defined(V8_SANDBOX) + v8::Local buffer = + node::Buffer::Copy(promise_.isolate(), &buffer_.front(), buffer_.size()) + .ToLocalChecked(); + promise_.Resolve(buffer); +#else v8::Local buffer = node::Buffer::New(promise_.isolate(), &buffer_.front(), buffer_.size(), &DataPipeReader::FreeBuffer, this) .ToLocalChecked(); promise_.Resolve(buffer); +#endif // Destroy data pipe. handle_watcher_.Cancel(); +#if defined(V8_SANDBOX) + delete this; +#else data_pipe_.reset(); data_pipe_getter_.reset(); +#endif } +#if !defined(V8_SANDBOX) static void FreeBuffer(char* data, void* self) { delete static_cast(self); } +#endif gin_helper::Promise> promise_; diff --git a/shell/browser/api/electron_api_global_shortcut.cc b/shell/browser/api/electron_api_global_shortcut.cc index e3daf615a6172..28a2b8413479e 100644 --- a/shell/browser/api/electron_api_global_shortcut.cc +++ b/shell/browser/api/electron_api_global_shortcut.cc @@ -9,7 +9,7 @@ #include "base/containers/contains.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/common/extensions/command.h" +#include "extensions/common/command.h" #include "gin/dictionary.h" #include "gin/object_template_builder.h" #include "shell/browser/api/electron_api_system_preferences.h" diff --git a/shell/browser/api/electron_api_web_contents_mac.mm b/shell/browser/api/electron_api_web_contents_mac.mm index b31c1f79b130f..8aa071e9b4335 100644 --- a/shell/browser/api/electron_api_web_contents_mac.mm +++ b/shell/browser/api/electron_api_web_contents_mac.mm @@ -54,7 +54,7 @@ - (void)redispatchKeyEvent:(NSEvent*)event; return false; // Send the event to the menu before sending it to the window - if (event.os_event.type == NSKeyDown && + if (event.os_event.type == NSEventTypeKeyDown && [[NSApp mainMenu] performKeyEquivalent:event.os_event]) return true; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 2cbd8065807fd..151fc8d17a758 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -277,9 +277,6 @@ int ElectronBrowserMainParts::PreCreateThreads() { #if defined(USE_AURA) screen_ = views::CreateDesktopScreen(); display::Screen::SetScreenInstance(screen_.get()); -#if BUILDFLAG(IS_LINUX) - views::LinuxUI::instance()->UpdateDeviceScaleFactor(); -#endif #endif if (!views::LayoutProvider::Get()) diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index a4b27a0fee7fd..f41683704d651 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -150,7 +150,7 @@ void ElectronPermissionManager::RequestPermissionWithDetails( StatusCallback response_callback) { RequestPermissionsWithDetails( std::vector(1, permission), render_frame_host, - requesting_origin, user_gesture, details, + user_gesture, details, base::BindOnce(PermissionRequestResponseCallbackWrapper, std::move(response_callback))); } @@ -161,15 +161,13 @@ void ElectronPermissionManager::RequestPermissions( const GURL& requesting_origin, bool user_gesture, StatusesCallback response_callback) { - RequestPermissionsWithDetails(permissions, render_frame_host, - requesting_origin, user_gesture, nullptr, - std::move(response_callback)); + RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, + nullptr, std::move(response_callback)); } void ElectronPermissionManager::RequestPermissionsWithDetails( const std::vector& permissions, content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, bool user_gesture, const base::DictionaryValue* details, StatusesCallback response_callback) { @@ -236,6 +234,16 @@ void ElectronPermissionManager::ResetPermission( const GURL& requesting_origin, const GURL& embedding_origin) {} +void ElectronPermissionManager::RequestPermissionsFromCurrentDocument( + const std::vector& permissions, + content::RenderFrameHost* render_frame_host, + bool user_gesture, + base::OnceCallback&)> + callback) { + RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, + nullptr, std::move(callback)); +} + blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( blink::PermissionType permission, const GURL& requesting_origin, @@ -351,18 +359,6 @@ void ElectronPermissionManager::RevokeDevicePermission( render_frame_host); } -blink::mojom::PermissionStatus -ElectronPermissionManager::GetPermissionStatusForFrame( - blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin) { - base::DictionaryValue details; - bool granted = CheckPermissionWithDetails(permission, render_frame_host, - requesting_origin, &details); - return granted ? blink::mojom::PermissionStatus::GRANTED - : blink::mojom::PermissionStatus::DENIED; -} - blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForCurrentDocument( blink::PermissionType permission, diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 10b9b820b0609..e2cd6655b8819 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -76,14 +76,10 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { void RequestPermissionsWithDetails( const std::vector& permissions, content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, bool user_gesture, const base::DictionaryValue* details, StatusesCallback callback); - blink::mojom::PermissionStatus GetPermissionStatusForFrame( - blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( blink::PermissionType permission, content::RenderFrameHost* render_frame_host) override; @@ -122,6 +118,13 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; + void RequestPermissionsFromCurrentDocument( + const std::vector& permissions, + content::RenderFrameHost* render_frame_host, + bool user_gesture, + base::OnceCallback< + void(const std::vector&)> callback) + override; blink::mojom::PermissionStatus GetPermissionStatusForWorker( blink::PermissionType permission, content::RenderProcessHost* render_process_host, diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 30a0935db736b..f286f25a9a5f6 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -4,6 +4,7 @@ #include "shell/browser/extensions/electron_extensions_browser_client.h" +#include #include #include "base/bind.h" @@ -297,7 +298,7 @@ ElectronExtensionsBrowserClient::GetComponentExtensionResourceManager() { void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( extensions::events::HistogramValue histogram_value, const std::string& event_name, - std::unique_ptr args, + base::Value::List args, bool dispatch_to_off_the_record_profiles) { if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { content::GetUIThreadTaskRunner({})->PostTask( @@ -309,8 +310,11 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( return; } - auto event = std::make_unique( - histogram_value, event_name, std::move(*args).TakeListDeprecated()); + std::vector event_args(args.size()); + std::transform(args.begin(), args.end(), event_args.begin(), + [](const base::Value& arg) { return arg.Clone(); }); + auto event = std::make_unique(histogram_value, event_name, + std::move(event_args)); auto& context_map = ElectronBrowserContext::browser_context_map(); for (auto const& entry : context_map) { if (entry.second) { diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index aaee2bd9845ef..7681112a75d7a 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -109,7 +109,7 @@ class ElectronExtensionsBrowserClient void BroadcastEventToRenderers( extensions::events::HistogramValue histogram_value, const std::string& event_name, - std::unique_ptr args, + base::Value::List args, bool dispatch_to_off_the_record_profiles) override; extensions::ExtensionCache* GetExtensionCache() override; bool IsBackgroundUpdateAllowed() override; diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 8b9c46c8d509a..02fe3d272567f 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -73,81 +73,6 @@ struct base::trace_event::TraceValue::Helper< namespace electron { -class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { - public: - enum InitializationPolicy { kZeroInitialize, kDontInitialize }; - - ArrayBufferAllocator() { - // Ref. - // https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/wtf/allocator/partitions.cc;l=94;drc=062c315a858a87f834e16a144c2c8e9591af2beb - allocator_->init({base::PartitionOptions::AlignedAlloc::kDisallowed, - base::PartitionOptions::ThreadCache::kDisabled, - base::PartitionOptions::Quarantine::kAllowed, - base::PartitionOptions::Cookie::kAllowed, - base::PartitionOptions::BackupRefPtr::kDisabled, - base::PartitionOptions::UseConfigurablePool::kNo}); - } - - // Allocate() methods return null to signal allocation failure to V8, which - // should respond by throwing a RangeError, per - // http://www.ecma-international.org/ecma-262/6.0/#sec-createbytedatablock. - void* Allocate(size_t size) override { - void* result = AllocateMemoryOrNull(size, kZeroInitialize); - return result; - } - - void* AllocateUninitialized(size_t size) override { - void* result = AllocateMemoryOrNull(size, kDontInitialize); - return result; - } - - void Free(void* data, size_t size) override { - allocator_->root()->Free(data); - } - - private: - static void* AllocateMemoryOrNull(size_t size, InitializationPolicy policy) { - return AllocateMemoryWithFlags(size, policy, - partition_alloc::AllocFlags::kReturnNull); - } - - static void* AllocateMemoryWithFlags(size_t size, - InitializationPolicy policy, - int flags) { - // The array buffer contents are sometimes expected to be 16-byte aligned in - // order to get the best optimization of SSE, especially in case of audio - // and video buffers. Hence, align the given size up to 16-byte boundary. - // Technically speaking, 16-byte aligned size doesn't mean 16-byte aligned - // address, but this heuristics works with the current implementation of - // PartitionAlloc (and PartitionAlloc doesn't support a better way for now). - if (base::kAlignment < - 16) { // base::kAlignment is a compile-time constant. - size_t aligned_size = base::bits::AlignUp(size, 16); - if (size == 0) { - aligned_size = 16; - } - if (aligned_size >= size) { // Only when no overflow - size = aligned_size; - } - } - - if (policy == kZeroInitialize) { - flags |= partition_alloc::AllocFlags::kZeroFill; - } - void* data = allocator_->root()->AllocWithFlags(flags, size, "Electron"); - if (base::kAlignment < 16) { - char* ptr = reinterpret_cast(data); - DCHECK_EQ(base::bits::AlignUp(ptr, 16), ptr) - << "Pointer " << ptr << " not 16B aligned for size " << size; - } - return data; - } - - static base::NoDestructor allocator_; -}; - -base::NoDestructor ArrayBufferAllocator::allocator_{}; - JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop) : isolate_(Initialize(event_loop)), isolate_holder_(base::ThreadTaskRunnerHandle::Get(), @@ -341,11 +266,12 @@ 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 */, js_flags, - nullptr /* fatal_error_callback */, nullptr /* oom_error_callback */, - false /* create_v8_platform */); + gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, + gin::ArrayBufferAllocator::SharedInstance(), + nullptr /* external_reference_table */, + js_flags, nullptr /* fatal_error_callback */, + nullptr /* oom_error_callback */, + false /* create_v8_platform */); v8::Isolate* isolate = v8::Isolate::Allocate(); platform_->RegisterIsolate(isolate, event_loop); diff --git a/shell/browser/media/media_capture_devices_dispatcher.cc b/shell/browser/media/media_capture_devices_dispatcher.cc index 84a2ad677551c..33ad8ebe0d6b1 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.cc +++ b/shell/browser/media/media_capture_devices_dispatcher.cc @@ -60,20 +60,20 @@ MediaCaptureDevicesDispatcher::GetVideoCaptureDevices() { void MediaCaptureDevicesDispatcher::GetDefaultDevices( bool audio, bool video, - blink::MediaStreamDevices* devices) { + blink::mojom::StreamDevices& devices) { // NOLINT(runtime/references) DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(audio || video); if (audio) { const blink::MediaStreamDevice* device = GetFirstAvailableAudioDevice(); if (device) - devices->push_back(*device); + devices.audio_device = *device; } if (video) { const blink::MediaStreamDevice* device = GetFirstAvailableVideoDevice(); if (device) - devices->push_back(*device); + devices.video_device = *device; } } diff --git a/shell/browser/media/media_capture_devices_dispatcher.h b/shell/browser/media/media_capture_devices_dispatcher.h index d7b0957e09f40..6b9dd746c633e 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.h +++ b/shell/browser/media/media_capture_devices_dispatcher.h @@ -11,6 +11,7 @@ #include "content/public/browser/media_observer.h" #include "content/public/browser/media_stream_request.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" +#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h" namespace electron { @@ -29,9 +30,10 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { // If the return list is empty, it means there is no available device on the // OS. // Called on the UI thread. - void GetDefaultDevices(bool audio, - bool video, - blink::MediaStreamDevices* devices); + void GetDefaultDevices( + bool audio, + bool video, + blink::mojom::StreamDevices& devices); // NOLINT(runtime/references) // Helpers for picking particular requested devices, identified by raw id. // If the device requested is not available it will return NULL. diff --git a/shell/browser/media/media_stream_devices_controller.cc b/shell/browser/media/media_stream_devices_controller.cc index 38a4e03153b80..c74f0c9ccfb61 100644 --- a/shell/browser/media/media_stream_devices_controller.cc +++ b/shell/browser/media/media_stream_devices_controller.cc @@ -45,7 +45,7 @@ MediaStreamDevicesController::MediaStreamDevicesController( MediaStreamDevicesController::~MediaStreamDevicesController() { if (!callback_.is_null()) { std::move(callback_).Run( - blink::MediaStreamDevices(), + blink::mojom::StreamDevices(), blink::mojom::MediaStreamRequestResult::FAILED_DUE_TO_SHUTDOWN, std::unique_ptr()); } @@ -77,7 +77,7 @@ bool MediaStreamDevicesController::TakeAction() { void MediaStreamDevicesController::Accept() { // Get the default devices for the request. - blink::MediaStreamDevices devices; + blink::mojom::StreamDevices stream_devices; if (microphone_requested_ || webcam_requested_) { switch (request_.request_type) { case blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY: { @@ -94,6 +94,8 @@ void MediaStreamDevicesController::Accept() { device = MediaCaptureDevicesDispatcher::GetInstance() ->GetFirstAvailableAudioDevice(); } + if (device) + stream_devices.audio_device = *device; } else if (request_.video_type == blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE) { // Pepper API opens only one device at a time. @@ -105,9 +107,9 @@ void MediaStreamDevicesController::Accept() { device = MediaCaptureDevicesDispatcher::GetInstance() ->GetFirstAvailableVideoDevice(); } + if (device) + stream_devices.video_device = *device; } - if (device) - devices.push_back(*device); break; } case blink::MEDIA_GENERATE_STREAM: { @@ -120,7 +122,7 @@ void MediaStreamDevicesController::Accept() { MediaCaptureDevicesDispatcher::GetInstance() ->GetRequestedAudioDevice(request_.requested_audio_device_id); if (audio_device) { - devices.push_back(*audio_device); + stream_devices.audio_device = *audio_device; needs_audio_device = false; } } @@ -129,7 +131,7 @@ void MediaStreamDevicesController::Accept() { MediaCaptureDevicesDispatcher::GetInstance() ->GetRequestedVideoDevice(request_.requested_video_device_id); if (video_device) { - devices.push_back(*video_device); + stream_devices.video_device = *video_device; needs_video_device = false; } } @@ -138,14 +140,14 @@ void MediaStreamDevicesController::Accept() { // specified by id, get the default devices. if (needs_audio_device || needs_video_device) { MediaCaptureDevicesDispatcher::GetInstance()->GetDefaultDevices( - needs_audio_device, needs_video_device, &devices); + needs_audio_device, needs_video_device, stream_devices); } break; } case blink::MEDIA_DEVICE_ACCESS: { // Get the default devices for the request. MediaCaptureDevicesDispatcher::GetInstance()->GetDefaultDevices( - microphone_requested_, webcam_requested_, &devices); + microphone_requested_, webcam_requested_, stream_devices); break; } case blink::MEDIA_DEVICE_UPDATE: { @@ -154,40 +156,41 @@ void MediaStreamDevicesController::Accept() { } case blink::MEDIA_GET_OPEN_DEVICE: { // Transferred tracks, that use blink::MEDIA_GET_OPEN_DEVICE type, do - // not need to get permissions for MediaStreamDevice as those are - // controlled by the original context. + // not need to get permissions for blink::mojom::StreamDevices as those + // are controlled by the original context. NOTREACHED(); break; } } } - std::move(callback_).Run(devices, blink::mojom::MediaStreamRequestResult::OK, + std::move(callback_).Run(stream_devices, + blink::mojom::MediaStreamRequestResult::OK, std::unique_ptr()); } void MediaStreamDevicesController::Deny( blink::mojom::MediaStreamRequestResult result) { - std::move(callback_).Run(blink::MediaStreamDevices(), result, + std::move(callback_).Run(blink::mojom::StreamDevices(), result, std::unique_ptr()); } void MediaStreamDevicesController::HandleUserMediaRequest() { - blink::MediaStreamDevices devices; + blink::mojom::StreamDevices devices; if (request_.audio_type == blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE) { - devices.emplace_back(blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE, - "", ""); + devices.audio_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE, "", ""); } if (request_.video_type == blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE) { - devices.emplace_back(blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE, - "", ""); + devices.video_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE, "", ""); } if (request_.audio_type == blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE) { - devices.emplace_back( + devices.audio_device = blink::MediaStreamDevice( blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE, "loopback", "System Audio"); } @@ -204,15 +207,17 @@ void MediaStreamDevicesController::HandleUserMediaRequest() { content::DesktopMediaID::Parse(request_.requested_video_device_id); } - devices.emplace_back( + devices.video_device = blink::MediaStreamDevice( blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE, screen_id.ToString(), "Screen"); } + bool empty = + !devices.audio_device.has_value() && !devices.video_device.has_value(); std::move(callback_).Run( devices, - devices.empty() ? blink::mojom::MediaStreamRequestResult::NO_HARDWARE - : blink::mojom::MediaStreamRequestResult::OK, + empty ? blink::mojom::MediaStreamRequestResult::NO_HARDWARE + : blink::mojom::MediaStreamRequestResult::OK, std::unique_ptr()); } diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index d236ca72aa1a5..1563a7b2cf09c 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -302,13 +302,13 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { styleMask = 0; if (minimizable) - styleMask |= NSMiniaturizableWindowMask; + styleMask |= NSWindowStyleMaskMiniaturizable; if (closable) styleMask |= NSWindowStyleMaskClosable; if (resizable) - styleMask |= NSResizableWindowMask; + styleMask |= NSWindowStyleMaskResizable; if (!useStandardWindow || transparent() || !has_frame()) - styleMask |= NSTexturedBackgroundWindowMask; + styleMask |= NSWindowStyleMaskTexturedBackground; // Create views::Widget and assign window_ with it. // TODO(zcbenz): Get rid of the window_ in future. @@ -841,11 +841,11 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } void NativeWindowMac::SetMinimizable(bool minimizable) { - SetStyleMask(minimizable, NSMiniaturizableWindowMask); + SetStyleMask(minimizable, NSWindowStyleMaskMiniaturizable); } bool NativeWindowMac::IsMinimizable() { - return [window_ styleMask] & NSMiniaturizableWindowMask; + return [window_ styleMask] & NSWindowStyleMaskMiniaturizable; } void NativeWindowMac::SetMaximizable(bool maximizable) { @@ -901,9 +901,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { level = NSPopUpMenuWindowLevel; } else if (level_name == "screen-saver") { level = NSScreenSaverWindowLevel; - } else if (level_name == "dock") { - // Deprecated by macOS, but kept for backwards compatibility - level = NSDockWindowLevel; } SetWindowLevel(level + relative_level); @@ -927,8 +924,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { level_name = "pop-up-menu"; } else if (level == NSScreenSaverWindowLevel) { level_name = "screen-saver"; - } else if (level == NSDockWindowLevel) { - level_name = "dock"; } return level_name; diff --git a/shell/browser/net/asar/asar_url_loader.cc b/shell/browser/net/asar/asar_url_loader.cc index 684aadc0897fc..eadfc5af789a7 100644 --- a/shell/browser/net/asar/asar_url_loader.cc +++ b/shell/browser/net/asar/asar_url_loader.cc @@ -269,9 +269,7 @@ class AsarURLLoader : public network::mojom::URLLoader { head->headers->AddHeader(net::HttpRequestHeaders::kContentType, head->mime_type.c_str()); } - client_->OnReceiveResponse(std::move(head), - mojo::ScopedDataPipeConsumerHandle()); - client_->OnStartLoadingResponseBody(std::move(consumer_handle)); + client_->OnReceiveResponse(std::move(head), std::move(consumer_handle)); if (total_bytes_to_send == 0) { // There's definitely no more data, so we're already done. diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index eb7b97952fcd0..02a93aae14bcb 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -554,13 +554,6 @@ void ElectronURLLoaderFactory::StartLoadingStream( } else if (stream->IsNullOrUndefined()) { mojo::Remote client_remote( std::move(client)); - // "data" was explicitly passed as null or undefined, assume the user wants - // to send an empty body. - // - // Note that We must submit a empty body otherwise NetworkService would - // crash. - client_remote->OnReceiveResponse(std::move(head), - mojo::ScopedDataPipeConsumerHandle()); mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; if (mojo::CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) { @@ -568,8 +561,13 @@ void ElectronURLLoaderFactory::StartLoadingStream( network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES)); return; } + // "data" was explicitly passed as null or undefined, assume the user wants + // to send an empty body. + // + // Note that We must submit a empty body otherwise NetworkService would + // crash. + client_remote->OnReceiveResponse(std::move(head), std::move(consumer)); producer.reset(); // The data pipe is empty. - client_remote->OnStartLoadingResponseBody(std::move(consumer)); client_remote->OnComplete(network::URLLoaderCompletionStatus(net::OK)); return; } else if (!stream->IsObject()) { @@ -605,8 +603,6 @@ void ElectronURLLoaderFactory::SendContents( // Add header to ignore CORS. head->headers->AddHeader("Access-Control-Allow-Origin", "*"); - client_remote->OnReceiveResponse(std::move(head), - mojo::ScopedDataPipeConsumerHandle()); // Code below follows the pattern of data_url_loader_factory.cc. mojo::ScopedDataPipeProducerHandle producer; @@ -617,7 +613,7 @@ void ElectronURLLoaderFactory::SendContents( return; } - client_remote->OnStartLoadingResponseBody(std::move(consumer)); + client_remote->OnReceiveResponse(std::move(head), std::move(consumer)); auto write_data = std::make_unique(); write_data->client = std::move(client_remote); diff --git a/shell/browser/net/node_stream_loader.cc b/shell/browser/net/node_stream_loader.cc index 74ec0e0f295f7..2cd93a2d63d1d 100644 --- a/shell/browser/net/node_stream_loader.cc +++ b/shell/browser/net/node_stream_loader.cc @@ -58,9 +58,7 @@ void NodeStreamLoader::Start(network::mojom::URLResponseHeadPtr head) { } producer_ = std::make_unique(std::move(producer)); - client_->OnReceiveResponse(std::move(head), - mojo::ScopedDataPipeConsumerHandle()); - client_->OnStartLoadingResponseBody(std::move(consumer)); + client_->OnReceiveResponse(std::move(head), std::move(consumer)); auto weak = weak_factory_.GetWeakPtr(); On("end", diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index 3cb8a384fdad4..49b728631a059 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -300,11 +300,6 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnTransferSizeUpdated( target_client_->OnTransferSizeUpdated(transfer_size_diff); } -void ProxyingURLLoaderFactory::InProgressRequest::OnStartLoadingResponseBody( - mojo::ScopedDataPipeConsumerHandle body) { - target_client_->OnStartLoadingResponseBody(std::move(body)); -} - void ProxyingURLLoaderFactory::InProgressRequest::OnComplete( const network::URLLoaderCompletionStatus& status) { if (status.error_code != net::OK) { diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index f4456a0ee0f67..edee0a3ee31a1 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/shell/browser/net/proxying_url_loader_factory.h @@ -97,8 +97,6 @@ class ProxyingURLLoaderFactory OnUploadProgressCallback callback) override; void OnReceiveCachedMetadata(mojo_base::BigBuffer data) override; void OnTransferSizeUpdated(int32_t transfer_size_diff) override; - void OnStartLoadingResponseBody( - mojo::ScopedDataPipeConsumerHandle body) override; void OnComplete(const network::URLLoaderCompletionStatus& status) override; void OnLoaderCreated( diff --git a/shell/browser/net/url_pipe_loader.cc b/shell/browser/net/url_pipe_loader.cc index b55dc3963dcfb..63895e6e3d03d 100644 --- a/shell/browser/net/url_pipe_loader.cc +++ b/shell/browser/net/url_pipe_loader.cc @@ -70,9 +70,7 @@ void URLPipeLoader::OnResponseStarted( producer_ = std::make_unique(std::move(producer)); - client_->OnReceiveResponse(response_head.Clone(), - mojo::ScopedDataPipeConsumerHandle()); - client_->OnStartLoadingResponseBody(std::move(consumer)); + client_->OnReceiveResponse(response_head.Clone(), std::move(consumer)); } void URLPipeLoader::OnWrite(base::OnceClosure resume, MojoResult result) { diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 82ff89a30dbf5..fbf72675bb5a8 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -82,19 +82,19 @@ ui::MouseEvent UiMouseEventFromWebMouseEvent(blink::WebMouseEvent event) { int button_flags = 0; switch (event.button) { case blink::WebMouseEvent::Button::kBack: - button_flags |= ui::EventFlags::EF_BACK_MOUSE_BUTTON; + button_flags |= ui::EF_BACK_MOUSE_BUTTON; break; case blink::WebMouseEvent::Button::kForward: - button_flags |= ui::EventFlags::EF_FORWARD_MOUSE_BUTTON; + button_flags |= ui::EF_FORWARD_MOUSE_BUTTON; break; case blink::WebMouseEvent::Button::kLeft: - button_flags |= ui::EventFlags::EF_LEFT_MOUSE_BUTTON; + button_flags |= ui::EF_LEFT_MOUSE_BUTTON; break; case blink::WebMouseEvent::Button::kMiddle: - button_flags |= ui::EventFlags::EF_MIDDLE_MOUSE_BUTTON; + button_flags |= ui::EF_MIDDLE_MOUSE_BUTTON; break; case blink::WebMouseEvent::Button::kRight: - button_flags |= ui::EventFlags::EF_RIGHT_MOUSE_BUTTON; + button_flags |= ui::EF_RIGHT_MOUSE_BUTTON; break; default: button_flags = 0; diff --git a/shell/browser/osr/osr_web_contents_view_mac.mm b/shell/browser/osr/osr_web_contents_view_mac.mm index 691b1d52e427b..919bec712feb3 100644 --- a/shell/browser/osr/osr_web_contents_view_mac.mm +++ b/shell/browser/osr/osr_web_contents_view_mac.mm @@ -15,7 +15,7 @@ - (void)drawRect:(NSRect)dirtyRect { NSString* str = @"No content under offscreen mode"; NSMutableParagraphStyle* paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; - [paragraphStyle setAlignment:NSCenterTextAlignment]; + [paragraphStyle setAlignment:NSTextAlignmentCenter]; NSDictionary* attributes = [NSDictionary dictionaryWithObject:paragraphStyle forKey:NSParagraphStyleAttributeName]; diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index d1ba8734d368b..57a169a5f39bb 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -226,7 +226,7 @@ void PrintPreviewMessageHandler::PrintToPDF( print_render_frame_->SetPrintPreviewUI( receiver_.BindNewEndpointAndPassRemote()); } - print_render_frame_->PrintPreview(options.Clone()); + print_render_frame_->PrintPreview(options.GetDict().Clone()); } gin_helper::Promise> 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 3f86dca5158e5..d223c823ca297 100644 --- a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm +++ b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm @@ -176,8 +176,9 @@ - (void)setIsDocked:(BOOL)docked activate:(BOOL)activate { auto devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView(); if (!docked) { auto styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | - NSMiniaturizableWindowMask | NSWindowStyleMaskResizable | - NSTexturedBackgroundWindowMask | + NSWindowStyleMaskMiniaturizable | + NSWindowStyleMaskResizable | + NSWindowStyleMaskTexturedBackground | NSWindowStyleMaskUnifiedTitleAndToolbar; devtools_window_.reset([[EventDispatchingWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 9d5633a0f95b8..2467be47424f4 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -70,7 +70,7 @@ - (NSRect)windowWillUseStandardFrame:(NSWindow*)window } // If the shift key is down, maximize. - if ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) + if ([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagShift) return frame; // Get preferred width from observers. Usually the page width. diff --git a/shell/browser/ui/cocoa/event_dispatching_window.mm b/shell/browser/ui/cocoa/event_dispatching_window.mm index b98e547730473..16273b6c4a3a0 100644 --- a/shell/browser/ui/cocoa/event_dispatching_window.mm +++ b/shell/browser/ui/cocoa/event_dispatching_window.mm @@ -20,8 +20,8 @@ - (BOOL)performKeyEquivalent:(NSEvent*)event { - (void)redispatchKeyEvent:(NSEvent*)event { NSEventType eventType = [event type]; - if (eventType != NSKeyDown && eventType != NSKeyUp && - eventType != NSFlagsChanged) { + if (eventType != NSEventTypeKeyDown && eventType != NSEventTypeKeyUp && + eventType != NSEventTypeFlagsChanged) { return; } diff --git a/shell/browser/ui/drag_util_mac.mm b/shell/browser/ui/drag_util_mac.mm index 811a0c8d103b1..85dc09d64dc67 100644 --- a/shell/browser/ui/drag_util_mac.mm +++ b/shell/browser/ui/drag_util_mac.mm @@ -30,7 +30,8 @@ void AddFilesToPasteboard(NSPasteboard* pasteboard, void DragFileItems(const std::vector& files, const gfx::Image& icon, gfx::NativeView view) { - NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard]; + NSPasteboard* pasteboard = + [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; AddFilesToPasteboard(pasteboard, files); // Synthesize a drag event, since we don't have access to the actual event @@ -38,9 +39,9 @@ void DragFileItems(const std::vector& files, NSWindow* window = [view.GetNativeNSView() window]; NSPoint position = [window mouseLocationOutsideOfEventStream]; NSTimeInterval eventTime = [[NSApp currentEvent] timestamp]; - NSEvent* dragEvent = [NSEvent mouseEventWithType:NSLeftMouseDragged + NSEvent* dragEvent = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDragged location:position - modifierFlags:NSLeftMouseDraggedMask + modifierFlags:NSEventMaskLeftMouseDragged timestamp:eventTime windowNumber:[window windowNumber] context:nil diff --git a/shell/browser/ui/file_dialog_mac.mm b/shell/browser/ui/file_dialog_mac.mm index 00c88c9bfe84a..fa7cfa424ef07 100644 --- a/shell/browser/ui/file_dialog_mac.mm +++ b/shell/browser/ui/file_dialog_mac.mm @@ -232,7 +232,7 @@ void SetupSaveDialogForProperties(NSSavePanel* dialog, int properties) { // Run modal dialog with parent window and return user's choice. int RunModalDialog(NSSavePanel* dialog, const DialogSettings& settings) { - __block int chosen = NSFileHandlingPanelCancelButton; + __block int chosen = NSModalResponseCancel; if (!settings.parent_window || !settings.parent_window->GetNativeWindow() || settings.force_detached) { chosen = [dialog runModal]; @@ -324,7 +324,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings, SetupOpenDialogForProperties(dialog, settings.properties); int chosen = RunModalDialog(dialog, settings); - if (chosen == NSFileHandlingPanelCancelButton) + if (chosen == NSModalResponseCancel) return false; ReadDialogPaths(dialog, paths); @@ -337,7 +337,7 @@ void OpenDialogCompletion(int chosen, gin_helper::Promise promise) { v8::HandleScope scope(promise.isolate()); gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(promise.isolate()); - if (chosen == NSFileHandlingPanelCancelButton) { + if (chosen == NSModalResponseCancel) { dict.Set("canceled", true); dict.Set("filePaths", std::vector()); #if defined(MAS_BUILD) @@ -402,7 +402,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) { SetupSaveDialogForProperties(dialog, settings.properties); int chosen = RunModalDialog(dialog, settings); - if (chosen == NSFileHandlingPanelCancelButton || ![[dialog URL] isFileURL]) + if (chosen == NSModalResponseCancel || ![[dialog URL] isFileURL]) return false; *path = base::FilePath(base::SysNSStringToUTF8([[dialog URL] path])); @@ -415,7 +415,7 @@ void SaveDialogCompletion(int chosen, gin_helper::Promise promise) { v8::HandleScope scope(promise.isolate()); gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(promise.isolate()); - if (chosen == NSFileHandlingPanelCancelButton) { + if (chosen == NSModalResponseCancel) { dict.Set("canceled", true); dict.Set("filePath", base::FilePath()); #if defined(MAS_BUILD) diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index 7af541819db5d..9ab03a0472eae 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -45,14 +45,14 @@ switch (settings.type) { case MessageBoxType::kInformation: - alert.alertStyle = NSInformationalAlertStyle; + alert.alertStyle = NSAlertStyleInformational; break; case MessageBoxType::kWarning: case MessageBoxType::kError: - // NSWarningAlertStyle shows the app icon while NSCriticalAlertStyle + // NSWarningAlertStyle shows the app icon while NSAlertStyleCritical // shows a warning icon with an app icon badge. Since there is no - // error variant, lets just use NSCriticalAlertStyle. - alert.alertStyle = NSCriticalAlertStyle; + // error variant, lets just use NSAlertStyleCritical. + alert.alertStyle = NSAlertStyleCritical; break; default: break; @@ -198,7 +198,7 @@ void ShowErrorBox(const std::u16string& title, const std::u16string& content) { NSAlert* alert = [[NSAlert alloc] init]; [alert setMessageText:base::SysUTF16ToNSString(title)]; [alert setInformativeText:base::SysUTF16ToNSString(content)]; - [alert setAlertStyle:NSCriticalAlertStyle]; + [alert setAlertStyle:NSAlertStyleCritical]; [alert runModal]; [alert release]; } diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index a5e8067968583..2a085d04d6af5 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -31,6 +31,7 @@ #include "ui/views/style/typography.h" #include "ui/views/widget/widget.h" #include "ui/views/window/frame_buttons.h" +#include "ui/views/window/window_button_order_provider.h" namespace electron { @@ -83,11 +84,16 @@ ClientFrameViewLinux::ClientFrameViewLinux() AddChildView(title_); native_theme_observer_.Observe(theme_); - window_button_order_observer_.Observe(views::LinuxUI::instance()); + + if (views::LinuxUI* ui = views::LinuxUI::instance()) { + ui->AddWindowButtonOrderObserver(this); + OnWindowButtonOrderingChange(); + } } ClientFrameViewLinux::~ClientFrameViewLinux() { - views::LinuxUI::instance()->RemoveWindowButtonOrderObserver(this); + if (views::LinuxUI* ui = views::LinuxUI::instance()) + ui->RemoveWindowButtonOrderObserver(this); theme_->RemoveObserver(this); } @@ -159,11 +165,10 @@ void ClientFrameViewLinux::OnNativeThemeUpdated( UpdateThemeValues(); } -void ClientFrameViewLinux::OnWindowButtonOrderingChange( - const std::vector& leading_buttons, - const std::vector& trailing_buttons) { - leading_frame_buttons_ = leading_buttons; - trailing_frame_buttons_ = trailing_buttons; +void ClientFrameViewLinux::OnWindowButtonOrderingChange() { + auto* provider = views::WindowButtonOrderProvider::GetInstance(); + leading_frame_buttons_ = provider->leading_buttons(); + trailing_frame_buttons_ = provider->trailing_buttons(); InvalidateLayout(); } diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index 404c0e6b7db91..360b11b3ed163 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -45,9 +45,7 @@ class ClientFrameViewLinux : public FramelessView, void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; // views::WindowButtonOrderObserver: - void OnWindowButtonOrderingChange( - const std::vector& leading_buttons, - const std::vector& trailing_buttons) override; + void OnWindowButtonOrderingChange() override; // Overriden from FramelessView: int ResizingBorderHitTest(const gfx::Point& point) override; diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 0dbda357a755c..7fffb3c08a0a1 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -271,9 +271,11 @@ std::string NativeImage::ToDataURL(gin::Arguments* args) { image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap()); } +#if !defined(V8_SANDBOX) void SkUnref(char* data, void* hint) { reinterpret_cast(hint)->unref(); } +#endif v8::Local NativeImage::GetBitmap(gin::Arguments* args) { float scale_factor = GetScaleFactorFromOptions(args); @@ -283,11 +285,18 @@ v8::Local NativeImage::GetBitmap(gin::Arguments* args) { SkPixelRef* ref = bitmap.pixelRef(); if (!ref) return node::Buffer::New(args->isolate(), 0).ToLocalChecked(); +#if defined(V8_SANDBOX) + return node::Buffer::Copy(args->isolate(), + reinterpret_cast(ref->pixels()), + bitmap.computeByteSize()) + .ToLocalChecked(); +#else ref->ref(); return node::Buffer::New(args->isolate(), reinterpret_cast(ref->pixels()), bitmap.computeByteSize(), &SkUnref, ref) .ToLocalChecked(); +#endif } v8::Local NativeImage::GetNativeHandle( diff --git a/spec-main/api-session-spec.ts b/spec-main/api-session-spec.ts index 53a637bf86f60..15c3cf8206031 100644 --- a/spec-main/api-session-spec.ts +++ b/spec-main/api-session-spec.ts @@ -216,7 +216,8 @@ describe('session module', () => { }); }); - it('should survive an app restart for persistent partition', async () => { + it('should survive an app restart for persistent partition', async function () { + this.timeout(60000); const appPath = path.join(fixtures, 'api', 'cookie-app'); const runAppWithPhase = (phase: string) => { diff --git a/spec/fixtures/api/cookie-app/main.js b/spec/fixtures/api/cookie-app/main.js index dc10bb8c5dcb4..db762f632257e 100644 --- a/spec/fixtures/api/cookie-app/main.js +++ b/spec/fixtures/api/cookie-app/main.js @@ -10,7 +10,7 @@ app.whenReady().then(async function () { url, name, value, - expirationDate: Date.now() + 60000, + expirationDate: Math.floor((Date.now() + 60000) / 1000), sameSite: 'strict' }); From df91dd6d2b9ec3fafdf3dbe83ecbd5c663984b45 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 06:02:01 -0700 Subject: [PATCH 435/811] Bump v21.0.0-nightly.20220601 --- 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 7085745b647a1..f732489a7a489 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220531 \ No newline at end of file +21.0.0-nightly.20220601 \ No newline at end of file diff --git a/package.json b/package.json index 23f3239067292..ea8b5047517ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220531", + "version": "21.0.0-nightly.20220601", "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 2ab0cf4c6a7f6..11975cee4f07e 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 21,0,0,20220531 - PRODUCTVERSION 21,0,0,20220531 + FILEVERSION 21,0,0,20220601 + PRODUCTVERSION 21,0,0,20220601 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cda8f3c15cac770142025cc3818ab8f069468aa1 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 08:28:12 -0700 Subject: [PATCH 436/811] Revert "Bump v21.0.0-nightly.20220601" This reverts commit df91dd6d2b9ec3fafdf3dbe83ecbd5c663984b45. --- 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 f732489a7a489..7085745b647a1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220601 \ No newline at end of file +21.0.0-nightly.20220531 \ No newline at end of file diff --git a/package.json b/package.json index ea8b5047517ee..23f3239067292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220601", + "version": "21.0.0-nightly.20220531", "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 11975cee4f07e..2ab0cf4c6a7f6 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 21,0,0,20220601 - PRODUCTVERSION 21,0,0,20220601 + FILEVERSION 21,0,0,20220531 + PRODUCTVERSION 21,0,0,20220531 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a38e5d20ff0ffa9cd2875e95755b1ce4be0ebb83 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 1 Jun 2022 12:59:26 -0400 Subject: [PATCH 437/811] ci: cache python install to better deal with download errors. (#34360) * ci: cache python install to better deal with download errors. * chore: use our CDN to download python2 * build: DRY up the python install steps Co-authored-by: Samuel Attard --- .circleci/config/base.yml | 40 +++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index a579069c96e93..c37b1ecd67a0a 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -527,15 +527,6 @@ step-install-gnutar-on-mac: &step-install-gnutar-on-mac ln -fs /usr/local/bin/gtar /usr/local/bin/tar fi -step-install-python2-on-mac: &step-install-python2-on-mac - run: - name: Install python2 on macos - command: | - if [ "`uname`" == "Darwin" ]; then - curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg - sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / - fi - step-gn-gen-default: &step-gn-gen-default run: name: Default GN gen @@ -1011,7 +1002,7 @@ steps-electron-gn-check: &steps-electron-gn-check - *step-checkout-electron - *step-depot-tools-get - *step-depot-tools-add-to-path - - *step-install-python2-on-mac + - install-python2-mac - *step-setup-env-for-build - *step-setup-goma-for-build - *step-generate-deps-hash @@ -1130,6 +1121,31 @@ steps-test-node: &steps-test-node # Command Aliases commands: + install-python2-mac: + steps: + - restore_cache: + keys: + - v2.7.18-python-cache-{{ arch }} + name: Restore python cache + - run: + name: Install python2 on macos + command: | + if [ "`uname`" == "Darwin" ]; then + if [ ! -f "python-downloads/python-2.7.18-macosx10.9.pkg" ]; then + mkdir python-downloads + echo 'Downloading Python 2.7.18' + curl -O https://dev-cdn.electronjs.org/python/python-2.7.18-macosx10.9.pkg + mv python-2.7.18-macosx10.9.pkg python-downloads + else + echo 'Using Python install from cache' + fi + sudo installer -pkg python-downloads/python-2.7.18-macosx10.9.pkg -target / + fi + - save_cache: + paths: + - python-downloads + key: v2.7.18-python-cache-{{ arch }} + name: Persisting python cache maybe-restore-portaled-src-cache: parameters: halt-if-successful: @@ -1296,7 +1312,7 @@ commands: - run: rm -rf src/electron - *step-restore-brew-cache - *step-install-gnutar-on-mac - - *step-install-python2-on-mac + - install-python2-mac - *step-save-brew-cache - when: condition: << parameters.build >> @@ -1488,7 +1504,7 @@ commands: - *step-depot-tools-get - *step-depot-tools-add-to-path - *step-restore-brew-cache - - *step-install-python2-on-mac + - install-python2-mac - *step-get-more-space-on-mac - when: condition: << parameters.checkout >> From 561be723736c6e677ebd20bbf582f797f09b8d92 Mon Sep 17 00:00:00 2001 From: Naoki Maeda <33103552+Maeda-Naoki@users.noreply.github.com> Date: Thu, 2 Jun 2022 02:00:48 +0900 Subject: [PATCH 438/811] chore: update husky to v8.0.1 (#34343) * chore: update husky v8.0.1 * chore: remove unnecessary .husky/.gitignore ref : https://github.com/typicode/husky/releases/tag/v7.0.0 * chore: add ^ prefix for husky version * chore: update yarn.lock Co-authored-by: Cheng Zhao --- .husky/.gitignore | 1 - package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .husky/.gitignore diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec138999..0000000000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/package.json b/package.json index 23f3239067292..8bc6babe6fe0f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "folder-hash": "^2.1.1", "fs-extra": "^9.0.1", "got": "^6.3.0", - "husky": "^6.0.0", + "husky": "^8.0.1", "klaw": "^3.0.0", "lint": "^1.1.2", "lint-staged": "^10.2.11", diff --git a/yarn.lock b/yarn.lock index 226aae6f5b92c..2cf78d42fb160 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3598,10 +3598,10 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -husky@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" - integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== +husky@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" + integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" From 5057cbf418c8d1c32ff228c80b5222873970b010 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:32:32 -0700 Subject: [PATCH 439/811] Bump v21.0.0-nightly.20220601 --- 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 7085745b647a1..f732489a7a489 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220531 \ No newline at end of file +21.0.0-nightly.20220601 \ No newline at end of file diff --git a/package.json b/package.json index 8bc6babe6fe0f..c49e9fdbc588d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220531", + "version": "21.0.0-nightly.20220601", "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 2ab0cf4c6a7f6..11975cee4f07e 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 21,0,0,20220531 - PRODUCTVERSION 21,0,0,20220531 + FILEVERSION 21,0,0,20220601 + PRODUCTVERSION 21,0,0,20220601 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f306fbc01056256864d49be4ddff882245662cdf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 14:31:30 -0700 Subject: [PATCH 440/811] Revert "Bump v21.0.0-nightly.20220601" This reverts commit 5057cbf418c8d1c32ff228c80b5222873970b010. --- 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 f732489a7a489..7085745b647a1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220601 \ No newline at end of file +21.0.0-nightly.20220531 \ No newline at end of file diff --git a/package.json b/package.json index c49e9fdbc588d..8bc6babe6fe0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220601", + "version": "21.0.0-nightly.20220531", "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 11975cee4f07e..2ab0cf4c6a7f6 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 21,0,0,20220601 - PRODUCTVERSION 21,0,0,20220601 + FILEVERSION 21,0,0,20220531 + PRODUCTVERSION 21,0,0,20220531 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1cd07c565a87ced6a923ade76eda380367e5ce1f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 1 Jun 2022 16:03:04 -0700 Subject: [PATCH 441/811] fix: crash in WebFrameMain mojo connection when RenderFrameHost is nullptr (#34411) * fix: crash when RenderFrameHost is nullptr * chore: lint fix Co-authored-by: samuelmaddock --- shell/browser/api/electron_api_web_frame_main.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index f8bc7c9efcd11..065150fbf3e82 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -193,8 +193,13 @@ void WebFrameMain::MaybeSetupMojoConnection() { renderer_api_.set_disconnect_handler(base::BindOnce( &WebFrameMain::OnRendererConnectionError, weak_factory_.GetWeakPtr())); } + + // Render frame should exist when this method is called. + DCHECK(render_frame_); + // Wait for RenderFrame to be created in renderer before accessing remote. - if (pending_receiver_ && render_frame_->IsRenderFrameCreated()) { + if (pending_receiver_ && render_frame_ && + render_frame_->IsRenderFrameCreated()) { render_frame_->GetRemoteInterfaces()->GetInterface( std::move(pending_receiver_)); } From eb9888d1d29406a999aed128fde93b601c4b31f0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 2 Jun 2022 06:01:23 -0700 Subject: [PATCH 442/811] Bump v21.0.0-nightly.20220602 --- 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 7085745b647a1..f8900231e1a68 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220531 \ No newline at end of file +21.0.0-nightly.20220602 \ No newline at end of file diff --git a/package.json b/package.json index 8bc6babe6fe0f..6c210f8629165 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220531", + "version": "21.0.0-nightly.20220602", "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 2ab0cf4c6a7f6..561d42ca8fa58 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 21,0,0,20220531 - PRODUCTVERSION 21,0,0,20220531 + FILEVERSION 21,0,0,20220602 + PRODUCTVERSION 21,0,0,20220602 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 000c3d981ce3b5c03e478f8c92a1506625ed06ed Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 2 Jun 2022 09:01:33 -0700 Subject: [PATCH 443/811] build: disable 32-bit Windows symbol generation (#34412) --- appveyor.yml | 9 ++++++--- script/release/release.js | 5 +++-- script/release/uploaders/upload.py | 14 ++++++++------ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 25aeea817e440..216999f6cf713 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -180,16 +180,19 @@ build_script: - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - 7z a node_headers.zip out\Default\gen\node_headers + # Temporarily disable symbol generation on 32-bit Windows due to failures - ps: >- - if ($env:GN_CONFIG -eq 'release') { + if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { # Needed for msdia140.dll on 64-bit windows $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" ninja -C out/Default electron:electron_symbols } - ps: >- if ($env:GN_CONFIG -eq 'release') { - python electron\script\zip-symbols.py - appveyor-retry appveyor PushArtifact out/Default/symbols.zip + if ($env:TARGET_ARCH -ne 'ia32') { + python electron\script\zip-symbols.py + appveyor-retry appveyor PushArtifact out/Default/symbols.zip + } } else { # It's useful to have pdb files when debugging testing builds that are # built on CI. diff --git a/script/release/release.js b/script/release/release.js index c3c8d6363b120..e89d7ba920245 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -128,8 +128,9 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-mas-arm64-dsym-snapshot.zip`, `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, - `electron-${version}-win32-ia32-pdb.zip`, - `electron-${version}-win32-ia32-symbols.zip`, + // TODO(vertedinde) Symbol generation on 32-bit Windows is temporarily disabled due to CI failures + // `electron-${version}-win32-ia32-pdb.zip`, + // `electron-${version}-win32-ia32-symbols.zip`, `electron-${version}-win32-ia32.zip`, `electron-${version}-win32-x64-pdb.zip`, `electron-${version}-win32-x64-symbols.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index a73955786e47c..69c4bbfa5720d 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -76,9 +76,10 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip) upload_electron(release, electron_zip, args) if get_target_arch() != 'mips64el': - symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) - upload_electron(release, symbols_zip, args) + if (get_target_arch() != 'ia32' or PLATFORM != 'win32'): + symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) + upload_electron(release, symbols_zip, args) if PLATFORM == 'darwin': if get_platform_key() == 'darwin' and get_target_arch() == 'x64': api_path = os.path.join(ELECTRON_DIR, 'electron-api.json') @@ -95,9 +96,10 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip) upload_electron(release, dsym_snaphot_zip, args) elif PLATFORM == 'win32': - pdb_zip = os.path.join(OUT_DIR, PDB_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) - upload_electron(release, pdb_zip, args) + if get_target_arch() != 'ia32': + pdb_zip = os.path.join(OUT_DIR, PDB_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) + upload_electron(release, pdb_zip, args) elif PLATFORM == 'linux': debug_zip = os.path.join(OUT_DIR, DEBUG_NAME) shutil.copy2(os.path.join(OUT_DIR, 'debug.zip'), debug_zip) From 539a53786c591f0f2009ebcdb5b045ad6e13bd80 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 2 Jun 2022 20:43:40 +0200 Subject: [PATCH 444/811] chore: remove redundant @available checks (#34407) * chore: require macOS 10.13 for Chromium * chore: fix lint --- .../electron_api_system_preferences_mac.mm | 96 +++++++++---------- .../mac/electron_application_delegate.mm | 34 ------- shell/browser/mac/in_app_purchase_product.mm | 8 +- shell/browser/native_window_mac.mm | 59 ++++-------- .../ui/cocoa/electron_menu_controller.mm | 6 +- shell/browser/ui/cocoa/electron_ns_window.mm | 2 +- .../ui/cocoa/electron_ns_window_delegate.mm | 3 +- shell/browser/ui/cocoa/electron_touch_bar.h | 51 ++++------ shell/browser/ui/cocoa/electron_touch_bar.mm | 83 +++++++--------- 9 files changed, 123 insertions(+), 219 deletions(-) diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index 70006a88dd157..dda1e63c9ee7f 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -423,17 +423,14 @@ AVMediaType ParseMediaType(const std::string& media_type) { } bool SystemPreferences::CanPromptTouchID() { - if (@available(macOS 10.12.2, *)) { - base::scoped_nsobject context([[LAContext alloc] init]); - if (![context - canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics - error:nil]) - return false; - if (@available(macOS 10.13.2, *)) - return [context biometryType] == LABiometryTypeTouchID; - return true; - } - return false; + base::scoped_nsobject context([[LAContext alloc] init]); + if (![context + canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics + error:nil]) + return false; + if (@available(macOS 10.13.2, *)) + return [context biometryType] == LABiometryTypeTouchID; + return true; } v8::Local SystemPreferences::PromptTouchID( @@ -442,46 +439,40 @@ AVMediaType ParseMediaType(const std::string& media_type) { gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); - if (@available(macOS 10.12.2, *)) { - base::scoped_nsobject context([[LAContext alloc] init]); - base::ScopedCFTypeRef access_control = - base::ScopedCFTypeRef( - SecAccessControlCreateWithFlags( - kCFAllocatorDefault, - kSecAttrAccessibleWhenUnlockedThisDeviceOnly, - kSecAccessControlPrivateKeyUsage | - kSecAccessControlUserPresence, - nullptr)); - - scoped_refptr runner = - base::SequencedTaskRunnerHandle::Get(); - - __block gin_helper::Promise p = std::move(promise); - [context - evaluateAccessControl:access_control - operation:LAAccessControlOperationUseKeySign - localizedReason:[NSString stringWithUTF8String:reason.c_str()] - reply:^(BOOL success, NSError* error) { - if (!success) { - std::string err_msg = std::string( - [error.localizedDescription UTF8String]); - runner->PostTask( - FROM_HERE, - base::BindOnce( - gin_helper::Promise::RejectPromise, - std::move(p), std::move(err_msg))); - } else { - runner->PostTask( - FROM_HERE, - base::BindOnce( - gin_helper::Promise::ResolvePromise, - std::move(p))); - } - }]; - } else { - promise.RejectWithErrorMessage( - "This API is not available on macOS versions older than 10.12.2"); - } + base::scoped_nsobject context([[LAContext alloc] init]); + base::ScopedCFTypeRef access_control = + base::ScopedCFTypeRef( + SecAccessControlCreateWithFlags( + kCFAllocatorDefault, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, + kSecAccessControlPrivateKeyUsage | kSecAccessControlUserPresence, + nullptr)); + + scoped_refptr runner = + base::SequencedTaskRunnerHandle::Get(); + + __block gin_helper::Promise p = std::move(promise); + [context + evaluateAccessControl:access_control + operation:LAAccessControlOperationUseKeySign + localizedReason:[NSString stringWithUTF8String:reason.c_str()] + reply:^(BOOL success, NSError* error) { + if (!success) { + std::string err_msg = std::string( + [error.localizedDescription UTF8String]); + runner->PostTask( + FROM_HERE, + base::BindOnce( + gin_helper::Promise::RejectPromise, + std::move(p), std::move(err_msg))); + } else { + runner->PostTask( + FROM_HERE, + base::BindOnce( + gin_helper::Promise::ResolvePromise, + std::move(p))); + } + }]; + return handle; } @@ -529,8 +520,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { } else if (color == "quaternary-label") { sysColor = [NSColor quaternaryLabelColor]; } else if (color == "scrubber-textured-background") { - if (@available(macOS 10.12.2, *)) - sysColor = [NSColor scrubberTexturedBackgroundColor]; + sysColor = [NSColor scrubberTexturedBackgroundColor]; } else if (color == "secondary-label") { sysColor = [NSColor secondaryLabelColor]; } else if (color == "selected-content-background") { diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 138400d625a87..ea7cbde4f3bca 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -19,30 +19,6 @@ #import -#if BUILDFLAG(USE_ALLOCATOR_SHIM) -// On macOS 10.12, the IME system attempts to allocate a 2^64 size buffer, -// which would typically cause an OOM crash. To avoid this, the problematic -// method is swizzled out and the make-OOM-fatal bit is disabled for the -// duration of the original call. https://crbug.com/654695 -static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; -@interface OOMDisabledIMKInputSession : NSObject -@end -@implementation OOMDisabledIMKInputSession -- (void)_coreAttributesFromRange:(NSRange)range - whichAttributes:(long long)attributes // NOLINT(runtime/int) - completionHandler:(void (^)(void))block { - // The allocator flag is per-process, so other threads may temporarily - // not have fatal OOM occur while this method executes, but it is better - // than crashing when using IME. - base::allocator::SetCallNewHandlerOnMallocFailure(false); - g_swizzle_imk_input_session->InvokeOriginal< - void, NSRange, long long, void (^)(void)>( // NOLINT(runtime/int) - self, _cmd, range, attributes, block); - base::allocator::SetCallNewHandlerOnMallocFailure(true); -} -@end -#endif // BUILDFLAG(USE_ALLOCATOR_SHIM) - static NSDictionary* UNNotificationResponseToNSDictionary( UNNotificationResponse* response) API_AVAILABLE(macosx(10.14)) { // [response isKindOfClass:[UNNotificationResponse class]] @@ -109,16 +85,6 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notify { electron::Browser::Get()->DidFinishLaunching( electron::NSDictionaryToDictionaryValue(notification_info)); - -#if BUILDFLAG(USE_ALLOCATOR_SHIM) - // Disable fatal OOM to hack around an OS bug https://crbug.com/654695. - if (base::mac::IsOS10_12()) { - g_swizzle_imk_input_session = new base::mac::ScopedObjCClassSwizzler( - NSClassFromString(@"IMKInputSession"), - [OOMDisabledIMKInputSession class], - @selector(_coreAttributesFromRange:whichAttributes:completionHandler:)); - } -#endif } - (void)applicationDidBecomeActive:(NSNotification*)notification { diff --git a/shell/browser/mac/in_app_purchase_product.mm b/shell/browser/mac/in_app_purchase_product.mm index 6165946261a35..da9a20fe53177 100644 --- a/shell/browser/mac/in_app_purchase_product.mm +++ b/shell/browser/mac/in_app_purchase_product.mm @@ -220,11 +220,9 @@ - (NSString*)formatPrice:(NSDecimalNumber*)price withLocal:product.priceLocale] UTF8String]; // Currency Information - if (@available(macOS 10.12, *)) { - if (product.priceLocale.currencyCode != nil) { - productStruct.currencyCode = - [product.priceLocale.currencyCode UTF8String]; - } + if (product.priceLocale.currencyCode != nil) { + productStruct.currencyCode = + [product.priceLocale.currencyCode UTF8String]; } } } diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 1563a7b2cf09c..e2723fba7da6c 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -392,13 +392,9 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { // Create a tab only if tabbing identifier is specified and window has // a native title bar. if (tabbingIdentifier.empty() || transparent() || !has_frame()) { - if (@available(macOS 10.12, *)) { - [window_ setTabbingMode:NSWindowTabbingModeDisallowed]; - } + [window_ setTabbingMode:NSWindowTabbingModeDisallowed]; } else { - if (@available(macOS 10.12, *)) { - [window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbingIdentifier)]; - } + [window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbingIdentifier)]; } // Resize to content bounds. @@ -1564,68 +1560,51 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { void NativeWindowMac::SetTouchBar( std::vector items) { - if (@available(macOS 10.12.2, *)) { - touch_bar_.reset([[ElectronTouchBar alloc] - initWithDelegate:window_delegate_.get() - window:this - settings:std::move(items)]); - [window_ setTouchBar:nil]; - } + touch_bar_.reset([[ElectronTouchBar alloc] + initWithDelegate:window_delegate_.get() + window:this + settings:std::move(items)]); + [window_ setTouchBar:nil]; } void NativeWindowMac::RefreshTouchBarItem(const std::string& item_id) { - if (@available(macOS 10.12.2, *)) { - if (touch_bar_ && [window_ touchBar]) - [touch_bar_ refreshTouchBarItem:[window_ touchBar] id:item_id]; - } + if (touch_bar_ && [window_ touchBar]) + [touch_bar_ refreshTouchBarItem:[window_ touchBar] id:item_id]; } void NativeWindowMac::SetEscapeTouchBarItem( gin_helper::PersistentDictionary item) { - if (@available(macOS 10.12.2, *)) { - if (touch_bar_ && [window_ touchBar]) - [touch_bar_ setEscapeTouchBarItem:std::move(item) - forTouchBar:[window_ touchBar]]; - } + if (touch_bar_ && [window_ touchBar]) + [touch_bar_ setEscapeTouchBarItem:std::move(item) + forTouchBar:[window_ touchBar]]; } void NativeWindowMac::SelectPreviousTab() { - if (@available(macOS 10.12, *)) { - [window_ selectPreviousTab:nil]; - } + [window_ selectPreviousTab:nil]; } void NativeWindowMac::SelectNextTab() { - if (@available(macOS 10.12, *)) { - [window_ selectNextTab:nil]; - } + [window_ selectNextTab:nil]; } void NativeWindowMac::MergeAllWindows() { - if (@available(macOS 10.12, *)) { - [window_ mergeAllWindows:nil]; - } + [window_ mergeAllWindows:nil]; } void NativeWindowMac::MoveTabToNewWindow() { - if (@available(macOS 10.12, *)) { - [window_ moveTabToNewWindow:nil]; - } + [window_ moveTabToNewWindow:nil]; } void NativeWindowMac::ToggleTabBar() { - if (@available(macOS 10.12, *)) { - [window_ toggleTabBar:nil]; - } + [window_ toggleTabBar:nil]; } bool NativeWindowMac::AddTabbedWindow(NativeWindow* window) { if (window_ == window->GetNativeWindow().GetNativeNSWindow()) { return false; } else { - if (@available(macOS 10.12, *)) - [window_ addTabbedWindow:window->GetNativeWindow().GetNativeNSWindow() - ordered:NSWindowAbove]; + [window_ addTabbedWindow:window->GetNativeWindow().GetNativeNSWindow() + ordered:NSWindowAbove]; } return true; } diff --git a/shell/browser/ui/cocoa/electron_menu_controller.mm b/shell/browser/ui/cocoa/electron_menu_controller.mm index 8725c8001162c..9caeadd9fb407 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.mm +++ b/shell/browser/ui/cocoa/electron_menu_controller.mm @@ -422,10 +422,8 @@ - (NSMenuItem*)menuItemForService:(NSSharingService*)service [item setKeyEquivalentModifierMask:modifier_mask]; } - if (@available(macOS 10.13, *)) { - [(id)item - setAllowsKeyEquivalentWhenHidden:(model->WorksWhenHiddenAt(index))]; - } + [(id)item + setAllowsKeyEquivalentWhenHidden:(model->WorksWhenHiddenAt(index))]; // Set menu item's role. [item setTarget:self]; diff --git a/shell/browser/ui/cocoa/electron_ns_window.mm b/shell/browser/ui/cocoa/electron_ns_window.mm index f4cc2bc5bcbf1..171bd26004bf5 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.mm +++ b/shell/browser/ui/cocoa/electron_ns_window.mm @@ -56,7 +56,7 @@ - (NSRect)originalContentRectForFrameRect:(NSRect)frameRect { return [super contentRectForFrameRect:frameRect]; } -- (NSTouchBar*)makeTouchBar API_AVAILABLE(macosx(10.12.2)) { +- (NSTouchBar*)makeTouchBar { if (shell_->touch_bar()) return [shell_->touch_bar() makeTouchBar]; else diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 2467be47424f4..740ed06b5fd6d 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -329,8 +329,7 @@ - (IBAction)newWindowForTab:(id)sender { #pragma mark - NSTouchBarDelegate - (NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar - makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier - API_AVAILABLE(macosx(10.12.2)) { + makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { if (touchBar && shell_->touch_bar()) return [shell_->touch_bar() makeItemForIdentifier:identifier]; else diff --git a/shell/browser/ui/cocoa/electron_touch_bar.h b/shell/browser/ui/cocoa/electron_touch_bar.h index 9b299d27e9933..ff645042021ae 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.h +++ b/shell/browser/ui/cocoa/electron_touch_bar.h @@ -29,19 +29,16 @@ window:(electron::NativeWindow*)window settings:(std::vector)settings; -- (NSTouchBar*)makeTouchBar API_AVAILABLE(macosx(10.12.2)); -- (NSTouchBar*)touchBarFromItemIdentifiers:(NSMutableArray*)items - API_AVAILABLE(macosx(10.12.2)); +- (NSTouchBar*)makeTouchBar; +- (NSTouchBar*)touchBarFromItemIdentifiers:(NSMutableArray*)items; - (NSMutableArray*)identifiersFromSettings: (const std::vector&)settings; - (void)refreshTouchBarItem:(NSTouchBar*)touchBar - id:(const std::string&)item_id - API_AVAILABLE(macosx(10.12.2)); + id:(const std::string&)item_id; - (void)addNonDefaultTouchBarItems: (const std::vector&)items; - (void)setEscapeTouchBarItem:(gin_helper::PersistentDictionary)item - forTouchBar:(NSTouchBar*)touchBar - API_AVAILABLE(macosx(10.12.2)); + forTouchBar:(NSTouchBar*)touchBar; - (NSString*)idFromIdentifier:(NSString*)identifier withPrefix:(NSString*)prefix; @@ -52,47 +49,35 @@ // Selector actions - (void)buttonAction:(id)sender; -- (void)colorPickerAction:(id)sender API_AVAILABLE(macosx(10.12.2)); -- (void)sliderAction:(id)sender API_AVAILABLE(macosx(10.12.2)); +- (void)colorPickerAction:(id)sender; +- (void)sliderAction:(id)sender; // Helpers to create touch bar items -- (NSTouchBarItem*)makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier - API_AVAILABLE(macosx(10.12.2)); +- (NSTouchBarItem*)makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier; - (NSTouchBarItem*)makeButtonForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; - (NSTouchBarItem*)makeLabelForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; - (NSTouchBarItem*)makeColorPickerForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; - (NSTouchBarItem*)makeSliderForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; - (NSTouchBarItem*)makePopoverForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; - (NSTouchBarItem*)makeGroupForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)); + withIdentifier:(NSString*)identifier; // Helpers to update touch bar items - (void)updateButton:(NSCustomTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)); + withSettings:(const gin_helper::PersistentDictionary&)settings; - (void)updateLabel:(NSCustomTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)); + withSettings:(const gin_helper::PersistentDictionary&)settings; - (void)updateColorPicker:(NSColorPickerTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)); + withSettings:(const gin_helper::PersistentDictionary&)settings; - (void)updateSlider:(NSSliderTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)); + withSettings:(const gin_helper::PersistentDictionary&)settings; - (void)updatePopover:(NSPopoverTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)); + withSettings:(const gin_helper::PersistentDictionary&)settings; @end diff --git a/shell/browser/ui/cocoa/electron_touch_bar.mm b/shell/browser/ui/cocoa/electron_touch_bar.mm index af690bd79d851..3272ebc652ed1 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.mm +++ b/shell/browser/ui/cocoa/electron_touch_bar.mm @@ -67,38 +67,36 @@ - (NSMutableArray*)identifiersFromSettings: bool has_other_items_proxy = false; - if (@available(macOS 10.12.2, *)) { - for (const auto& item : dicts) { - std::string type; - std::string item_id; - if (item.Get("type", &type) && item.Get("id", &item_id)) { - NSTouchBarItemIdentifier identifier = nil; - if (type == "spacer") { - std::string size; - item.Get("size", &size); - if (size == "large") { - identifier = NSTouchBarItemIdentifierFixedSpaceLarge; - } else if (size == "flexible") { - identifier = NSTouchBarItemIdentifierFlexibleSpace; - } else { - identifier = NSTouchBarItemIdentifierFixedSpaceSmall; - } - } else if (type == "other_items_proxy") { - identifier = NSTouchBarItemIdentifierOtherItemsProxy; - has_other_items_proxy = true; + for (const auto& item : dicts) { + std::string type; + std::string item_id; + if (item.Get("type", &type) && item.Get("id", &item_id)) { + NSTouchBarItemIdentifier identifier = nil; + if (type == "spacer") { + std::string size; + item.Get("size", &size); + if (size == "large") { + identifier = NSTouchBarItemIdentifierFixedSpaceLarge; + } else if (size == "flexible") { + identifier = NSTouchBarItemIdentifierFlexibleSpace; } else { - identifier = [self identifierFromID:item_id type:type]; + identifier = NSTouchBarItemIdentifierFixedSpaceSmall; } + } else if (type == "other_items_proxy") { + identifier = NSTouchBarItemIdentifierOtherItemsProxy; + has_other_items_proxy = true; + } else { + identifier = [self identifierFromID:item_id type:type]; + } - if (identifier) { - settings_[item_id] = item; - [identifiers addObject:identifier]; - } + if (identifier) { + settings_[item_id] = item; + [identifiers addObject:identifier]; } } - if (!has_other_items_proxy) - [identifiers addObject:NSTouchBarItemIdentifierOtherItemsProxy]; } + if (!has_other_items_proxy) + [identifiers addObject:NSTouchBarItemIdentifierOtherItemsProxy]; return identifiers; } @@ -140,8 +138,7 @@ - (NSTouchBarItem*)makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { - (void)refreshTouchBarItem:(NSTouchBar*)touchBar id:(NSTouchBarItemIdentifier)identifier withType:(const std::string&)item_type - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)) { + withSettings:(const gin_helper::PersistentDictionary&)settings { NSTouchBarItem* item = [touchBar itemForIdentifier:identifier]; if (!item) return; @@ -289,8 +286,7 @@ - (void)segmentedControlAction:(id)sender { } - (void)scrubber:(NSScrubber*)scrubber - didSelectItemAtIndex:(NSInteger)selectedIndex - API_AVAILABLE(macosx(10.12.2)) { + didSelectItemAtIndex:(NSInteger)selectedIndex { base::DictionaryValue details; details.SetInteger("selectedIndex", selectedIndex); details.SetString("type", "select"); @@ -299,8 +295,7 @@ - (void)scrubber:(NSScrubber*)scrubber } - (void)scrubber:(NSScrubber*)scrubber - didHighlightItemAtIndex:(NSInteger)highlightedIndex - API_AVAILABLE(macosx(10.12.2)) { + didHighlightItemAtIndex:(NSInteger)highlightedIndex { base::DictionaryValue details; details.SetInteger("highlightedIndex", highlightedIndex); details.SetString("type", "highlight"); @@ -592,8 +587,7 @@ - (NSTouchBarItem*)makeGroupForID:(NSString*)id } - (void)updateGroup:(NSGroupTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)) { + withSettings:(const gin_helper::PersistentDictionary&)settings { v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::HandleScope handle_scope(isolate); @@ -609,8 +603,7 @@ - (void)updateGroup:(NSGroupTouchBarItem*)item } - (NSTouchBarItem*)makeSegmentedControlForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)) { + withIdentifier:(NSString*)identifier { std::string s_id([id UTF8String]); if (![self hasItemWithID:s_id]) return nil; @@ -635,8 +628,8 @@ - (NSTouchBarItem*)makeSegmentedControlForID:(NSString*)id } - (void)updateSegmentedControl:(NSCustomTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)) { + withSettings: + (const gin_helper::PersistentDictionary&)settings { NSSegmentedControl* control = item.view; std::string segmentStyle; @@ -697,8 +690,7 @@ - (void)updateSegmentedControl:(NSCustomTouchBarItem*)item } - (NSTouchBarItem*)makeScrubberForID:(NSString*)id - withIdentifier:(NSString*)identifier - API_AVAILABLE(macosx(10.12.2)) { + withIdentifier:(NSString*)identifier { std::string s_id([id UTF8String]); if (![self hasItemWithID:s_id]) return nil; @@ -729,8 +721,7 @@ - (NSTouchBarItem*)makeScrubberForID:(NSString*)id } - (void)updateScrubber:(NSCustomTouchBarItem*)item - withSettings:(const gin_helper::PersistentDictionary&)settings - API_AVAILABLE(macosx(10.12.2)) { + withSettings:(const gin_helper::PersistentDictionary&)settings { NSScrubber* scrubber = item.view; bool showsArrowButtons = false; @@ -780,8 +771,7 @@ - (void)updateScrubber:(NSCustomTouchBarItem*)item [scrubber reloadData]; } -- (NSInteger)numberOfItemsForScrubber:(NSScrubber*)scrubber - API_AVAILABLE(macosx(10.12.2)) { +- (NSInteger)numberOfItemsForScrubber:(NSScrubber*)scrubber { std::string s_id([[scrubber identifier] UTF8String]); if (![self hasItemWithID:s_id]) return 0; @@ -796,8 +786,7 @@ - (NSInteger)numberOfItemsForScrubber:(NSScrubber*)scrubber } - (NSScrubberItemView*)scrubber:(NSScrubber*)scrubber - viewForItemAtIndex:(NSInteger)index - API_AVAILABLE(macosx(10.12.2)) { + viewForItemAtIndex:(NSInteger)index { std::string s_id([[scrubber identifier] UTF8String]); if (![self hasItemWithID:s_id]) return nil; @@ -839,7 +828,7 @@ - (NSScrubberItemView*)scrubber:(NSScrubber*)scrubber - (NSSize)scrubber:(NSScrubber*)scrubber layout:(NSScrubberFlowLayout*)layout - sizeForItemAtIndex:(NSInteger)itemIndex API_AVAILABLE(macosx(10.12.2)) { + sizeForItemAtIndex:(NSInteger)itemIndex { NSInteger width = 50; NSInteger height = 30; NSInteger margin = 15; From 0671f229ac8991ccac5373bb28ab37a46ef5d2c3 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 2 Jun 2022 14:12:10 -0700 Subject: [PATCH 445/811] chore: increase timeout for electron-build step (#34427) --- .circleci/config/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index c37b1ecd67a0a..88fd0051fa115 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -549,7 +549,7 @@ step-gn-check: &step-gn-check step-electron-build: &step-electron-build run: name: Electron build - no_output_timeout: 30m + no_output_timeout: 60m 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 From 3ad70d0f0b9bd50665ae05b5de677f6d2cdab038 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 2 Jun 2022 14:12:58 -0700 Subject: [PATCH 446/811] Revert "Bump v21.0.0-nightly.20220602" This reverts commit eb9888d1d29406a999aed128fde93b601c4b31f0. --- 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 f8900231e1a68..7085745b647a1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220602 \ No newline at end of file +21.0.0-nightly.20220531 \ No newline at end of file diff --git a/package.json b/package.json index 6c210f8629165..8bc6babe6fe0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220602", + "version": "21.0.0-nightly.20220531", "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 561d42ca8fa58..2ab0cf4c6a7f6 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 21,0,0,20220602 - PRODUCTVERSION 21,0,0,20220602 + FILEVERSION 21,0,0,20220531 + PRODUCTVERSION 21,0,0,20220531 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d13c879a15d22248c09e2fad2db28d3f6c749d6e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 2 Jun 2022 14:15:14 -0700 Subject: [PATCH 447/811] Bump v21.0.0-nightly.20220602 --- 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 7085745b647a1..f8900231e1a68 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220531 \ No newline at end of file +21.0.0-nightly.20220602 \ No newline at end of file diff --git a/package.json b/package.json index 8bc6babe6fe0f..6c210f8629165 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220531", + "version": "21.0.0-nightly.20220602", "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 2ab0cf4c6a7f6..561d42ca8fa58 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 21,0,0,20220531 - PRODUCTVERSION 21,0,0,20220531 + FILEVERSION 21,0,0,20220602 + PRODUCTVERSION 21,0,0,20220602 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From eb26f99f6efcc10048e80f58f60f9453e2171aee Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 2 Jun 2022 23:27:37 +0200 Subject: [PATCH 448/811] test: re-enable shared worker webview test (#34338) --- spec/chromium-spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index afcc2b668a756..d0379b13d629c 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -281,15 +281,14 @@ describe('chromium feature', () => { expect(event.data).to.equal('undefined undefined undefined undefined'); }); - // FIXME: disabled during chromium update due to crash in content::WorkerScriptFetchInitiator::CreateScriptLoaderOnIO - xit('has node integration with nodeIntegrationInWorker', async () => { + it('has node integration with nodeIntegrationInWorker', async () => { const webview = new WebView(); webview.addEventListener('console-message', (e) => { console.log(e); }); const eventPromise = waitForEvent(webview, 'ipc-message'); webview.src = `file://${fixtures}/pages/shared_worker.html`; - webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker'); + webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker, contextIsolation=no'); document.body.appendChild(webview); const event = await eventPromise; webview.remove(); From b00c026a54da906d89f4476d122218b01b6baee9 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Thu, 2 Jun 2022 20:23:01 -0400 Subject: [PATCH 449/811] fix: render process crash handling (#34428) * fix: crash when renderer process is reused Could occur when a renderer crashes and the same-origin URL is loaded again which leads to reusing the renderer process. * test: renderer process crash recovery * fix: handle case which leads to render frame DCHECK * fix: lint --- .../api/electron_api_web_frame_main.cc | 9 ++++++- shell/browser/electron_browser_client.cc | 3 +++ spec-main/api-web-frame-main-spec.ts | 27 +++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index 065150fbf3e82..5bea00749976d 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -188,13 +188,20 @@ const mojo::Remote& WebFrameMain::GetRendererApi() { } void WebFrameMain::MaybeSetupMojoConnection() { + if (render_frame_disposed_) { + // RFH may not be set yet if called between when a new RFH is created and + // before it's been swapped with an old RFH. + LOG(INFO) << "Attempt to setup WebFrameMain connection while render frame " + "is disposed"; + return; + } + if (!renderer_api_) { pending_receiver_ = renderer_api_.BindNewPipeAndPassReceiver(); renderer_api_.set_disconnect_handler(base::BindOnce( &WebFrameMain::OnRendererConnectionError, weak_factory_.GetWeakPtr())); } - // Render frame should exist when this method is called. DCHECK(render_frame_); // Wait for RenderFrame to be created in renderer before accessing remote. diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 3d3b19384a091..813f70799813a 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -451,6 +451,9 @@ void ElectronBrowserClient::RenderProcessWillLaunch( new extensions::MessagingAPIMessageFilter(process_id, browser_context)); #endif + // Remove in case the host is reused after a crash, otherwise noop. + host->RemoveObserver(this); + // ensure the ProcessPreferences is removed later host->AddObserver(this); } diff --git a/spec-main/api-web-frame-main-spec.ts b/spec-main/api-web-frame-main-spec.ts index 7f947f7f54922..bf3106a6efb70 100644 --- a/spec-main/api-web-frame-main-spec.ts +++ b/spec-main/api-web-frame-main-spec.ts @@ -224,6 +224,33 @@ describe('webFrameMain module', () => { expect(w.webContents.mainFrame).to.equal(mainFrame); expect(mainFrame.url).to.equal(crossOriginUrl); }); + + it('recovers from renderer crash on same-origin', async () => { + const server = await createServer(); + // Keep reference to mainFrame alive throughout crash and recovery. + const { mainFrame } = w.webContents; + await w.webContents.loadURL(server.url); + w.webContents.forcefullyCrashRenderer(); + await w.webContents.loadURL(server.url); + // Log just to keep mainFrame in scope. + console.log('mainFrame.url', mainFrame.url); + }); + + // Fixed by #34411 + it('recovers from renderer crash on cross-origin', async () => { + const server = await createServer(); + // 'localhost' is treated as a separate origin. + const crossOriginUrl = server.url.replace('127.0.0.1', 'localhost'); + // Keep reference to mainFrame alive throughout crash and recovery. + const { mainFrame } = w.webContents; + await w.webContents.loadURL(server.url); + w.webContents.forcefullyCrashRenderer(); + // A short wait seems to be required to reproduce the crash. + await new Promise(resolve => setTimeout(resolve, 100)); + await w.webContents.loadURL(crossOriginUrl); + // Log just to keep mainFrame in scope. + console.log('mainFrame.url', mainFrame.url); + }); }); describe('webFrameMain.fromId', () => { From 6038e42c23c238e65a8c7abdf4dbd9e953084d2f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 3 Jun 2022 09:47:19 +0200 Subject: [PATCH 450/811] fix: fullscreen windows aren't resizable on macOS (#34379) --- shell/browser/native_window_mac.h | 1 + shell/browser/native_window_mac.mm | 20 ++++++++++++------- .../ui/cocoa/electron_ns_window_delegate.mm | 6 ++++-- spec-main/api-browser-window-spec.ts | 20 +++++++++++++++++-- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index 9b6fcb14dda59..9b02cb44327b2 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -167,6 +167,7 @@ class NativeWindowMac : public NativeWindow, void UpdateVibrancyRadii(bool fullscreen); // Set the attribute of NSWindow while work around a bug of zoom button. + bool HasStyleMask(NSUInteger flag) const; void SetStyleMask(bool on, NSUInteger flag); void SetCollectionBehavior(bool on, NSUInteger flag); void SetWindowLevel(int level); diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index e2723fba7da6c..e3cbfefd9c4dd 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -642,7 +642,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } bool NativeWindowMac::IsMaximized() { - if (([window_ styleMask] & NSWindowStyleMaskResizable) != 0) + if (HasStyleMask(NSWindowStyleMaskResizable) != 0) return [window_ isZoomed]; NSRect rectScreen = GetAspectRatio() > 0.0 @@ -725,7 +725,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } bool NativeWindowMac::IsFullscreen() const { - return [window_ styleMask] & NSWindowStyleMaskFullScreen; + return HasStyleMask(NSWindowStyleMaskFullScreen); } void NativeWindowMac::SetBounds(const gfx::Rect& bounds, bool animate) { @@ -825,7 +825,10 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } bool NativeWindowMac::IsResizable() { - return [window_ styleMask] & NSWindowStyleMaskResizable; + bool in_fs_transition = + fullscreen_transition_state() != FullScreenTransitionState::NONE; + bool has_rs_mask = HasStyleMask(NSWindowStyleMaskResizable); + return has_rs_mask && !IsFullscreen() && !in_fs_transition; } void NativeWindowMac::SetMovable(bool movable) { @@ -841,7 +844,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } bool NativeWindowMac::IsMinimizable() { - return [window_ styleMask] & NSWindowStyleMaskMiniaturizable; + return HasStyleMask(NSWindowStyleMaskMiniaturizable); } void NativeWindowMac::SetMaximizable(bool maximizable) { @@ -871,7 +874,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } bool NativeWindowMac::IsClosable() { - return [window_ styleMask] & NSWindowStyleMaskClosable; + return HasStyleMask(NSWindowStyleMaskClosable); } void NativeWindowMac::SetAlwaysOnTop(ui::ZOrderLevel z_order, @@ -1379,8 +1382,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { NSVisualEffectView* vibrantView = [window_ vibrantView]; if (vibrantView != nil && !vibrancy_type_.empty()) { - const bool no_rounded_corner = - !([window_ styleMask] & NSWindowStyleMaskTitled); + const bool no_rounded_corner = !HasStyleMask(NSWindowStyleMaskTitled); if (!has_frame() && !is_modal() && !no_rounded_corner) { CGFloat radius; if (fullscreen) { @@ -1731,6 +1733,10 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { AddContentViewLayers(); } +bool NativeWindowMac::HasStyleMask(NSUInteger flag) const { + return [window_ styleMask] & flag; +} + void NativeWindowMac::SetStyleMask(bool on, NSUInteger flag) { // Changing the styleMask of a frameless windows causes it to change size so // we explicitly disable resizing while setting it. diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 740ed06b5fd6d..7bd9fdf7d0d42 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -234,12 +234,14 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification { } - (void)windowWillEnterFullScreen:(NSNotification*)notification { + // Store resizable mask so it can be restored after exiting fullscreen. + is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable); + shell_->SetFullScreenTransitionState(FullScreenTransitionState::ENTERING); shell_->NotifyWindowWillEnterFullScreen(); - // Setting resizable to true before entering fullscreen. - is_resizable_ = shell_->IsResizable(); + // Set resizable to true before entering fullscreen. shell_->SetResizable(true); } diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 0de2068f9590c..c140ae15ae28c 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4650,12 +4650,13 @@ describe('BrowserWindow module', () => { }); ifdescribe(process.platform === 'darwin')('fullscreen state with resizable set', () => { - it('resizable flag should be set to true and restored', async () => { + it('resizable flag should be set to false and restored', async () => { const w = new BrowserWindow({ resizable: false }); + const enterFullScreen = emittedOnce(w, 'enter-full-screen'); w.setFullScreen(true); await enterFullScreen; - expect(w.resizable).to.be.true('resizable'); + expect(w.resizable).to.be.false('resizable'); await delay(); const leaveFullScreen = emittedOnce(w, 'leave-full-screen'); @@ -4663,6 +4664,21 @@ describe('BrowserWindow module', () => { await leaveFullScreen; expect(w.resizable).to.be.false('resizable'); }); + + it('default resizable flag should be restored after entering/exiting fullscreen', async () => { + const w = new BrowserWindow(); + + const enterFullScreen = emittedOnce(w, 'enter-full-screen'); + w.setFullScreen(true); + await enterFullScreen; + expect(w.resizable).to.be.false('resizable'); + + await delay(); + const leaveFullScreen = emittedOnce(w, 'leave-full-screen'); + w.setFullScreen(false); + await leaveFullScreen; + expect(w.resizable).to.be.true('resizable'); + }); }); ifdescribe(process.platform === 'darwin')('fullscreen state', () => { From 05b03b01dc8f9cc6bc37991d3832b08fc8ab730c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 3 Jun 2022 06:00:36 -0700 Subject: [PATCH 451/811] Bump v21.0.0-nightly.20220603 --- 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 f8900231e1a68..026cc07d0972e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220602 \ No newline at end of file +21.0.0-nightly.20220603 \ No newline at end of file diff --git a/package.json b/package.json index 6c210f8629165..7b0f928432752 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220602", + "version": "21.0.0-nightly.20220603", "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 561d42ca8fa58..28ae96f4ea844 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 21,0,0,20220602 - PRODUCTVERSION 21,0,0,20220602 + FILEVERSION 21,0,0,20220603 + PRODUCTVERSION 21,0,0,20220603 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f39c1a35e5cac86c13ee65fbfdbefb32eeef4f5b Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 3 Jun 2022 16:13:27 +0200 Subject: [PATCH 452/811] chore: bump node to v16.15.1 (main) (#34424) --- DEPS | 2 +- patches/node/build_add_gn_build_files.patch | 2 +- .../fix_add_default_values_for_variables_in_common_gypi.patch | 2 +- ...ix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index bc96d86bcb6cd..b426c6b27f2dd 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '104.0.5073.0', 'node_version': - 'v16.15.0', + 'v16.15.1', 'nan_version': '16fa32231e2ccd89d2804b3f765319128b20c4ac', 'squirrel.mac_version': diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 788c5dc5bcf6d..69142b12e0d62 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1799,7 +1799,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 29c9be6366d63be7b340b35cea141e4d7e7f71cc..587735f2ddc0e5d93edd8644d121c6fb31fc4378 100644 +index 39f6406dd2b52e16a2be5c00c554da30a806ead9..36117c5b36c65f0a8a9bb9c421bc74b82f2b1f3a 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ 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 aba4b338e5f86..93e000bb61628 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 bdc2c105abeddc4c8e434ead05ebc0d7d82cfae8..3fd1d4ddddc109dfd87f4ba6115948f1c31b1261 100644 +index 3cfed562577978c41a256fc779f6a3a172e65b3d..96d512630e9727467aa523c2dfc1a4cf9275465b 100644 --- a/common.gypi +++ b/common.gypi @@ -84,6 +84,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 5716a2d57dc79..1943720ef81c6 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 3fd1d4ddddc109dfd87f4ba6115948f1c31b1261..fd4e0b38eb6ecf81b23186ec663499d1e685fdf8 100644 +index 96d512630e9727467aa523c2dfc1a4cf9275465b..bdfe81d11cc50f492c93fe48f6946765b6fb5238 100644 --- a/common.gypi +++ b/common.gypi @@ -82,6 +82,8 @@ From 4f99e3e46cc09696d58b8e0aae89f2d647a79713 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Sun, 5 Jun 2022 22:49:14 -0700 Subject: [PATCH 453/811] docs: fix `did-frame-navigate` example in webFrameMain docs (#34419) docs: fix did-frame-navigate example in webFrameMain docs --- docs/api/web-frame-main.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-frame-main.md b/docs/api/web-frame-main.md index 0190f4dbc0ac5..e97041668e15b 100644 --- a/docs/api/web-frame-main.md +++ b/docs/api/web-frame-main.md @@ -16,7 +16,7 @@ win.loadURL('https://twitter.com') win.webContents.on( 'did-frame-navigate', - (event, url, isMainFrame, frameProcessId, frameRoutingId) => { + (event, url, httpResponseCode, httpStatusText, isMainFrame, frameProcessId, frameRoutingId) => { const frame = webFrameMain.fromId(frameProcessId, frameRoutingId) if (frame) { const code = 'document.body.innerHTML = document.body.innerHTML.replaceAll("heck", "h*ck")' From 92b0f3e80874f18631fa489687e4c3fe65fac9a7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Jun 2022 00:51:10 -0500 Subject: [PATCH 454/811] build: add --unique option to release notes script (#34296) Useful when looking for changes unique to a single branch --- script/release/notes/index.js | 11 ++++++----- script/release/notes/notes.js | 18 +++++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/script/release/notes/index.js b/script/release/notes/index.js index 79d512218343f..d40ed7086f864 100755 --- a/script/release/notes/index.js +++ b/script/release/notes/index.js @@ -147,7 +147,7 @@ const getPreviousPoint = async (point) => { } }; -async function getReleaseNotes (range, newVersion) { +async function getReleaseNotes (range, newVersion, unique) { const rangeList = range.split('..') || ['HEAD']; const to = rangeList.pop(); const from = rangeList.pop() || (await getPreviousPoint(to)); @@ -158,7 +158,7 @@ async function getReleaseNotes (range, newVersion) { const notes = await notesGenerator.get(from, to, newVersion); const ret = { - text: notesGenerator.render(notes) + text: notesGenerator.render(notes, unique) }; if (notes.unknown.length) { @@ -170,7 +170,7 @@ async function getReleaseNotes (range, newVersion) { async function main () { const opts = minimist(process.argv.slice(2), { - boolean: ['help'], + boolean: ['help', 'unique'], string: ['version'] }); opts.range = opts._.shift(); @@ -179,13 +179,14 @@ async function main () { console.log(` easy usage: ${name} version -full usage: ${name} [begin..]end [--version version] +full usage: ${name} [begin..]end [--version version] [--unique] * 'begin' and 'end' are two git references -- tags, branches, etc -- from which the release notes are generated. * if omitted, 'begin' defaults to the previous tag in end's branch. * if omitted, 'version' defaults to 'end'. Specifying a version is useful if you're making notes on a new version that isn't tagged yet. + * '--unique' omits changes that also landed in other branches. For example, these invocations are equivalent: ${process.argv[1]} v4.0.1 @@ -194,7 +195,7 @@ For example, these invocations are equivalent: return 0; } - const notes = await getReleaseNotes(opts.range, opts.version); + const notes = await getReleaseNotes(opts.range, opts.version, opts.unique); console.log(notes.text); if (notes.warning) { throw new Error(notes.warning); diff --git a/script/release/notes/notes.js b/script/release/notes/notes.js index 08579c100991c..20f72b071b77e 100644 --- a/script/release/notes/notes.js +++ b/script/release/notes/notes.js @@ -596,10 +596,14 @@ function renderDescription (commit) { const renderNote = (commit, excludeBranch) => `* ${renderDescription(commit)} ${renderLink(commit)} ${renderTrops(commit, excludeBranch)}\n`; -const renderNotes = (notes) => { +const renderNotes = (notes, unique = false) => { const rendered = [`# Release Notes for ${notes.name}\n\n`]; - const renderSection = (title, commits) => { + const renderSection = (title, commits, unique) => { + if (unique) { + // omit changes that also landed in other branches + commits = commits.filter((commit) => renderTrops(commit, notes.toBranch).length === 0); + } if (commits.length > 0) { rendered.push( `## ${title}\n\n`, @@ -608,17 +612,17 @@ const renderNotes = (notes) => { } }; - renderSection('Breaking Changes', notes.breaking); - renderSection('Features', notes.feat); - renderSection('Fixes', notes.fix); - renderSection('Other Changes', notes.other); + renderSection('Breaking Changes', notes.breaking, unique); + renderSection('Features', notes.feat, unique); + renderSection('Fixes', notes.fix, unique); + renderSection('Other Changes', notes.other, unique); if (notes.docs.length) { const docs = notes.docs.map(commit => renderLink(commit)).sort(); rendered.push('## Documentation\n\n', ` * Documentation changes: ${docs.join(', ')}\n`, '\n'); } - renderSection('Unknown', notes.unknown); + renderSection('Unknown', notes.unknown, unique); return rendered.join(''); }; From e56f626b945f11b120f36019d621f32a55307c7a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 06:02:02 -0700 Subject: [PATCH 455/811] Bump v21.0.0-nightly.20220606 --- 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 026cc07d0972e..9d04f0a9c0699 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220603 \ No newline at end of file +21.0.0-nightly.20220606 \ No newline at end of file diff --git a/package.json b/package.json index 7b0f928432752..e251b80a32457 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220603", + "version": "21.0.0-nightly.20220606", "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 28ae96f4ea844..df4cea0efdeb2 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 21,0,0,20220603 - PRODUCTVERSION 21,0,0,20220603 + FILEVERSION 21,0,0,20220606 + PRODUCTVERSION 21,0,0,20220606 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 882fa36940fc5846a4c72b1c73a4ccc3ac146437 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Mon, 6 Jun 2022 17:39:58 -0400 Subject: [PATCH 456/811] test: fix for flaky renderer crash test (#34452) --- spec-main/api-web-frame-main-spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec-main/api-web-frame-main-spec.ts b/spec-main/api-web-frame-main-spec.ts index bf3106a6efb70..8890e1402f52c 100644 --- a/spec-main/api-web-frame-main-spec.ts +++ b/spec-main/api-web-frame-main-spec.ts @@ -230,7 +230,9 @@ describe('webFrameMain module', () => { // Keep reference to mainFrame alive throughout crash and recovery. const { mainFrame } = w.webContents; await w.webContents.loadURL(server.url); + const crashEvent = emittedOnce(w.webContents, 'render-process-gone'); w.webContents.forcefullyCrashRenderer(); + await crashEvent; await w.webContents.loadURL(server.url); // Log just to keep mainFrame in scope. console.log('mainFrame.url', mainFrame.url); @@ -244,7 +246,9 @@ describe('webFrameMain module', () => { // Keep reference to mainFrame alive throughout crash and recovery. const { mainFrame } = w.webContents; await w.webContents.loadURL(server.url); + const crashEvent = emittedOnce(w.webContents, 'render-process-gone'); w.webContents.forcefullyCrashRenderer(); + await crashEvent; // A short wait seems to be required to reproduce the crash. await new Promise(resolve => setTimeout(resolve, 100)); await w.webContents.loadURL(crossOriginUrl); From 30d15715a9ce6a360c73d2e8eb9970ca17d0ad36 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 7 Jun 2022 00:49:52 -0700 Subject: [PATCH 457/811] build: switch to --use-color flag for clang-tidy (#34457) chore: switch to --use-color flag for clang-tidy --- script/run-clang-tidy.ts | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/script/run-clang-tidy.ts b/script/run-clang-tidy.ts index d3611e743f3c7..f399b2c0845ee 100644 --- a/script/run-clang-tidy.ts +++ b/script/run-clang-tidy.ts @@ -1,4 +1,3 @@ -import chalk from 'chalk'; import * as childProcess from 'child_process'; import * as fs from 'fs'; import * as klaw from 'klaw'; @@ -143,7 +142,7 @@ async function runClangTidy ( jobs: number = 1 ): Promise { const cmd = path.resolve(LLVM_BIN, 'clang-tidy'); - const args = [`-p=${outDir}`]; + const args = [`-p=${outDir}`, '--use-color']; if (checks) args.push(`--checks=${checks}`); @@ -202,38 +201,7 @@ async function runClangTidy ( while (filenames) { results.push( await spawnAsync(cmd, [...args, ...filenames], {}).then((result) => { - // We lost color, so recolorize because it's much more legible - // There's a --use-color flag for clang-tidy but it has no effect - // on Windows at the moment, so just recolor for everyone - let state = null; - - for (const line of result.stdout.split('\n')) { - if (line.includes(' warning: ')) { - console.log( - line - .split(' warning: ') - .map((part) => chalk.whiteBright(part)) - .join(chalk.magentaBright(' warning: ')) - ); - state = 'code-line'; - } else if (line.includes(' note: ')) { - const lineParts = line.split(' note: '); - lineParts[0] = chalk.whiteBright(lineParts[0]); - console.log(lineParts.join(chalk.grey(' note: '))); - state = 'code-line'; - } else if (line.startsWith('error:')) { - console.log( - chalk.redBright('error: ') + line.split(' ').slice(1).join(' ') - ); - } else if (state === 'code-line') { - console.log(line); - state = 'post-code-line'; - } else if (state === 'post-code-line') { - console.log(chalk.greenBright(line)); - } else { - console.log(line); - } - } + console.log(result.stdout); if (result.status !== 0) { console.error(result.stderr); From 4ec2de659fa797a3a906c3a050cc0b3ccd491553 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 7 Jun 2022 12:09:08 +0200 Subject: [PATCH 458/811] chore: fix nan spec runner on macOS (#34447) --- script/nan-spec-runner.js | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index f7934c76a629a..f022f3da25fa7 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -18,7 +18,8 @@ const args = require('minimist')(process.argv.slice(2), { }); async function main () { - const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`); + const outDir = utils.getOutDir({ shouldLog: true }); + const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers'); const env = Object.assign({}, process.env, { npm_config_nodedir: nodeDir, npm_config_msvs_version: '2019', @@ -31,6 +32,25 @@ async function main () { const cxx = path.resolve(clangDir, 'clang++'); const ld = path.resolve(clangDir, 'lld'); + const platformFlags = []; + if (process.platform === 'darwin') { + const sdkPath = path.resolve(BASE, 'out', outDir, 'sdk', 'xcode_links'); + const sdks = (await fs.promises.readdir(sdkPath)).filter(fileName => fileName.endsWith('.sdk')); + const sdkToUse = sdks[0]; + if (!sdkToUse) { + console.error('Could not find an SDK to use for the NAN tests'); + process.exit(1); + } + + if (sdks.length) { + console.warn(`Multiple SDKs found in the xcode_links directory - using ${sdkToUse}`); + } + + platformFlags.push( + `-isysroot ${path.resolve(sdkPath, sdkToUse)}` + ); + } + // TODO(ckerr) this is cribbed from read obj/electron/electron_app.ninja. // Maybe it would be better to have this script literally open up that // file and pull cflags_cc from it instead of using bespoke code here? @@ -41,15 +61,17 @@ async function main () { `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`, - '-fPIC' + '-fPIC', + ...platformFlags ].join(' '); const ldflags = [ '-stdlib=libc++', '-fuse-ld=lld', - `-L"${path.resolve(BASE, 'out', `${utils.getOutDir({ shouldLog: true })}`, 'obj', 'buildtools', 'third_party', 'libc++abi')}"`, - `-L"${path.resolve(BASE, 'out', `${utils.getOutDir({ shouldLog: true })}`, 'obj', 'buildtools', 'third_party', 'libc++')}"`, - '-lc++abi' + `-L"${path.resolve(BASE, 'out', outDir, 'obj', 'buildtools', 'third_party', 'libc++abi')}"`, + `-L"${path.resolve(BASE, 'out', outDir, 'obj', 'buildtools', 'third_party', 'libc++')}"`, + '-lc++abi', + ...platformFlags ].join(' '); if (process.platform !== 'win32') { @@ -66,6 +88,7 @@ async function main () { cwd: NAN_DIR, stdio: 'inherit' }); + if (buildStatus !== 0) { console.error('Failed to build nan test modules'); return process.exit(buildStatus); From 5f0f51748685e3d1e3145e742bec08f7090050d4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 06:01:42 -0700 Subject: [PATCH 459/811] Bump v21.0.0-nightly.20220607 --- 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 9d04f0a9c0699..6629a5431ddbb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220606 \ No newline at end of file +21.0.0-nightly.20220607 \ No newline at end of file diff --git a/package.json b/package.json index e251b80a32457..b8f9b0d444ff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220606", + "version": "21.0.0-nightly.20220607", "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 df4cea0efdeb2..6139ac73fc46c 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 21,0,0,20220606 - PRODUCTVERSION 21,0,0,20220606 + FILEVERSION 21,0,0,20220607 + PRODUCTVERSION 21,0,0,20220607 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c75093632857fb558b2ca9afd7df7ecfa03e069b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 07:09:18 -0700 Subject: [PATCH 460/811] Revert "Bump v21.0.0-nightly.20220607" This reverts commit 5f0f51748685e3d1e3145e742bec08f7090050d4. --- 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 6629a5431ddbb..9d04f0a9c0699 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220607 \ No newline at end of file +21.0.0-nightly.20220606 \ No newline at end of file diff --git a/package.json b/package.json index b8f9b0d444ff7..e251b80a32457 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220607", + "version": "21.0.0-nightly.20220606", "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 6139ac73fc46c..df4cea0efdeb2 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 21,0,0,20220607 - PRODUCTVERSION 21,0,0,20220607 + FILEVERSION 21,0,0,20220606 + PRODUCTVERSION 21,0,0,20220606 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a203123473f1811f77ec8d50f611a54eb2b9d9bb Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 07:11:11 -0700 Subject: [PATCH 461/811] Bump v21.0.0-nightly.20220607 --- 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 9d04f0a9c0699..6629a5431ddbb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220606 \ No newline at end of file +21.0.0-nightly.20220607 \ No newline at end of file diff --git a/package.json b/package.json index e251b80a32457..b8f9b0d444ff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220606", + "version": "21.0.0-nightly.20220607", "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 df4cea0efdeb2..6139ac73fc46c 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 21,0,0,20220606 - PRODUCTVERSION 21,0,0,20220606 + FILEVERSION 21,0,0,20220607 + PRODUCTVERSION 21,0,0,20220607 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 8e97f3badf17eb3f3379f29aea9d4acf47b3bd50 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 07:12:33 -0700 Subject: [PATCH 462/811] Revert "Bump v21.0.0-nightly.20220607" This reverts commit a203123473f1811f77ec8d50f611a54eb2b9d9bb. --- 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 6629a5431ddbb..9d04f0a9c0699 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220607 \ No newline at end of file +21.0.0-nightly.20220606 \ No newline at end of file diff --git a/package.json b/package.json index b8f9b0d444ff7..e251b80a32457 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220607", + "version": "21.0.0-nightly.20220606", "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 6139ac73fc46c..df4cea0efdeb2 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 21,0,0,20220607 - PRODUCTVERSION 21,0,0,20220607 + FILEVERSION 21,0,0,20220606 + PRODUCTVERSION 21,0,0,20220606 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f44ecb7f031bbe22289be1007093cff5057cb6cf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 07:30:55 -0700 Subject: [PATCH 463/811] Bump v21.0.0-nightly.20220607 --- 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 9d04f0a9c0699..6629a5431ddbb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220606 \ No newline at end of file +21.0.0-nightly.20220607 \ No newline at end of file diff --git a/package.json b/package.json index e251b80a32457..b8f9b0d444ff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220606", + "version": "21.0.0-nightly.20220607", "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 df4cea0efdeb2..6139ac73fc46c 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 21,0,0,20220606 - PRODUCTVERSION 21,0,0,20220606 + FILEVERSION 21,0,0,20220607 + PRODUCTVERSION 21,0,0,20220607 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 16db5a112e3cde7d9ee8ea817f52bf2b9af7568f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 7 Jun 2022 18:59:50 +0200 Subject: [PATCH 464/811] fix: html fullscreen transitions stacking (#32905) * fix: html fullscreen transitions stacking * spec: move webview test to spec-main --- .../browser/api/electron_api_web_contents.cc | 10 ++- shell/browser/native_window.cc | 9 +++ shell/browser/native_window.h | 16 +++++ shell/browser/native_window_mac.h | 13 ---- shell/browser/native_window_mac.mm | 14 ---- .../ui/cocoa/electron_ns_window_delegate.mm | 8 +-- spec-main/api-browser-window-spec.ts | 67 ++++++++++++++++++- spec-main/chromium-spec.ts | 33 ++++++++- .../fixtures/webview/fullscreen/frame.html | 1 + spec-main/webview-spec.ts | 58 ++++++++++++++-- spec/fixtures/pages/fullscreen.html | 2 +- spec/webview-spec.js | 14 ---- 12 files changed, 184 insertions(+), 61 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 1422083e5d511..f719bcbd7cbf4 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3673,7 +3673,12 @@ void WebContents::EnumerateDirectory( bool WebContents::IsFullscreenForTabOrPending( const content::WebContents* source) { - return html_fullscreen_; + bool transition_fs = owner_window() + ? owner_window()->fullscreen_transition_state() != + NativeWindow::FullScreenTransitionState::NONE + : false; + + return html_fullscreen_ || transition_fs; } bool WebContents::TakeFocus(content::WebContents* source, bool reverse) { @@ -3995,9 +4000,8 @@ void WebContents::SetHtmlApiFullscreen(bool enter_fullscreen) { ? !web_preferences->ShouldDisableHtmlFullscreenWindowResize() : true; - if (html_fullscreenable) { + if (html_fullscreenable) owner_window_->SetFullScreen(enter_fullscreen); - } UpdateHtmlApiFullscreen(enter_fullscreen); native_fullscreen_ = false; diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 989d816c17c8a..414cb2ec4e01a 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -718,6 +718,15 @@ std::string NativeWindow::GetAccessibleTitle() { return base::UTF16ToUTF8(accessible_title_); } +void NativeWindow::HandlePendingFullscreenTransitions() { + if (pending_transitions_.empty()) + return; + + bool next_transition = pending_transitions_.front(); + pending_transitions_.pop(); + SetFullScreen(next_transition); +} + // static int32_t NativeWindow::next_id_ = 0; diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index febc36213fd04..3170c1911c074 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -317,6 +318,17 @@ class NativeWindow : public base::SupportsUserData, observers_.RemoveObserver(obs); } + enum class FullScreenTransitionState { ENTERING, EXITING, NONE }; + + // Handle fullscreen transitions. + void HandlePendingFullscreenTransitions(); + void set_fullscreen_transition_state(FullScreenTransitionState state) { + fullscreen_transition_state_ = state; + } + FullScreenTransitionState fullscreen_transition_state() const { + return fullscreen_transition_state_; + } + views::Widget* widget() const { return widget_.get(); } views::View* content_view() const { return content_view_; } @@ -375,6 +387,10 @@ class NativeWindow : public base::SupportsUserData, // The "titleBarStyle" option. TitleBarStyle title_bar_style_ = TitleBarStyle::kNormal; + std::queue pending_transitions_; + FullScreenTransitionState fullscreen_transition_state_ = + FullScreenTransitionState::NONE; + private: std::unique_ptr widget_; diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index 9b02cb44327b2..2ed12d23d903f 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -8,7 +8,6 @@ #import #include -#include #include #include @@ -172,11 +171,6 @@ class NativeWindowMac : public NativeWindow, void SetCollectionBehavior(bool on, NSUInteger flag); void SetWindowLevel(int level); - enum class FullScreenTransitionState { ENTERING, EXITING, NONE }; - - // Handle fullscreen transitions. - void SetFullScreenTransitionState(FullScreenTransitionState state); - void HandlePendingFullscreenTransitions(); bool HandleDeferredClose(); void SetHasDeferredWindowClose(bool defer_close) { has_deferred_window_close_ = defer_close; @@ -247,13 +241,6 @@ class NativeWindowMac : public NativeWindow, bool zoom_to_page_width_ = false; absl::optional traffic_light_position_; - std::queue pending_transitions_; - FullScreenTransitionState fullscreen_transition_state() const { - return fullscreen_transition_state_; - } - FullScreenTransitionState fullscreen_transition_state_ = - FullScreenTransitionState::NONE; - // Trying to close an NSWindow during a fullscreen transition will cause the // window to lock up. Use this to track if CloseWindow was called during a // fullscreen transition, to defer the -[NSWindow close] call until the diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index e3cbfefd9c4dd..9cd1ab4b2d5e6 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -582,11 +582,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { return [window_ isVisible] && !occluded && !IsMinimized(); } -void NativeWindowMac::SetFullScreenTransitionState( - FullScreenTransitionState state) { - fullscreen_transition_state_ = state; -} - bool NativeWindowMac::IsEnabled() { return [window_ attachedSheet] == nil; } @@ -670,15 +665,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { return [window_ isMiniaturized]; } -void NativeWindowMac::HandlePendingFullscreenTransitions() { - if (pending_transitions_.empty()) - return; - - bool next_transition = pending_transitions_.front(); - pending_transitions_.pop(); - SetFullScreen(next_transition); -} - bool NativeWindowMac::HandleDeferredClose() { if (has_deferred_window_close_) { SetHasDeferredWindowClose(false); diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 7bd9fdf7d0d42..960dbbaa53e28 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -237,7 +237,7 @@ - (void)windowWillEnterFullScreen:(NSNotification*)notification { // Store resizable mask so it can be restored after exiting fullscreen. is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable); - shell_->SetFullScreenTransitionState(FullScreenTransitionState::ENTERING); + shell_->set_fullscreen_transition_state(FullScreenTransitionState::ENTERING); shell_->NotifyWindowWillEnterFullScreen(); @@ -246,7 +246,7 @@ - (void)windowWillEnterFullScreen:(NSNotification*)notification { } - (void)windowDidEnterFullScreen:(NSNotification*)notification { - shell_->SetFullScreenTransitionState(FullScreenTransitionState::NONE); + shell_->set_fullscreen_transition_state(FullScreenTransitionState::NONE); shell_->NotifyWindowEnterFullScreen(); @@ -257,13 +257,13 @@ - (void)windowDidEnterFullScreen:(NSNotification*)notification { } - (void)windowWillExitFullScreen:(NSNotification*)notification { - shell_->SetFullScreenTransitionState(FullScreenTransitionState::EXITING); + shell_->set_fullscreen_transition_state(FullScreenTransitionState::EXITING); shell_->NotifyWindowWillLeaveFullScreen(); } - (void)windowDidExitFullScreen:(NSNotification*)notification { - shell_->SetFullScreenTransitionState(FullScreenTransitionState::NONE); + shell_->set_fullscreen_transition_state(FullScreenTransitionState::NONE); shell_->SetResizable(is_resizable_); shell_->NotifyWindowLeaveFullScreen(); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index c140ae15ae28c..f35cdbec8339f 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4731,19 +4731,80 @@ describe('BrowserWindow module', () => { expect(w.isFullScreen()).to.be.false('is fullscreen'); }); + it('handles several HTML fullscreen transitions', async () => { + const w = new BrowserWindow(); + await w.loadFile(path.join(fixtures, 'pages', 'a.html')); + + expect(w.isFullScreen()).to.be.false('is fullscreen'); + + const enterFullScreen = emittedOnce(w, 'enter-full-screen'); + const leaveFullScreen = emittedOnce(w, 'leave-full-screen'); + + await w.webContents.executeJavaScript('document.getElementById("div").requestFullscreen()', true); + await enterFullScreen; + await w.webContents.executeJavaScript('document.exitFullscreen()', true); + await leaveFullScreen; + + expect(w.isFullScreen()).to.be.false('is fullscreen'); + + await delay(); + + await w.webContents.executeJavaScript('document.getElementById("div").requestFullscreen()', true); + await enterFullScreen; + await w.webContents.executeJavaScript('document.exitFullscreen()', true); + await leaveFullScreen; + + expect(w.isFullScreen()).to.be.false('is fullscreen'); + }); + it('handles several transitions in close proximity', async () => { const w = new BrowserWindow(); expect(w.isFullScreen()).to.be.false('is fullscreen'); + const enterFS = emittedNTimes(w, 'enter-full-screen', 2); + const leaveFS = emittedNTimes(w, 'leave-full-screen', 2); + w.setFullScreen(true); w.setFullScreen(false); w.setFullScreen(true); + w.setFullScreen(false); - const enterFullScreen = emittedNTimes(w, 'enter-full-screen', 2); - await enterFullScreen; + await Promise.all([enterFS, leaveFS]); - expect(w.isFullScreen()).to.be.true('not fullscreen'); + expect(w.isFullScreen()).to.be.false('not fullscreen'); + }); + + it('handles several chromium-initiated transitions in close proximity', async () => { + const w = new BrowserWindow(); + await w.loadFile(path.join(fixtures, 'pages', 'a.html')); + + expect(w.isFullScreen()).to.be.false('is fullscreen'); + + let enterCount = 0; + let exitCount = 0; + + const done = new Promise(resolve => { + const checkDone = () => { + if (enterCount === 2 && exitCount === 2) resolve(); + }; + + w.webContents.on('enter-html-full-screen', () => { + enterCount++; + checkDone(); + }); + + w.webContents.on('leave-html-full-screen', () => { + exitCount++; + checkDone(); + }); + }); + + await w.webContents.executeJavaScript('document.getElementById("div").requestFullscreen()', true); + await w.webContents.executeJavaScript('document.exitFullscreen()'); + await w.webContents.executeJavaScript('document.getElementById("div").requestFullscreen()', true); + await w.webContents.executeJavaScript('document.exitFullscreen()'); + await done; }); it('does not crash when exiting simpleFullScreen (properties)', async () => { diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 3ebadfe1bf2ca..d6bc5cd897a85 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -10,7 +10,7 @@ import * as url from 'url'; import * as ChildProcess from 'child_process'; import { EventEmitter } from 'events'; import { promisify } from 'util'; -import { ifit, ifdescribe, delay, defer } from './spec-helpers'; +import { ifit, ifdescribe, defer, delay } from './spec-helpers'; import { AddressInfo } from 'net'; import { PipeTransport } from './pipe-transport'; @@ -1590,7 +1590,7 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', () server.close(); }); - it('can fullscreen from out-of-process iframes (OOPIFs)', async () => { + ifit(process.platform !== 'darwin')('can fullscreen from out-of-process iframes (non-macOS)', async () => { const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); const html = ''; @@ -1614,8 +1614,37 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', () expect(width).to.equal(0); }); + ifit(process.platform === 'darwin')('can fullscreen from out-of-process iframes (macOS)', async () => { + await emittedOnce(w, 'enter-full-screen'); + const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); + const html = + ''; + w.loadURL(`data:text/html,${html}`); + await fullscreenChange; + + const fullscreenWidth = await w.webContents.executeJavaScript( + "document.querySelector('iframe').offsetWidth" + ); + expect(fullscreenWidth > 0).to.be.true(); + + await w.webContents.executeJavaScript( + "document.querySelector('iframe').contentWindow.postMessage('exitFullscreen', '*')" + ); + await emittedOnce(w.webContents, 'leave-html-full-screen'); + + const width = await w.webContents.executeJavaScript( + "document.querySelector('iframe').offsetWidth" + ); + expect(width).to.equal(0); + + w.setFullScreen(false); + await emittedOnce(w, 'leave-full-screen'); + }); + // TODO(jkleinsc) fix this flaky test on WOA ifit(process.platform !== 'win32' || process.arch !== 'arm64')('can fullscreen from in-process iframes', async () => { + if (process.platform === 'darwin') await emittedOnce(w, 'enter-full-screen'); + const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); w.loadFile(path.join(fixturesPath, 'pages', 'fullscreen-ipif.html')); await fullscreenChange; diff --git a/spec-main/fixtures/webview/fullscreen/frame.html b/spec-main/fixtures/webview/fullscreen/frame.html index c92571eef4a8b..d7307f0b83bc4 100644 --- a/spec-main/fixtures/webview/fullscreen/frame.html +++ b/spec-main/fixtures/webview/fullscreen/frame.html @@ -2,6 +2,7 @@
WebView
+ + diff --git a/docs/fiddles/tutorial-first-app/main.js b/docs/fiddles/tutorial-first-app/main.js new file mode 100644 index 0000000000000..10d57a0696f0f --- /dev/null +++ b/docs/fiddles/tutorial-first-app/main.js @@ -0,0 +1,26 @@ +const { app, BrowserWindow } = require('electron'); + +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + }); + + win.loadFile('index.html'); +}; + +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/docs/fiddles/tutorial-preload/index.html b/docs/fiddles/tutorial-preload/index.html new file mode 100644 index 0000000000000..3d677b7c97b5b --- /dev/null +++ b/docs/fiddles/tutorial-preload/index.html @@ -0,0 +1,21 @@ + + + + + + + Hello from Electron renderer! + + +

Hello from Electron renderer!

+

👋

+

+ + + diff --git a/docs/fiddles/tutorial-preload/main.js b/docs/fiddles/tutorial-preload/main.js new file mode 100644 index 0000000000000..6b7184900e6dd --- /dev/null +++ b/docs/fiddles/tutorial-preload/main.js @@ -0,0 +1,30 @@ +const { app, BrowserWindow } = require('electron'); +const path = require('path'); + +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + webPreferences: { + preload: path.join(__dirname, 'preload.js'), + }, + }); + + win.loadFile('index.html'); +}; + +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/docs/fiddles/tutorial-preload/preload.js b/docs/fiddles/tutorial-preload/preload.js new file mode 100644 index 0000000000000..e0dbdce1b8b2f --- /dev/null +++ b/docs/fiddles/tutorial-preload/preload.js @@ -0,0 +1,7 @@ +const { contextBridge } = require('electron'); + +contextBridge.exposeInMainWorld('versions', { + node: () => process.versions.node, + chrome: () => process.versions.chrome, + electron: () => process.versions.electron, +}); diff --git a/docs/fiddles/tutorial-preload/renderer.js b/docs/fiddles/tutorial-preload/renderer.js new file mode 100644 index 0000000000000..7585229a91781 --- /dev/null +++ b/docs/fiddles/tutorial-preload/renderer.js @@ -0,0 +1,2 @@ +const information = document.getElementById('info'); +information.innerText = `This app is using Chrome (v${versions.chrome()}), Node.js (v${versions.node()}), and Electron (v${versions.electron()})`; diff --git a/docs/images/gatekeeper.png b/docs/images/gatekeeper.png index ed4b15ec7e8d2ee10a75165ec3f67955bd6a41ea..22567135b7da1385eb3c50e0939998771c5cca75 100644 GIT binary patch delta 57480 zcmb^ZbyS;A6E_ayE(MBfi@TJf!AdDkS||mIJG2xD4uK0PrMLulDNrcx?oM%9+zD<$ zga7#6^4!mP-hbcZiz$c z|2G}zUtD_sW0MvX7XA;@|4sdWIduPjI6(hQ|9_MJUluUL*3#a^^q*&w7W~f?|E0l{ z2*m;OBl}+{D6%NZujSr*pzfz*XIUzE_HDHs3{~PQ)vVatbyFx4aJ`%L>%izSGS8vn z=?=xCVRo|%G0at((luk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new file mode 100644 index 0000000000000000000000000000000000000000..9f330b32de9ca8620842d99a6e46b1b3d1f0182d GIT binary patch literal 71705 zcmc$_WmH_v(lCl8xCaPsNpN>35ZooWlR*N5+u(%Y?k+)tySoQ>cXx-u;ZC0CocDcl z&iAdm?yozu_Uhi$j=>;EBDPQ}!%8ClconG! zM@WwNF7_?pteGga}d`%LRrlBQ6^M`q5Qp3_`UfOsA9@DHnN~&J04cI zmr=c`Pt?_4Z7T6kitXh_r*veLy^&5#j7B_L*j=w(xpMc z*syywqP9Vdlv>ao0B;$MHHV@9S~zTATe=E*tRDV4R78(+Yy1|aq9~CG3pR5f&K64H z*S2VJ;4+PnS2T>eh$Z~-dyFm@D7H(!k)yVAQ?zsYhIvtqq*?Euet}=2`A@1}s@Pw& zFD|!y1ufSyk#aE+gC7l1t+(Zal?`aSmp6tIHN;BDpUF1p4$+{bF$XB4z6ng!y zVec`TE*i*{FbGA7K8%C}sqM2>eKI5pT(|m|AB@B;g+VCXEJ=ner#f#LEibKjCvsSo zV;L{)6;4NdR&;hPoSrhIeBOqM#7*ldn=P3bi^THEs7ORf8l{^6qv@9&cD5>KcJTM3 z#E*mp{2wvfaJms;Y+cHuN$G~7{onsQlDPo*-WjEQr;ratI%UH6AVz)Yo3>#KzY)-2 zknqY#?Sd>qnDc`xGhQp%JJlpUunw8Lyz04oe-DqQhKQaBy|{Desov37;e9i zus>Uz$HLU}#67yi=a4Z<;Zy0wc7=ti^!hTvk9(tvK*9c6{{`;$0YH7SRX$lfD0fT>GpVid26EJB5g*+PoYEQfMKQZW;o^k9EOM5~GAlSHpg(1#!QGM;p=@6JfBv)|Vu@Oh{8$Q$fdbZNjE81$8k z7vu0{wTm_#_P3u9T*WhEC@^keK6S0G#e7y(-qAW-*uK}~Q722(%H(!Al8QE0R;n%c z?)YX65A932)4!okK3BN)f=y}Ms{J08zCN#6U>a~}`c<~nMp?Uq> z`aZA97$&m>t-awxx{lV*sr6uF=w}(T&KMH}S)cdizIXM|Ol$Dpg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In`<7g0f>YOO%36sHCBW)q0ZrS3+=XNv8INI;7G&(Ebhba!=WFf#e5M9;$7!29k# zdFcDdVrcXuFn3C3&TWFWpCz<;HKR5-a59>%PRmHJquouqbH( *NOTE:* the location of Electron's prebuilt binaries is indicated +:::note +The location of Electron's prebuilt binaries is indicated with `electron/` in the examples below. +::: -*On macOS:* - -```plaintext +```plain title='macOS' electron/Electron.app/Contents/Resources/app/ ├── package.json ├── main.js └── index.html ``` -*On Windows and Linux:* - -```plaintext +```plain title='Windows and Linux' electron/resources/app ├── package.json ├── main.js @@ -54,7 +52,7 @@ Then execute `Electron.app` on macOS, `electron` on Linux, or `electron.exe` on Windows, and Electron will start as your app. The `electron` directory will then be your distribution to deliver to users. -### With an app source code archive +### With an app source code archive (asar) 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 @@ -65,16 +63,12 @@ To use an `asar` archive to replace the `app` folder, you need to rename the archive to `app.asar`, and put it under Electron's resources directory like below, and Electron will then try to read the archive and start from it. -*On macOS:* - -```plaintext +```plain title='macOS' electron/Electron.app/Contents/Resources/ └── app.asar ``` -*On Windows and Linux:* - -```plaintext +```plain title='Windows' electron/resources/ └── app.asar ``` @@ -87,47 +81,44 @@ You can find more details on how to use `asar` in the After bundling your app into Electron, you will want to rebrand Electron before distributing it to users. -#### macOS - -You can rename `Electron.app` to any name you want, and you also have to rename -the `CFBundleDisplayName`, `CFBundleIdentifier` and `CFBundleName` fields in the -following files: +- **Windows:** You can rename `electron.exe` to any name you like, and edit + its icon and other information with tools like [rcedit](https://github.com/electron/rcedit). +- **Linux:** You can rename the `electron` executable to any name you like. +- **macOS:** You can rename `Electron.app` to any name you want, and you also have to rename + the `CFBundleDisplayName`, `CFBundleIdentifier` and `CFBundleName` fields in the + following files: -* `Electron.app/Contents/Info.plist` -* `Electron.app/Contents/Frameworks/Electron Helper.app/Contents/Info.plist` + - `Electron.app/Contents/Info.plist` + - `Electron.app/Contents/Frameworks/Electron Helper.app/Contents/Info.plist` -You can also rename the helper app to avoid showing `Electron Helper` in the -Activity Monitor, but make sure you have renamed the helper app's executable -file's name. + You can also rename the helper app to avoid showing `Electron Helper` in the + Activity Monitor, but make sure you have renamed the helper app's executable + file's name. -The structure of a renamed app would be like: + The structure of a renamed app would be like: -```plaintext +```plain MyApp.app/Contents ├── Info.plist ├── MacOS/ -│   └── MyApp +│ └── MyApp └── Frameworks/ └── MyApp Helper.app ├── Info.plist └── MacOS/ -    └── MyApp Helper + └── MyApp Helper ``` -#### Windows +:::note -You can rename `electron.exe` to any name you like, and edit its icon and other -information with tools like [rcedit](https://github.com/electron/rcedit). - -#### Linux - -You can rename the `electron` executable to any name you like. - -### Rebranding by rebuilding Electron from source - -It is also possible to rebrand Electron by changing the product name and +it is also possible to rebrand Electron by changing the product name and building it from source. To do this you need to set the build argument corresponding to the product name (`electron_product_name = "YourProductName"`) in the `args.gn` file and rebuild. +Keep in mind this is not recommended as setting up the environment to compile +from source is not trivial and takes significant time. + +::: + [asar]: https://github.com/electron/asar diff --git a/docs/tutorial/code-signing.md b/docs/tutorial/code-signing.md index d591fe617c89b..a035b480cd57e 100644 --- a/docs/tutorial/code-signing.md +++ b/docs/tutorial/code-signing.md @@ -1,14 +1,20 @@ -# Code Signing +--- +title: 'Code Signing' +description: 'Code signing is a security technology that you use to certify that an app was created by you.' +slug: code-signing +hide_title: false +--- Code signing is a security technology that you use to certify that an app was -created by you. +created by you. You should sign your application so it does not trigger any +operating system security checks. -On macOS the system can detect any change to the app, whether the change is +On macOS, the system can detect any change to the app, whether the change is introduced accidentally or by malicious code. On Windows, the system assigns a trust level to your code signing certificate which if you don't have, or if your trust level is low, will cause security -dialogs to appear when users start using your application. Trust level builds +dialogs to appear when users start using your application. Trust level builds over time so it's better to start code signing as early as possible. While it is possible to distribute unsigned apps, it is not recommended. Both @@ -16,20 +22,19 @@ Windows and macOS will, by default, prevent either the download or the execution of unsigned applications. Starting with macOS Catalina (version 10.15), users have to go through multiple manual steps to open unsigned applications. -![macOS Catalina Gatekeeper warning: The app cannot be opened because the -developer cannot be verified](../images/gatekeeper.png) +![macOS Catalina Gatekeeper warning: The app cannot be opened because the developer cannot be verified](../images/gatekeeper.png) As you can see, users get two options: Move the app straight to the trash or cancel running it. You don't want your users to see that dialog. If you are building an Electron app that you intend to package and distribute, -it should be code-signed. +it should be code signed. -# Signing & notarizing macOS builds +## Signing & notarizing macOS builds -Properly preparing macOS applications for release requires two steps: First, the -app needs to be code-signed. Then, the app needs to be uploaded to Apple for a -process called "notarization", where automated systems will further verify that +Properly preparing macOS applications for release requires two steps. First, the +app needs to be code signed. Then, the app needs to be uploaded to Apple for a +process called **notarization**, where automated systems will further verify that your app isn't doing anything to endanger its users. To start the process, ensure that you fulfill the requirements for signing and @@ -42,18 +47,18 @@ notarizing your app: Electron's ecosystem favors configuration and freedom, so there are multiple ways to get your application signed and notarized. -## `electron-forge` +### Using Electron Forge If you're using Electron's favorite build tool, getting your application signed and notarized requires a few additions to your configuration. [Forge](https://electronforge.io) is a collection of the official Electron tools, using [`electron-packager`], [`electron-osx-sign`], and [`electron-notarize`] under the hood. -Let's take a look at an example configuration with all required fields. Not all -of them are required: the tools will be clever enough to automatically find a -suitable `identity`, for instance, but we recommend that you are explicit. +Let's take a look at an example `package.json` configuration with all required fields. Not all of them are +required: the tools will be clever enough to automatically find a suitable `identity`, for instance, +but we recommend that you are explicit. -```json +```json title="package.json" {7} { "name": "my-app", "version": "0.0.1", @@ -69,7 +74,7 @@ suitable `identity`, for instance, but we recommend that you are explicit. }, "osxNotarize": { "appleId": "felix@felix.fun", - "appleIdPassword": "my-apple-id-password", + "appleIdPassword": "my-apple-id-password" } } } @@ -77,11 +82,11 @@ suitable `identity`, for instance, but we recommend that you are explicit. } ``` -The `plist` file referenced here needs the following macOS-specific entitlements +The `entitlements.plist` file referenced here needs the following macOS-specific entitlements to assure the Apple security mechanisms that your app is doing these things without meaning any harm: -```xml +```xml title="entitlements.plist" @@ -104,7 +109,7 @@ file](https://github.com/electron/fiddle/blob/master/forge.config.js). If you plan to access the microphone or camera within your app using Electron's APIs, you'll also need to add the following entitlements: -```xml +```xml title="entitlements.plist" com.apple.security.device.audio-input com.apple.security.device.camera @@ -113,28 +118,26 @@ need to add the following entitlements: If these are not present in your app's entitlements when you invoke, for example: -```js +```js title="main.js" const { systemPreferences } = require('electron') - const microphone = systemPreferences.askForMediaAccess('microphone') ``` Your app may crash. See the Resource Access section in [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime) for more information and entitlements you may need. -## `electron-builder` +### Using Electron Builder Electron Builder comes with a custom solution for signing your application. You can find [its documentation here](https://www.electron.build/code-signing). -## `electron-packager` +### Using Electron Packager If you're not using an integrated build pipeline like Forge or Builder, you are likely using [`electron-packager`], which includes [`electron-osx-sign`] and [`electron-notarize`]. If you're using Packager's API, you can pass [in configuration that both signs -and notarizes your -application](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html). +and notarizes your application](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html). ```js const packager = require('electron-packager') @@ -155,11 +158,11 @@ packager({ }) ``` -The `plist` file referenced here needs the following macOS-specific entitlements +The `entitlements.plist` file referenced here needs the following macOS-specific entitlements to assure the Apple security mechanisms that your app is doing these things without meaning any harm: -```xml +```xml title="entitlements.plist" @@ -175,11 +178,11 @@ without meaning any harm: Up until Electron 12, the `com.apple.security.cs.allow-unsigned-executable-memory` entitlement was required as well. However, it should not be used anymore if it can be avoided. -## Mac App Store +### Signing Mac App Store applications See the [Mac App Store Guide]. -# Signing Windows builds +## Signing Windows builds Before signing Windows builds, you must do the following: @@ -190,31 +193,140 @@ Before signing Windows builds, you must do the following: You can get a code signing certificate from a lot of resellers. Prices vary, so it may be worth your time to shop around. Popular resellers include: -* [digicert](https://www.digicert.com/code-signing/microsoft-authenticode.htm) -* [Sectigo](https://sectigo.com/ssl-certificates-tls/code-signing) -* Amongst others, please shop around to find one that suits your needs, Google - is your friend 😄 +- [digicert](https://www.digicert.com/code-signing/microsoft-authenticode.htm) +- [Sectigo](https://sectigo.com/ssl-certificates-tls/code-signing) +- Amongst others, please shop around to find one that suits your needs! 😄 + +:::caution Keep your certificate password private +Your certificate password should be a **secret**. Do not share it publicly or +commit it to your source code. +::: + +### Using Electron Forge + +Once you have a code signing certificate file (`.pfx`), you can sign +[Squirrel.Windows][maker-squirrel] and [MSI][maker-msi] installers in Electron Forge +with the `certificateFile` and `certificatePassword` fields in their respective +configuration objects. -There are a number of tools for signing your packaged app: +For example, if you keep your Forge config in your `package.json` file and are +creating a Squirrel.Windows installer: + +```json {9-15} title='package.json' +{ + "name": "my-app", + "version": "0.0.1", + //... + "config": { + "forge": { + "packagerConfig": {}, + "makers": [ + { + "name": "@electron-forge/maker-squirrel", + "config": { + "certificateFile": "./cert.pfx", + "certificatePassword": "this-is-a-secret" + } + } + ] + } + } + //... +} +``` -* [`electron-winstaller`] will generate an installer for windows and sign it for - you -* [`electron-forge`] can sign installers it generates through the - Squirrel.Windows or MSI targets. -* [`electron-builder`] can sign some of its windows targets +### Using electron-winstaller (Squirrel.Windows) + +[`electron-winstaller`] is a package that can generate Squirrel.Windows installers for your +Electron app. This is the tool used under the hood by Electron Forge's +[Squirrel.Windows Maker][maker-squirrel]. If you're not using Electron Forge and want to use +`electron-winstaller` directly, use the `certificateFile` and `certificatePassword` configuration +options when creating your installer. + +```js {10-11} +const electronInstaller = require('electron-winstaller') +// NB: Use this syntax within an async function, Node does not have support for +// top-level await as of Node 12. +try { + await electronInstaller.createWindowsInstaller({ + appDirectory: '/tmp/build/my-app-64', + outputDirectory: '/tmp/build/installer64', + authors: 'My App Inc.', + exe: 'myapp.exe', + certificateFile: './cert.pfx', + certificatePassword: 'this-is-a-secret', + }) + console.log('It worked!') +} catch (e) { + console.log(`No dice: ${e.message}`) +} +``` + +For full configuration options, check out the [`electron-winstaller`] repository! + +### Using electron-wix-msi (WiX MSI) + +[`electron-wix-msi`] is a package that can generate MSI installers for your +Electron app. This is the tool used under the hood by Electron Forge's [MSI Maker][maker-msi]. + +If you're not using Electron Forge and want to use `electron-wix-msi` directly, use the +`certificateFile` and `certificatePassword` configuration options +or pass in parameters directly to [SignTool.exe] with the `signWithParams` option. + +```js {12-13} +import { MSICreator } from 'electron-wix-msi' + +// Step 1: Instantiate the MSICreator +const msiCreator = new MSICreator({ + appDirectory: '/path/to/built/app', + description: 'My amazing Kitten simulator', + exe: 'kittens', + name: 'Kittens', + manufacturer: 'Kitten Technologies', + version: '1.1.2', + outputDirectory: '/path/to/output/folder', + certificateFile: './cert.pfx', + certificatePassword: 'this-is-a-secret', +}) + +// Step 2: Create a .wxs template file +const supportBinaries = await msiCreator.create() + +// 🆕 Step 2a: optionally sign support binaries if you +// sign you binaries as part of of your packaging script +supportBinaries.forEach(async (binary) => { + // Binaries are the new stub executable and optionally + // the Squirrel auto updater. + await signFile(binary) +}) + +// Step 3: Compile the template to a .msi file +await msiCreator.compile() +``` + +For full configuration options, check out the [`electron-wix-msi`] repository! + +### Using Electron Builder + +Electron Builder comes with a custom solution for signing your application. You +can find [its documentation here](https://www.electron.build/code-signing). -## Windows Store +### Signing Windows Store applications See the [Windows Store Guide]. -[Apple Developer Program]: https://developer.apple.com/programs/ +[apple developer program]: https://developer.apple.com/programs/ [`electron-builder`]: https://github.com/electron-userland/electron-builder [`electron-forge`]: https://github.com/electron-userland/electron-forge [`electron-osx-sign`]: https://github.com/electron-userland/electron-osx-sign [`electron-packager`]: https://github.com/electron/electron-packager [`electron-notarize`]: https://github.com/electron/electron-notarize [`electron-winstaller`]: https://github.com/electron/windows-installer -[Xcode]: https://developer.apple.com/xcode +[`electron-wix-msi`]: https://github.com/felixrieseberg/electron-wix-msi +[xcode]: https://developer.apple.com/xcode [signing certificates]: https://github.com/electron/electron-osx-sign/wiki/1.-Getting-Started#certificates -[Mac App Store Guide]: mac-app-store-submission-guide.md -[Windows Store Guide]: windows-store-guide.md +[mac app store guide]: ./mac-app-store-submission-guide.md +[windows store guide]: ./windows-store-guide.md +[maker-squirrel]: https://www.electronforge.io/config/makers/squirrel.windows +[maker-msi]: https://www.electronforge.io/config/makers/wix-msi +[signtool.exe]: https://docs.microsoft.com/en-us/dotnet/framework/tools/signtool-exe diff --git a/docs/tutorial/distribution-overview.md b/docs/tutorial/distribution-overview.md new file mode 100644 index 0000000000000..b7e9bd991b4fd --- /dev/null +++ b/docs/tutorial/distribution-overview.md @@ -0,0 +1,54 @@ +--- +title: 'Distribution Overview' +description: 'To distribute your app with Electron, you need to package and rebrand it. To do this, you can either use specialized tooling or manual approaches.' +slug: distribution-overview +hide_title: false +--- + +Once your app is ready for production, there are a couple steps you need to take before +you can deliver it to your users. + +## Packaging + +To distribute your app with Electron, you need to package all your resources and assets +into an executable and rebrand it. To do this, you can either use specialized tooling +or do it manually. See the [Application Packaging][application-packaging] tutorial +for more information. + +## Code signing + +Code signing is a security technology that you use to certify that an app was +created by you. You should sign your application so it does not trigger the +security checks of your user's operating system. + +To get started with each operating system's code signing process, please read the +[Code Signing][code-signing] docs. + +## Publishing + +Once your app is packaged and signed, you can freely distribute your app directly +to users by uploading your installers online. + +To reach more users, you can also choose to upload your app to each operating system's +digital distribution platform (i.e. app store). These require another build step aside +from your direct download app. For more information, check out each individual app store guide: + +- [Mac App Store][mac-app] +- [Windows Store][windows-store] +- [Snapcraft (Linux)][snapcraft] + +## Updating + +Electron's auto-updater allows you to deliver application updates to users +without forcing them to manually download new versions of your application. +Check out the [Updating Applications][updates] guide for details on implementing automatic updates +with Electron. + + + +[application-packaging]: ./application-distribution.md +[code-signing]: ./code-signing.md +[mac-app]: ./mac-app-store-submission-guide.md +[windows-store]: ./windows-store-guide.md +[snapcraft]: ./snapcraft.md +[updates]: ./updates.md diff --git a/docs/tutorial/examples.md b/docs/tutorial/examples.md new file mode 100644 index 0000000000000..a2bea3c12f300 --- /dev/null +++ b/docs/tutorial/examples.md @@ -0,0 +1,56 @@ +--- +title: 'Examples Overview' +description: 'A set of examples for common Electron features' +slug: examples +hide_title: false +--- + +# Examples Overview + +In this section, we have collected a set of guides for common features +that you may want to implement in your Electron application. Each guide +contains a practical example in a minimal, self-contained example app. +The easiest way to run these examples is by downloading [Electron Fiddle][fiddle]. + +Once Fiddle is installed, you can press on the "Open in Fiddle" button that you +will find below code samples like the following one: + +```fiddle docs/fiddles/quick-start +window.addEventListener('DOMContentLoaded', () => { + const replaceText = (selector, text) => { + const element = document.getElementById(selector) + if (element) element.innerText = text + } + + for (const type of ['chrome', 'node', 'electron']) { + replaceText(`${type}-version`, process.versions[type]) + } +}) +``` + +If there is still something that you do not know how to do, please take a look at the [API][app] +as there is a chance it might be documented just there (and also open an issue requesting the +guide!). + + + +| Guide | Description | +| :-------------------- | ------------------------------------------------------------------------------------------------------------------- | +| [Message ports] | This guide provides some examples of how you might use MessagePorts in your app to communicate different processes. | +| [Device access] | Learn how to access the device hardware (Bluetooth, USB, Serial). | +| [Keyboard shortcuts] | Configure local and global keyboard shortcuts for your Electron application. | +| [Multithreading] | With Web Workers, it is possible to run JavaScript in OS-level threads | +| [Offscreen rendering] | Offscreen rendering lets you obtain the content of a BrowserWindow in a bitmap, so it can be rendered anywhere. | +| [Spellchecker] | Learn how to use the built-in spellchecker, set languages, etc. | +| [Web embeds] | Discover the different ways to embed third-party web content in your application. | + + + +## How to...? + +You can find the full list of "How to?" in the sidebar. If there is +something that you would like to do that is not documented, please join +our [Discord server][] and let us know! + +[discord server]: https://discord.com/invite/electron +[fiddle]: https://www.electronjs.org/fiddle diff --git a/docs/tutorial/introduction.md b/docs/tutorial/introduction.md index fe26df6498f8f..8091434c01b0f 100644 --- a/docs/tutorial/introduction.md +++ b/docs/tutorial/introduction.md @@ -1,10 +1,11 @@ -# Introduction +--- +title: 'Introduction' +description: 'Welcome to the Electron documentation! If this is your first time developing an Electron app, read through this Getting Started section to get familiar with the basics. Otherwise, feel free to explore our guides and API documentation!' +slug: /latest/ +hide_title: false +--- -Welcome to the Electron documentation! If this is your first time developing -an Electron app, read through this Getting Started section to get familiar with the -basics. Otherwise, feel free to explore our guides and API documentation! - -## What is Electron? +# What is Electron? Electron is a framework for building desktop applications using JavaScript, HTML, and CSS. By embedding [Chromium][chromium] and [Node.js][node] into its @@ -12,20 +13,12 @@ binary, Electron allows you to maintain one JavaScript codebase and create cross-platform apps that work on Windows, macOS, and Linux — no native development experience required. -## Prerequisites - -These docs operate under the assumption that the reader is familiar with both -Node.js and general web development. If you need to get more comfortable with -either of these areas, we recommend the following resources: - -* [Getting started with the Web (MDN)][mdn-guide] -* [Introduction to Node.js][node-guide] +## Getting started -Moreover, you'll have a better time understanding how Electron works if you get -acquainted with Chromium's process model. You can get a brief overview of -Chrome architecture with the [Chrome comic][comic], which was released alongside -Chrome's launch back in 2008. Although it's been over a decade since then, the -core principles introduced in the comic remain helpful to understand Electron. +We recommend you to start with the [tutorial], which guides you through the +process of developing an Electron app and distributing it to users. +The [examples] and [API documentation] are also good places to browse around +and discover new things. ## Running examples with Electron Fiddle @@ -39,21 +32,44 @@ a code block. If you have Fiddle installed, this button will open a `fiddle.electronjs.org` link that will automatically load the example into Fiddle, no copy-pasting required. +```fiddle docs/fiddles/quick-start +``` + +## What is in the docs? + +All the official documentation is available from the sidebar. These +are the different categories and what you can expect on each one: + +- **Tutorial**: An end-to-end guide on how to create and publish your first Electron + application. +- **Processes in Electron**: In-depth reference on Electron processes and how to work with them. +- **Best Practices**: Important checklists to keep in mind when developing an Electron app. +- **How-To Examples**: Quick references to add features to your Electron app. +- **Development**: Miscellaneous development guides. +- **Distribution**: Learn how to distribute your app to end users. +- **Testing and debugging**: How to debug JavaScript, write tests, and other tools used + to create quality Electron applications. +- **Resources**: Useful links to better understand how the Electron project works + and is organized. +- **Contributing to Electron**: Compiling Electron and making contributions can be daunting. + We try to make it easier in this section. + ## Getting help Are you getting stuck anywhere? Here are a few links to places to look: -* If you need help with developing your app, our [community Discord server][discord] -is a great place to get advice from other Electron app developers. -* If you suspect you're running into a bug with the `electron` package, please check -the [GitHub issue tracker][issue-tracker] to see if any existing issues match your -problem. If not, feel free to fill out our bug report template and submit a new issue. +- If you need help with developing your app, our [community Discord server][discord] + is a great place to get advice from other Electron app developers. +- If you suspect you're running into a bug with the `electron` package, please check + the [GitHub issue tracker][issue-tracker] to see if any existing issues match your + problem. If not, feel free to fill out our bug report template and submit a new issue. + + +[api documentation]: ../api/app.md [chromium]: https://www.chromium.org/ -[node]: https://nodejs.org/ -[mdn-guide]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web -[node-guide]: https://nodejs.dev/learn -[comic]: https://www.google.com/googlebooks/chrome/ +[discord]: https://discord.com/invite/APGC3k5yaH +[examples]: examples.md [fiddle]: https://electronjs.org/fiddle [issue-tracker]: https://github.com/electron/electron/issues -[discord]: https://discord.gg/electronjs +[node]: https://nodejs.org/ diff --git a/docs/tutorial/process-model.md b/docs/tutorial/process-model.md index bfbb941486f55..2cb37099b513b 100644 --- a/docs/tutorial/process-model.md +++ b/docs/tutorial/process-model.md @@ -1,10 +1,17 @@ +--- +title: 'Process Model' +description: 'Electron inherits its multi-process architecture from Chromium, which makes the framework architecturally very similar to a modern web browser. This guide will expand on the concepts applied in the tutorial.' +slug: process-model +hide_title: false +--- + # Process Model Electron inherits its multi-process architecture from Chromium, which makes the framework -architecturally very similar to a modern web browser. In this guide, we'll expound on -the conceptual knowledge of Electron that we applied in the minimal [quick start app][]. +architecturally very similar to a modern web browser. This guide will expand on the +concepts applied in the [Tutorial][tutorial]. -[quick start app]: ./quick-start.md +[tutorial]: ./tutorial-1-prerequisites.md ## Why not a single process? @@ -27,10 +34,10 @@ visualizes this model: ![Chrome's multi-process architecture](../images/chrome-processes.png) Electron applications are structured very similarly. As an app developer, you control -two types of processes: main and renderer. These are analogous to Chrome's own browser -and renderer processes outlined above. +two types of processes: [main](#the-main-process) and [renderer](#the-renderer-process). +These are analogous to Chrome's own browser and renderer processes outlined above. -[Chrome Comic]: https://www.google.com/googlebooks/chrome/ +[chrome comic]: https://www.google.com/googlebooks/chrome/ ## The main process @@ -40,7 +47,7 @@ to `require` modules and use all of Node.js APIs. ### Window management -The primary purpose of the main process is to create and manage application windows with the +The main process' primary purpose is to create and manage application windows with the [`BrowserWindow`][browser-window] module. Each instance of the `BrowserWindow` class creates an application window that loads @@ -68,7 +75,7 @@ When a `BrowserWindow` instance is destroyed, its corresponding renderer process terminated as well. [browser-window]: ../api/browser-window.md -[web-embed]: ./web-embeds.md +[web-embed]: ../tutorial/web-embeds.md [web-contents]: ../api/web-contents.md [event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter @@ -90,7 +97,7 @@ app.on('window-all-closed', () => { ``` [app]: ../api/app.md -[quick-start-lifecycle]: ./quick-start.md#manage-your-windows-lifecycle +[quick-start-lifecycle]: ../tutorial/quick-start.md#manage-your-windows-lifecycle ### Native APIs @@ -105,7 +112,7 @@ For a full list of Electron's main process modules, check out our API documentat Each Electron app spawns a separate renderer process for each open `BrowserWindow` (and each web embed). As its name implies, a renderer is responsible for -*rendering* web content. For all intents and purposes, code ran in renderer processes +_rendering_ web content. For all intents and purposes, code ran in renderer processes should behave according to web standards (insofar as Chromium does, at least). Therefore, all user interfaces and app functionality within a single browser @@ -115,18 +122,22 @@ web. Although explaining every web spec is out of scope for this guide, the bare minimum to understand is: -* An HTML file is your entry point for the renderer process. -* UI styling is added through Cascading Style Sheets (CSS). -* Executable JavaScript code can be added through ` + +``` + +After following the above steps, your app should look something like this: + +![Electron app showing This app is using Chrome (v102.0.5005.63), Node.js (v16.14.2), and Electron (v19.0.3)](../images/preload-example.png) + +And the code should look like this: + +```fiddle docs/fiddles/tutorial-preload + +``` + +## Communicating between processes + +As we have mentioned above, Electron's main and renderer process have distinct responsibilities +and are not interchangeable. This means it is not possible to access the Node.js APIs directly +from the renderer process, nor the HTML Document Object Model (DOM) from the main process. + +The solution for this problem is to use Electron's `ipcMain` and `ipcRenderer` modules for +inter-process communication (IPC). To send a message from your web page to the main process, +you can set up a main process handler with `ipcMain.handle` and +then expose a function that calls `ipcRenderer.invoke` to trigger the handler in your preload script. + +To illustrate, we will add a global function to the renderer called `ping()` +that will return a string from the main process. + +First, set up the `invoke` call in your preload script: + +```js {1,7} title="preload.js" +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('versions', { + node: () => process.versions.node, + chrome: () => process.versions.chrome, + electron: () => process.versions.electron, + ping: () => ipcRenderer.invoke('ping'), + // we can also expose variables, not just functions +}) +``` + +:::caution IPC security + +Notice how we wrap the `ipcRenderer.invoke('ping')` call in a helper function rather +than expose the `ipcRenderer` module directly via context bridge. You **never** want to +directly expose the entire `ipcRenderer` module via preload. This would give your renderer +the ability to send arbitrary IPC messages to the main process, which becomes a powerful +attack vector for malicious code. + +::: + +Then, set up your `handle` listener in the main process. We do this _before_ +loading the HTML file so that the handler is guaranteed to be ready before +you send out the `invoke` call from the renderer. + +```js {1,11} title="main.js" +const { ipcMain } = require('electron') + +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + webPreferences: { + preload: path.join(__dirname, 'preload.js'), + }, + }) + ipcMain.handle('ping', () => 'pong') + win.loadFile('index.html') +} +``` + +Once you have the sender and receiver set up, you can now send messages from the renderer +to the main process through the `'ping'` channel you just defined. + +```js title='renderer.js' +const func = async () => { + const response = await window.versions.ping() + console.log(response) // prints out 'pong' +} + +func() +``` + +:::info + +For more in-depth explanations on using the `ipcRenderer` and `ipcMain` modules, +check out the full [Inter-Process Communication][ipc] guide. + +::: + +## Summary + +A preload script contains code that runs before your web page is loaded into the browser +window. It has access to both DOM APIs and Node.js environment, and is often used to +expose privileged APIs to the renderer via the `contextBridge` API. + +Because the main and renderer processes have very different responsibilities, Electron +apps often use the preload script to set up inter-process communication (IPC) interfaces +to pass arbitrary messages between the two kinds of processes. + +In the next part of the tutorial, we will be showing you resources on adding more +functionality to your app, then teaching you distributing your app to users. + + + +[advanced-installation]: ./installation.md +[application debugging]: ./application-debugging.md +[app]: ../api/app.md +[app-ready]: ../api/app.md#event-ready +[app-when-ready]: ../api/app.md#appwhenready +[browser-window]: ../api/browser-window.md +[commonjs]: https://nodejs.org/docs/latest/api/modules.html#modules_modules_commonjs_modules +[compound task]: https://code.visualstudio.com/Docs/editor/tasks#_compound-tasks +[content-script]: https://developer.chrome.com/docs/extensions/mv3/content_scripts/ +[contextbridge]: ../api/context-bridge.md +[context-isolation]: ./context-isolation.md +[`document.getelementbyid`]: https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById +[devtools-extension]: ./devtools-extension.md +[dirname]: https://nodejs.org/api/modules.html#modules_dirname +[global]: https://developer.mozilla.org/en-US/docs/Glossary/Global_object +[ipc]: ./ipc.md +[mdn-csp]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP +[modules]: ../api/app.md +[node-api]: https://nodejs.org/dist/latest/docs/api/ +[package-json-main]: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#main +[package-scripts]: https://docs.npmjs.com/cli/v7/using-npm/scripts +[path-join]: https://nodejs.org/api/path.html#path_path_join_paths +[process-model]: ./process-model.md +[react]: https://reactjs.org +[sandbox]: ./sandbox.md +[webpack]: https://webpack.js.org + + + +[prerequisites]: tutorial-1-prerequisites.md +[building your first app]: tutorial-2-first-app.md +[preload]: tutorial-3-preload.md +[features]: tutorial-4-adding-features.md +[packaging]: tutorial-5-packaging.md +[updates]: tutorial-6-publishing-updating.md diff --git a/docs/tutorial/tutorial-4-adding-features.md b/docs/tutorial/tutorial-4-adding-features.md new file mode 100644 index 0000000000000..b7c776c1dbd67 --- /dev/null +++ b/docs/tutorial/tutorial-4-adding-features.md @@ -0,0 +1,77 @@ +--- +title: 'Adding Features' +description: 'In this step of the tutorial, we will share some resources you should read to add features to your application' +slug: tutorial-adding-features +hide_title: false +--- + +:::info Follow along the tutorial + +This is **part 4** of the Electron tutorial. + +1. [Prerequisites][prerequisites] +1. [Building your First App][building your first app] +1. [Using Preload Scripts][preload] +1. **[Adding Features][features]** +1. [Packaging Your Application][packaging] +1. [Publishing and Updating][updates] + +::: + +## Adding application complexity + +If you have been following along, you should have a functional Electron application +with a static user interface. From this starting point, you can generally progress +in developing your app in two broad directions: + +1. Adding complexity to your renderer process' web app code +1. Deeper integrations with the operating system and Node.js + +It is important to understand the distinction between these two broad concepts. For the +first point, Electron-specific resources are not necessary. Building a pretty to-do +list in Electron is just pointing your Electron BrowserWindow to a pretty +to-do list web app. Ultimately, you are building your renderer's UI using the same tools +(HTML, CSS, JavaScript) that you would on the web. Therefore, Electron's docs will +not go in-depth on how to use standard web tools. + +On the other hand, Electron also provides a rich set of tools that allow +you to integrate with the desktop environment, from creating tray icons to adding +global shortcuts to displaying native menus. It also gives you all the power of a +Node.js environment in the main process. This set of capabilities separates +Electron applications from running a website in a browser tab, and are the +focus of Electron's documentation. + +## How-to examples + +Electron's documentation has many tutorials to help you with more advanced topics +and deeper operating system integrations. To get started, check out the +[How-To Examples][how-to] doc. + +:::note Let us know if something is missing! + +If you can't find what you are looking for, please let us know on [GitHub] or in +our [Discord server][discord]! + +::: + +## What's next? + +For the rest of the tutorial, we will be shifting away from application code +and giving you a look at how you can get your app from your developer machine +into end users' hands. + + + +[discord]: https://discord.com/invite/APGC3k5yaH +[github]: https://github.com/electron/electronjs.org-new/issues/new +[how to]: ./examples.md +[node-platform]: https://nodejs.org/api/process.html#process_process_platform + + + +[prerequisites]: tutorial-1-prerequisites.md +[building your first app]: tutorial-2-first-app.md +[preload]: tutorial-3-preload.md +[features]: tutorial-4-adding-features.md +[packaging]: tutorial-5-packaging.md +[updates]: tutorial-6-publishing-updating.md diff --git a/docs/tutorial/tutorial-5-packaging.md b/docs/tutorial/tutorial-5-packaging.md new file mode 100644 index 0000000000000..3ab4f15b50d84 --- /dev/null +++ b/docs/tutorial/tutorial-5-packaging.md @@ -0,0 +1,225 @@ +--- +title: 'Packaging Your Application' +description: 'To distribute your app with Electron, you need to package it and create installers.' +slug: tutorial-packaging +hide_title: false +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +:::info Follow along the tutorial + +This is **part 5** of the Electron tutorial. + +1. [Prerequisites][prerequisites] +1. [Building your First App][building your first app] +1. [Using Preload Scripts][preload] +1. [Adding Features][features] +1. **[Packaging Your Application][packaging]** +1. [Publishing and Updating][updates] + +::: + +## Learning goals + +In this part of the tutorial, we'll be going over the basics of packaging and distributing +your app with [Electron Forge]. + +## Using Electron Forge + +Electron does not have any tooling for packaging and distribution bundled into its core +modules. Once you have a working Electron app in dev mode, you need to use +additional tooling to create a packaged app you can distribute to your users (also known +as a **distributable**). Distributables can be either installers (e.g. MSI on Windows) or +portable executable files (e.g. `.app` on macOS). + +Electron Forge is an all-in-one tool that handles the packaging and distribution of Electron +apps. Under the hood, it combines a lot of existing Electron tools (e.g. [`electron-packager`], +[`@electron/osx-sign`], [`electron-winstaller`], etc.) into a single interface so you do not +have to worry about wiring them all together. + +### Importing your project into Forge + +You can install Electron Forge's CLI in your project's `devDependencies` and import your +existing project with a handy conversion script. + +```sh npm2yarn +npm install --save-dev @electron-forge/cli +npx electron-forge import +``` + +Once the conversion script is done, Forge should have added a few scripts +to your `package.json` file. + +```json title='package.json' + //... + "scripts": { + "start": "electron-forge start", + "package": "electron-forge package", + "make": "electron-forge make" + }, + //... +``` + +:::info CLI documentation + +For more information on `make` and other Forge APIs, check out +the [Electron Forge CLI documentation]. + +::: + +You should also notice that your package.json now has a few more packages installed +under your `devDependencies`, and contains an added `config.forge` field with an array +of makers configured. **Makers** are Forge plugins that create distributables from +your source code. You should see multiple makers in the pre-populated configuration, +one for each target platform. + +### Creating a distributable + +To create a distributable, use your project's new `make` script, which runs the +`electron-forge make` command. + +```sh npm2yarn +npm run make +``` + +This `make` command contains two steps: + +1. It will first run `electron-forge package` under the hood, which bundles your app + code together with the Electron binary. The packaged code is generated into a folder. +1. It will then use this packaged app folder to create a separate distributable for each + configured maker. + +After the script runs, you should see an `out` folder containing both the distributable +and a folder containing the packaged application code. + +```plain title='macOS output example' +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 +``` + +The distributable in the `out/make` folder should be ready to launch! You have now +created your first bundled Electron application. + +:::tip Distributable formats + +Electron Forge can be configured to create distributables in different OS-specific formats +(e.g. DMG, deb, MSI, etc.). See Forge's [Makers] documentation for all configuration options. + +::: + +:::note Packaging without Electron Forge + +If you want to manually package your code, or if you're just interested understanding the +mechanics behind packaging an Electron app, check out the full [Application Packaging] +documentation. + +::: + +## Important: signing your code + +In order to distribute desktop applications to end users, we _highly recommended_ for you +to **code sign** your Electron app. Code signing is an important part of shipping +desktop applications, and is mandatory for the auto-update step in the final part +of the tutorial. + +Code signing is a security technology that you use to certify that a desktop app was +created by a known source. Windows and macOS have their own OS-specific code signing +systems that will make it difficult for users to download or launch unsigned applications. + +If you already have code signing certificates for Windows and macOS, you can set your +credentials in your Forge configuration. Otherwise, please refer to the full +[Code Signing] documentation to learn how to purchase a certificate and for more information +on the desktop app code signing process. + +On macOS, code signing is done at the app packaging level. On Windows, distributable installers +are signed instead. + + + + +```json title='package.json' {6-18} +{ + //... + "config": { + "forge": { + //... + "packagerConfig": { + "osxSign": { + "identity": "Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)", + "hardened-runtime": true, + "entitlements": "entitlements.plist", + "entitlements-inherit": "entitlements.plist", + "signature-flags": "library" + }, + "osxNotarize": { + "appleId": "felix@felix.fun", + "appleIdPassword": "this-is-a-secret" + } + } + //... + } + } + //... +} +``` + + + + +```json title='package.json' {6-14} +{ + //... + "config": { + "forge": { + //... + "makers": [ + { + "name": "@electron-forge/maker-squirrel", + "config": { + "certificateFile": "./cert.pfx", + "certificatePassword": "this-is-a-secret" + } + } + ] + //... + } + } + //... +} +``` + + + + +## Summary + +Electron applications need to be packaged to be distributed to users. In this tutorial, +you imported your app into Electron Forge and configured it to package your app and +generate installers. + +In order for your application to be trusted by the user's system, you need to digitally +certify that the distributable is authentic and untampered by code signing it. Your app +can be signed through Forge once you configure it to use your code signing certificate +information. + +[`@electron/osx-sign`]: https://github.com/electron/osx-sign +[application packaging]: ./application-distribution.md +[code signing]: ./code-signing.md +[`electron-packager`]: https://github.com/electron/electron-packager +[`electron-winstaller`]: https://github.com/electron/windows-installer +[electron forge]: https://www.electronforge.io +[electron forge cli documentation]: https://www.electronforge.io/cli#commands +[makers]: https://www.electronforge.io/config/makers + + + +[prerequisites]: tutorial-1-prerequisites.md +[building your first app]: tutorial-2-first-app.md +[preload]: tutorial-3-preload.md +[features]: tutorial-4-adding-features.md +[packaging]: tutorial-5-packaging.md +[updates]: tutorial-6-publishing-updating.md diff --git a/docs/tutorial/tutorial-6-publishing-updating.md b/docs/tutorial/tutorial-6-publishing-updating.md new file mode 100644 index 0000000000000..65b89766d88f2 --- /dev/null +++ b/docs/tutorial/tutorial-6-publishing-updating.md @@ -0,0 +1,251 @@ +--- +title: 'Publishing and Updating' +description: "There are several ways to update an Electron application. The easiest and officially supported one is taking advantage of the built-in Squirrel framework and Electron's autoUpdater module." +slug: tutorial-publishing-updating +hide_title: false +--- + +:::info Follow along the tutorial + +This is **part 6** of the Electron tutorial. + +1. [Prerequisites][prerequisites] +1. [Building your First App][building your first app] +1. [Using Preload Scripts][preload] +1. [Adding Features][features] +1. [Packaging Your Application][packaging] +1. **[Publishing and Updating][updates]** + +::: + +## Learning goals + +If you've been following along, this is the last step of the tutorial! In this part, +you will publish your app to GitHub releases and integrate automatic updates +into your app code. + +## Using update.electronjs.org + +The Electron maintainers provide a free auto-updating service for open-source apps +at https://update.electronjs.org. Its requirements are: + +- Your app runs on macOS or Windows +- Your app has a public GitHub repository +- Builds are published to [GitHub releases] +- Builds are [code signed][code-signed] + +At this point, we'll assume that you have already pushed all your +code to a public GitHub repository. + +:::info Alternative update services + +If you're using an alternate repository host (e.g. GitLab or Bitbucket) or if +you need to keep your code repository private, please refer to our +[step-by-step guide][update-server] on hosting your own Electron update server. + +::: + +## Publishing a GitHub release + +Electron Forge has [Publisher] plugins that can automate the distribution +of your packaged application to various sources. In this tutorial, we will +be using the GitHub Publisher, which will allow us to publish +our code to GitHub releases. + +### Generating a personal access token + +Forge cannot publish to any repository on GitHub without permission. You +need to pass in an authenticated token that gives Forge access to +your GitHub releases. The easiest way to do this is to +[create a new personal access token (PAT)][new-pat] +with the `public_repo` scope, which gives write access to your public repositories. +**Make sure to keep this token a secret.** + +### Setting up the GitHub Publisher + +#### Installing the module + +Forge's [GitHub Publisher] is a plugin that +needs to be installed in your project's `devDependencies`: + +```sh npm2yarn +npm install --save-dev @electron-forge/publisher-github +``` + +#### Configuring the publisher in Forge + +Once you have it installed, you need to set it up in your Forge +configuration. A full list of options is documented in the Forge's +[`PublisherGitHubConfig`] API docs. + +```json title='package.json' {6-16} +{ + //... + "config": { + "forge": { + "publishers": [ + { + "name": "@electron-forge/publisher-github", + "config": { + "repository": { + "owner": "github-user-name", + "name": "github-repo-name" + }, + "prerelease": false, + "draft": true + } + } + ] + } + } + //... +} +``` + +:::tip Drafting releases before publishing + +Notice that you have configured Forge to publish your release as a draft. +This will allow you to see the release with its generated artifacts +without actually publishing it to your end users. You can manually +publish your releases via GitHub after writing release notes and +double-checking that your distributables work. + +::: + +#### Setting up your authentication token + +You also need to make the Publisher aware of your authentication token. +By default, it will use the value stored in the `GITHUB_TOKEN` environment +variable. + +### Running the publish command + +Add Forge's [publish command] to your npm scripts. + +```json {6} title='package.json' + //... + "scripts": { + "start": "electron-forge start", + "package": "electron-forge package", + "make": "electron-forge make", + "publish": "electron-forge publish" + }, + //... +``` + +This command will run your configured makers and publish the output distributables to a new +GitHub release. + +```sh npm2yarn +npm run publish +``` + +By default, this will only publish a single distributable for your host operating system and +architecture. You can publish for different architectures by passing in the `--arch` flag to your +Forge commands. + +The name of this release will correspond to the `version` field in your project's package.json file. + +:::tip Tagging releases + +Optionally, you can also [tag your releases in Git][git-tag] so that your +release is associated with a labeled point in your code history. npm comes +with a handy [`npm version`](https://docs.npmjs.com/cli/v8/commands/npm-version) +command that can handle the version bumping and tagging for you. + +::: + +#### Bonus: Publishing in GitHub Actions + +Publishing locally can be painful, especially because you can only create distributables +for your host operating system (i.e. you can't publish a Window `.exe` file from macOS). + +A solution for this would be to publish your app via automation workflows +such as [GitHub Actions], which can run tasks in the +cloud on Ubuntu, macOS, and Windows. This is the exact approach taken by [Electron Fiddle]. +You can refer to Fiddle's [Build and Release pipeline][fiddle-build] +and [Forge configuration][fiddle-forge-config] +for more details. + +## Instrumenting your updater code + +Now that we have a functional release system via GitHub releases, we now need to tell our +Electron app to download an update whenever a new release is out. Electron apps do this +via the [autoUpdater] module, which reads from an update server feed to check if a new version +is available for download. + +The update.electronjs.org service provides an updater-compatible feed. For example, Electron +Fiddle v0.28.0 will check the endpoint at https://update.electronjs.org/electron/fiddle/darwin/v0.28.0 +to see if a newer GitHub release is available. + +After your release is published to GitHub, the update.electronjs.org service should work +for your application. The only step left is to configure the feed with the autoUpdater module. + +To make this process easier, the Electron team maintains the [`update-electron-app`] module, +which sets up the autoUpdater boilerplate for update.electronjs.org in one function +call — no configuration required. This module will search for the update.electronjs.org +feed that matches your project's package.json `"repository"` field. + +First, install the module as a runtime dependency. + +```sh npm2yarn +npm install update-electron-app +``` + +Then, import the module and call it immediately in the main process. + +```js title='main.js' +require('update-electron-app')() +``` + +And that is all it takes! Once your application is packaged, it will update itself for each new +GitHub release that you publish. + +## Summary + +In this tutorial, we configured Electron Forge's GitHub Publisher to upload your app's +distributables to GitHub releases. Since distributables cannot always be generated +between platforms, we recommend setting up your building and publishing flow +in a Continuous Integration pipeline if you do not have access to machines. + +Electron applications can self-update by pointing the autoUpdater module to an update server feed. +update.electronjs.org is a free update server provided by Electron for open-source applications +published on GitHub releases. Configuring your Electron app to use this service is as easy as +installing and importing the `update-electron-app` module. + +If your application is not eligible for update.electronjs.org, you should instead deploy your +own update server and configure the autoUpdater module yourself. + +:::info 🌟 You're done! + +From here, you have officially completed our tutorial to Electron. Feel free to explore the +rest of our docs and happy developing! If you have questions, please stop by our community +[Discord server]. + +::: + +[autoupdater]: ../api/auto-updater.md +[code-signed]: ./code-signing.md +[discord server]: https://discord.com/invite/APGC3k5yaH +[electron fiddle]: https://electronjs.org/fiddle +[fiddle-build]: https://github.com/electron/fiddle/blob/master/.github/workflows/build.yaml +[fiddle-forge-config]: https://github.com/electron/fiddle/blob/master/forge.config.js +[github actions]: https://github.com/features/actions +[github publisher]: https://www.electronforge.io/config/publishers/github +[github releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository +[git tag]: https://git-scm.com/book/en/v2/Git-Basics-Tagging +[new-pat]: https://github.com/settings/tokens/new +[publish command]: https://www.electronforge.io/cli#publish +[publisher]: https://www.electronforge.io/config/publishers +[`publishergithubconfig`]: https://js.electronforge.io/publisher/github/interfaces/publishergithubconfig +[`update-electron-app`]: https://github.com/electron/update-electron-app +[update-server]: ./updates.md + + + +[prerequisites]: tutorial-1-prerequisites.md +[building your first app]: tutorial-2-first-app.md +[preload]: tutorial-3-preload.md +[features]: tutorial-4-adding-features.md +[packaging]: tutorial-5-packaging.md +[updates]: tutorial-6-publishing-updating.md diff --git a/docs/tutorial/updates.md b/docs/tutorial/updates.md index 83174b3e4b747..530d9658d496d 100644 --- a/docs/tutorial/updates.md +++ b/docs/tutorial/updates.md @@ -1,11 +1,16 @@ -# Updating Applications - -There are several ways to update an Electron application. The easiest and -officially supported one is taking advantage of the built-in +--- +title: 'Updating Applications' +description: "There are several ways to update an Electron application. The easiest and officially supported one is taking advantage of the built-in Squirrel framework and Electron's autoUpdater module." +slug: updates +hide_title: false +--- + +There are several ways to provide automatic updates to your Electron application. +The easiest and officially supported one is taking advantage of the built-in [Squirrel](https://github.com/Squirrel) framework and Electron's [autoUpdater](../api/auto-updater.md) module. -## Using `update.electronjs.org` +## Using update.electronjs.org The Electron team maintains [update.electronjs.org], a free and open-source webservice that Electron apps can use to self-update. The service is designed @@ -13,72 +18,77 @@ for Electron apps that meet the following criteria: - App runs on macOS or Windows - App has a public GitHub repository -- Builds are published to GitHub Releases -- Builds are code-signed +- Builds are published to [GitHub Releases][gh-releases] +- Builds are [code-signed](./code-signing.md) The easiest way to use this service is by installing [update-electron-app], a Node.js module preconfigured for use with update.electronjs.org. -Install the module: +Install the module using your Node.js package manager of choice: -```sh +```sh npm2yarn npm install update-electron-app ``` -Invoke the updater from your app's main process file: +Then, invoke the updater from your app's main process file: -```js +```js title="main.js" require('update-electron-app')() ``` By default, this module will check for updates at app startup, then every ten -minutes. When an update is found, it will automatically be downloaded in the background. When the download completes, a dialog is displayed allowing the user -to restart the app. +minutes. When an update is found, it will automatically be downloaded in the background. +When the download completes, a dialog is displayed allowing the user to restart the app. If you need to customize your configuration, you can -[pass options to `update-electron-app`][update-electron-app] +[pass options to update-electron-app][update-electron-app] or [use the update service directly][update.electronjs.org]. -## Deploying an Update Server +## Using other update services If you're developing a private Electron application, or if you're not publishing releases to GitHub Releases, it may be necessary to run your own update server. +### Step 1: Deploying an update server + Depending on your needs, you can choose from one of these: - [Hazel][hazel] – Update server for private or open-source apps which can be -deployed for free on [Vercel][vercel]. It pulls from [GitHub Releases][gh-releases] -and leverages the power of GitHub's CDN. + deployed for free on [Vercel][vercel]. It pulls from [GitHub Releases][gh-releases] + and leverages the power of GitHub's CDN. - [Nuts][nuts] – Also uses [GitHub Releases][gh-releases], but caches app -updates on disk and supports private repositories. + updates on disk and supports private repositories. - [electron-release-server][electron-release-server] – Provides a dashboard for -handling releases and does not require releases to originate on GitHub. + handling releases and does not require releases to originate on GitHub. - [Nucleus][nucleus] – A complete update server for Electron apps maintained by -Atlassian. Supports multiple applications and channels; uses a static file store -to minify server cost. + Atlassian. Supports multiple applications and channels; uses a static file store + to minify server cost. + +Once you've deployed your update server, you can instrument your app code to receive and +apply the updates with Electron's [autoUpdater] module. -## Implementing Updates in Your App +### Step 2: Receiving updates in your app -Once you've deployed your update server, continue with importing the required -modules in your code. The following code might vary for different server -software, but it works like described when using -[Hazel][hazel]. +First, import the required modules in your main process code. The following code might +vary for different server software, but it works like described when using [Hazel][hazel]. -**Important:** Please ensure that the code below will only be executed in -your packaged app, and not in development. You can use -[electron-is-dev](https://github.com/sindresorhus/electron-is-dev) to check for -the environment. +:::warning Check your execution environment! -```javascript +Please ensure that the code below will only be executed in your packaged app, and not in development. +You can use the [app.isPackaged](../api/app.md#appispackaged-readonly) API to check the environment. + +::: + +```javascript title='main.js' const { app, autoUpdater, dialog } = require('electron') ``` -Next, construct the URL of the update server and tell +Next, construct the URL of the update server feed and tell [autoUpdater](../api/auto-updater.md) about it: -```javascript +```javascript title='main.js' const server = 'https://your-deployment-url.com' const url = `${server}/update/${process.platform}/${app.getVersion()}` @@ -87,32 +97,32 @@ autoUpdater.setFeedURL({ url }) As the final step, check for updates. The example below will check every minute: -```javascript +```javascript title='main.js' setInterval(() => { autoUpdater.checkForUpdates() }, 60000) ``` -Once your application is [packaged](../tutorial/application-distribution.md), +Once your application is [packaged](./application-distribution.md), it will receive an update for each new [GitHub Release](https://help.github.com/articles/creating-releases/) that you publish. -## Applying Updates +### Step 3: Notifying users when updates are available Now that you've configured the basic update mechanism for your application, you need to ensure that the user will get notified when there's an update. This -can be achieved using the autoUpdater API -[events](../api/auto-updater.md#events): +can be achieved using the [autoUpdater API events](../api/auto-updater.md#events): -```javascript +```javascript title="main.js" autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { const dialogOpts = { type: 'info', buttons: ['Restart', 'Later'], title: 'Application Update', message: process.platform === 'win32' ? releaseNotes : releaseName, - detail: 'A new version has been downloaded. Restart the application to apply the updates.' + detail: + 'A new version has been downloaded. Restart the application to apply the updates.', } dialog.showMessageBox(dialogOpts).then((returnValue) => { @@ -125,16 +135,22 @@ Also make sure that errors are [being handled](../api/auto-updater.md#event-error). Here's an example for logging them to `stderr`: -```javascript -autoUpdater.on('error', message => { +```javascript title="main.js" +autoUpdater.on('error', (message) => { console.error('There was a problem updating the application') console.error(message) }) ``` -## Handling Updates Manually +:::info Handling updates manually + +Because the requests made by autoUpdate aren't under your direct control, you may find situations +that are difficult to handle (such as if the update server is behind authentication). The `url` +field supports the `file://` protocol, which means that with some effort, you can sidestep the +server-communication aspect of the process by loading your update from a local directory. +[Here's an example of how this could work](https://github.com/electron/electron/issues/5020#issuecomment-477636990). -Because the requests made by Auto Update aren't under your direct control, you may find situations that are difficult to handle (such as if the update server is behind authentication). The `url` field does support files, which means that with some effort, you can sidestep the server-communication aspect of the process. [Here's an example of how this could work](https://github.com/electron/electron/issues/5020#issuecomment-477636990). +::: [vercel]: https://vercel.com [hazel]: https://github.com/vercel/hazel From 218797eb61375a18b6126dfc9f511759585da84d Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 22 Jun 2022 04:18:12 -0400 Subject: [PATCH 515/811] fix: allow macOS debug builds to be built (#34536) Extending the `testing` GN profile with the arguments documented to allow breakpoint debugging (https://www.electronjs.org/docs/latest/development/debugging#breakpoint-debugging) doesn't quite work on macOS: ```sh is_debug = true symbol_level = 2 forbid_non_component_debug_builds = false ``` The build eventually fails on both Intel and Apple Silicon with the following (summarized) error: ```sh [S:41062 R:1 (41062:41247) (C/s:0.1 O/s:13.6)] SOLINK 'obj/electron/electron_framework_shared_library/Electron Framework' 'obj/electron/electron_framework_shared_library/Electron Framework.TOC' FAILED: obj/electron/electron_framework_shared_library/Electron Framework obj/electron/electron_framework_shared_library/Electron Framework.TOC ... Undefined symbols for architecture x86_64: "platform_util::GetViewForWindow(gfx::NativeWindow)", referenced from: BoundsOverlapWithAnyOpenPrompt(gfx::Rect const&, content::WebContents*) in libchrome.a(autofill_popup_view_utils.o) "platform_util::GetParent(gfx::NativeView)", referenced from: BoundsOverlapWithAnyOpenPrompt(gfx::Rect const&, content::WebContents*) in libchrome.a(autofill_popup_view_utils.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This symbol is defined on a file that is not declared as a dependency of `libchrome` on the GN definitions. Why the problem is not reproducible on plain testing or release builds remains a mystery to me. I'm guessing some non-debug path somewhere in the GN definitions does eventually require that file. Signed-off-by: Juan Cruz Viotti --- chromium_src/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index f5a8939902246..ffd4dacca88e2 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -92,6 +92,7 @@ static_library("chrome") { "//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h", "//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm", "//chrome/browser/media/webrtc/window_icon_util_mac.mm", + "//chrome/browser/platform_util_mac.mm", "//chrome/browser/process_singleton_mac.mm", "//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h", "//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm", From f172136752d2ad246733555339a1a7f97c87012b Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 22 Jun 2022 10:18:42 +0200 Subject: [PATCH 516/811] chore: remove undocumented page-title-set webview event (#34533) --- lib/renderer/web-view/guest-view-internal.ts | 8 -------- spec/webview-spec.js | 12 ------------ 2 files changed, 20 deletions(-) diff --git a/lib/renderer/web-view/guest-view-internal.ts b/lib/renderer/web-view/guest-view-internal.ts index d8b9b61c135f6..97b1ae6fea396 100644 --- a/lib/renderer/web-view/guest-view-internal.ts +++ b/lib/renderer/web-view/guest-view-internal.ts @@ -9,10 +9,6 @@ export interface GuestViewDelegate { reset(): void; } -const DEPRECATED_EVENTS: Record = { - 'page-title-updated': 'page-title-set' -} as const; - export function registerEvents (viewInstanceId: number, delegate: GuestViewDelegate) { ipcRendererInternal.on(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${viewInstanceId}`, function () { delegate.reset(); @@ -20,10 +16,6 @@ export function registerEvents (viewInstanceId: number, delegate: GuestViewDeleg }); ipcRendererInternal.on(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT}-${viewInstanceId}`, function (event, eventName, props) { - if (DEPRECATED_EVENTS[eventName] != null) { - delegate.dispatchEvent(DEPRECATED_EVENTS[eventName], props); - } - delegate.dispatchEvent(eventName, props); }); } diff --git a/spec/webview-spec.js b/spec/webview-spec.js index c703c57c8cec6..ff0f9c7964d68 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -566,18 +566,6 @@ describe(' tag', function () { }); }); - describe('page-title-set event', () => { - it('emits when title is set', async () => { - loadWebView(webview, { - src: `file://${fixtures}/pages/a.html` - }); - const { title, explicitSet } = await waitForEvent(webview, 'page-title-set'); - - expect(title).to.equal('test'); - expect(explicitSet).to.be.true(); - }); - }); - describe('page-favicon-updated event', () => { it('emits when favicon urls are received', async () => { loadWebView(webview, { From 5fee5b0e223aa73ddb118646431b6f4330135208 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 22 Jun 2022 03:23:11 -0700 Subject: [PATCH 517/811] chore: chunk filenames when linting C++ files (#34237) * chore: chunk filenames when linting C++ files * chore: refactor code for better readability Co-authored-by: Charles Kerr * chore: further tweak * chore: limit all platforms to 4095 characters on command line * chore: use python3 * Revert "chore: use python3" Co-authored-by: Charles Kerr Co-authored-by: Cheng Zhao --- script/lib/utils.js | 29 +++++++++++++++++++++++++++++ script/lint.js | 11 ++++++----- script/run-clang-tidy.ts | 29 ++--------------------------- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/script/lib/utils.js b/script/lib/utils.js index 55f678b43ed1c..44c81dc86aca0 100644 --- a/script/lib/utils.js +++ b/script/lib/utils.js @@ -1,5 +1,6 @@ const { GitProcess } = require('dugite'); const fs = require('fs'); +const os = require('os'); const path = require('path'); const ELECTRON_DIR = path.resolve(__dirname, '..', '..'); @@ -95,7 +96,35 @@ async function getCurrentBranch (gitDir) { return branch.trim(); } +function chunkFilenames (filenames, offset = 0) { + // Windows has a max command line length of 2047 characters, so we can't + // provide too many filenames without going over that. To work around that, + // chunk up a list of filenames such that it won't go over that limit when + // used as args. Other platforms may have higher limits, but 4095 might be + // the limit on Linux systems according to `termios(3)`, so cap it there. + const MAX_FILENAME_ARGS_LENGTH = + (os.platform() === 'win32' ? 2047 : 4095) - offset; + + return filenames.reduce( + (chunkedFilenames, filename) => { + const currChunk = chunkedFilenames[chunkedFilenames.length - 1]; + const currChunkLength = currChunk.reduce( + (totalLength, _filename) => totalLength + _filename.length + 1, + 0 + ); + if (currChunkLength + filename.length + 1 > MAX_FILENAME_ARGS_LENGTH) { + chunkedFilenames.push([filename]); + } else { + currChunk.push(filename); + } + return chunkedFilenames; + }, + [[]] + ); +} + module.exports = { + chunkFilenames, getCurrentBranch, getElectronExec, getOutDir, diff --git a/script/lint.js b/script/lint.js index 42b1abf1f09ed..839215ee35e84 100755 --- a/script/lint.js +++ b/script/lint.js @@ -9,6 +9,8 @@ const klaw = require('klaw'); const minimist = require('minimist'); const path = require('path'); +const { chunkFilenames } = require('./lib/utils'); + 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'); @@ -69,12 +71,11 @@ const LINTERS = [{ roots: ['shell'], test: filename => filename.endsWith('.cc') || (filename.endsWith('.h') && !isObjCHeader(filename)), run: (opts, filenames) => { - if (opts.fix) { - spawnAndCheckExitCode('python3', ['script/run-clang-format.py', '-r', '--fix', ...filenames]); - } else { - spawnAndCheckExitCode('python3', ['script/run-clang-format.py', '-r', ...filenames]); + const clangFormatFlags = opts.fix ? ['--fix'] : []; + for (const chunk of chunkFilenames(filenames)) { + spawnAndCheckExitCode('python3', ['script/run-clang-format.py', ...clangFormatFlags, ...chunk]); + cpplint(chunk); } - cpplint(filenames); } }, { key: 'objc', diff --git a/script/run-clang-tidy.ts b/script/run-clang-tidy.ts index 93d1a13f72497..86dba04f2e849 100644 --- a/script/run-clang-tidy.ts +++ b/script/run-clang-tidy.ts @@ -9,6 +9,8 @@ import * as streamJson from 'stream-json'; import { ignore as streamJsonIgnore } from 'stream-json/filters/Ignore'; import { streamArray as streamJsonStreamArray } from 'stream-json/streamers/StreamArray'; +import { chunkFilenames } from './lib/utils'; + const SOURCE_ROOT = path.normalize(path.dirname(__dirname)); const LLVM_BIN = path.resolve( SOURCE_ROOT, @@ -108,33 +110,6 @@ function getDepotToolsEnv (): NodeJS.ProcessEnv { return depotToolsEnv; } -function chunkFilenames (filenames: string[], offset: number = 0): string[][] { - // Windows has a max command line length of 2047 characters, so we can't - // provide too many filenames without going over that. To work around that, - // chunk up a list of filenames such that it won't go over that limit when - // used as args. Use a much higher limit on other platforms which will - // effectively be a no-op. - const MAX_FILENAME_ARGS_LENGTH = - PLATFORM === 'win32' ? 2047 - offset : 100 * 1024; - - return filenames.reduce( - (chunkedFilenames: string[][], filename) => { - const currChunk = chunkedFilenames[chunkedFilenames.length - 1]; - const currChunkLength = currChunk.reduce( - (totalLength, _filename) => totalLength + _filename.length + 1, - 0 - ); - if (currChunkLength + filename.length + 1 > MAX_FILENAME_ARGS_LENGTH) { - chunkedFilenames.push([filename]); - } else { - currChunk.push(filename); - } - return chunkedFilenames; - }, - [[]] - ); -} - async function runClangTidy ( outDir: string, filenames: string[], From e3243ad11384b938042a54adcce3a4a767495e44 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 22 Jun 2022 06:00:53 -0700 Subject: [PATCH 518/811] Bump v21.0.0-nightly.20220622 --- 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 753d7f773d16e..3c1431facc4d2 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220621 \ No newline at end of file +21.0.0-nightly.20220622 \ No newline at end of file diff --git a/package.json b/package.json index 7ebc2a8524b6e..6cb997f0a915f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220621", + "version": "21.0.0-nightly.20220622", "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 bb0aef7158c1c..1dfd4579ddd21 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 21,0,0,20220621 - PRODUCTVERSION 21,0,0,20220621 + FILEVERSION 21,0,0,20220622 + PRODUCTVERSION 21,0,0,20220622 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 58952962395523621573da31673de72173a433bd Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 22 Jun 2022 10:37:32 -0700 Subject: [PATCH 519/811] test: disable flaky transparent window test (#34660) --- spec-main/api-browser-window-spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index f2682e70482a6..a7b3cc87dd9a3 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2063,7 +2063,8 @@ describe('BrowserWindow module', () => { }).to.not.throw(); }); - it('Allows setting a transparent window via CSS', async () => { + // TODO(nornagon): disabled due to flakiness. + it.skip('Allows setting a transparent window via CSS', async () => { const appPath = path.join(__dirname, 'fixtures', 'apps', 'background-color-transparent'); appProcess = childProcess.spawn(process.execPath, [appPath], { From cd19a741b1a1cbd0ab7560314f1a77bed922bddb Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 22 Jun 2022 10:37:58 -0700 Subject: [PATCH 520/811] chore: modernize base::Value usage in shell/renderer/printing (#34682) Co-authored-by: Shelley Vohr --- .../printing/print_render_frame_helper_delegate.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc b/shell/renderer/printing/print_render_frame_helper_delegate.cc index ab952cd6e009d..c104cb145d5fd 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.cc +++ b/shell/renderer/printing/print_render_frame_helper_delegate.cc @@ -4,6 +4,8 @@ #include "shell/renderer/printing/print_render_frame_helper_delegate.h" +#include + #include "content/public/renderer/render_frame.h" #include "extensions/buildflags/buildflags.h" #include "third_party/blink/public/web/web_element.h" @@ -49,9 +51,9 @@ bool PrintRenderFrameHelperDelegate::OverridePrint( // instructs the PDF plugin to print. This is to make window.print() on a // PDF plugin document correctly print the PDF. See // https://crbug.com/448720. - base::DictionaryValue message; - message.SetString("type", "print"); - post_message_support->PostMessageFromValue(message); + base::Value::Dict message; + message.Set("type", "print"); + post_message_support->PostMessageFromValue(base::Value(std::move(message))); return true; } #endif // BUILDFLAG(ENABLE_EXTENSIONS) From 11924bdbb271a1db97d4fe4666935bca435ceb0d Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 22 Jun 2022 23:28:41 -0700 Subject: [PATCH 521/811] chore: modernize ListValue usage in dict_util.mm and related files (#34661) * chore: modernize ListValue usage in dict_util.mm and related files * use base::Value::{Dict,List} instead of raw base::Value * fix compile * fix build * fix build again --- shell/browser/api/electron_api_app.cc | 19 ++++---- shell/browser/api/electron_api_app.h | 18 ++++--- .../api/electron_api_system_preferences.h | 4 +- .../electron_api_system_preferences_mac.mm | 48 ++++++++++--------- .../electron_api_system_preferences_win.cc | 3 +- shell/browser/browser.cc | 4 +- shell/browser/browser.h | 10 ++-- shell/browser/browser_mac.mm | 23 +++++---- shell/browser/browser_observer.h | 18 ++++--- shell/browser/electron_browser_main_parts.cc | 2 +- shell/browser/mac/dict_util.h | 13 ++--- shell/browser/mac/dict_util.mm | 37 +++++++------- shell/browser/mac/electron_application.mm | 8 ++-- .../mac/electron_application_delegate.mm | 6 +-- 14 files changed, 106 insertions(+), 107 deletions(-) mode change 100755 => 100644 shell/browser/browser.h diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 975cb94a33d57..77281437ef32b 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -706,13 +706,13 @@ void App::OnWillFinishLaunching() { Emit("will-finish-launching"); } -void App::OnFinishLaunching(const base::DictionaryValue& launch_info) { +void App::OnFinishLaunching(base::Value::Dict launch_info) { #if BUILDFLAG(IS_LINUX) // Set the application name for audio streams shown in external // applications. Only affects pulseaudio currently. media::AudioManager::SetGlobalAppName(Browser::Get()->GetName()); #endif - Emit("ready", launch_info); + Emit("ready", base::Value(std::move(launch_info))); } void App::OnPreMainMessageLoopRun() { @@ -756,22 +756,23 @@ void App::OnDidFailToContinueUserActivity(const std::string& type, void App::OnContinueUserActivity(bool* prevent_default, const std::string& type, - const base::DictionaryValue& user_info, - const base::DictionaryValue& details) { - if (Emit("continue-activity", type, user_info, details)) { + base::Value::Dict user_info, + base::Value::Dict details) { + if (Emit("continue-activity", type, base::Value(std::move(user_info)), + base::Value(std::move(details)))) { *prevent_default = true; } } void App::OnUserActivityWasContinued(const std::string& type, - const base::DictionaryValue& user_info) { - Emit("activity-was-continued", type, user_info); + base::Value::Dict user_info) { + Emit("activity-was-continued", type, base::Value(std::move(user_info))); } void App::OnUpdateUserActivityState(bool* prevent_default, const std::string& type, - const base::DictionaryValue& user_info) { - if (Emit("update-activity-state", type, user_info)) { + base::Value::Dict user_info) { + if (Emit("update-activity-state", type, base::Value(std::move(user_info)))) { *prevent_default = true; } } diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index d7ff219e0871f..c253088deb64d 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -96,7 +96,7 @@ class App : public ElectronBrowserClient::Delegate, void OnOpenURL(const std::string& url) override; void OnActivate(bool has_visible_windows) override; void OnWillFinishLaunching() override; - void OnFinishLaunching(const base::DictionaryValue& launch_info) override; + void OnFinishLaunching(base::Value::Dict launch_info) override; void OnAccessibilitySupportChanged() override; void OnPreMainMessageLoopRun() override; void OnPreCreateThreads() override; @@ -107,15 +107,13 @@ class App : public ElectronBrowserClient::Delegate, const std::string& error) override; void OnContinueUserActivity(bool* prevent_default, const std::string& type, - const base::DictionaryValue& user_info, - const base::DictionaryValue& details) override; - void OnUserActivityWasContinued( - const std::string& type, - const base::DictionaryValue& user_info) override; - void OnUpdateUserActivityState( - bool* prevent_default, - const std::string& type, - const base::DictionaryValue& user_info) override; + base::Value::Dict user_info, + base::Value::Dict details) override; + void OnUserActivityWasContinued(const std::string& type, + base::Value::Dict user_info) override; + void OnUpdateUserActivityState(bool* prevent_default, + const std::string& type, + base::Value::Dict user_info) override; void OnNewWindowForTab() override; void OnDidBecomeActive() override; #endif diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index a254e553244a6..24096cd05cad2 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -67,11 +67,11 @@ class SystemPreferences void OnSysColorChange() override; // BrowserObserver: - void OnFinishLaunching(const base::DictionaryValue& launch_info) override; + void OnFinishLaunching(base::Value::Dict launch_info) override; #elif BUILDFLAG(IS_MAC) using NotificationCallback = base::RepeatingCallback< - void(const std::string&, base::DictionaryValue, const std::string&)>; + void(const std::string&, base::Value, const std::string&)>; void PostNotification(const std::string& name, base::DictionaryValue user_info, diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index dda1e63c9ee7f..371bf33af94ae 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -147,10 +147,11 @@ AVMediaType ParseMediaType(const std::string& media_type) { NSDistributedNotificationCenter* center = [NSDistributedNotificationCenter defaultCenter]; - [center postNotificationName:base::SysUTF8ToNSString(name) - object:nil - userInfo:DictionaryValueToNSDictionary(user_info) - deliverImmediately:immediate]; + [center + postNotificationName:base::SysUTF8ToNSString(name) + object:nil + userInfo:DictionaryValueToNSDictionary(user_info.GetDict()) + deliverImmediately:immediate]; } int SystemPreferences::SubscribeNotification( @@ -169,9 +170,10 @@ AVMediaType ParseMediaType(const std::string& media_type) { void SystemPreferences::PostLocalNotification(const std::string& name, base::DictionaryValue user_info) { NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; - [center postNotificationName:base::SysUTF8ToNSString(name) - object:nil - userInfo:DictionaryValueToNSDictionary(user_info)]; + [center + postNotificationName:base::SysUTF8ToNSString(name) + object:nil + userInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; } int SystemPreferences::SubscribeLocalNotification( @@ -191,9 +193,10 @@ AVMediaType ParseMediaType(const std::string& media_type) { base::DictionaryValue user_info) { NSNotificationCenter* center = [[NSWorkspace sharedWorkspace] notificationCenter]; - [center postNotificationName:base::SysUTF8ToNSString(name) - object:nil - userInfo:DictionaryValueToNSDictionary(user_info)]; + [center + postNotificationName:base::SysUTF8ToNSString(name) + object:nil + userInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; } int SystemPreferences::SubscribeWorkspaceNotification( @@ -240,7 +243,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { if (notification.userInfo) { copied_callback.Run( base::SysNSStringToUTF8(notification.name), - NSDictionaryToDictionaryValue(notification.userInfo), + base::Value(NSDictionaryToValue(notification.userInfo)), object); } else { copied_callback.Run( @@ -282,11 +285,12 @@ AVMediaType ParseMediaType(const std::string& media_type) { return gin::ConvertToV8(isolate, net::GURLWithNSURL([defaults URLForKey:key])); } else if (type == "array") { - return gin::ConvertToV8(isolate, - NSArrayToListValue([defaults arrayForKey:key])); + return gin::ConvertToV8( + isolate, base::Value(NSArrayToValue([defaults arrayForKey:key]))); } else if (type == "dictionary") { - return gin::ConvertToV8(isolate, NSDictionaryToDictionaryValue( - [defaults dictionaryForKey:key])); + return gin::ConvertToV8( + isolate, + base::Value(NSDictionaryToValue([defaults dictionaryForKey:key]))); } else { return v8::Undefined(isolate); } @@ -299,7 +303,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { args->ThrowError(); } else { @try { - NSDictionary* dict = DictionaryValueToNSDictionary(value); + NSDictionary* dict = DictionaryValueToNSDictionary(value.GetDict()); for (id key in dict) { id value = [dict objectForKey:key]; if ([value isKindOfClass:[NSNull class]] || value == nil) { @@ -359,17 +363,17 @@ AVMediaType ParseMediaType(const std::string& media_type) { } } } else if (type == "array") { - base::ListValue value; - if (args->GetNext(&value)) { - if (NSArray* array = ListValueToNSArray(value)) { + base::Value value; + if (args->GetNext(&value) && value.is_list()) { + if (NSArray* array = ListValueToNSArray(value.GetList())) { [defaults setObject:array forKey:key]; return; } } } else if (type == "dictionary") { - base::DictionaryValue value; - if (args->GetNext(&value)) { - if (NSDictionary* dict = DictionaryValueToNSDictionary(value)) { + base::Value value; + if (args->GetNext(&value) && value.is_dict()) { + if (NSDictionary* dict = DictionaryValueToNSDictionary(value.GetDict())) { [defaults setObject:dict forKey:key]; return; } diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index ce47c81227ec5..c2d77e941e4fd 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/shell/browser/api/electron_api_system_preferences_win.cc @@ -258,8 +258,7 @@ void SystemPreferences::OnSysColorChange() { Emit("color-changed"); } -void SystemPreferences::OnFinishLaunching( - const base::DictionaryValue& launch_info) { +void SystemPreferences::OnFinishLaunching(base::Value::Dict launch_info) { color_change_listener_ = std::make_unique(this); } diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index e94b1d65c229c..959b2cc3ec447 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -184,7 +184,7 @@ void Browser::WillFinishLaunching() { observer.OnWillFinishLaunching(); } -void Browser::DidFinishLaunching(base::DictionaryValue launch_info) { +void Browser::DidFinishLaunching(base::Value::Dict launch_info) { // Make sure the userData directory is created. base::ThreadRestrictions::ScopedAllowIO allow_io; base::FilePath user_data; @@ -196,7 +196,7 @@ void Browser::DidFinishLaunching(base::DictionaryValue launch_info) { ready_promise_->Resolve(); } for (BrowserObserver& observer : observers_) - observer.OnFinishLaunching(launch_info); + observer.OnFinishLaunching(launch_info.Clone()); } v8::Local Browser::WhenReady(v8::Isolate* isolate) { diff --git a/shell/browser/browser.h b/shell/browser/browser.h old mode 100755 new mode 100644 index c56cc3ce84cd0..aaae1b774f3fd --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -191,16 +191,16 @@ class Browser : public WindowListObserver { // Resumes an activity via hand-off. bool ContinueUserActivity(const std::string& type, - base::DictionaryValue user_info, - base::DictionaryValue details); + base::Value::Dict user_info, + base::Value::Dict details); // Indicates that an activity was continued on another device. void UserActivityWasContinued(const std::string& type, - base::DictionaryValue user_info); + base::Value::Dict user_info); // Gives an opportunity to update the Handoff payload. bool UpdateUserActivityState(const std::string& type, - base::DictionaryValue user_info); + base::Value::Dict user_info); // Bounce the dock icon. enum class BounceType{ @@ -288,7 +288,7 @@ class Browser : public WindowListObserver { // Tell the application the loading has been done. void WillFinishLaunching(); - void DidFinishLaunching(base::DictionaryValue launch_info); + void DidFinishLaunching(base::Value::Dict launch_info); void OnAccessibilitySupportChanged(); diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 9821e0b0a3803..f155160f55fbe 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -242,7 +242,7 @@ [[AtomApplication sharedApplication] setCurrentActivity:base::SysUTF8ToNSString(type) - withUserInfo:DictionaryValueToNSDictionary(user_info) + withUserInfo:DictionaryValueToNSDictionary(user_info.GetDict()) withWebpageURL:net::NSURLWithGURL(GURL(url_string))]; } @@ -264,7 +264,7 @@ base::DictionaryValue user_info) { [[AtomApplication sharedApplication] updateCurrentActivity:base::SysUTF8ToNSString(type) - withUserInfo:DictionaryValueToNSDictionary(user_info)]; + withUserInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; } bool Browser::WillContinueUserActivity(const std::string& type) { @@ -281,25 +281,27 @@ } bool Browser::ContinueUserActivity(const std::string& type, - base::DictionaryValue user_info, - base::DictionaryValue details) { + base::Value::Dict user_info, + base::Value::Dict details) { bool prevent_default = false; for (BrowserObserver& observer : observers_) - observer.OnContinueUserActivity(&prevent_default, type, user_info, details); + observer.OnContinueUserActivity(&prevent_default, type, user_info.Clone(), + details.Clone()); return prevent_default; } void Browser::UserActivityWasContinued(const std::string& type, - base::DictionaryValue user_info) { + base::Value::Dict user_info) { for (BrowserObserver& observer : observers_) - observer.OnUserActivityWasContinued(type, user_info); + observer.OnUserActivityWasContinued(type, user_info.Clone()); } bool Browser::UpdateUserActivityState(const std::string& type, - base::DictionaryValue user_info) { + base::Value::Dict user_info) { bool prevent_default = false; for (BrowserObserver& observer : observers_) - observer.OnUpdateUserActivityState(&prevent_default, type, user_info); + observer.OnUpdateUserActivityState(&prevent_default, type, + user_info.Clone()); return prevent_default; } @@ -486,7 +488,8 @@ void RemoveFromLoginItems() { } void Browser::ShowAboutPanel() { - NSDictionary* options = DictionaryValueToNSDictionary(about_panel_options_); + NSDictionary* options = + DictionaryValueToNSDictionary(about_panel_options_.GetDict()); // Credits must be a NSAttributedString instead of NSString NSString* credits = (NSString*)options[@"Credits"]; diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 03d252d3c70f2..16576a1e586a8 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -47,7 +47,7 @@ class BrowserObserver : public base::CheckedObserver { // The browser has finished loading. virtual void OnWillFinishLaunching() {} - virtual void OnFinishLaunching(const base::DictionaryValue& launch_info) {} + virtual void OnFinishLaunching(base::Value::Dict launch_info) {} // The browser's accessibility support has changed. virtual void OnAccessibilitySupportChanged() {} @@ -70,17 +70,15 @@ class BrowserObserver : public base::CheckedObserver { // The browser wants to resume a user activity via handoff. (macOS only) virtual void OnContinueUserActivity(bool* prevent_default, const std::string& type, - const base::DictionaryValue& user_info, - const base::DictionaryValue& details) {} + base::Value::Dict user_info, + base::Value::Dict details) {} // The browser wants to notify that an user activity was resumed. (macOS only) - virtual void OnUserActivityWasContinued( - const std::string& type, - const base::DictionaryValue& user_info) {} + virtual void OnUserActivityWasContinued(const std::string& type, + base::Value::Dict user_info) {} // The browser wants to update an user activity payload. (macOS only) - virtual void OnUpdateUserActivityState( - bool* prevent_default, - const std::string& type, - const base::DictionaryValue& user_info) {} + virtual void OnUpdateUserActivityState(bool* prevent_default, + const std::string& type, + base::Value::Dict user_info) {} // User clicked the native macOS new tab button. (macOS only) virtual void OnNewWindowForTab() {} diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index dd5f187ce9ed5..b4747f06824a6 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -453,7 +453,7 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { #if !BUILDFLAG(IS_MAC) // The corresponding call in macOS is in ElectronApplicationDelegate. Browser::Get()->WillFinishLaunching(); - Browser::Get()->DidFinishLaunching(base::DictionaryValue()); + Browser::Get()->DidFinishLaunching(base::Value::Dict()); #endif // Notify observers that main thread message loop was initialized. diff --git a/shell/browser/mac/dict_util.h b/shell/browser/mac/dict_util.h index 13b3bed0d9762..88ce5e58fe80b 100644 --- a/shell/browser/mac/dict_util.h +++ b/shell/browser/mac/dict_util.h @@ -7,17 +7,14 @@ #import -namespace base { -class ListValue; -class DictionaryValue; -} // namespace base +#include "base/values.h" namespace electron { -NSArray* ListValueToNSArray(const base::ListValue& value); -base::ListValue NSArrayToListValue(NSArray* arr); -NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value); -base::DictionaryValue NSDictionaryToDictionaryValue(NSDictionary* dict); +NSArray* ListValueToNSArray(const base::Value::List& value); +base::Value::List NSArrayToValue(NSArray* arr); +NSDictionary* DictionaryValueToNSDictionary(const base::Value::Dict& value); +base::Value::Dict NSDictionaryToValue(NSDictionary* dict); } // namespace electron diff --git a/shell/browser/mac/dict_util.mm b/shell/browser/mac/dict_util.mm index d48ecb13daf4a..1d31185bc5a2a 100644 --- a/shell/browser/mac/dict_util.mm +++ b/shell/browser/mac/dict_util.mm @@ -12,9 +12,9 @@ namespace electron { -NSArray* ListValueToNSArray(const base::ListValue& value) { +NSArray* ListValueToNSArray(const base::Value::List& value) { std::string json; - if (!base::JSONWriter::Write(value, &json)) + if (!base::JSONWriter::Write(base::Value(value.Clone()), &json)) return nil; NSData* jsonData = [NSData dataWithBytes:json.c_str() length:json.length()]; id obj = [NSJSONSerialization JSONObjectWithData:jsonData @@ -25,8 +25,8 @@ return obj; } -base::ListValue NSArrayToListValue(NSArray* arr) { - base::ListValue result; +base::Value::List NSArrayToValue(NSArray* arr) { + base::Value::List result; if (!arr) return result; @@ -44,9 +44,9 @@ else result.Append([value intValue]); } else if ([value isKindOfClass:[NSArray class]]) { - result.Append(NSArrayToListValue(value)); + result.Append(NSArrayToValue(value)); } else if ([value isKindOfClass:[NSDictionary class]]) { - result.Append(NSDictionaryToDictionaryValue(value)); + result.Append(NSDictionaryToValue(value)); } else { result.Append(base::SysNSStringToUTF8([value description])); } @@ -55,10 +55,9 @@ return result; } -NSDictionary* DictionaryValueToNSDictionary( - const base::DictionaryValue& value) { +NSDictionary* DictionaryValueToNSDictionary(const base::Value::Dict& value) { std::string json; - if (!base::JSONWriter::Write(value, &json)) + if (!base::JSONWriter::Write(base::Value(value.Clone()), &json)) return nil; NSData* jsonData = [NSData dataWithBytes:json.c_str() length:json.length()]; id obj = [NSJSONSerialization JSONObjectWithData:jsonData @@ -69,8 +68,8 @@ return obj; } -base::DictionaryValue NSDictionaryToDictionaryValue(NSDictionary* dict) { - base::DictionaryValue result; +base::Value::Dict NSDictionaryToValue(NSDictionary* dict) { + base::Value::Dict result; if (!dict) return result; @@ -80,24 +79,24 @@ id value = [dict objectForKey:key]; if ([value isKindOfClass:[NSString class]]) { - result.SetKey(str_key, base::Value(base::SysNSStringToUTF8(value))); + result.Set(str_key, base::Value(base::SysNSStringToUTF8(value))); } else if ([value isKindOfClass:[NSNumber class]]) { const char* objc_type = [value objCType]; if (strcmp(objc_type, @encode(BOOL)) == 0 || strcmp(objc_type, @encode(char)) == 0) - result.SetKey(str_key, base::Value([value boolValue])); + result.Set(str_key, base::Value([value boolValue])); else if (strcmp(objc_type, @encode(double)) == 0 || strcmp(objc_type, @encode(float)) == 0) - result.SetKey(str_key, base::Value([value doubleValue])); + result.Set(str_key, base::Value([value doubleValue])); else - result.SetKey(str_key, base::Value([value intValue])); + result.Set(str_key, base::Value([value intValue])); } else if ([value isKindOfClass:[NSArray class]]) { - result.SetKey(str_key, NSArrayToListValue(value)); + result.Set(str_key, NSArrayToValue(value)); } else if ([value isKindOfClass:[NSDictionary class]]) { - result.SetKey(str_key, NSDictionaryToDictionaryValue(value)); + result.Set(str_key, NSDictionaryToValue(value)); } else { - result.SetKey(str_key, - base::Value(base::SysNSStringToUTF8([value description]))); + result.Set(str_key, + base::Value(base::SysNSStringToUTF8([value description]))); } } diff --git a/shell/browser/mac/electron_application.mm b/shell/browser/mac/electron_application.mm index 468887cb5c4be..d6ff91475e75e 100644 --- a/shell/browser/mac/electron_application.mm +++ b/shell/browser/mac/electron_application.mm @@ -120,8 +120,8 @@ - (void)userActivityWillSave:(NSUserActivity*)userActivity { dispatch_sync_main(^{ std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); - base::DictionaryValue user_info = - electron::NSDictionaryToDictionaryValue(userActivity.userInfo); + base::Value::Dict user_info = + electron::NSDictionaryToValue(userActivity.userInfo); electron::Browser* browser = electron::Browser::Get(); shouldWait = @@ -149,8 +149,8 @@ - (void)userActivityWasContinued:(NSUserActivity*)userActivity { dispatch_async(dispatch_get_main_queue(), ^{ std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); - base::DictionaryValue user_info = - electron::NSDictionaryToDictionaryValue(userActivity.userInfo); + base::Value::Dict user_info = + electron::NSDictionaryToValue(userActivity.userInfo); electron::Browser* browser = electron::Browser::Get(); browser->UserActivityWasContinued(activity_type, std::move(user_info)); diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index ea7cbde4f3bca..d065eb75e4213 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -84,7 +84,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notify { } electron::Browser::Get()->DidFinishLaunching( - electron::NSDictionaryToDictionaryValue(notification_info)); + electron::NSDictionaryToValue(notification_info)); } - (void)applicationDidBecomeActive:(NSNotification*)notification { @@ -128,8 +128,8 @@ - (BOOL)application:(NSApplication*)sender electron::Browser* browser = electron::Browser::Get(); return browser->ContinueUserActivity( activity_type, - electron::NSDictionaryToDictionaryValue(userActivity.userInfo), - electron::NSDictionaryToDictionaryValue(details)) + electron::NSDictionaryToValue(userActivity.userInfo), + electron::NSDictionaryToValue(details)) ? YES : NO; } From 106aa0e9228250015eef99eaa9063bafa9fc187b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 23 Jun 2022 06:00:50 -0700 Subject: [PATCH 522/811] Bump v21.0.0-nightly.20220623 --- 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 3c1431facc4d2..3d2a3d64ff0c7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220622 \ No newline at end of file +21.0.0-nightly.20220623 \ No newline at end of file diff --git a/package.json b/package.json index 6cb997f0a915f..22754254adfd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220622", + "version": "21.0.0-nightly.20220623", "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 1dfd4579ddd21..f6686ef18cde5 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 21,0,0,20220622 - PRODUCTVERSION 21,0,0,20220622 + FILEVERSION 21,0,0,20220623 + PRODUCTVERSION 21,0,0,20220623 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3b881e4a132742b30e2f7a61203c1bfec5b81364 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 23 Jun 2022 19:08:32 +0200 Subject: [PATCH 523/811] fix: WCO respects maximizable/closable/minimizable (#34677) --- shell/browser/native_window_views.cc | 15 +++++++++++++ .../ui/views/win_caption_button_container.cc | 21 ++++++++++++++++++- .../ui/views/win_caption_button_container.h | 10 ++++----- shell/browser/ui/views/win_frame_view.h | 4 ++++ 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 1f4f316048bac..f33a3705cf031 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -876,6 +876,11 @@ bool NativeWindowViews::IsMovable() { void NativeWindowViews::SetMinimizable(bool minimizable) { #if BUILDFLAG(IS_WIN) FlipWindowStyle(GetAcceleratedWidget(), minimizable, WS_MINIMIZEBOX); + if (titlebar_overlay_enabled()) { + auto* frame_view = + static_cast(widget()->non_client_view()->frame_view()); + frame_view->caption_button_container()->UpdateButtons(); + } #endif minimizable_ = minimizable; } @@ -891,6 +896,11 @@ bool NativeWindowViews::IsMinimizable() { void NativeWindowViews::SetMaximizable(bool maximizable) { #if BUILDFLAG(IS_WIN) FlipWindowStyle(GetAcceleratedWidget(), maximizable, WS_MAXIMIZEBOX); + if (titlebar_overlay_enabled()) { + auto* frame_view = + static_cast(widget()->non_client_view()->frame_view()); + frame_view->caption_button_container()->UpdateButtons(); + } #endif maximizable_ = maximizable; } @@ -926,6 +936,11 @@ void NativeWindowViews::SetClosable(bool closable) { } else { EnableMenuItem(menu, SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); } + if (titlebar_overlay_enabled()) { + auto* frame_view = + static_cast(widget()->non_client_view()->frame_view()); + frame_view->caption_button_container()->UpdateButtons(); + } #endif } diff --git a/shell/browser/ui/views/win_caption_button_container.cc b/shell/browser/ui/views/win_caption_button_container.cc index 9995c9741279c..62ce6d9e5b880 100644 --- a/shell/browser/ui/views/win_caption_button_container.cc +++ b/shell/browser/ui/views/win_caption_button_container.cc @@ -148,11 +148,30 @@ void WinCaptionButtonContainer::UpdateButtons() { restore_button_->SetVisible(is_maximized); maximize_button_->SetVisible(!is_maximized); + const bool minimizable = frame_view_->window()->IsMinimizable(); + minimize_button_->SetEnabled(minimizable); + // In touch mode, windows cannot be taken out of fullscreen or tiled mode, so // the maximize/restore button should be disabled. const bool is_touch = ui::TouchUiController::Get()->touch_ui(); restore_button_->SetEnabled(!is_touch); - maximize_button_->SetEnabled(!is_touch); + + // The maximize button should only be enabled if the window is + // maximizable *and* touch mode is disabled. + const bool maximizable = frame_view_->window()->IsMaximizable(); + maximize_button_->SetEnabled(!is_touch && maximizable); + + const bool closable = frame_view_->window()->IsClosable(); + close_button_->SetEnabled(closable); + + // If all three of closable, maximizable, and minimizable are disabled, + // Windows natively only shows the disabled closable button. Copy that + // behavior here. + if (!maximizable && !closable && !minimizable) { + minimize_button_->SetVisible(false); + maximize_button_->SetVisible(false); + } + InvalidateLayout(); } } // namespace electron diff --git a/shell/browser/ui/views/win_caption_button_container.h b/shell/browser/ui/views/win_caption_button_container.h index 9a40ae1be3415..d9a8fa7ca6f54 100644 --- a/shell/browser/ui/views/win_caption_button_container.h +++ b/shell/browser/ui/views/win_caption_button_container.h @@ -41,6 +41,11 @@ class WinCaptionButtonContainer : public views::View, gfx::Size GetButtonSize() const; void SetButtonSize(gfx::Size size); + // Sets caption button visibility and enabled state based on window state. + // Only one of maximize or restore button should ever be visible at the same + // time, and both are disabled in tablet UI mode. + void UpdateButtons(); + private: // views::View: void AddedToWidget() override; @@ -52,11 +57,6 @@ class WinCaptionButtonContainer : public views::View, void ResetWindowControls(); - // Sets caption button visibility and enabled state based on window state. - // Only one of maximize or restore button should ever be visible at the same - // time, and both are disabled in tablet UI mode. - void UpdateButtons(); - WinFrameView* const frame_view_; WinCaptionButton* const minimize_button_; WinCaptionButton* const maximize_button_; diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index 460474e03bb66..3dddee8af6cac 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -13,6 +13,7 @@ #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/frameless_view.h" #include "shell/browser/ui/views/win_caption_button.h" +#include "shell/browser/ui/views/win_caption_button_container.h" namespace electron { @@ -43,6 +44,9 @@ class WinFrameView : public FramelessView { NativeWindowViews* window() const { return window_; } views::Widget* frame() const { return frame_; } + WinCaptionButtonContainer* caption_button_container() { + return caption_button_container_; + } bool IsMaximized() const; From c5b87e49192c1812fcb227313534dfcdfea3765d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 24 Jun 2022 06:01:02 -0700 Subject: [PATCH 524/811] Bump v21.0.0-nightly.20220624 --- 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 3d2a3d64ff0c7..775a50c55fc9f 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220623 \ No newline at end of file +21.0.0-nightly.20220624 \ No newline at end of file diff --git a/package.json b/package.json index 22754254adfd2..af4d0bde7e759 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220623", + "version": "21.0.0-nightly.20220624", "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 f6686ef18cde5..804ffa694d243 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 21,0,0,20220623 - PRODUCTVERSION 21,0,0,20220623 + FILEVERSION 21,0,0,20220624 + PRODUCTVERSION 21,0,0,20220624 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ba4893c248b3f19c55dcc57e2acc31aabce04ad1 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 27 Jun 2022 10:28:35 +0200 Subject: [PATCH 525/811] refactor: load webFrame via process._linkedBinding in security-warnings.ts (#34735) --- lib/renderer/security-warnings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/renderer/security-warnings.ts b/lib/renderer/security-warnings.ts index 30cb0cc63b6d6..0aadfb632d19f 100644 --- a/lib/renderer/security-warnings.ts +++ b/lib/renderer/security-warnings.ts @@ -1,7 +1,8 @@ -import { webFrame } from 'electron'; import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; +const { mainFrame: webFrame } = process._linkedBinding('electron_renderer_web_frame'); + let shouldLog: boolean | null = null; const { platform, execPath, env } = process; From e2c58d164dc44515a067b156302a391e6c13e8a6 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 27 Jun 2022 01:29:18 -0700 Subject: [PATCH 526/811] chore: replace Object.assign with object spread syntax (#34739) --- script/gn-check.js | 7 ++++--- script/lint.js | 11 ++++++----- script/nan-spec-runner.js | 5 +++-- script/release/publish-to-npm.js | 2 +- script/spec-runner.js | 5 +++-- spec-main/api-browser-window-spec.ts | 2 +- spec-main/node-spec.ts | 14 ++++++++------ spec/api-shell-spec.js | 2 +- 8 files changed, 27 insertions(+), 21 deletions(-) diff --git a/script/gn-check.js b/script/gn-check.js index 497e6ec5f3cd8..12dca3651e723 100644 --- a/script/gn-check.js +++ b/script/gn-check.js @@ -18,10 +18,11 @@ if (!OUT_DIR) { throw new Error('No viable out dir: one of Debug, Testing, or Release must exist.'); } -const env = Object.assign({ +const env = { CHROMIUM_BUILDTOOLS_PATH: path.resolve(SOURCE_ROOT, '..', 'buildtools'), - DEPOT_TOOLS_WIN_TOOLCHAIN: '0' -}, process.env); + DEPOT_TOOLS_WIN_TOOLCHAIN: '0', + ...process.env +}; // Users may not have depot_tools in PATH. env.PATH = `${env.PATH}${path.delimiter}${DEPOT_TOOLS}`; diff --git a/script/lint.js b/script/lint.js index 839215ee35e84..8ee4f9b756133 100755 --- a/script/lint.js +++ b/script/lint.js @@ -27,7 +27,7 @@ const IGNORELIST = new Set([ const IS_WINDOWS = process.platform === 'win32'; function spawnAndCheckExitCode (cmd, args, opts) { - opts = Object.assign({ stdio: 'inherit' }, opts); + opts = { stdio: 'inherit', ...opts }; const { error, status, signal } = childProcess.spawnSync(cmd, args, opts); if (error) { // the subsprocess failed or timed out @@ -103,7 +103,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(ELECTRON_ROOT, 'script') }, process.env); + const env = { PYTHONPATH: path.join(ELECTRON_ROOT, 'script'), ...process.env }; spawnAndCheckExitCode('pylint-2.7', args, { env }); } }, { @@ -143,10 +143,11 @@ const LINTERS = [{ test: filename => filename.endsWith('.gn') || filename.endsWith('.gni'), run: (opts, filenames) => { const allOk = filenames.map(filename => { - const env = Object.assign({ + const env = { CHROMIUM_BUILDTOOLS_PATH: path.resolve(ELECTRON_ROOT, '..', 'buildtools'), - DEPOT_TOOLS_WIN_TOOLCHAIN: '0' - }, process.env); + DEPOT_TOOLS_WIN_TOOLCHAIN: '0', + ...process.env + }; // Users may not have depot_tools in PATH. env.PATH = `${env.PATH}${path.delimiter}${DEPOT_TOOLS}`; const args = ['format', filename]; diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index f022f3da25fa7..c03f3f36ca984 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -20,12 +20,13 @@ const args = require('minimist')(process.argv.slice(2), { async function main () { const outDir = utils.getOutDir({ shouldLog: true }); const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers'); - const env = Object.assign({}, process.env, { + const env = { + ...process.env, npm_config_nodedir: nodeDir, npm_config_msvs_version: '2019', npm_config_arch: process.env.NPM_CONFIG_ARCH, npm_config_yes: 'true' - }); + }; const clangDir = path.resolve(BASE, 'third_party', 'llvm-build', 'Release+Asserts', 'bin'); const cc = path.resolve(clangDir, 'clang'); diff --git a/script/release/publish-to-npm.js b/script/release/publish-to-npm.js index 55799665a57ad..081274d83edac 100644 --- a/script/release/publish-to-npm.js +++ b/script/release/publish-to-npm.js @@ -167,7 +167,7 @@ new Promise((resolve, reject) => { const tarballPath = path.join(tempDir, `${rootPackageJson.name}-${rootPackageJson.version}.tgz`); return new Promise((resolve, reject) => { const result = childProcess.spawnSync('npm', ['install', tarballPath, '--force', '--silent'], { - env: Object.assign({}, process.env, { electron_config_cache: tempDir }), + env: { ...process.env, electron_config_cache: tempDir }, cwd: tempDir, stdio: 'inherit' }); diff --git a/script/spec-runner.js b/script/spec-runner.js index eb4160c8ce8b8..590966f064b8b 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -235,12 +235,13 @@ async function installSpecModules (dir) { const CXXFLAGS = ['-std=c++17', process.env.CXXFLAGS].filter(x => !!x).join(' '); const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`); - const env = Object.assign({}, process.env, { + const env = { + ...process.env, CXXFLAGS, npm_config_nodedir: nodeDir, npm_config_msvs_version: '2019', npm_config_yes: 'true' - }); + }; if (fs.existsSync(path.resolve(dir, 'node_modules'))) { await fs.remove(path.resolve(dir, 'node_modules')); } diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index a7b3cc87dd9a3..67539005316a1 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1040,7 +1040,7 @@ describe('BrowserWindow module', () => { const boundsUpdate = { width: 200 }; w.setBounds(boundsUpdate as any); - const expectedBounds = Object.assign(fullBounds, boundsUpdate); + const expectedBounds = { ...fullBounds, ...boundsUpdate }; expectBoundsEqual(w.getBounds(), expectedBounds); }); diff --git a/spec-main/node-spec.ts b/spec-main/node-spec.ts index af6c11360f202..40eb0276029ed 100644 --- a/spec-main/node-spec.ts +++ b/spec-main/node-spec.ts @@ -78,7 +78,7 @@ describe('node feature', () => { child.kill(); }); - const env = Object.assign({}, process.env, { NODE_OPTIONS: '--v8-options' }); + const env = { ...process.env, NODE_OPTIONS: '--v8-options' }; child = childProcess.spawn(process.execPath, { env }); exitPromise = emittedOnce(child, 'exit'); @@ -113,7 +113,7 @@ describe('node feature', () => { child.kill(); }); - const env = Object.assign({}, process.env, { NODE_OPTIONS: '--use-openssl-ca' }); + const env = { ...process.env, NODE_OPTIONS: '--use-openssl-ca' }; child = childProcess.spawn(process.execPath, ['--enable-logging'], { env }); let output = ''; @@ -136,9 +136,10 @@ describe('node feature', () => { it('does allow --require in non-packaged apps', async () => { const appPath = path.join(fixtures, 'module', 'noop.js'); - const env = Object.assign({}, process.env, { + const env = { + ...process.env, NODE_OPTIONS: `--require=${path.join(fixtures, 'module', 'fail.js')}` - }); + }; // App should exit with code 1. const child = childProcess.spawn(process.execPath, [appPath], { env }); const [code] = await emittedOnce(child, 'exit'); @@ -147,10 +148,11 @@ describe('node feature', () => { it('does not allow --require in packaged apps', async () => { const appPath = path.join(fixtures, 'module', 'noop.js'); - const env = Object.assign({}, process.env, { + const env = { + ...process.env, ELECTRON_FORCE_IS_PACKAGED: 'true', NODE_OPTIONS: `--require=${path.join(fixtures, 'module', 'fail.js')}` - }); + }; // App should exit with code 0. const child = childProcess.spawn(process.execPath, [appPath], { env }); const [code] = await emittedOnce(child, 'exit'); diff --git a/spec/api-shell-spec.js b/spec/api-shell-spec.js index 284dd62864d82..6eacf51363992 100644 --- a/spec/api-shell-spec.js +++ b/spec/api-shell-spec.js @@ -63,7 +63,7 @@ describe('shell module', () => { expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); const change = { target: 'D:\\' }; expect(shell.writeShortcutLink(tmpShortcut, 'update', change)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(Object.assign(shortcutOptions, change)); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal({ ...shortcutOptions, ...change }); }); it('replaces the shortcut', () => { From 8238cca87b8fc77c5b3a1316315360004224387e Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 27 Jun 2022 01:29:55 -0700 Subject: [PATCH 527/811] test: use maximize event instead of resize event (#34740) --- spec-main/api-browser-window-spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 67539005316a1..aac15ffe468cd 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1354,7 +1354,7 @@ describe('BrowserWindow module', () => { w.setAspectRatio(16 / 11); - const maximize = emittedOnce(w, 'resize'); + const maximize = emittedOnce(w, 'maximize'); w.show(); w.maximize(); await maximize; From 39840502be074969013adf08270c7c2fef149428 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 27 Jun 2022 05:14:01 -0700 Subject: [PATCH 528/811] docs: replace broken Windows taskbar images (#34729) --- docs/images/windows-taskbar-icon-overlay.png | Bin 0 -> 13746 bytes docs/images/windows-taskbar-jumplist.png | Bin 0 -> 176913 bytes .../windows-taskbar-thumbnail-toolbar.png | Bin 0 -> 145030 bytes docs/tutorial/windows-taskbar.md | 9 ++++----- 4 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 docs/images/windows-taskbar-icon-overlay.png create mode 100644 docs/images/windows-taskbar-jumplist.png create mode 100644 docs/images/windows-taskbar-thumbnail-toolbar.png diff --git a/docs/images/windows-taskbar-icon-overlay.png b/docs/images/windows-taskbar-icon-overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..fb9a86d530bb103337e7cfa18eab1b89b780dad4 GIT binary patch literal 13746 zcmV;jHBHKiP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DHAhKAK~#8NjhzR0 z71h@MPtG|>C`nFBLMI)hBT|&E0->abB1Hv3?1~LRK|w(Ud%4zY7q8w=`7U-45JK<0 z_fRfiCCH!g_2c~O;ai>qWVuiA4()!r+s z^;uOddu{ccbusxHVhc9L7H*5{yWQV^r*FU>-@v{8LHqne_6Ke~6uj-=5U@o2HP<9DvasZljv@zk8C_ME5YWKXRZ z-L+qI)t(YjXKF+pw8pSH)m`@`W1f01d+NRFuKNniQ}=b4tG;CsNpCp){~vQFzj=Aj zYcy}t>)zy7JxQ<7-1T3EdFtWlV(xk`dh5REsrwwvU1x&3&NH4m9Jgr<%*{ zi*UzBxNEp*oM z+T$-KPYE}k@@MObr<&fmEvn^Lu3AsKYEOu$J<(lbLS)T}QMH~$>#g;yyY?j8p0`aH zg5#<4f~U?D%W6-hktCWjWZ6}08MA_Yg+&+lUDG zXbwIAhw{5*+_M78~1LHPxsh@y0z8-3&NU=Hj+riN7hoLKh;eQ0~EQ!7Ag#Yf73HOyHKYF&|ljmDb zy4320i_IpTZZd3ztHpb+n$NoGyx^)a(VZ|Zvc`CC;*)ON`dSkm_MFo^wI_+ydfu1= zCSvqo%@KR2sW!m8b#RmkFs}u~IGRnvSWk^H-bC0qoNZ*n6OjpzdlMc87M{?3u;{>} zRRW```tPpdALxzk;jZ4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KGL=P7GFH6;A76;2?#NqSk=-7T1Q|POszWE7~&~=oH328dINKj(Ypq-*AhyXwV zjG*YCLnBboYNu?$`K-)x1!pNgBK>v+INZJ(e8C)J;Cg(hDiK3?z~B%xgpM8vS2mx* z7WgUnT;Bo(t!^#c2S4(P73B+B;fn`xi!VseF)LP>{)k!uR(w^YfGH#kTBVF&g-H;z zAty7!Qfd7JD^hT=$q^iw5=VN-Ba0+BqEiG_f-OoF7}FnM1r~sWAP9@(x)mfrhK8zE zSX(hATZ3jA{txnx;y>KZ;@{4z5Oh&TPhj}}0jT|+*JbogVE_OC07*qoM6N<$g2M27 AzyJUM literal 0 HcmV?d00001 diff --git a/docs/tutorial/windows-taskbar.md b/docs/tutorial/windows-taskbar.md index 444c712b3607b..92f4498b154f8 100644 --- a/docs/tutorial/windows-taskbar.md +++ b/docs/tutorial/windows-taskbar.md @@ -41,10 +41,9 @@ as quoted from [MSDN][msdn-jumplist]: > confuse the user who does not expect that portion of the destination list to > change. -![IE](https://i-msdn.sec.s-msft.com/dynimg/IC420539.png) +![Taskbar JumpList](../images/windows-taskbar-jumplist.png) -> NOTE: The screenshot above is an example of general tasks of -Internet Explorer +> NOTE: The screenshot above is an example of general tasks for Microsoft Edge Unlike the dock menu in macOS which is a real menu, user tasks in Windows work like application shortcuts. For example, when a user clicks a task, the program @@ -109,7 +108,7 @@ As quoted from [MSDN][msdn-thumbnail]: > For example, Windows Media Player might offer standard media transport controls > such as play, pause, mute, and stop. -![player](https://i-msdn.sec.s-msft.com/dynimg/IC420540.png) +![Thumbnail toolbar](../images/windows-taskbar-thumbnail-toolbar.png) > NOTE: The screenshot above is an example of thumbnail toolbar of Windows Media Player @@ -176,7 +175,7 @@ As quoted from [MSDN][msdn-icon-overlay]: > network status, messenger status, or new mail. The user should not be > presented with constantly changing overlays or animations. -![Overlay on taskbar button](https://i-msdn.sec.s-msft.com/dynimg/IC420441.png) +![Overlay on taskbar button](../images/windows-taskbar-icon-overlay.png) > NOTE: The screenshot above is an example of overlay on a taskbar button From 032e1d9befad640ee6edc276cec1ebd1e84bc73f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 06:02:43 -0700 Subject: [PATCH 529/811] Bump v21.0.0-nightly.20220627 --- 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 775a50c55fc9f..038611d37a56b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220624 \ No newline at end of file +21.0.0-nightly.20220627 \ No newline at end of file diff --git a/package.json b/package.json index af4d0bde7e759..a455fad3649ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220624", + "version": "21.0.0-nightly.20220627", "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 804ffa694d243..508be5195cf99 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 21,0,0,20220624 - PRODUCTVERSION 21,0,0,20220624 + FILEVERSION 21,0,0,20220627 + PRODUCTVERSION 21,0,0,20220627 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e86d1cba75be6e5134a3190432b4aae6b19134e8 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:50:08 -0500 Subject: [PATCH 530/811] chore: bump chromium to 105.0.5129.0 (main) (#34403) * chore: bump chromium in DEPS to 104.0.5096.0 * 3651284: Use the entry settings object for window.open navigation https://chromium-review.googlesource.com/c/chromium/src/+/3651284 * 3644598: Make RenderFrameHost used for notification permission decision https://chromium-review.googlesource.com/c/chromium/src/+/3644598 * 3642842: Window Placement: Prototype Fullscreen Capability Delegation - Part 2 https://chromium-review.googlesource.com/c/chromium/src/+/3642842 * 3652785: [sandbox] Enable sandboxed pointers on sanitizer builds https://chromium-review.googlesource.com/c/v8/v8/+/3652785 * 3611967: webhid: Migrate HidDelegate to use BrowserContext and Origin https://chromium-review.googlesource.com/c/chromium/src/+/3611967 * 3665762: Remove RenderFrameHost::IsRenderFrameCreated from //content/. https://chromium-review.googlesource.com/c/chromium/src/+/3665762 * 3659375: Fold x509_util_ios and most of x509_util_mac into x509_util_apple https://chromium-review.googlesource.com/c/chromium/src/+/3659375 * 3656234: [CodeHealth] Remove uses of base::ListValue::Append() (Final, take 2) https://chromium-review.googlesource.com/c/chromium/src/+/3656234 * chore: update patch indices * chore: fix lint * 3644598: Make RenderFrameHost used for notification permission decision https://chromium-review.googlesource.com/c/chromium/src/+/3644598 * webhid: Migrate HidDelegate to use BrowserContext and Origin This is a temporary fix for https://chromium-review.googlesource.com/c/chromium/src/+/3611967 to get the build compiling, but we need to either patch around https://chromium-review.googlesource.com/c/chromium/src/+/3611967 or move our device permissioning to BrowserContext * chore: fix lint * build: run electron/script/gen-libc++-filenames.js fixes gn check * chore: bump chromium in DEPS to 104.0.5098.0 * chore: disable flaking tests * 3682394: Change pipes surrounding code references in comments to backticks https://chromium-review.googlesource.com/c/chromium/src/+/3682394 * 3652749: Delete GLRenderer and related classes https://chromium-review.googlesource.com/c/chromium/src/+/3652749 * chore: fixup patch indices * 3671199: Remove ContentMainDelegate::PostFieldTrialInitialization https://chromium-review.googlesource.com/c/chromium/src/+/3671199 * 3607963: hid: Do not exclude HID device with no collections https://chromium-review.googlesource.com/c/chromium/src/+/3607963 * refactor: use ElectronBrowserContext instead of WebContents to persist devices due to changes like https://chromium-review.googlesource.com/c/chromium/src/+/3611967, we can no longer use WebContents to store device permissions so this commit moves device permission storage to live in memory in ElectronBrowserContext instead. * 3557253: Deprecate some signature checks https://chromium-review.googlesource.com/c/v8/v8/+/3557253 * chore: bump chromium in DEPS to 104.0.5100.0 * 3680781: Add policy for Renderer App Container. https://chromium-review.googlesource.com/c/chromium/src/+/3680781 * chore: update patch indices * 3675465: Update NetLog network service API to use mojom::DictionaryValue. https://chromium-review.googlesource.com/c/chromium/src/+/3675465 * chore: bump chromium in DEPS to 104.0.5102.0 * chore: update patches * chore: bump chromium in DEPS to 104.0.5103.0 * chore: update patches * chore: bump chromium in DEPS to 104.0.5104.0 * chore: update patches * fix: add patch for DCHECK in fullscreen test * build: fix nan build * build: make the nan spec runner work on macOS * chore: bump chromium in DEPS to 104.0.5106.0 * chore: update patches * chore: bump chromium in DEPS to 104.0.5108.0 * chore: update patches * chore: bump chromium in DEPS to 104.0.5110.0 * chore: update patches * chore: bump chromium in DEPS to 104.0.5112.0 * chore: bump chromium in DEPS to 105.0.5113.0 * chore: bump chromium in DEPS to 105.0.5115.0 * chore: bump chromium in DEPS to 105.0.5117.0 * chore: update patches * chore: update libcpp patch * 3693745: Delete base::LowerCaseEqualsASCII() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3693745 * 3669226: Remove printing PostTask usage of IO thread Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3669226 * 3687395: Remove DictionaryValue::HasKey(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3687395 * 3691014: Prevent unsafe narrowing: ui/accessibility, part 2 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3691014 * 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3560567 * 3684873: [Bluetooth][Win/Linux] Add bluetooth pair confirmation prompt https://chromium-review.googlesource.com/c/chromium/src/+/3684873 * chore: bump chromium in DEPS to 105.0.5119.0 * chore: missing includes in desktop_notification_controller * chore: update patches * 3685951: Reland "Make sure screen object is created once in tests." https://chromium-review.googlesource.com/c/chromium/src/+/3685951 * fixup: Reland "Make sure screen object is created once in tests." * 3646014: [API] Deprecate LegacyOOMErrorCallback Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3646014 * chore: bump chromium in DEPS to 105.0.5121.0 * chore: update patches * 3699085: [cleanup] update PrintBackend::EnumeratePrinters to use reference Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3699085 * chore: bump chromium in DEPS to 105.0.5123.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5125.0 * chore: update patches * 3630082: [sandbox] Also enable the sandbox outside of Chromium builds Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3630082 * chore: bump chromium in DEPS to 105.0.5127.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5129.0 * chore: update patches * 3703741: Remove WebContents::GetMainFrame. https://chromium-review.googlesource.com/c/chromium/src/+/3703741 * chore: update patches * fixup! 3703741: Remove WebContents::GetMainFrame. * fix lint * more lint * chore: document breaking change * 3687671: [v8] Freeze flags after initialization https://chromium-review.googlesource.com/c/chromium/src/+/3687671 * fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors. * use the v8 allocator for node serdes * chore: update patches * remove faulty non-v8-sandbox-compatible code * make NodeArrayBufferAllocator use the v8 allocator under the hood * fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors. * fix build on windows * 3691954: [Reland][Extensions Bindings] Validate arguments sent to API events https://chromium-review.googlesource.com/c/chromium/src/+/3691954 * chore: remove deprecated AccessorSignatures https://github.com/nodejs/nan/pull/941 * Update patches/chromium/notification_provenance.patch Co-authored-by: John Kleinschmidt * remove chore_expose_v8_initialization_isolate_callbacks.patch * add link to nodejs/nan#941 * 52026: Do not allow md4 or md5 based signatures in X.509 certificates. https://boringssl-review.googlesource.com/c/boringssl/+/52026 * chore: update patches * disable nan buffer-test * disable sandboxed pointers for now * force sandboxed pointers off * improve node allocation patch * restore accidentally dropped node crypto test patch Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr Co-authored-by: John Kleinschmidt Co-authored-by: Charles Kerr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard Co-authored-by: Keeley Hammond Co-authored-by: VerteDinde Co-authored-by: VerteDinde Co-authored-by: Jeremy Rose Co-authored-by: Jeremy Rose --- DEPS | 2 +- build/args/all.gn | 2 + docs/api/session.md | 7 +- docs/breaking-changes.md | 7 + filenames.libcxx.gni | 364 ++++++++++++++++- patches/boringssl/expose_aes-cfb.patch | 4 +- patches/chromium/.patches | 3 +- ...client_precreatemessageloop_callback.patch | 10 +- .../add_didinstallconditionalfeatures.patch | 24 +- ..._scheduler_throttling_per_renderview.patch | 6 +- ...leges_in_unsandboxed_child_processes.patch | 2 +- patches/chromium/blink_local_frame.patch | 4 +- ..._node_processes_as_browser_processes.patch | 2 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ...build_disable_print_content_analysis.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 18 +- patches/chromium/build_gn.patch | 4 +- .../build_libc_as_static_library.patch | 2 +- ...bcxx_abi_unstable_false_for_electron.patch | 4 +- patches/chromium/can_create_window.patch | 49 +-- ..._v8_initialization_isolate_callbacks.patch | 41 -- ...screationoverridden_with_full_params.patch | 52 +-- ...allow_disabling_compression_on_linux.patch | 2 +- .../crash_allow_setting_more_options.patch | 10 +- .../custom_protocols_plzserviceworker.patch | 6 +- patches/chromium/desktop_media_list.patch | 8 +- patches/chromium/disable-redraw-lock.patch | 10 +- .../disable_color_correct_rendering.patch | 170 +------- .../disable_compositor_recycling.patch | 4 +- ...le_freezing_flags_after_init_in_node.patch | 30 ++ patches/chromium/disable_hidden.patch | 8 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 2 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- .../extend_apply_webpreferences.patch | 4 +- ..._registry_to_multibuffer_data_source.patch | 4 +- ...screen_rendering_with_viz_compositor.patch | 55 ++- ..._raw_response_headers_from_urlloader.patch | 14 +- ...uest_webcontents_to_enter_fullscreen.patch | 20 + .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- .../chromium/fix_export_zlib_symbols.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- ...out_profile_refs_in_accessibility_ui.patch | 2 +- patches/chromium/frame_host_manager.patch | 6 +- .../gin_enable_disable_v8_platform.patch | 2 +- ...gpu_notify_when_dxdiag_request_fails.patch | 4 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...tform_electron_can_call_x11_property.patch | 2 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- .../mas_disable_custom_window_frame.patch | 14 +- .../mas_disable_remote_accessibility.patch | 18 +- .../chromium/mas_disable_remote_layer.patch | 24 +- patches/chromium/mas_no_private_api.patch | 4 +- ...emote_certificate_verification_logic.patch | 20 +- .../chromium/notification_provenance.patch | 62 +-- ...utofill_colors_to_the_color_pipeline.patch | 2 +- ..._doubleforkandexec_with_forkandspawn.patch | 12 +- patches/chromium/printing.patch | 72 ++-- ...r_changes_to_the_webcontentsobserver.patch | 12 +- .../render_widget_host_view_base.patch | 10 +- .../render_widget_host_view_mac.patch | 6 +- patches/chromium/resource_file_conflict.patch | 8 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 16 +- patches/chromium/web_contents.patch | 8 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 10 +- .../worker_context_will_destroy.patch | 16 +- ...feat_add_hook_to_notify_script_ready.patch | 16 +- patches/nan/.patches | 1 + ...remove_deprecated_accessorsignatures.patch | 45 +++ patches/node/.patches | 2 + ...mespace_as_cr_to_align_with_chromium.patch | 21 + .../fix_crypto_tests_to_run_with_bssl.patch | 29 ++ .../node/support_v8_sandboxed_pointers.patch | 375 ++++++++++++++++++ patches/v8/.patches | 3 +- ...w_disabling_of_v8_sandboxed_pointers.patch | 32 -- patches/v8/build_gn.patch | 6 +- ...ild_remove_legacy_oom_error_callback.patch | 168 ++++++++ patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 2 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- .../force_disable_v8_sandboxed_pointers.patch | 24 ++ ..._terminating_exception_in_microtasks.patch | 8 +- ...workaround_an_undefined_symbol_error.patch | 2 +- script/nan-spec-runner.js | 5 +- script/node-disabled-tests.json | 1 + shell/app/electron_main_delegate.cc | 4 +- shell/app/electron_main_delegate.h | 2 +- .../api/electron_api_data_pipe_holder.cc | 26 +- shell/browser/api/electron_api_net_log.cc | 9 +- shell/browser/api/electron_api_net_log.h | 2 +- shell/browser/api/electron_api_printing.cc | 4 +- .../browser/api/electron_api_web_contents.cc | 189 ++------- shell/browser/api/electron_api_web_contents.h | 35 -- .../api/electron_api_web_frame_main.cc | 2 +- shell/browser/api/gpu_info_enumerator.cc | 8 +- .../bluetooth/electron_bluetooth_delegate.cc | 7 + .../bluetooth/electron_bluetooth_delegate.h | 3 + shell/browser/electron_autofill_driver.cc | 7 +- .../electron_autofill_driver_factory.cc | 2 +- shell/browser/electron_browser_client.cc | 2 +- shell/browser/electron_browser_context.cc | 110 +++++ shell/browser/electron_browser_context.h | 32 ++ shell/browser/electron_browser_main_parts.cc | 8 +- shell/browser/electron_browser_main_parts.h | 2 + ...electron_pdf_web_contents_helper_client.cc | 2 +- shell/browser/electron_permission_manager.cc | 38 +- shell/browser/electron_permission_manager.h | 18 +- .../cryptotoken_private_api.cc | 24 +- .../extensions/electron_messaging_delegate.cc | 21 +- shell/browser/hid/electron_hid_delegate.cc | 67 ++-- shell/browser/hid/electron_hid_delegate.h | 21 +- shell/browser/hid/hid_chooser_context.cc | 64 ++- shell/browser/hid/hid_chooser_context.h | 13 +- shell/browser/hid/hid_chooser_controller.cc | 7 +- .../media/media_stream_devices_controller.cc | 22 +- .../desktop_notification_controller.cc | 3 +- .../printing/print_preview_message_handler.cc | 6 +- .../serial/electron_serial_delegate.cc | 5 +- .../browser/serial/serial_chooser_context.cc | 30 +- shell/browser/serial/serial_chooser_context.h | 4 +- .../serial/serial_chooser_context_factory.cc | 4 +- .../serial/serial_chooser_controller.cc | 2 +- shell/browser/ui/certificate_trust_mac.mm | 3 +- shell/browser/ui/inspectable_web_contents.cc | 16 +- shell/browser/ui/webui/accessibility_ui.cc | 7 +- .../browser/web_contents_permission_helper.cc | 90 +---- .../browser/web_contents_permission_helper.h | 37 -- shell/browser/web_contents_preferences.cc | 3 +- shell/browser/web_contents_zoom_controller.cc | 2 +- shell/browser/web_view_guest_delegate.cc | 2 +- shell/common/api/electron_api_native_image.cc | 14 - shell/common/v8_value_converter.cc | 13 +- spec/package.json | 4 +- spec/yarn.lock | 19 +- 144 files changed, 1907 insertions(+), 1232 deletions(-) delete mode 100644 patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch create mode 100644 patches/chromium/disable_freezing_flags_after_init_in_node.patch create mode 100644 patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch create mode 100644 patches/nan/chore_remove_deprecated_accessorsignatures.patch create mode 100644 patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch create mode 100644 patches/node/support_v8_sandboxed_pointers.patch delete mode 100644 patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch create mode 100644 patches/v8/build_remove_legacy_oom_error_callback.patch create mode 100644 patches/v8/force_disable_v8_sandboxed_pointers.patch diff --git a/DEPS b/DEPS index b426c6b27f2dd..aa7afdb3214cd 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '104.0.5073.0', + '105.0.5129.0', 'node_version': 'v16.15.1', 'nan_version': diff --git a/build/args/all.gn b/build/args/all.gn index e12aca35a29b1..9a3fee65b82d2 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -46,4 +46,6 @@ enable_cet_shadow_stack = false # Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281 is_cfi = false +# TODO(nornagon): this is disabled until node.js's internals can be made +# compatible with sandboxed pointers. v8_enable_sandboxed_pointers = false diff --git a/docs/api/session.md b/docs/api/session.md index 70a1a29f4d55a..ed8f895f1655b 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -281,7 +281,7 @@ Returns: * `event` Event * `details` Object * `device` [HIDDevice[]](structures/hid-device.md) - * `frame` [WebFrameMain](web-frame-main.md) + * `origin` string (optional) - The origin that the device has been revoked from. Emitted after `HIDDevice.forget()` has been called. This event can be used to help maintain persistent storage of permissions when @@ -705,7 +705,6 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents, * `deviceType` string - The type of device that permission is being requested on, can be `hid` or `serial`. * `origin` string - The origin URL of the device permission check. * `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for. - * `frame` [WebFrameMain](web-frame-main.md) - WebFrameMain checking the device permission. Sets the handler which can be used to respond to device permission checks for the `session`. Returning `true` will allow the device to be permitted and `false` will reject it. @@ -713,8 +712,8 @@ To clear the handler, call `setDevicePermissionHandler(null)`. This handler can be used to provide default permissioning to devices without first calling for permission to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used. -Additionally, the default behavior of Electron is to store granted device permission through the lifetime -of the corresponding WebContents. If longer term storage is needed, a developer can store granted device +Additionally, the default behavior of Electron is to store granted device permision in memory. +If longer term storage is needed, a developer can store granted device permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`. ```javascript diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index e0dea89dfd9a2..08136f49a514b 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -89,6 +89,13 @@ 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. +### API Changed: `session.setDevicePermissionHandler(handler)` + +The handler invoked when `session.setDevicePermissionHandler(handler)` is used +has a change to its arguments. This handler no longer is passed a frame +`[WebFrameMain](api/web-frame-main.md)`, but instead is passed the `origin`, which +is the origin that is checking for device permission. + ## Planned Breaking API Changes (19.0) None diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index b14a775f99962..56021a48dd9e4 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -1,49 +1,376 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/CMakeLists.txt", + "//buildtools/third_party/libc++/trunk/include/__algorithm/adjacent_find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/all_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/any_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/binary_search.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/clamp.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/comp.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/comp_ref_type.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_backward.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/count.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/count_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/equal.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/equal_range.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/fill.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/fill_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/find_end.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/find_first_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/find_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/find_if_not.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/for_each.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/for_each_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/generate.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/generate_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/half_positive.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_found_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_fun_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_in_out_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_in_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_out_out_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/in_out_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/includes.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/inplace_merge.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_heap_until.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_partitioned.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_permutation.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted_until.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/iter_swap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/lexicographical_compare.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/lower_bound.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/make_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/max.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/max_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/merge.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/min.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/min_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/min_max_result.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/minmax.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/minmax_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/mismatch.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/move.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/move_backward.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/next_permutation.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/none_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/nth_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/partial_sort.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/partial_sort_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/partition.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/partition_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/partition_point.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/pop_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/prev_permutation.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/push_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if_not.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_swap_ranges.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/remove.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/remove_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/replace.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/replace_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/replace_copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/replace_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/reverse.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/reverse_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/rotate.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/rotate_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/sample.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/search.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/search_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/set_difference.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/set_intersection.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/set_symmetric_difference.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/set_union.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/shift_left.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/shift_right.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/shuffle.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/sift_down.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/sort.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/sort_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/stable_partition.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/stable_sort.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/swap_ranges.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/transform.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/upper_bound.h", + "//buildtools/third_party/libc++/trunk/include/__assert", "//buildtools/third_party/libc++/trunk/include/__availability", + "//buildtools/third_party/libc++/trunk/include/__bit/bit_cast.h", + "//buildtools/third_party/libc++/trunk/include/__bit/byteswap.h", "//buildtools/third_party/libc++/trunk/include/__bit_reference", "//buildtools/third_party/libc++/trunk/include/__bits", "//buildtools/third_party/libc++/trunk/include/__bsd_locale_defaults.h", "//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h", + "//buildtools/third_party/libc++/trunk/include/__charconv/chars_format.h", + "//buildtools/third_party/libc++/trunk/include/__charconv/from_chars_result.h", + "//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_result.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/calendar.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/convert_to_timespec.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/duration.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/file_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/high_resolution_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/steady_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/system_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/time_point.h", + "//buildtools/third_party/libc++/trunk/include/__compare/common_comparison_category.h", + "//buildtools/third_party/libc++/trunk/include/__compare/compare_partial_order_fallback.h", + "//buildtools/third_party/libc++/trunk/include/__compare/compare_strong_order_fallback.h", + "//buildtools/third_party/libc++/trunk/include/__compare/compare_three_way.h", + "//buildtools/third_party/libc++/trunk/include/__compare/compare_three_way_result.h", + "//buildtools/third_party/libc++/trunk/include/__compare/compare_weak_order_fallback.h", + "//buildtools/third_party/libc++/trunk/include/__compare/is_eq.h", + "//buildtools/third_party/libc++/trunk/include/__compare/ordering.h", + "//buildtools/third_party/libc++/trunk/include/__compare/partial_order.h", + "//buildtools/third_party/libc++/trunk/include/__compare/strong_order.h", + "//buildtools/third_party/libc++/trunk/include/__compare/synth_three_way.h", + "//buildtools/third_party/libc++/trunk/include/__compare/three_way_comparable.h", + "//buildtools/third_party/libc++/trunk/include/__compare/weak_order.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/arithmetic.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/assignable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/boolean_testable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/class_or_enum.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/common_reference_with.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/common_with.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/constructible.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/convertible_to.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/copyable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/derived_from.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/destructible.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/different_from.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/equality_comparable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/invocable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/movable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/predicate.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/regular.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/relation.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/same_as.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/semiregular.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/swappable.h", + "//buildtools/third_party/libc++/trunk/include/__concepts/totally_ordered.h", "//buildtools/third_party/libc++/trunk/include/__config", "//buildtools/third_party/libc++/trunk/include/__config_site.in", + "//buildtools/third_party/libc++/trunk/include/__coroutine/coroutine_handle.h", + "//buildtools/third_party/libc++/trunk/include/__coroutine/coroutine_traits.h", + "//buildtools/third_party/libc++/trunk/include/__coroutine/noop_coroutine_handle.h", + "//buildtools/third_party/libc++/trunk/include/__coroutine/trivial_awaitables.h", "//buildtools/third_party/libc++/trunk/include/__debug", "//buildtools/third_party/libc++/trunk/include/__errc", - "//buildtools/third_party/libc++/trunk/include/__functional_03", - "//buildtools/third_party/libc++/trunk/include/__functional_base", - "//buildtools/third_party/libc++/trunk/include/__functional_base_03", + "//buildtools/third_party/libc++/trunk/include/__filesystem/copy_options.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/directory_entry.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/directory_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/directory_options.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/file_status.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/file_time_type.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/file_type.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/filesystem_error.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/operations.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/path.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/path_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/perm_options.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/perms.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/recursive_directory_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/space_info.h", + "//buildtools/third_party/libc++/trunk/include/__filesystem/u8path.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_arg.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_args.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_context.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_error.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_fwd.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_parse_context.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_string.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_to_n_result.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_bool.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_char.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_floating_point.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_integer.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_integral.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_string.h", + "//buildtools/third_party/libc++/trunk/include/__format/parser_std_format_spec.h", + "//buildtools/third_party/libc++/trunk/include/__functional/binary_function.h", + "//buildtools/third_party/libc++/trunk/include/__functional/binary_negate.h", + "//buildtools/third_party/libc++/trunk/include/__functional/bind.h", + "//buildtools/third_party/libc++/trunk/include/__functional/bind_back.h", + "//buildtools/third_party/libc++/trunk/include/__functional/bind_front.h", + "//buildtools/third_party/libc++/trunk/include/__functional/binder1st.h", + "//buildtools/third_party/libc++/trunk/include/__functional/binder2nd.h", + "//buildtools/third_party/libc++/trunk/include/__functional/compose.h", + "//buildtools/third_party/libc++/trunk/include/__functional/default_searcher.h", + "//buildtools/third_party/libc++/trunk/include/__functional/function.h", + "//buildtools/third_party/libc++/trunk/include/__functional/hash.h", + "//buildtools/third_party/libc++/trunk/include/__functional/identity.h", + "//buildtools/third_party/libc++/trunk/include/__functional/invoke.h", + "//buildtools/third_party/libc++/trunk/include/__functional/is_transparent.h", + "//buildtools/third_party/libc++/trunk/include/__functional/mem_fn.h", + "//buildtools/third_party/libc++/trunk/include/__functional/mem_fun_ref.h", + "//buildtools/third_party/libc++/trunk/include/__functional/not_fn.h", + "//buildtools/third_party/libc++/trunk/include/__functional/operations.h", + "//buildtools/third_party/libc++/trunk/include/__functional/perfect_forward.h", + "//buildtools/third_party/libc++/trunk/include/__functional/pointer_to_binary_function.h", + "//buildtools/third_party/libc++/trunk/include/__functional/pointer_to_unary_function.h", + "//buildtools/third_party/libc++/trunk/include/__functional/ranges_operations.h", + "//buildtools/third_party/libc++/trunk/include/__functional/reference_wrapper.h", + "//buildtools/third_party/libc++/trunk/include/__functional/unary_function.h", + "//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h", + "//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h", + "//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h", "//buildtools/third_party/libc++/trunk/include/__hash_table", + "//buildtools/third_party/libc++/trunk/include/__ios/fpos.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/access.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/advance.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/back_insert_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/common_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/counted_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/data.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/default_sentinel.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/distance.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/empty.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/erase_if_container.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/front_insert_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/incrementable_traits.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/indirectly_comparable.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/insert_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/istream_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/istreambuf_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/iter_move.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/iter_swap.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/mergeable.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/move_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/next.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/ostream_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/ostreambuf_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/permutable.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/prev.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/projected.h", "//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/reverse_access.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/reverse_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/size.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/sortable.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/unreachable_sentinel.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/wrap_iter.h", "//buildtools/third_party/libc++/trunk/include/__libcpp_version", "//buildtools/third_party/libc++/trunk/include/__locale", + "//buildtools/third_party/libc++/trunk/include/__mbstate_t.h", "//buildtools/third_party/libc++/trunk/include/__memory/addressof.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocator.h", + "//buildtools/third_party/libc++/trunk/include/__memory/allocator_arg_t.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h", "//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h", "//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h", + "//buildtools/third_party/libc++/trunk/include/__memory/concepts.h", "//buildtools/third_party/libc++/trunk/include/__memory/construct_at.h", - "//buildtools/third_party/libc++/trunk/include/__memory/pointer_safety.h", "//buildtools/third_party/libc++/trunk/include/__memory/pointer_traits.h", + "//buildtools/third_party/libc++/trunk/include/__memory/ranges_construct_at.h", + "//buildtools/third_party/libc++/trunk/include/__memory/ranges_uninitialized_algorithms.h", "//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h", "//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h", "//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h", "//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h", "//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h", + "//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator.h", + "//buildtools/third_party/libc++/trunk/include/__memory/voidify.h", "//buildtools/third_party/libc++/trunk/include/__mutex_base", "//buildtools/third_party/libc++/trunk/include/__node_handle", - "//buildtools/third_party/libc++/trunk/include/__nullptr", + "//buildtools/third_party/libc++/trunk/include/__numeric/accumulate.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/adjacent_difference.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/exclusive_scan.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/gcd_lcm.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/inclusive_scan.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/inner_product.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/iota.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/midpoint.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/partial_sum.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/reduce.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/transform_exclusive_scan.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/transform_inclusive_scan.h", + "//buildtools/third_party/libc++/trunk/include/__numeric/transform_reduce.h", + "//buildtools/third_party/libc++/trunk/include/__random/bernoulli_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/binomial_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/cauchy_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/chi_squared_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/clamp_to_integral.h", + "//buildtools/third_party/libc++/trunk/include/__random/default_random_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/discard_block_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/discrete_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/exponential_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/extreme_value_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/fisher_f_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/gamma_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/generate_canonical.h", + "//buildtools/third_party/libc++/trunk/include/__random/geometric_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/independent_bits_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/is_seed_sequence.h", + "//buildtools/third_party/libc++/trunk/include/__random/is_valid.h", + "//buildtools/third_party/libc++/trunk/include/__random/knuth_b.h", + "//buildtools/third_party/libc++/trunk/include/__random/linear_congruential_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/log2.h", + "//buildtools/third_party/libc++/trunk/include/__random/lognormal_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/mersenne_twister_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/negative_binomial_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/normal_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/piecewise_constant_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/piecewise_linear_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/poisson_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/random_device.h", + "//buildtools/third_party/libc++/trunk/include/__random/ranlux.h", + "//buildtools/third_party/libc++/trunk/include/__random/seed_seq.h", + "//buildtools/third_party/libc++/trunk/include/__random/shuffle_order_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/student_t_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/subtract_with_carry_engine.h", + "//buildtools/third_party/libc++/trunk/include/__random/uniform_int_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/uniform_random_bit_generator.h", + "//buildtools/third_party/libc++/trunk/include/__random/uniform_real_distribution.h", + "//buildtools/third_party/libc++/trunk/include/__random/weibull_distribution.h", "//buildtools/third_party/libc++/trunk/include/__ranges/access.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/all.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/common_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/copyable_box.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/counted.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/dangling.h", "//buildtools/third_party/libc++/trunk/include/__ranges/data.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/drop_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/empty.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/empty_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/enable_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/iota_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/join_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/non_propagating_cache.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/owning_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/range_adaptor.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/rbegin.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/ref_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/rend.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/reverse_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/single_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/size.h", - "//buildtools/third_party/libc++/trunk/include/__ranges/view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/subrange.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/take_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/transform_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/view_interface.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/views.h", "//buildtools/third_party/libc++/trunk/include/__split_buffer", "//buildtools/third_party/libc++/trunk/include/__std_stream", "//buildtools/third_party/libc++/trunk/include/__string", @@ -51,14 +378,12 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h", - "//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_aix.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/musl/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/newlib/xlocale.h", - "//buildtools/third_party/libc++/trunk/include/__support/nuttx/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/openbsd/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/solaris/floatingpoint.h", "//buildtools/third_party/libc++/trunk/include/__support/solaris/wchar.h", @@ -68,11 +393,30 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__support/xlocale/__nop_locale_mgmt.h", "//buildtools/third_party/libc++/trunk/include/__support/xlocale/__posix_l_fallback.h", "//buildtools/third_party/libc++/trunk/include/__support/xlocale/__strtonum_fallback.h", + "//buildtools/third_party/libc++/trunk/include/__thread/poll_with_backoff.h", + "//buildtools/third_party/libc++/trunk/include/__thread/timed_backoff_policy.h", "//buildtools/third_party/libc++/trunk/include/__threading_support", "//buildtools/third_party/libc++/trunk/include/__tree", "//buildtools/third_party/libc++/trunk/include/__tuple", "//buildtools/third_party/libc++/trunk/include/__undef_macros", + "//buildtools/third_party/libc++/trunk/include/__utility/as_const.h", + "//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h", + "//buildtools/third_party/libc++/trunk/include/__utility/cmp.h", + "//buildtools/third_party/libc++/trunk/include/__utility/declval.h", + "//buildtools/third_party/libc++/trunk/include/__utility/exchange.h", + "//buildtools/third_party/libc++/trunk/include/__utility/forward.h", + "//buildtools/third_party/libc++/trunk/include/__utility/in_place.h", + "//buildtools/third_party/libc++/trunk/include/__utility/integer_sequence.h", + "//buildtools/third_party/libc++/trunk/include/__utility/move.h", + "//buildtools/third_party/libc++/trunk/include/__utility/pair.h", + "//buildtools/third_party/libc++/trunk/include/__utility/piecewise_construct.h", + "//buildtools/third_party/libc++/trunk/include/__utility/priority_tag.h", + "//buildtools/third_party/libc++/trunk/include/__utility/rel_ops.h", + "//buildtools/third_party/libc++/trunk/include/__utility/swap.h", "//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h", + "//buildtools/third_party/libc++/trunk/include/__utility/transaction.h", + "//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h", + "//buildtools/third_party/libc++/trunk/include/__variant/monostate.h", "//buildtools/third_party/libc++/trunk/include/algorithm", "//buildtools/third_party/libc++/trunk/include/any", "//buildtools/third_party/libc++/trunk/include/array", @@ -99,6 +443,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/complex.h", "//buildtools/third_party/libc++/trunk/include/concepts", "//buildtools/third_party/libc++/trunk/include/condition_variable", + "//buildtools/third_party/libc++/trunk/include/coroutine", "//buildtools/third_party/libc++/trunk/include/csetjmp", "//buildtools/third_party/libc++/trunk/include/csignal", "//buildtools/third_party/libc++/trunk/include/cstdarg", @@ -111,6 +456,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/ctgmath", "//buildtools/third_party/libc++/trunk/include/ctime", "//buildtools/third_party/libc++/trunk/include/ctype.h", + "//buildtools/third_party/libc++/trunk/include/cuchar", "//buildtools/third_party/libc++/trunk/include/cwchar", "//buildtools/third_party/libc++/trunk/include/cwctype", "//buildtools/third_party/libc++/trunk/include/deque", @@ -122,7 +468,6 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/experimental/algorithm", "//buildtools/third_party/libc++/trunk/include/experimental/coroutine", "//buildtools/third_party/libc++/trunk/include/experimental/deque", - "//buildtools/third_party/libc++/trunk/include/experimental/filesystem", "//buildtools/third_party/libc++/trunk/include/experimental/forward_list", "//buildtools/third_party/libc++/trunk/include/experimental/functional", "//buildtools/third_party/libc++/trunk/include/experimental/iterator", @@ -205,6 +550,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/type_traits", "//buildtools/third_party/libc++/trunk/include/typeindex", "//buildtools/third_party/libc++/trunk/include/typeinfo", + "//buildtools/third_party/libc++/trunk/include/uchar.h", "//buildtools/third_party/libc++/trunk/include/unordered_map", "//buildtools/third_party/libc++/trunk/include/unordered_set", "//buildtools/third_party/libc++/trunk/include/utility", diff --git a/patches/boringssl/expose_aes-cfb.patch b/patches/boringssl/expose_aes-cfb.patch index 767013b5404cc..f7c95c952449b 100644 --- a/patches/boringssl/expose_aes-cfb.patch +++ b/patches/boringssl/expose_aes-cfb.patch @@ -58,10 +58,10 @@ index 852b76bea69988e0b3ac76a17b603128f239dde0..d443f4dc2daea0b7aa86ae75d31d995f callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg); callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg); diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h -index 2458847e5640fe955a9971aa77c27251e5091db5..a0b3ac5f6b55921a542f27108beca93d6372c6fc 100644 +index 380d25d9c2a8efb0636db5749a8e3b1ba6908ad5..7a5aa1c142e15cf06e63882e83d82a93c0d38785 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h -@@ -448,6 +448,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); +@@ -460,6 +460,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); // EVP_aes_128_cfb128 is only available in decrepit. OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void); diff --git a/patches/chromium/.patches b/patches/chromium/.patches index fca913719ee48..e0cb53f32a2a8 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -75,7 +75,6 @@ skip_atk_toolchain_check.patch worker_feat_add_hook_to_notify_script_ready.patch chore_provide_iswebcontentscreationoverridden_with_full_params.patch fix_properly_honor_printing_page_ranges.patch -chore_expose_v8_initialization_isolate_callbacks.patch export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch fix_export_zlib_symbols.patch don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -111,4 +110,6 @@ make_gtk_getlibgtk_public.patch build_disable_print_content_analysis.patch custom_protocols_plzserviceworker.patch feat_filter_out_non-shareable_windows_in_the_current_application_in.patch +fix_allow_guest_webcontents_to_enter_fullscreen.patch posix_replace_doubleforkandexec_with_forkandspawn.patch +disable_freezing_flags_after_init_in_node.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 9176b7a52a1ad..65e54de741e2d 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 e0ff6fae1e96699e7cb54c9e82a3c68a8e95602b..2179a906bb6c93fbfaa8e7b7e64fddfaab034e94 100644 +index b017e2bf97a4a15cb7af384d9b4e54aa729a997c..fc59b7040bf68e90fbbe516b5321a519a5e77b2a 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -241,6 +241,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,9 +24,9 @@ index e0ff6fae1e96699e7cb54c9e82a3c68a8e95602b..2179a906bb6c93fbfaa8e7b7e64fddfa // 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 -@@ -347,7 +351,6 @@ int GpuMain(MainFunctionParams parameters) { - GpuProcess gpu_process(io_thread_priority); - #endif +@@ -344,7 +348,6 @@ int GpuMain(MainFunctionParams parameters) { + ChildProcess gpu_process(io_thread_priority); + DCHECK(base::ThreadPoolInstance::Get()->WasStarted()); - auto* client = GetContentClient()->gpu(); if (client) diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index bd92d7ecb804e..91312aeb13cb3 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 d921125d153742dd09e34418c19195a3d61bef1f..5348c3289a94c86bbbc9bb07be26cc56b4986788 100644 +index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ede21d73be 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index d921125d153742dd09e34418c19195a3d61bef1f..5348c3289a94c86bbbc9bb07be26cc56 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 831db39365764d4001b8d602b225f157d3562ca8..4aabe0781d9e4150dddce76a50b993d0b8da8068 100644 +index f479e7ce6ceb21e67f72dd29589dfda180e438b0..23dcc6507ed9151f657689904bf90d3b2e8ae3d3 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4502,6 +4502,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 831db39365764d4001b8d602b225f157d3562ca8..4aabe0781d9e4150dddce76a50b993d0 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index e903ba9ec4f8d32c5d3a6795f0a20f2addf95743..bb9755b981cf96e131e6545f778f73607fabdd02 100644 +index ac30039d95f1f4c73067df58d8af63190b352030..c674c87797fc8ea057f5b94aabbb53b92bded031 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -604,6 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -609,6 +609,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index e903ba9ec4f8d32c5d3a6795f0a20f2addf95743..bb9755b981cf96e131e6545f778f7360 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 595441198b5253e5f36f97303e952e642998be39..1b17db7b9285cb874e74abdd896888c12b288565 100644 +index 9e2dc9b2ea07a1f9bdfd92284f73dd1977ea1437..18c07f44196e83cf16cace6863e3db368a86ce0d 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -598,6 +598,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -605,6 +605,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b09415 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 6fb24096d3a5415f59cba2a8a5a6f36fe838dcc1..a4089fb3989ecd37d5b01baeb03c2ac1f4f05b53 100644 +index 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847dd6a38d86 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index 6fb24096d3a5415f59cba2a8a5a6f36fe838dcc1..a4089fb3989ecd37d5b01baeb03c2ac1 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 40042e1fa2622a871d0ed512f1f6fda1cdda56a6..a377548b36712bd4971bae6b4c0afdc5c8fdbdfc 100644 +index 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d266b18cbe5 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( @@ -110,7 +110,7 @@ index 40042e1fa2622a871d0ed512f1f6fda1cdda56a6..a377548b36712bd4971bae6b4c0afdc5 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 1f929d9535ca19a2c443e13f2bafce179f5870df..fe7605585501fcc1fd515f1d94fda7e27d5ba632 100644 +index c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f48c3c837a 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 @@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,7 +123,7 @@ index 1f929d9535ca19a2c443e13f2bafce179f5870df..fe7605585501fcc1fd515f1d94fda7e2 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 a9bd5283d3c65728dd3293abe88ffd02d3eee4fc..f5e4a927f2f5114e62d76fec86d6a5d2d2321166 100644 +index d1e2d799602ce3b671e7e33afc57923fcc066f00..64dc35a4ba05521dc55b69d2413010ae47b10152 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -352,6 +352,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { 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 785bc29c679d7..6b6c839e9dffa 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 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de // 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 229d9f2112e70f3bbff6e6986ab01c67483a1ae9..0529b4399959a2a2b9b0131dd8736a87fb973b0b 100644 +index deeeab3e6ead93cb3be26f4b40caeeef8bfaafa5..98c257b43cf198481bcaa8f080add28e60e7d9a2 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3711,6 +3711,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3732,6 +3732,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 229d9f2112e70f3bbff6e6986ab01c67483a1ae9..0529b4399959a2a2b9b0131dd8736a87 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3722,7 +3729,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3743,7 +3750,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( diff --git a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch index 31c19ddc9a29f..3e7cca104eec5 100644 --- a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch +++ b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch @@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes This allows unsandboxed renderers to launch setuid processes on Linux. diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index b2b29e715d6e5ea427faf6829e935e91dd87d471..138b5da2e5ae85760faaeeff92168d1070b6f562 100644 +index 16d838b710d4f717733f4aa8f92f144922969b3b..ff2c78c7b803159dde97dafdb799d9b8761dc3fd 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc @@ -54,6 +54,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 931e0185041f2..5521df73eb7fd 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 f370d230361c3ab524c0fc74facf8954840aa29f..0e62d29e44a971d49d70e485509d0b59f5cb31c7 100644 +index 80f4314d205f4cbf0d92a331062f8a01a46d6917..2e5c15fc2cf5d0db8d26c1eeb759f6d2837e0656 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,7 +49,7 @@ index f370d230361c3ab524c0fc74facf8954840aa29f..0e62d29e44a971d49d70e485509d0b59 // 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 d5ef00cb9870c2dc767d80595a39af4302c3e3c3..f3a2a9527f97902f357782eb445cf63777c77398 100644 +index 9d8a9be49ed025439b9323fe4805191db1be6e6b..9c618930625dfd7ca44c2d5c1ca25db4d9f36052 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { 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 f550c068a4fe7..810480a1b56d5 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 3933fa761768b5a45891bfef4c2c2123b92fc276..2eb52b71d7ebc7525cceffbecc99db6751429afd 100644 +index b1f8fd4494e7f5deac078023c2e0240d701e1f13..a372e9bb12f9cec6235fe529d73b6e0009328038 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index 5fd0656a2cdea..47744405285ac 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 97a57dfb1626ae9a781736dd8b0b55bf201162c1..5c97441faad781b459255cb1f7d0652ec86e40c8 100644 +index c3c62f83553bd0d258de4d5d9ecd8b02a74f594b..3dbf4462fa056db7a4084453ef35f1b944fbd093 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_disable_print_content_analysis.patch b/patches/chromium/build_disable_print_content_analysis.patch index 7dff09c3e4eea..dd26dbc9c487a 100644 --- a/patches/chromium/build_disable_print_content_analysis.patch +++ b/patches/chromium/build_disable_print_content_analysis.patch @@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more easily enabled or disabled by default with buildflags. diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni -index 559ac76d4e4b9d9c1824c4da186a6b0f7619fcca..72855e0c5fadb286b67144b34ff71f45e1434c73 100644 +index 1d2b24adbb39215531bbe189d6191dba026d4f68..88b7962836cfe93a59d1569245f4815f22be355e 100644 --- a/printing/buildflags/buildflags.gni +++ b/printing/buildflags/buildflags.gni @@ -36,8 +36,7 @@ declare_args() { 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 93c0696100b5a..b87359449662a 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 dc59a88bc930d4d7b8e606434d940cac5b834bd0..6a583029436f033dc2736b9d7407f26637936add 100644 +index 672bc56194e1ad8b03acd639c17b7f7e67a5dba0..59ba25815e511af5ca6aca5467cc91d5cc3c6bf1 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -175,11 +175,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index dc59a88bc930d4d7b8e606434d940cac5b834bd0..6a583029436f033dc2736b9d7407f266 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 79aa50fbb9944052163bfdf958c5add60a0151f8..9fce5f07a79f801253c6bd8658ed7dba902856ad 100644 +index 46197c5a6423f3278b75549d601421d2b5e139d6..b02779a76a238fd713796597bec8a82897e88f51 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4479,7 +4479,7 @@ static_library("browser") { +@@ -4544,7 +4544,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 79aa50fbb9944052163bfdf958c5add60a0151f8..9fce5f07a79f801253c6bd8658ed7dba sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 65bee9c9d02c6f95cce6ba60d69e2a1b879a1c2f..e26897337f8c96a493936ab1342eb6b7c2c63ffe 100644 +index 5d7cfeb42574b15ddac55c797000bca490274a6f..8b967ef76faa8190d0064f3fa78a661f451228e1 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5870,7 +5870,6 @@ test("unit_tests") { +@@ -5915,7 +5915,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 65bee9c9d02c6f95cce6ba60d69e2a1b879a1c2f..e26897337f8c96a493936ab1342eb6b7 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5893,6 +5892,10 @@ test("unit_tests") { +@@ -5939,6 +5938,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,15 +68,15 @@ index 65bee9c9d02c6f95cce6ba60d69e2a1b879a1c2f..e26897337f8c96a493936ab1342eb6b7 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6786,7 +6789,6 @@ test("unit_tests") { +@@ -6826,7 +6829,6 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", - "//chrome/browser/media/router:test_support", -@@ -6887,6 +6889,10 @@ test("unit_tests") { + "//chrome/browser/autofill_assistant/password_change/proto:proto", +@@ -6937,6 +6939,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index bd23b789dcd3b..a8ab854a62f91 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 d960648941d8b959b25f87b364a594ec44760348..74a14a2373305e2e62b974b34a28ea9a62c6a911 100644 +index c737e53c2ce7237974f6c749eae60ba1de7ec2c1..26ba3ae4a77bc8f525c2ad927ff2956c028ef337 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { @@ -27,7 +27,7 @@ index d960648941d8b959b25f87b364a594ec44760348..74a14a2373305e2e62b974b34a28ea9a # 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 -@@ -349,6 +352,7 @@ default_compiler_configs = [ +@@ -348,6 +351,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 f0bd3d9fd8ef3..ea753eee3f9e0 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 74b6ad644d49c003996db0eab225ea30ac17420a..0a1ba3510be3047bfc34e603c5aaafbf15908269 100644 +index b3e5378f711c54b76c73179e791646d4e5e4e96b..262c8e53ec25b2e91a73b5971d64dbe5d5e005a1 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 89e171dc5eb23..056be0692568f 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,10 +6,10 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn -index 046792ac275853bf109537589b911cfada44ed24..e43daeaa8f8c8e23eea99b3f8f5f48f92012bbc1 100644 +index 2e5843b9f0a5d39d8dbfea0ae5d2ebb413c0ac7d..f4c901e9980ad068a2903482f712bfa8b1310057 100644 --- a/build/config/c++/BUILD.gn +++ b/build/config/c++/BUILD.gn -@@ -8,6 +8,11 @@ assert(use_custom_libcxx, "should only be used if use_custom_libcxx is set") +@@ -9,6 +9,11 @@ assert(use_custom_libcxx, "should only be used if use_custom_libcxx is set") libcxx_abi_unstable = true diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 7f3714ced8c89..ef7bb00517d6e 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 c983b5f4c20acba8a7d779a634cd1593ef69b1ae..e612764997277da3411d8040850756eb38996cca 100644 +index 381bb7d6b1ec2f321dcab9a217aa57e5b2c21925..bdf2fa0461840d6059b4a7d6660a356be5c38ba0 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6922,6 +6922,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7127,6 +7127,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 c983b5f4c20acba8a7d779a634cd1593ef69b1ae..e612764997277da3411d8040850756eb &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b94e87b6f90c986f115a87baf8214baeb8103826..987e437641b7978290aa2633755b67f9099e1d04 100644 +index 1470df421f254725be1a55be5756e47988798035..1c69625326df08b85ec77d01b588fc3a8ce58553 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3912,6 +3912,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3949,6 +3949,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index b94e87b6f90c986f115a87baf8214baeb8103826..987e437641b7978290aa2633755b67f9 new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3956,12 +3964,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3993,12 +4001,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index b94e87b6f90c986f115a87baf8214baeb8103826..987e437641b7978290aa2633755b67f9 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 5aca51ea4154941512e989048295c7de0475c14c..278accd8c6f14a4d91cc2ff4e336e365279c7b9b 100644 +index 3aafb44665ed475084355144663a3c7395a009d5..d32b572673e24f14c60b27e8a1fab683b7aa3e8e 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -569,6 +569,10 @@ struct CreateNewWindowParams { +@@ -575,6 +575,10 @@ struct CreateNewWindowParams { // Governs how downloads are handled if `target_url` results in a download. blink.mojom.NavigationDownloadPolicy download_policy; @@ -68,10 +68,10 @@ index 5aca51ea4154941512e989048295c7de0475c14c..278accd8c6f14a4d91cc2ff4e336e365 // 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 82d33875526759dda05a1818543c0605382597f4..ec89c920f0e0ad3638749b1468bcd54f74b3cce5 100644 +index 9a593698d9e3aebe21cb7e74e0e5603adde30f87..c57b933d2950a69c92d47057b83d96a66416bc1b 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -594,6 +594,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -604,6 +604,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,7 +81,7 @@ index 82d33875526759dda05a1818543c0605382597f4..ec89c920f0e0ad3638749b1468bcd54f 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 e2c88a7e692406c9774a0e9783df612cbc38d7cd..4e069af9256eb106b50e84d1243c92353daf2015 100644 +index 58755b9dca27ddd4d75cf08ecdc47c6d9d9da724..2f786efe35ebdff7061118a14247859ed30eeb2a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -165,6 +165,7 @@ class NetworkService; @@ -92,7 +92,7 @@ index e2c88a7e692406c9774a0e9783df612cbc38d7cd..4e069af9256eb106b50e84d1243c9235 } // namespace network namespace sandbox { -@@ -968,6 +969,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -977,6 +978,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ index e2c88a7e692406c9774a0e9783df612cbc38d7cd..4e069af9256eb106b50e84d1243c9235 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 daf9b4566396c6d681760329cf4ba6869bbb55e4..321d5cfc36e40f2a649e8ea5910f4082b71b62e1 100644 +index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae139178fe 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -26,6 +26,17 @@ namespace content { @@ -124,7 +124,7 @@ index daf9b4566396c6d681760329cf4ba6869bbb55e4..321d5cfc36e40f2a649e8ea5910f4082 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 04aa4d993b331396ee20464f6e1d2da10c91c834..2556c044b6e28501a5fac9b0040e623b8f35f497 100644 +index 348dcde05d71e7d16e4c7bb1d8d9f8718070e669..5a9cc64d6e0d9d01f5dc133c7fcab34101bc32db 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,18 +150,10 @@ index 04aa4d993b331396ee20464f6e1d2da10c91c834..2556c044b6e28501a5fac9b0040e623b // 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 03b637c4d3a68a2bff5a4e06f421f23f97f40911..6235fd626a377643851dbb98d4d089e5a59366db 100644 +index 9b42426f878a741290c89fb6b641b6c44423aa6f..d0c99c26116f6affc801ac59657b89c2ae159a0c 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -32,6 +32,7 @@ - #include "third_party/blink/public/mojom/page/page.mojom.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" -+#include "third_party/blink/public/platform/web_url_request_util.h" - #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" -@@ -302,6 +303,10 @@ WebView* RenderViewImpl::CreateView( +@@ -308,6 +308,10 @@ WebView* RenderViewImpl::CreateView( /*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(), creator->IsAdSubframe()); @@ -220,14 +212,15 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 a25203186cc2df437fe3f9fe309599d86284aefb..b288472c5a00d76077859f02c0e1abca826aa8be 100644 +index fd6118fd28df7ea3f86f7fff6ed7ae7b0517777b..a1cb624589a302340d152a1389adac26d5c6d6ee 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2093,6 +2093,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, - +@@ -2101,6 +2101,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = - GetWindowFeaturesFromString(features, incumbent_window); -+ window_features.raw_features = features; + GetWindowFeaturesFromString(features, entered_window); ++ window_features.raw_features = features; ++ // In fenced frames, we should always use `noopener`. if (GetFrame()->IsInFencedFrameTree()) { + window_features.noopener = true; diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch deleted file mode 100644 index e44f77536c7f9..0000000000000 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Mon, 5 Oct 2020 13:43:59 -0700 -Subject: chore: expose v8 initialization isolate callbacks - -This commit is necessary in order to ensure consistent behavior from -v8 Isolate callbacks in contexts which Node.js does not control. If -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 f417dca0103ddfd8ce6e3b3a4d033ea42133604e..d0ee37d147243858d997be230c12ea3e41e6c873 100644 ---- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -448,8 +448,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, - return {true, std::move(stringified_source)}; - } - --bool V8Initializer::WasmCodeGenerationCheckCallbackInMainThread(v8::Local context, -- v8::Local source) { -+bool V8Initializer::WasmCodeGenerationCheckCallbackInMainThread( -+ 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 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 -@@ -69,8 +69,8 @@ class CORE_EXPORT V8Initializer { - static void MessageHandlerInWorker(v8::Local, - v8::Local); - static bool WasmCodeGenerationCheckCallbackInMainThread( -- v8::Local context, -- v8::Local source); -+ v8::Local context, -+ v8::Local source); - }; - - } // namespace blink diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index a72ce1e616d02..fa12e080d2e2f 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 370a2eaf18f86e16d4198a4f0001f96abfebad07..72f7032a8fe2011a0bd80d557e661fc487c3b876 100644 +index 3289268d3ddb3fbb625b8498c2f84370c37acdff..89920af3e44257b6091bb558537fe07d2bb2d899 100644 --- a/chrome/browser/media/offscreen_tab.cc +++ b/chrome/browser/media/offscreen_tab.cc @@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( @@ -63,7 +63,7 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc -index 2c877ddbb8c1448a73c0f0e0af27c7fecb1b7848..e1dfc70c951dd004dd8b37607dc8840b804a1e54 100644 +index 268355f22577cf21926e209a9fcdb3f52314f2ac..80f998cdb10d9955e438ba5ef4599b35c448fae2 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc @@ -84,10 +84,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( @@ -94,7 +94,7 @@ index f0333177f885000fb22818ffa30a0c4ad520a161..03e82957f9d7bf009dcbf5fcd43718c9 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 caa6c2dbc6dbf87081da9a2e5c42e9ac2e60c77f..ac0b7dbee8195be8c165444a141629475e97a107 100644 +index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c4887cdd382 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc @@ -71,8 +71,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, @@ -108,10 +108,10 @@ index caa6c2dbc6dbf87081da9a2e5c42e9ac2e60c77f..ac0b7dbee8195be8c165444a14162947 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 706684de51b047abf2a355416a6361b7ed8542c9..5ccbde951b833bd9413a5c3506da5d982fb3b58e 100644 +index 458af711eda586adbc4efc515da6a21e62879cfc..221ec7acca678060f0f152d4fee32d3378875bc1 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1795,12 +1795,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1794,12 +1794,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index 706684de51b047abf2a355416a6361b7ed8542c9..5ccbde951b833bd9413a5c3506da5d98 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 1f02e2e3d3f510b52089fbc835c6401ed693f1b9..6116970cb65bb7699759fad4351497ab057e25c0 100644 +index 87859f4741386c967a0568273a2fd16ad26c4a96..8265417dcf7397b2eb37e997547d1e8cfd977509 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -836,8 +836,7 @@ class Browser : public TabStripModelObserver, +@@ -839,8 +839,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -218,7 +218,7 @@ 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 9f46f0b26a0ea42d6bd36e7ec7459a1b2d9c789e..874b7c8d779f471214507417e35449c66b70c97d 100644 +index 186711550a45f4bf383cdceeabac9e1f46aeca89..df1ecec4bf56de72a6164644d3094557a7a52896 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.cc +++ b/components/offline_pages/content/background_loader/background_loader_contents.cc @@ -83,8 +83,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( @@ -246,10 +246,10 @@ 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 6f09c04cc612d2ac58b62d44516eefa1b66d145c..407f734b77d1ed4876f01327df958847d60e9128 100644 +index 686fc99becf068106cc9fb372d2dce1e8d8c5114..eb94d05bf03d04b508123675c31957b8d22ee13a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3860,8 +3860,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3882,8 +3882,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,7 +260,7 @@ index 6f09c04cc612d2ac58b62d44516eefa1b66d145c..407f734b77d1ed4876f01327df958847 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 321d5cfc36e40f2a649e8ea5910f4082b71b62e1..e78e2aad4f13d7810027b65f321691091611fd2d 100644 +index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb53327aa69 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -274,7 +274,7 @@ index 321d5cfc36e40f2a649e8ea5910f4082b71b62e1..e78e2aad4f13d7810027b65f32169109 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 2556c044b6e28501a5fac9b0040e623b8f35f497..4c6cd654551b2f5cfd59a5271a8d95a9e6862d3c 100644 +index 5a9cc64d6e0d9d01f5dc133c7fcab34101bc32db..166e506f1afbcb1a3a661479d489e71d8d8ff552 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -288,7 +288,7 @@ index 2556c044b6e28501a5fac9b0040e623b8f35f497..4c6cd654551b2f5cfd59a5271a8d95a9 // 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 bddbd37ca73369adb82dad5bb8b25f0ab2a7f878..9bf28cd7f926f41041f40d4bc0a497c8b8730b86 100644 +index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590efd3892c61 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( @@ -316,7 +316,7 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10 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 b652f1f30ce7043a0c8434d05a3b1da653aee1fc..259c62c60f302abebf167709b4a1c68ad5607129 100644 +index aef9d1a79fcea0e73541cf8257b498e167c9dfeb..1f0c4209d1c6be31e1abd6bcfcaf181fd2d4858c 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 @@ -402,8 +402,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( @@ -343,11 +343,11 @@ index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec48 content::WebContents* CreateCustomWebContents( 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 d815a972b079676e900be8e312909832ae81bde8..ae28b864fcc2f10007ce33774d2d787c91d65f41 100644 ---- a/fuchsia/engine/browser/frame_impl.cc -+++ b/fuchsia/engine/browser/frame_impl.cc -@@ -406,8 +406,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc +index 5b804b3ad089154424eda6eb58edbb24baf67794..7f055a37080f40dede16dfa7b7ad6b3c31c5282d 100644 +--- a/fuchsia_web/webengine/browser/frame_impl.cc ++++ b/fuchsia_web/webengine/browser/frame_impl.cc +@@ -412,8 +412,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -357,11 +357,11 @@ index d815a972b079676e900be8e312909832ae81bde8..ae28b864fcc2f10007ce33774d2d787c // Specify a generous upper bound for unacknowledged popup windows, so that we // 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 50631a4db62448699e7701f7b4e950e8058896ae..13ba38e1cae39ea46e64313c6a9312e504603bbb 100644 ---- a/fuchsia/engine/browser/frame_impl.h -+++ b/fuchsia/engine/browser/frame_impl.h -@@ -309,8 +309,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame, +diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h +index 0661fd642dcee69a7c8f955490dadf32dc0eb468..e3fa74da87513fbfcd035fa872dc938db96c2766 100644 +--- a/fuchsia_web/webengine/browser/frame_impl.h ++++ b/fuchsia_web/webengine/browser/frame_impl.h +@@ -310,8 +310,7 @@ class WEB_ENGINE_EXPORT 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 50631a4db62448699e7701f7b4e950e8058896ae..13ba38e1cae39ea46e64313c6a9312e5 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 899b8beabdf1131a08583470ace5b468576eeab6..21ab4ae22c54846af78518e897dc23ebe4ce8317 100644 +index 807879aa4894e5fabe043d07d5899e5700a7c172..5044c462ccfeaeb4aeb2dd3189e40e60c835ed73 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 { +@@ -179,8 +179,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/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch index bfe7658c28575..b64fe0220c598 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 2eb52b71d7ebc7525cceffbecc99db6751429afd..d3ff2942d831745efed440be0fe1e82441a39ff7 100644 +index a372e9bb12f9cec6235fe529d73b6e0009328038..58f6f559265d0da5e6ca4c711df4b1dbf3d40e38 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -111,6 +111,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 0a049f6b24aad..33cc2b52a8a15 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 4ed2558351e37dde0eb35b6eb32f442346ff2490..3933fa761768b5a45891bfef4c2c2123b92fc276 100644 +index 3c28019ae3d1d8fd43e5e027fa3abe6786658885..b1f8fd4494e7f5deac078023c2e0240d701e1f13 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -113,6 +113,7 @@ void SetUploadURL(const std::string& url) { @@ -75,7 +75,7 @@ index 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4 // 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 39fb479eba509f7ba1528cafecd1c6b21f3b0e76..a28b88d078560f05fa295f29dcf8b1865839285c 100644 +index 7159bea91a25700f0cb36c48cab62fe2d616b3bd..9bcc5ae7e870c27c3533534c06daa890de5a4816 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc @@ -170,6 +170,7 @@ bool PlatformCrashpadInitialization( @@ -97,9 +97,9 @@ index 39fb479eba509f7ba1528cafecd1c6b21f3b0e76..a28b88d078560f05fa295f29dcf8b186 + arguments.push_back("--no-upload-gzip"); + } + - bool result = - client.StartHandler(handler_path, *database_path, metrics_path, url, - annotations, arguments, false, false); + CHECK(client.StartHandler(handler_path, *database_path, metrics_path, url, + annotations, arguments, false, false)); + } else { diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a59bf46b96 100644 --- a/components/crash/core/app/crashpad_mac.mm diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 5c67bca44ddeb..c0c4dd9f08a42 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index 9aba6deb9e11ec2803f163088d1c321dd256787f..1dc24bb4c83acd2ff618b085059c918261b2a3d4 100644 +index 654219d75727c189d377cf14e25a8abdc1002204..3e243964f429c3afcb874b208c672991dd3468bf 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1616,6 +1616,28 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1649,6 +1649,28 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -40,7 +40,7 @@ index 9aba6deb9e11ec2803f163088d1c321dd256787f..1dc24bb4c83acd2ff618b085059c9182 if (base::FeatureList::IsEnabled( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { -@@ -1636,9 +1658,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1669,9 +1691,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( browser_context(), scope_origin)) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 1d1ec74f873d3..5a439ea80d375 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 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc6657b943bdd 100644 +index d2297c082f482219f35c3acf5bcc8dadf18bbafb..97b1589793962b2b601a78ef5118256903ee65f9 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { +@@ -139,8 +139,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) @@ -96,7 +96,7 @@ index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc665 #endif } // namespace -@@ -415,6 +416,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -427,6 +428,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -106,7 +106,7 @@ index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc665 } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -628,6 +632,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -642,6 +646,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 5944ac0d05cdc..de0f40a292a83 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 15e33123f633b29db9937b76374ef9c03853defa..c24f24d7f53a8ed1c5614244a938f972706bdc61 100644 +index 2d21f2e408004fbaf6a19980ad5daf47493aec65..c6a0ac1c5dd98a41392bd170bb0ada7418f17453 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; @@ -39,7 +39,7 @@ index 15e33123f633b29db9937b76374ef9c03853defa..c24f24d7f53a8ed1c5614244a938f972 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -1015,6 +1020,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -1051,6 +1056,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -51,10 +51,10 @@ index 15e33123f633b29db9937b76374ef9c03853defa..c24f24d7f53a8ed1c5614244a938f972 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 3779c5028db164c70432d042876692822c7dd75c..98d4b486f978ba6e8c1641c759dc9002cea7c345 100644 +index 73337f6b14516f93500705606c89e4c7b5a55f35..6badb272496a630031592372c1a766a9d70bb26a 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, +@@ -207,6 +207,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, using TouchIDs = std::set; enum class DwmFrameState { kOff, kOn }; @@ -64,7 +64,7 @@ index 3779c5028db164c70432d042876692822c7dd75c..98d4b486f978ba6e8c1641c759dc9002 HICON GetDefaultWindowIcon() const override; HICON GetSmallWindowIcon() const override; diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index caff85f683b7a67f14f4e66b588e40b9704c2bc3..210f39f68b839684c4ba0a4c57a76df44ddad7dc 100644 +index d8e0f1d3131aef80c9fcb6069df7d7f986af6605..5dbb192d0840ca0ded61397c399b774a8cb05cce 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h @@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 6c05f861afee5..8ef3fa1c1b34a 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 bae9dd70c7657bf2bf66ab237d35440c14e7f6fb..796c3101103465bac8a7c177185c570dcc757fc1 100644 +index 691496d0ca6fce79c26b9da7322856b3bf06332f..4aadafbba17578cfa26a111eecd0cfaad676326d 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1863,6 +1863,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1853,6 +1853,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -34,7 +34,7 @@ index bae9dd70c7657bf2bf66ab237d35440c14e7f6fb..796c3101103465bac8a7c177185c570d // 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 14a2e02d9a6edc3a7002ca43bc82c8ef98eb32b5..10abba0f0610719cc4be0ce792ce64aba43bbe04 100644 +index 5eaf2d9cab94def423be78b414179e6ccc596437..1ca8b5968350e88761d9ebc073fe8c573d0f3b5d 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -47,7 +47,7 @@ index 14a2e02d9a6edc3a7002ca43bc82c8ef98eb32b5..10abba0f0610719cc4be0ce792ce64ab // 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 8b0b5eda59c863efb6f4c67636810871677894c5..eea098eab3c2a5c36fab1a71d888e562e8f93da5 100644 +index bc48a50a7664f12a454997db54d893cde9b04881..810a8ce52bf9ac74f47a710f8b332980754996f5 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 { @@ -59,7 +59,7 @@ index 8b0b5eda59c863efb6f4c67636810871677894c5..eea098eab3c2a5c36fab1a71d888e562 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 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47da860679 100644 +index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd316fb6499 100644 --- a/components/viz/host/renderer_settings_creation.cc +++ b/components/viz/host/renderer_settings_creation.cc @@ -17,6 +17,7 @@ @@ -79,159 +79,11 @@ index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47 renderer_settings.partial_swap_enabled = !command_line->HasSwitch(switches::kUIDisablePartialSwap); -diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index e0a8510a9e1d1475bfe92153db8cf860fbba74b5..5c01d58b3121ecf81d0971179ada834ca37d54a1 100644 ---- a/components/viz/service/display/gl_renderer.cc -+++ b/components/viz/service/display/gl_renderer.cc -@@ -87,6 +87,9 @@ - - using gpu::gles2::GLES2Interface; - -+#define PATCH_CS(color_space) \ -+ (settings_->enable_color_correct_rendering ? color_space : gfx::ColorSpace()) -+ - namespace viz { - namespace { - -@@ -685,8 +688,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, - void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { - SetBlendEnabled(quad->ShouldDrawWithBlending()); - -- SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(), -- CurrentRenderPassColorSpace()); -+ SetUseProgram(ProgramKey::DebugBorder(), -+ PATCH_CS(gfx::ColorSpace::CreateSRGB()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - // Use the full quad_rect for debug quads to not move the edges based on - // partial swaps. -@@ -1676,7 +1680,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, - params->use_color_matrix, tint_gl_composited_content_, - params->apply_shader_based_rounded_corner && - ShouldApplyRoundedCorner(params->quad)), -- params->contents_and_bypass_color_space, target_color_space); -+ PATCH_CS(params->contents_and_bypass_color_space), -+ PATCH_CS(target_color_space)); - } - - void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2149,7 +2154,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, - SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, - tint_gl_composited_content_, - ShouldApplyRoundedCorner(quad)), -- CurrentRenderPassColorSpace(), CurrentRenderPassColorSpace()); -+ PATCH_CS(CurrentRenderPassColorSpace()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); - SkColor4f color_f = SkColor4f::FromColor(color); -@@ -2157,7 +2163,7 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, - // Apply color transform if the color space or source and target do not match. - if (quad_color_space != CurrentRenderPassColorSpace()) { - const gfx::ColorTransform* color_transform = -- GetColorTransform(quad_color_space, CurrentRenderPassColorSpace()); -+ GetColorTransform(PATCH_CS(quad_color_space), PATCH_CS(CurrentRenderPassColorSpace())); - gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB); - color_transform->Transform(&col, 1); - color_f.fR = col.x(); -@@ -2379,7 +2385,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, - : NON_PREMULTIPLIED_ALPHA, - false, false, tint_gl_composited_content_, - ShouldApplyRoundedCorner(quad)), -- quad_resource_lock.color_space(), CurrentRenderPassColorSpace()); -+ PATCH_CS(quad_resource_lock.color_space()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - if (current_program_->tint_color_matrix_location() != -1) { - auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2478,7 +2485,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, - !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, - tint_gl_composited_content_, - ShouldApplyRoundedCorner(quad)), -- quad_resource_lock.color_space(), CurrentRenderPassColorSpace()); -+ PATCH_CS(quad_resource_lock.color_space()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - if (current_program_->tint_color_matrix_location() != -1) { - auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2588,7 +2596,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, - // The source color space should never be RGB. - DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); - -- gfx::ColorSpace dst_color_space = CurrentRenderPassColorSpace(); -+ gfx::ColorSpace dst_color_space = -+ PATCH_CS(CurrentRenderPassColorSpace()); - - #if BUILDFLAG(IS_WIN) - // Force sRGB output on Windows for overlay candidate video quads to match -@@ -2769,7 +2778,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, - - SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, - ShouldApplyRoundedCorner(quad)), -- lock.color_space(), CurrentRenderPassColorSpace()); -+ PATCH_CS(lock.color_space()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); - gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2840,8 +2850,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { - draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); - - // Bind the program to the GL state. -- SetUseProgram(draw_cache_.program_key, locked_quad.color_space(), -- CurrentRenderPassColorSpace(), -+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()), -+ PATCH_CS(CurrentRenderPassColorSpace()), - /*adjust_src_white_level=*/draw_cache_.is_video_frame, - locked_quad.hdr_metadata()); - -@@ -3698,7 +3708,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) { -- DCHECK(dst_color_space.IsValid()); -+ if (settings_->enable_color_correct_rendering) { -+ DCHECK(dst_color_space.IsValid()); -+ } - gfx::ColorSpace adjusted_src_color_space = src_color_space; - - ProgramKey program_key = program_key_no_color; -@@ -4075,9 +4087,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( - cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); - } - -- *overlay_texture = -- FindOrCreateOverlayTexture(params.quad->render_pass_id, iosurface_width, -- iosurface_height, RootRenderPassColorSpace()); -+ *overlay_texture = FindOrCreateOverlayTexture( -+ params.quad->render_pass_id, iosurface_width, iosurface_height, -+ PATCH_CS(RootRenderPassColorSpace())); - *new_bounds = gfx::RectF(updated_dst_rect.origin(), - gfx::SizeF((*overlay_texture)->texture.size())); - -@@ -4296,8 +4308,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { - - PrepareGeometry(SHARED_BINDING); - -- SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(), -- CurrentRenderPassColorSpace()); -+ SetUseProgram(ProgramKey::DebugBorder(), -+ PATCH_CS(gfx::ColorSpace::CreateSRGB()), -+ PATCH_CS(CurrentRenderPassColorSpace())); - - gfx::Transform render_matrix; - render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4503,3 +4516,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 e0df775b22507336c249ed10fc0251dbbca088b8..2ba12303c28c39aa2e8f88b4a0e14a60e65b9df8 100644 +index d3375aa2370158888d35e064b9613cd696d4b45b..a7a33cfd499925c23a26a6dacc5add3d4c462d78 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -229,6 +229,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( +@@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( // Command-line switches to propagate to the GPU process. static const char* const kSwitchNames[] = { @@ -240,7 +92,7 @@ index e0df775b22507336c249ed10fc0251dbbca088b8..2ba12303c28c39aa2e8f88b4a0e14a60 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 8aa14d7cdb7edc5d53736fb959e3f9992d4fd896..da4830ccc3c3a160754dd9c89fc6292d7333ac67 100644 +index e186644f7592f7d0e827b7d8af6c31951738f6f5..5e8df8f92729ba851fe7ba8557e309a32899df93 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -199,6 +199,7 @@ @@ -251,7 +103,7 @@ index 8aa14d7cdb7edc5d53736fb959e3f9992d4fd896..da4830ccc3c3a160754dd9c89fc6292d #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3175,6 +3176,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3173,6 +3174,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[] = { @@ -292,7 +144,7 @@ index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..b4ddafdd126edd16172f00448bbbd56e } 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 9a5903820308299a1a480ecaaa1cbca9655f4093..705f1fce4d05694b92b4eb6de1044ae2232bb8ed 100644 +index 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937c56f6ffd 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 @@ @@ -303,7 +155,7 @@ index 9a5903820308299a1a480ecaaa1cbca9655f4093..705f1fce4d05694b92b4eb6de1044ae2 #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -185,6 +186,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -178,6 +179,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index ecc594be91742..3e685e539e743 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 f36e046b2879c3cd24eac04b1cf5f5c62338a11f..06ca0f25bc575fa8508934fe498d599964a7f05d 100644 +index 19396ba065ebab86903e2d52dc72d22de9d6bc89..fdb09a51829db40f4bcba71e76cd0dcef16a47ad 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -513,7 +513,11 @@ +@@ -511,7 +511,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch new file mode 100644 index 0000000000000..908c926de71b6 --- /dev/null +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Mon, 20 Jun 2022 14:53:37 -0700 +Subject: disable freezing flags after init in node + +This was introduced in +https://chromium-review.googlesource.com/c/chromium/src/+/3687671. + +When running node in the renderer, flags are updated after initialization, so +freezing the flags in Blink causes node initialization to fail. + +If possible, it would be ideal to do this without a patch. +https://bugs.chromium.org/p/v8/issues/detail?id=12887 suggests that there may +at some point be an API to "unfreeze" the flags, or we may be able to refactor +node initialization to not update flags after V8 initialization. + +diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc +index 02b4f803369202a81f2d54f3b35aef04be13dfa2..76dd21fc8e97c1a2836ae5a5a11b56334a656fe2 100644 +--- a/content/renderer/render_process_impl.cc ++++ b/content/renderer/render_process_impl.cc +@@ -222,7 +222,8 @@ RenderProcessImpl::RenderProcessImpl() + SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, + "--no-wasm-dynamic-tiering"); + +- v8::V8::SetFlagsFromString("--freeze-flags-after-init"); ++ // This conflicts with node in the renderer. ++ //v8::V8::SetFlagsFromString("--freeze-flags-after-init"); + + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) + if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 7b943409e321a..2b6fcf3fa406d 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 18133ca75853394e616c3a816c1eb74b7da23fd9..273750752cdef18ccd7d54b9b28c524375bb3e8d 100644 +index e3a14e47ac328261f48bcd137961a6e794d4f5af..205921ae492bf30c16869cdd7ed9605d7fdbd452 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,10 +20,10 @@ index 18133ca75853394e616c3a816c1eb74b7da23fd9..273750752cdef18ccd7d54b9b28c5243 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 65297e78ee11fb3e7f662408f65a263f9ae8c550..62d3bef655580b1bad1077de797cdadc04721f8e 100644 +index e617a4496a5f8cfa7ca1904fea8b0c3c0ffa14f9..e5d0edc222755a20019dd1e4042b87abe3ae39d8 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -879,6 +879,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl SiteInstanceGroup* GetSiteInstanceGroup(); @@ -34,7 +34,7 @@ index 65297e78ee11fb3e7f662408f65a263f9ae8c550..62d3bef655580b1bad1077de797cdadc // |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 dc52cc54d2a6078bef1cf9f09e8063011b4f5191..d9b9f49ea7fe9b0b6dec4ad49c112af4fc832691 100644 +index f20f35ae49d50f19bd4355defe1dfd3a20462c21..b8801f1a939aab5ea6c8db87d357c3d27c946e3c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index c7593e21241c2..219559b32e276 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 cfc5263749fa3068ad3699892bc4060891d7a0ef..f0aa5f66bc62efb2ea2d105d86dc3a8ea13e5eec 100644 +index 8779affce72baa97eebc68779fd3be08ba4505f8..3d2d03366a6e7776d0bd589c32c09b8bbed01b64 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1293,6 +1293,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1196,6 +1196,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index cfc5263749fa3068ad3699892bc4060891d7a0ef..f0aa5f66bc62efb2ea2d105d86dc3a8e // 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 && -@@ -1339,6 +1340,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1246,6 +1247,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 75b2567794e49..c7d8872892bbe 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 @@ -19,7 +19,7 @@ index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944 using PCScan = internal::PCScan; const auto invocation_mode = flags & PurgeFlags::kAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index d51b37c8a2df11f71fa6056193100d00883db43d..b44002788cf4d4f5d754dd35dd193be233e6ebcb 100644 +index fb5df2ee7c40e93bf2ebf625b14d08044006534b..67aecdd1d70ff58eb5b1b8b67990a7448a3b1ba4 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc @@ -44,6 +44,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 7893453256944..9e23e3f582a8f 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 4aabe0781d9e4150dddce76a50b993d0b8da8068..4961f2db5bf80ad2b926617fe933bca4db5c82b7 100644 +index 23dcc6507ed9151f657689904bf90d3b2e8ae3d3..5c81b7882dda7d9815555b43158140f894dbbd03 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2400,7 +2400,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2369,7 +2369,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 6f0014385b6f9..c42efd45fb14b 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 28d01a952a31bc7df63dd70df167421c453a581c..172e250660d30d703c0c104c73f627d13797e2f4 100644 +index d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa19493c3c 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 28d01a952a31bc7df63dd70df167421c453a581c..172e250660d30d703c0c104c73f627d1 aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index c24f24d7f53a8ed1c5614244a938f972706bdc61..ee465b298240a21929abd438d930b9ce8afa6ffe 100644 +index c6a0ac1c5dd98a41392bd170bb0ada7418f17453..738a56e976a510fcdb44020193cc79522bae0855 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -965,8 +965,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -1001,8 +1001,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 74d7b3fecb28e..3c54bc5d8c658 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 1a41a282f054d8ca93db19dc5df7f1de14cb8e44..452372aa40947531452c7ad7226a4ee6b0adfccb 100644 +index 03cbb536f9a5a3f9aaf8fe2a5baac1d62e398e3a..2f4cf65a7b75e1dfe6c2b6e472040b2a0617b912 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index e2256f4f742e5..f9c1139dff817 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 e351c6625fac1037040f639e55e0a2e48abf2538..1bb2e5b1d6d061961933b49bdcbe689efaeaa8f7 100644 +index 7dc2ce4577594d16930fd97ad3370e28765a0327..68bd003bee2d85536f97569df8cdc9b7875c3086 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1407,6 +1407,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1400,6 +1400,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index e351c6625fac1037040f639e55e0a2e48abf2538..1bb2e5b1d6d061961933b49bdcbe689e // 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 620d7b7b733cc9749775c2bcabcebdedafe6ba0b..984e1f04c01006b7f038538c16ad2dd224925731 100644 +index 9d86b641760c82f145d17a4e70813cd13fad9d9c..ac38bfa5d84b838ec3bcf6cbc244868105480c98 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -298,6 +298,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -297,6 +297,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 620d7b7b733cc9749775c2bcabcebdedafe6ba0b..984e1f04c01006b7f038538c16ad2dd2 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 0450b50b5545d9b8f9025553167bed2e78157130..1b772288816ee770ee47cb59cf6c93439729320e 100644 +index e180a77e7727acb093e12a2879c3cfb3b3771a6f..f440504f5d26b86ebe3e2a17a6374e16004f5b8b 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1090,6 +1090,9 @@ interface NetworkContext { +@@ -1098,6 +1098,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 0450b50b5545d9b8f9025553167bed2e78157130..1b772288816ee770ee47cb59cf6c9343 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index d143a82b1fd021bb03b760b91e87c7714f5395b9..3c18369ff3ab80430e21caac03373605dad64a88 100644 +index e1598a296f2f54061b7b408cc707d6727b51156f..b51f25bec1f8a79765c5b27326973da00c571f86 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -136,6 +136,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 216c2d3cb749a..ea5cbf6672a20 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 0529b4399959a2a2b9b0131dd8736a87fb973b0b..6870692202c40179870d7f00e20c7ce19bdb85ce 100644 +index 98c257b43cf198481bcaa8f080add28e60e7d9a2..d94a06f92bbdda28f4307dcc6a06dc2c381f274b 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -161,6 +161,7 @@ @@ -23,7 +23,7 @@ index 0529b4399959a2a2b9b0131dd8736a87fb973b0b..6870692202c40179870d7f00e20c7ce1 #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" -@@ -1776,6 +1777,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1790,6 +1791,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 72cb9fc018ca2..529cee547296b 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,7 +13,7 @@ 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/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 58256037e0a2485a9f8de9f4086550f39e865b2d..3456f1d55b16239698ba83d1d27beec1c3806192 100644 +index 58256037e0a2485a9f8de9f4086550f39e865b2d..30cf2ee44f6e0629e664fcf2072ad14ca186f947 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 @@ @@ -56,7 +56,7 @@ index 58256037e0a2485a9f8de9f4086550f39e865b2d..3456f1d55b16239698ba83d1d27beec1 + + const std::string scheme = url_data_->url().scheme(); + for (const std::string& streaming_scheme : *GetStreamingSchemes()) { -+ if (base::LowerCaseEqualsASCII(scheme, streaming_scheme)) { ++ if (base::EqualsCaseInsensitiveASCII(scheme, streaming_scheme)) { + return false; + } + } 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 b4f87cd57376f..18812a84eb3df 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -81,23 +81,23 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index fe988e3bbcf0c9deb5592f24fdeda3016114e3bf..da82b0458d0c87cf4de793007b826984d010cbb2 100644 +index d6cce8a676b93a67fa1a5e64d2b189c9dfa616a5..10f4ace6027c32b57f5d070026ecd9565c40b62f 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -139,6 +139,8 @@ viz_component("service") { - "display_embedder/output_surface_provider_impl.h", - "display_embedder/server_shared_bitmap_manager.cc", - "display_embedder/server_shared_bitmap_manager.h", +@@ -134,6 +134,8 @@ viz_component("service") { + "display_embedder/skia_output_surface_impl_on_gpu.h", + "display_embedder/skia_render_copy_results.cc", + "display_embedder/skia_render_copy_results.h", + "display_embedder/software_output_device_proxy.cc", + "display_embedder/software_output_device_proxy.h", "display_embedder/software_output_surface.cc", "display_embedder/software_output_surface.h", - "display_embedder/viz_process_context_provider.cc", + "display_embedder/vsync_parameter_listener.cc", diff --git a/components/viz/service/display_embedder/output_surface_provider.h b/components/viz/service/display_embedder/output_surface_provider.h -index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e365803633459a86 100644 +index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c06a01a60 100644 --- a/components/viz/service/display_embedder/output_surface_provider.h +++ b/components/viz/service/display_embedder/output_surface_provider.h -@@ -39,7 +39,8 @@ class OutputSurfaceProvider { +@@ -38,7 +38,8 @@ class OutputSurfaceProvider { mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -108,26 +108,25 @@ 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 8a277c6337d446890bb32814a68db2a9d3d3cd72..1c967969a03c985e68f744cf4815cefbdd2c0f71 100644 +index 3aaccca596c0287f56841131fc6a5878281593fc..f0fc2e11ddbb7ded1964a815f79e5a1858ac25d2 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc -@@ -26,6 +26,7 @@ +@@ -23,12 +23,14 @@ #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" +#include "components/viz/service/display_embedder/software_output_device_proxy.h" #include "components/viz/service/display_embedder/software_output_surface.h" - #include "components/viz/service/display_embedder/viz_process_context_provider.h" #include "components/viz/service/gl/gpu_service_impl.h" -@@ -39,6 +40,7 @@ + #include "gpu/command_buffer/client/shared_memory_limits.h" + #include "gpu/config/gpu_finch_features.h" + #include "gpu/ipc/common/surface_handle.h" #include "gpu/ipc/scheduler_sequence.h" - #include "gpu/ipc/service/gpu_channel_manager_delegate.h" - #include "gpu/ipc/service/image_transport_surface.h" +#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" #include "ui/base/ui_base_switches.h" - #include "ui/gl/gl_context.h" - #include "ui/gl/init/gl_factory.h" -@@ -126,7 +128,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( + + #if BUILDFLAG(IS_WIN) +@@ -89,7 +91,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -137,16 +136,16 @@ index 8a277c6337d446890bb32814a68db2a9d3d3cd72..1c967969a03c985e68f744cf4815cefb #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -138,7 +141,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -101,7 +104,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { output_surface = std::make_unique( - CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client)); + CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client, offscreen)); - } else if (renderer_settings.use_skia_renderer) { + } else { DCHECK(gpu_dependency); { -@@ -243,10 +246,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -139,10 +142,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -171,10 +170,10 @@ index 8a277c6337d446890bb32814a68db2a9d3d3cd72..1c967969a03c985e68f744cf4815cefb 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 fa9bc45b5c12821789270907f73c7e6f3c0c1424..6d2ad1d88631db82f41de2852c3e9a6ad1431b2e 100644 +index be10797e6f517ae069b8bc579155440d8a110362..fb6848b70a80c9c6cda42605a8b86ffbeb2a5ec8 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 +@@ -49,12 +49,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -190,7 +189,7 @@ index fa9bc45b5c12821789270907f73c7e6f3c0c1424..6d2ad1d88631db82f41de2852c3e9a6a + bool offscreen); const raw_ptr gpu_service_impl_; - const raw_ptr task_executor_; + diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc index 33e12349a951ef533b964d1158f8fa124623e946..fc04bcaffefc277dd1d0cdd766168de017fedca8 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.cc @@ -503,11 +502,11 @@ 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 4e38e0f49054cef3fd1a712c89608ce39003edeb..427882f8ed0d85c6e4170b213c3a3678b60a62df 100644 +index 8eeb87e2322821ac52e4bc0000cb777d69515a2c..5a7d1501aed1f01b1b67ae156cfb927ee696f83b 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( - params->gpu_compositing, params->widget, params->renderer_settings); + params->gpu_compositing, params->widget); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), - display_controller.get(), params->renderer_settings, debug_settings); @@ -550,7 +549,7 @@ index b2f873919d68633103d115d7d9550a098c1a254c..8e38831a6df15d37e5fb87d63613b7db // 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 a9a0e5a1167b2018e6dc206ecb7d37aad94042aa..3997ecb0228914144d6b04595c47376679fca3ef 100644 +index 3c495dfe499e1bae90fa0d576d5f58f1300c17fa..678700882d379f528ee1d77819b063cfdcdad036 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 { @@ -573,7 +572,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 80bff73a5886e8e79d7d91de5e27bc747fcfce02..8bc43d1359fa2551713992d6ccb73949743dde2e 100644 +index 68332e455e2d44efac75253179f3b78d7ce0717a..0ec6343dd574078d381155238ddc2f1d0abb5323 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -83,6 +83,7 @@ class DisplayPrivate; @@ -611,7 +610,7 @@ index 80bff73a5886e8e79d7d91de5e27bc747fcfce02..8bc43d1359fa2551713992d6ccb73949 // 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 -@@ -476,6 +490,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -479,6 +493,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 10e839cd9d536..b5421f51314c2 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -81,7 +81,7 @@ index ef3e8e68621402db5a97977f49ac74c438b0a563..aa1c1bcf7ca30adde4c25ed9bd8ed8a7 // 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 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d602ac3397 100644 +index 5a0cc45fb7b695bef46e475232adb70893299b96..156073daca8c69e05b478e8365b812321af1bf19 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom @@ -8,6 +8,7 @@ import "mojo/public/mojom/base/time.mojom"; @@ -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 8137159de740809e44bc3a3dc18c842455a6795d..7292a40382fffcc96998b04696f4a2934a2da9ee 100644 +index c1f5c1e8c4eab221ac4e2de312ade85fa41ab803..152c69b657a3fe549dd2ce7e6e9b9c4019554bdf 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -468,6 +468,7 @@ URLLoader::URLLoader( +@@ -605,6 +605,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index 8137159de740809e44bc3a3dc18c842455a6795d..7292a40382fffcc96998b04696f4a293 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -620,7 +621,7 @@ URLLoader::URLLoader( +@@ -799,7 +800,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 8137159de740809e44bc3a3dc18c842455a6795d..7292a40382fffcc96998b04696f4a293 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1347,6 +1348,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1531,6 +1532,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -144,10 +144,10 @@ index 8137159de740809e44bc3a3dc18c842455a6795d..7292a40382fffcc96998b04696f4a293 // 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 abc8ecdcd717b06552af7cf5c4e4e8f60db16ec1..4f633b5a818388f6cfd30a15496c94dde1e2b48c 100644 +index 6bddb19e692f274afd077bd58145fcb68d59c4a2..08b95c71575e31e5b4d87e4d95ea7d7c8d318d29 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -497,6 +497,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -522,6 +522,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch new file mode 100644 index 0000000000000..b154b4ba47d35 --- /dev/null +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Mon, 6 Jun 2022 14:25:15 -0700 +Subject: fix: allow guest webcontents to enter fullscreen + +This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. + +diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc +index 035aa45845d56d0a8edaa693689bb27e6cd3b158..26cfaa4c20794649dcbd5610796031a0f966e3c0 100644 +--- a/content/browser/web_contents/web_contents_impl.cc ++++ b/content/browser/web_contents/web_contents_impl.cc +@@ -3413,7 +3413,7 @@ void WebContentsImpl::EnterFullscreenMode( + OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); + DCHECK(CanEnterFullscreenMode(requesting_frame, options)); + DCHECK(requesting_frame->IsActive()); +- DCHECK(ContainsOrIsFocusedWebContents()); ++ DCHECK(ContainsOrIsFocusedWebContents() || IsGuest()); + + if (delegate_) { + delegate_->EnterFullscreenModeForTab(requesting_frame, options); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index fb9b97974a5f3..e863e3c246aef 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 ee465b298240a21929abd438d930b9ce8afa6ffe..83702d83078b68047f4464613033bc25cee21791 100644 +index 738a56e976a510fcdb44020193cc79522bae0855..7c7952755317a8069becfff58ca5ec89e2266ce4 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3625,6 +3625,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3661,6 +3661,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 022773554260c..a687e2edd98ac 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.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 41e9cb083e2abfc48976f21e4ca45d175671f69f..90cd537d117894cb73af61787d7085fcedeaebbd 100644 +index a22dd8209fd9c67e9c3637fee61bca5524ee51da..6e3c8da273aa4d24c32200f3d67210eb08ee3dad 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -859,26 +859,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -860,26 +860,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -48,7 +48,7 @@ index 41e9cb083e2abfc48976f21e4ca45d175671f69f..90cd537d117894cb73af61787d7085fc } /** -@@ -986,30 +972,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -987,30 +973,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index 5effa32d57758..0590f70607420 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,10 +6,10 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index ca58b86f7b5b760b8088eddfb2ab923290771e4d..5c786bccae90cfb6263cae2148a6d00c8e618b3f 100644 +index ee7483e9ef6a4ff85f8e6ac966d6e6c1e669dcf6..54d42304d84e1a25bb8b690282ff8268626eb5ad 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn -@@ -314,6 +314,10 @@ component("zlib") { +@@ -316,6 +316,10 @@ component("zlib") { defines = [] deps = [] 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 4180c938c9330..33c6a648fb0fa 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 13253163b54c86b37c7b5654b674c5f920c81272..82c4963605707a0fa56b01b572c0ef9b0d093565 100644 +index a44f6d7364ad26965e84a432ae376fa922af5fec..7279dc98acdece8658fbc7e2b343f53299234741 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1820,7 +1820,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1823,7 +1823,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,10 +21,10 @@ index 13253163b54c86b37c7b5654b674c5f920c81272..82c4963605707a0fa56b01b572c0ef9b // 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 d5c2a922bba0ff0d5a4a22d9cd25be46fd09d4e1..86eefb4d6e2d571965be9f40269b7f4fc633d26e 100644 +index a99435a0a9c1c4e26a53d513f180a07f8308cbc9..273bf488259f7a85b01182edae2d609c32a55ba0 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -673,6 +673,10 @@ class WebContents : public PageNavigator, +@@ -672,6 +672,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; 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 fd64b412b8433..64fa426f75151 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 35568a00ef94ca0db2cbb0325634ce8d2a881e12..a8ea8eaabb7cf3248b19af93bf5002f88e23fd8d 100644 +index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8299fe9e8 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -22,7 +22,10 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 76157c2e242da..afee9f92509fa 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 c8f2abaf2991b415b117604d37e8fb8abded00a3..41b09cb5c3a73f72178db9efcf883bd04fe68d6d 100644 +index 398358851f4ec3d1373091c352fe864b8901f08b..0fadcf6eb5aa9e7e6ca32ec252f1722ab87b6be9 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3217,6 +3217,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3203,6 +3203,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index c8f2abaf2991b415b117604d37e8fb8abded00a3..41b09cb5c3a73f72178db9efcf883bd0 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 4e069af9256eb106b50e84d1243c92353daf2015..8e8ba0a946c3382045691b788566885fb0e41ce5 100644 +index 2f786efe35ebdff7061118a14247859ed30eeb2a..6453286e79ac9edb6566c7db605ef2e3bfa7feb5 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -271,6 +271,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 3de96009621ac..f2cfeb9bf75dc 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,7 +38,7 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745 // 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 ec8de596ca5028e9d8c722cda082f0df668359ed..899ebbb1c2ba8d57532a1af43fcd5d44ac3a2de0 100644 +index d04aa76f6667c941637de26998b52b4b2f0d2802..1b41c6ad5681ee85250b27cb9d221995ca1e4b7f 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -353,7 +353,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 6aa34e52cb665..8fbc394f99fbe 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -40,10 +40,10 @@ index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec6303166 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 260a2d4ef5df85291eda27a0f7066646d31dacfe..1f83ab4a9b22b35dd2b9053553121b49e1c42ca1 100644 +index 88b4436d618d8b110ead2b739f1249232698f218..20376095d83cfaf838992cb720f369c98ba816d1 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1232,6 +1232,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1235,6 +1235,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index b9b2c2bd509dd..1148b8f694dd3 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 4ab466ef86340e97707bc5b14e0f0e67997c52a6..03d0b2f126c69df7af42095725a4f89880f0d634 100644 +index 626187e49ef53b5d74aa91dcf14821672a8f62b5..86f0e29fab782e5ebcf5977739dc6b72cf3c6b0a 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -955,6 +955,11 @@ +@@ -959,6 +959,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index f9b02be672a7b..6924ea290af6c 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index b1180a85530a7dd65022e174fe335ede0c7c55ca..c12133d82b111d37c8bac92980c22e406125c8df 100644 +index 52c52a8425fb2940d77cc6a0f73414aff3b32ec6..6432c01da49b89ef9d5c1123dd7f191b48184032 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") 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 44ac6e99b22d1..22458236851b3 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 3a4bbeb6233f2735d5354c3faaeaef71c0f892a1..2a6891fb0af06d418fd3dc9ff7595f4b898c55df 100755 +index 32a309a31994453c413b5bf78991fc1a1b0ec60b..b42d000283d52b72a7b85428e68b06a2a52d2a57 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index f879002345cc1..3342d70593fd8 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -21,7 +21,7 @@ index 9008af973427d7dab8170449bc5767cebc9d2e9e..e312287e4aca61b51a69c8413088f56f properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index 22ba32317a74df24249d1528dcaaa28ff18bd0f4..fa57f97520a0327be2c7f5179591ca61b801c8b0 100644 +index df6b551b94bd4e04f4c0d6e976c68cc187a57d85..3b6dd20277af88568cdb17a7fddf89bdf89b5640 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h @@ -132,6 +132,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 280c955d156f0..25236e534c2f9 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 4ea2ad7697bd4531f9538c16778b76ed7b439d74..bdc2e97e41705abe0f7b259635842c4f2e122b41 100644 +index 892ed9c63346595376ea89bd8161bd66bb43459a..328f8b800c36544f7906536416ac61dc87cc45d3 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -251,11 +251,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -253,11 +253,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/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 8f74c3cf1c77e..2408079f26546 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 596084265973b955a02c87babdefd43c7a1fc8e3..747718d5a0f58911e3f5f6e7a04a0a8d22238627 100644 +index fc2ac4583bafd1847fd8dfe3fccbdf4eb40bd929..50fb6b583f84623bd8a146d9476cdf7989627d8a 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -269,7 +269,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_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 06cd665d2e11d..7c7230f4a4dce 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -95,11 +95,11 @@ index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565aeb8bfb01 100644 +index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e866244fdb 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -16,7 +16,9 @@ - #import "ui/base/cocoa/window_size_constants.h" +@@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window, + } // namespace @interface NSWindow (Private) +#ifndef MAS_BUILD @@ -108,7 +108,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a - (BOOL)hasKeyAppearance; - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; -@@ -48,6 +50,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { +@@ -109,6 +111,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { } @end @@ -117,7 +117,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -74,6 +78,8 @@ - (BOOL)usesCustomDrawing { +@@ -135,6 +139,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -126,7 +126,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -209,6 +215,8 @@ - (BOOL)hasViewsMenuActive { +@@ -281,6 +287,8 @@ - (BOOL)hasViewsMenuActive { // NSWindow overrides. @@ -135,7 +135,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -220,6 +228,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -292,6 +300,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 1d607671a6b66..a6599f5be1646 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063 } // 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 4c76aafff03b76d78ab8c84e962cf96f8fefc091..32ac66e9ac5a643f5e4ddea979bf4239d441d23f 100644 +index aa6a1a667af13a76ef299681367b31a8668d7425..949fdc533703862d02a19f08dcd26a56e7845d4a 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 -@@ -579,10 +579,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -580,10 +580,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -87,7 +87,7 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4 } 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 0048862cb89d519b8c1c111f923e6dd960c855d6..c7b9124462b0779ed4d1b27fe167e653bf5c6be5 100644 +index 71369b69fe03409ec0eb7fe071b1d49524748fec..9ce1e4a7efce6b39306baceac953db23e8d14240 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; @@ -114,10 +114,10 @@ index 0048862cb89d519b8c1c111f923e6dd960c855d6..c7b9124462b0779ed4d1b27fe167e653 // 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 b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c62338a11f 100644 +index c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22de9d6bc89 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -254,8 +254,10 @@ +@@ -258,8 +258,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -128,7 +128,7 @@ index b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c6 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1521,8 +1523,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1548,8 +1550,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c6 return [GetInProcessNSView() window]; } -@@ -1566,9 +1570,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1593,9 +1597,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c6 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2063,12 +2069,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2090,12 +2096,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,7 +167,7 @@ index b72b540492abd9d9060bb06996d2d849ac580aa2..f36e046b2879c3cd24eac04b1cf5f5c6 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 4c996a80ae71aee8c2d259a7eb294fe3257ad9ac..5e897496539a365a5de15073f1dccb16db3987dd 100644 +index 9de91819e2658a58b8b7a8c90fd97544e22964f0..ade6c4085720e16843faf63f43688f28057a34dc 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -337,6 +337,13 @@ component("base") { diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 093c692d94b8f..87a806ed62c58 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,7 +16,7 @@ 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 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc717317ba48e6 100644 +index 506ff3c2b9a14a725d13e3933bc281d05c0b6b13..9726e2d34d6d123ad3e62d843d21b755788fc062 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h @@ -21,7 +21,9 @@ @@ -29,7 +29,7 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173 @class CALayer; namespace ui { -@@ -115,7 +117,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface, +@@ -113,7 +115,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -39,7 +39,7 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173 std::unique_ptr ca_layer_tree_coordinator_; gfx::Size pixel_size_; -@@ -210,7 +214,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL, +@@ -204,7 +208,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -50,10 +50,10 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173 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 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d121828ce85 100644 +index 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2aab75969 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -59,6 +59,7 @@ +@@ -60,6 +60,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -61,7 +61,7 @@ index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d12 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -67,6 +68,7 @@ +@@ -68,6 +69,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -69,17 +69,17 @@ index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d12 } ImageTransportSurfaceOverlayMac::~ImageTransportSurfaceOverlayMac() { -@@ -146,7 +148,9 @@ +@@ -145,7 +147,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { +#ifndef MAS_BUILD - params.ca_layer_params.ca_context_id = [ca_context_ contextId]; + params.ca_context_id = [ca_context_ contextId]; +#endif } else { IOSurfaceRef io_surface = ca_layer_tree_coordinator_->GetIOSurfaceForDisplay(); -@@ -408,6 +412,7 @@ +@@ -378,6 +382,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -87,7 +87,7 @@ index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d12 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -416,6 +421,7 @@ +@@ -386,6 +391,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -95,12 +95,12 @@ index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d12 } ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { -@@ -496,7 +502,9 @@ +@@ -464,7 +470,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { +#ifndef MAS_BUILD - params.ca_layer_params.ca_context_id = [ca_context_ contextId]; + params.ca_context_id = [ca_context_ contextId]; +#endif } else { IOSurfaceRef io_surface = diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 124bb9afbc651..d6eb624fba6d6 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -166,10 +166,10 @@ index 69e60d498941c34cfac9e79c7517765bf93849f5..b998ad7cf01c21e93c57e1283cfdcb1e void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 1b849df0ee4c40a765a14bfaa75720f5570d4846..1f7a4fe36a96d076ddcfd9c9f092f95132d579dc 100644 +index bf0142f0089d14e8fef22afe3d1d3916b7dccefd..cee63f36c1a802eacf878a119ab1904cf5b56d51 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -173,6 +173,12 @@ source_set("audio") { +@@ -176,6 +176,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] 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 af9c65ee153b1..ab99d0e9c103b 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 812cfebfbe4f95cf38ce2fcd115a5a363f51363e..e351c6625fac1037040f639e55e0a2e48abf2538 100644 +index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28765a0327 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -128,6 +128,11 @@ @@ -114,7 +114,7 @@ index 812cfebfbe4f95cf38ce2fcd115a5a363f51363e..e351c6625fac1037040f639e55e0a2e4 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -733,6 +823,13 @@ void NetworkContext::SetClient( +@@ -742,6 +832,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index 812cfebfbe4f95cf38ce2fcd115a5a363f51363e..e351c6625fac1037040f639e55e0a2e4 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2302,6 +2399,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2295,6 +2392,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index 812cfebfbe4f95cf38ce2fcd115a5a363f51363e..e351c6625fac1037040f639e55e0a2e4 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebdedafe6ba0b 100644 +index 4da0446b68ff11f65df809f04209a0e0daf12015..9d86b641760c82f145d17a4e70813cd13fad9d9c 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -105,6 +105,7 @@ class URLMatcher; +@@ -106,6 +106,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebded class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -237,6 +238,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebded void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -823,6 +826,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -824,6 +827,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,10 +169,10 @@ index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebded // 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 cc3f99007db46a488d7f8dacd3ede4a90e1d2ae3..0450b50b5545d9b8f9025553167bed2e78157130 100644 +index 9428fe1432ee5cae0d0f812dd48878861d31e09c..e180a77e7727acb093e12a2879c3cfb3b3771a6f 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -282,6 +282,17 @@ struct NetworkContextFilePaths { +@@ -283,6 +283,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index cc3f99007db46a488d7f8dacd3ede4a90e1d2ae3..0450b50b5545d9b8f9025553167bed2e // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -833,6 +844,9 @@ interface NetworkContext { +@@ -844,6 +855,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 4f582c7187ca0..d835fbd379677 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -31,23 +31,24 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48 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 a3df152caabcadaba454f73f58763a89fdea4247..ba76f2f294a2eab8581b5ef8d879cb464f14cb1f 100644 +index 0c59d3cec404bc28acd112329ebd8332cfae96a4..62f06f55ec122597af442561fb688c0f6654be6e 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc -@@ -82,10 +82,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( +@@ -83,11 +83,13 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( BrowserContext* browser_context, scoped_refptr service_worker_context, RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, + const WeakDocumentPtr& weak_document_ptr, mojo::PendingReceiver receiver) : notification_context_(notification_context), + render_frame_host_(render_frame_host), browser_context_(browser_context), service_worker_context_(std::move(service_worker_context)), render_process_host_id_(render_process_host->GetID()), -@@ -149,7 +151,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( +@@ -152,7 +154,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( notification_id, std::move(event_listener_remote)); browser_context_->GetPlatformNotificationService()->DisplayNotification( @@ -57,18 +58,18 @@ index a3df152caabcadaba454f73f58763a89fdea4247..ba76f2f294a2eab8581b5ef8d879cb46 } diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h -index dc8de24c86f1769680ce7830844d35dfef7eb7e7..fcd99361fa8c895d6bd89bacb9fb94e76969e7b2 100644 +index 20db1f61b391f7b154071f24e91fd0925e3e0df2..4816ac66d1eebe0823844b07b146707db7727c21 100644 --- a/content/browser/notifications/blink_notification_service_impl.h +++ b/content/browser/notifications/blink_notification_service_impl.h -@@ -42,6 +42,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl +@@ -43,6 +43,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl BrowserContext* browser_context, scoped_refptr service_worker_context, RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, - mojo::PendingReceiver receiver); -@@ -102,6 +103,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl + const WeakDocumentPtr& weak_document_ptr, +@@ -104,6 +105,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl // The notification context that owns this service instance. raw_ptr notification_context_; @@ -77,7 +78,7 @@ index dc8de24c86f1769680ce7830844d35dfef7eb7e7..fcd99361fa8c895d6bd89bacb9fb94e7 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 fe015fa7d7813115a2c6a23a00cb509c4c16cd93..88e04351204c786d0fc72a99ccc421f76fc26ef9 100644 +index 41fb02d532190e82d50286e2733a6c3627bf25c8..f19bb5dcb69233733125029d8f997f7343d7e04b 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc @@ -129,7 +129,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { @@ -87,30 +88,32 @@ index fe015fa7d7813115a2c6a23a00cb509c4c16cd93..88e04351204c786d0fc72a99ccc421f7 - url::Origin::Create(GURL(kTestOrigin)), + nullptr, url::Origin::Create(GURL(kTestOrigin)), /*document_url=*/GURL(), + /*weak_document_ptr=*/WeakDocumentPtr(), 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 fc24d16beb5a0ae61bf3123d0594287031d69ddf..6a6edfa8f919ffca815cc0f50fcde0b09067d494 100644 +index 61ac1d7760432bd1a4118c0929a35168a3e26f49..e2ce4aa910053b1a4fb52fcc1197943af95b02f6 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc -@@ -282,13 +282,14 @@ void PlatformNotificationContextImpl::Shutdown() { +@@ -282,6 +282,7 @@ void PlatformNotificationContextImpl::Shutdown() { void PlatformNotificationContextImpl::CreateService( RenderProcessHost* render_process_host, + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, - mojo::PendingReceiver receiver) { + const WeakDocumentPtr& weak_document_ptr, +@@ -289,7 +290,8 @@ void PlatformNotificationContextImpl::CreateService( DCHECK_CURRENTLY_ON(BrowserThread::UI); services_.push_back(std::make_unique( this, browser_context_, service_worker_context_, render_process_host, -- origin, document_url, std::move(receiver))); -+ render_frame_host, origin, document_url, std::move(receiver))); +- origin, document_url, weak_document_ptr, std::move(receiver))); ++ render_frame_host, origin, document_url, weak_document_ptr, ++ std::move(receiver))); } void PlatformNotificationContextImpl::RemoveService( diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b5c19f436 100644 +index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5de8612403 100644 --- a/content/browser/notifications/platform_notification_context_impl.h +++ b/content/browser/notifications/platform_notification_context_impl.h @@ -48,6 +48,7 @@ struct NotificationDatabaseData; @@ -128,21 +131,32 @@ index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b + RenderFrameHost* render_frame_host, const url::Origin& origin, const GURL& document_url, - mojo::PendingReceiver receiver); + const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index b661376d97f515574385dde451ed21fb3f3e4f7b..733931cf9f2b55b63c0611cca673250696f1300d 100644 +index 6a94b868e963d98c09d130c70b7c7740c6b544e3..654d7d77b2a7ea8e1819288bb49084e435072ba9 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2051,7 +2051,8 @@ void RenderProcessHostImpl::CreateNotificationService( - document_url = rfh->GetLastCommittedURL(); - +@@ -2055,8 +2055,9 @@ void RenderProcessHostImpl::CreateNotificationService( + // For workers: + if (render_frame_id == MSG_ROUTING_NONE) { + storage_partition_impl_->GetPlatformNotificationContext()->CreateService( +- this, origin, /*document_url=*/GURL(), +- /*weak_document_ptr=*/WeakDocumentPtr(), std::move(receiver)); ++ this, RenderFrameHost::FromID(GetID(), render_frame_id), origin, ++ /*document_url=*/GURL(), /*weak_document_ptr=*/WeakDocumentPtr(), ++ std::move(receiver)); + return; + } + +@@ -2064,7 +2065,7 @@ void RenderProcessHostImpl::CreateNotificationService( + RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); + CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( -- this, origin, document_url, std::move(receiver)); -+ this, RenderFrameHost::FromID(GetID(), render_frame_id), -+ origin, document_url, std::move(receiver)); +- this, origin, rfh->GetLastCommittedURL(), rfh->GetWeakDocumentPtr(), ++ this, rfh, origin, rfh->GetLastCommittedURL(), rfh->GetWeakDocumentPtr(), + std::move(receiver)); } - void RenderProcessHostImpl::CreateWebSocketConnector( diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h index 9646cbeb31141e3518f51482801431f3a6010360..b13b6ab07b4931b892749c84879d9a6adb3bcb58 100644 --- a/content/public/browser/platform_notification_service.h 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 4d30cc3869be4..52c431446b661 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 14d91a0d19c01a856a9614b127a4ef3655614684..a243dd71886af7c5313b16a8522a50ae50af5959 100644 +index b981338d714f66d14dd120cfc1185b97902c45b2..dbe2e0ce2bb9a2122c608ffcea923b650e4eccde 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h @@ -128,6 +128,16 @@ diff --git a/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch b/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch index 5cb0508a1a082..9bad1bda3874e 100644 --- a/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch +++ b/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch @@ -33,7 +33,7 @@ index 8dcac3238870920d374b86033d05d77ebde351e9..02103924332eddbd158c04f8a395bb4a MIPS Technologies, Inc. +Darshan Sen diff --git a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc -index 53c2dadac9d6cb74a3c3e07d9917e9162474b8a0..6761db0e8ac5edba6fac90cdf79e38dfd4cd9d70 100644 +index 295ec1615d83984835e238e349029b8755611f52..94c1cb02efe328ab45bc30fc7db8992872ed6b08 100644 --- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc +++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc @@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@ index 53c2dadac9d6cb74a3c3e07d9917e9162474b8a0..6761db0e8ac5edba6fac90cdf79e38df #include "util/posix/scoped_mmap.h" #include "util/posix/signals.h" -@@ -454,7 +454,7 @@ bool CrashpadClient::StartHandler( +@@ -459,7 +459,7 @@ bool CrashpadClient::StartHandler( argv.push_back(FormatArgumentInt("initial-client-fd", handler_sock.get())); argv.push_back("--shared-client-connection"); @@ -54,7 +54,7 @@ index 53c2dadac9d6cb74a3c3e07d9917e9162474b8a0..6761db0e8ac5edba6fac90cdf79e38df return false; } -@@ -609,7 +609,7 @@ bool CrashpadClient::StartJavaHandlerForClient( +@@ -614,7 +614,7 @@ bool CrashpadClient::StartJavaHandlerForClient( int socket) { std::vector argv = BuildAppProcessArgs( class_name, database, metrics_dir, url, annotations, arguments, socket); @@ -63,7 +63,7 @@ index 53c2dadac9d6cb74a3c3e07d9917e9162474b8a0..6761db0e8ac5edba6fac90cdf79e38df } bool CrashpadClient::StartHandlerWithLinkerAtCrash( -@@ -658,7 +658,7 @@ bool CrashpadClient::StartHandlerWithLinkerForClient( +@@ -663,7 +663,7 @@ bool CrashpadClient::StartHandlerWithLinkerForClient( annotations, arguments, socket); @@ -72,7 +72,7 @@ index 53c2dadac9d6cb74a3c3e07d9917e9162474b8a0..6761db0e8ac5edba6fac90cdf79e38df } #endif -@@ -692,7 +692,7 @@ bool CrashpadClient::StartHandlerForClient( +@@ -697,7 +697,7 @@ bool CrashpadClient::StartHandlerForClient( argv.push_back(FormatArgumentInt("initial-client-fd", socket)); @@ -135,7 +135,7 @@ index 9e58d94aa499fdb7271a78ea21a1dcc1b12e3a52..3caa3b987b35be575558a312026cf6f1 Metrics::CaptureResult::kFinishedWritingCrashReportFailed); return false; diff --git a/third_party/crashpad/crashpad/util/BUILD.gn b/third_party/crashpad/crashpad/util/BUILD.gn -index 30f03b13f3a018e6a96b0689452a344992675c23..64fa2e9e89b700d8a265a9737cb6a30a210cdffe 100644 +index b8daef48b460ce2771a9f5502ee48d5efffc4039..8d4329e6b56062a1ef48a8607ddf52c31d251883 100644 --- a/third_party/crashpad/crashpad/util/BUILD.gn +++ b/third_party/crashpad/crashpad/util/BUILD.gn @@ -296,10 +296,10 @@ crashpad_static_library("util") { diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index a3d13a71f28b9..826c1f5136be3 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -55,7 +55,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index ee713c5686d4ea8a5d73cebf74e67381b685cff6..375ce3294727b84bf0071681c7bc35c772e4e3b9 100644 +index d9ae000f1348529ab849349d7562dbb04fe9fd16..cf66978761f5dda2f8958234d62c3cf11ae4cf9c 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -74,7 +74,7 @@ index ee713c5686d4ea8a5d73cebf74e67381b685cff6..375ce3294727b84bf0071681c7bc35c7 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -229,16 +229,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, +@@ -222,16 +222,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -113,7 +113,7 @@ index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf0 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0adb5365a94 100644 +index e665eb42fad5f47b1643315d2cdcdf2eb66b069d..21451d9ae0cbb647cafe0e9ae47f067068aef1b7 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -141,9 +141,9 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad +#endif } - #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -192,7 +193,9 @@ void UpdatePrintSettingsReplyOnIO( - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + void OnDidGetDefaultPrintSettings( +@@ -144,7 +145,9 @@ void OnDidUpdatePrintSettings( + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); - if (printer_query->last_status() == mojom::ResultCode::kSuccess) { @@ -153,26 +153,25 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -245,6 +248,7 @@ void ScriptedPrintReplyOnIO( +@@ -172,6 +175,7 @@ void OnDidScriptedPrint( mojom::PrintManagerHost::ScriptedPrintCallback callback) { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); + if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -254,8 +258,9 @@ void ScriptedPrintReplyOnIO( +@@ -181,7 +185,8 @@ void OnDidScriptedPrint( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); +- std::move(callback).Run(std::move(params)); + 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)); ++ std::move(callback).Run(std::move(params), canceled); if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -293,12 +298,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -196,12 +201,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -187,7 +186,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -306,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -209,7 +216,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -199,7 +198,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -334,6 +344,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -237,6 +247,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -209,7 +208,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -502,7 +515,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -405,7 +418,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -219,7 +218,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -517,16 +531,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -420,8 +434,11 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -232,18 +231,17 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad } void PrintViewManagerBase::UpdatePrintingEnabled() { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +@@ -429,8 +446,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { // The Unretained() is safe because ForEachRenderFrameHost() is synchronous. -- web_contents()->GetMainFrame()->ForEachRenderFrameHost(base::BindRepeating( -- &PrintViewManagerBase::SendPrintingEnabled, base::Unretained(this), -- printing_enabled_.GetValue())); -+ web_contents()->GetMainFrame()->ForEachRenderFrameHost( -+ base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, + web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost( + base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, +- base::Unretained(this), +- printing_enabled_.GetValue())); + base::Unretained(this), true)); } void PrintViewManagerBase::NavigationStopped() { -@@ -642,11 +659,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -546,11 +562,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -258,7 +256,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -676,18 +696,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -588,18 +607,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -280,7 +278,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -697,6 +719,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -609,6 +630,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -288,7 +286,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -722,14 +745,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -640,14 +662,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -305,7 +303,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad return; } #endif -@@ -767,7 +790,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -685,7 +707,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -313,7 +311,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad #endif ReleasePrinterQuery(); -@@ -782,6 +804,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -700,6 +721,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -325,7 +323,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -792,10 +819,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -710,10 +736,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -338,7 +336,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad } void PrintViewManagerBase::DidStartLoading() { -@@ -855,6 +884,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -773,6 +801,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -350,9 +348,9 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -912,7 +946,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -831,7 +864,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( - // Disconnect the current |print_job_|. + // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); - DisconnectFromCurrentPrintJob(); + if (callback_.is_null()) { @@ -362,7 +360,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad if (!weak_this) return false; -@@ -993,6 +1030,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -912,6 +948,13 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -376,7 +374,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad if (!print_job_) return; -@@ -1042,7 +1086,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -961,7 +1004,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -385,7 +383,7 @@ index e74a2d0858c187b11ac322033b122e046a45967e..09f6d4a575225ac5df9994fd0620e0ad return true; if (!cookie) { -@@ -1150,7 +1194,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1067,7 +1110,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -502,7 +500,7 @@ index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d18 // 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 1664ac8233e74cadcf19ebc53e41cef37d13019c..aa341dd9a6f2b6e2ebb6e8048d2d9a3e5c3e89ea 100644 +index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804fe5039b8 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ 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 288bb9200db53..dc0896803f661 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 273750752cdef18ccd7d54b9b28c524375bb3e8d..3eec2e5c14186b39a67ca8ad410a3268841e5f4e 100644 +index 205921ae492bf30c16869cdd7ed9605d7fdbd452..51a720da21417c1e83570770959a44d90f172d66 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) { @@ -43,10 +43,10 @@ index 273750752cdef18ccd7d54b9b28c524375bb3e8d..3eec2e5c14186b39a67ca8ad410a3268 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 987e437641b7978290aa2633755b67f9099e1d04..6f09c04cc612d2ac58b62d44516eefa1b66d145c 100644 +index 1c69625326df08b85ec77d01b588fc3a8ce58553..686fc99becf068106cc9fb372d2dce1e8d8c5114 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4491,6 +4491,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4537,6 +4537,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -57,12 +57,12 @@ index 987e437641b7978290aa2633755b67f9099e1d04..6f09c04cc612d2ac58b62d44516eefa1 + bool WebContentsImpl::IsWidgetForPrimaryMainFrame( RenderWidgetHostImpl* render_widget_host) { - return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); + return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 36888689fe38e7873f09b1bc64a901f0771cbd5b..13253163b54c86b37c7b5654b674c5f920c81272 100644 +index 9af9ea4e10a51572e726309e619fb31cb5a928ee..a44f6d7364ad26965e84a432ae376fa922af5fec 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -954,6 +954,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -957,6 +957,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) 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 579052a1a0d70..f7f2e7210be36 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 bdaae69dbeac280dcc83baa217d6c4ab0039ba35..14e7b4386d8d8bf020abf5a1037761eac1068223 100644 +index 1bb9760fee301bebb5e940d6786999cfbf52656f..0b4b9fb7d64ca1615d5a03e86f421b8f282ed27a 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -691,6 +691,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -699,6 +699,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index bdaae69dbeac280dcc83baa217d6c4ab0039ba35..14e7b4386d8d8bf020abf5a1037761ea 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 8f76edf316a075bddb2963ff1baf3ba0481b5fa7..2604d55c46e4ef3e512554a645d3db4b5670995c 100644 +index 2f7dabc3317f7b1a609e6b67795036696a6420d0..a300f9b497f206086d9bba01b0ea3948a1b6413a 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 @@ @@ -50,7 +50,7 @@ index 8f76edf316a075bddb2963ff1baf3ba0481b5fa7..2604d55c46e4ef3e512554a645d3db4b class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -144,6 +148,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -145,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -60,7 +60,7 @@ index 8f76edf316a075bddb2963ff1baf3ba0481b5fa7..2604d55c46e4ef3e512554a645d3db4b // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -295,6 +302,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -299,6 +306,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 c70ffd75bc488..bfcb6e2bb6da5 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ 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 0282cf6bb6674b10e6a92897ec8c5b2bb9c4a4a0..6ce9f338bb92390b355a7cc124e8fa869a3cb4ac 100644 +index 6e4656b8f6dd76e4e13e066a87de4ec893063a46..2232f86b1c91700cdc371adbfdd7beed99d26418 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 @@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -61,7 +61,7 @@ index 0282cf6bb6674b10e6a92897ec8c5b2bb9c4a4a0..6ce9f338bb92390b355a7cc124e8fa86 // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1761,9 +1781,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1778,9 +1798,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 0282cf6bb6674b10e6a92897ec8c5b2bb9c4a4a0..6ce9f338bb92390b355a7cc124e8fa86 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1772,7 +1794,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1789,7 +1811,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 64adbef1380b8..83075078e1b42 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 b1c9b0c7e7d6d8694f123d057e415676cab607c7..dc59a88bc930d4d7b8e606434d940cac5b834bd0 100644 +index 06e3385d4f148eb23f9ddf560afb563897846609..672bc56194e1ad8b03acd639c17b7f7e67a5dba0 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1538,7 +1538,7 @@ if (is_chrome_branded && !is_android) { +@@ -1539,7 +1539,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index b1c9b0c7e7d6d8694f123d057e415676cab607c7..dc59a88bc930d4d7b8e606434d940cac chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1567,6 +1567,12 @@ if (!is_android) { +@@ -1568,6 +1568,12 @@ if (!is_android) { } } @@ -75,5 +75,5 @@ index b1c9b0c7e7d6d8694f123d057e415676cab607c7..dc59a88bc930d4d7b8e606434d940cac +} + repack("unit_tests_pak") { + testonly = true sources = [ "$root_gen_dir/chrome/chrome_test_resources.pak" ] - output = "$root_out_dir/unit_tests.pak" diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 38a37c6c62911..a5704c0b5bb82 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 f81f1104399a42009f7705585716579d4c17ad03..d08e4c8223078230e35afd21b6f98ec839664ea9 100644 +index ab74207b348f211ee78de1384c9c75f7682926fe..ff475b3978b215cdbe921c620661070309bc5f5d 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1343,7 +1343,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1283,7 +1283,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 c0ca856c45100..f56ee04810871 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 733931cf9f2b55b63c0611cca673250696f1300d..8aa14d7cdb7edc5d53736fb959e3f9992d4fd896 100644 +index 654d7d77b2a7ea8e1819288bb49084e435072ba9..e186644f7592f7d0e827b7d8af6c31951738f6f5 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1750,9 +1750,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1748,9 +1748,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); @@ -42,7 +42,7 @@ index 733931cf9f2b55b63c0611cca673250696f1300d..8aa14d7cdb7edc5d53736fb959e3f999 auto file_data = std::make_unique(); 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 2c4bd947eca08223c541de53390a18d19208397e..6ef28fe7ebfd3dfa60995184772e3e2dd6f7f0d8 100644 +index af8173d4203150237387529aa2b974aeec7c5a41..9fadaa80a4547a583484355342c3fd98d53bcd27 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -31,6 +31,9 @@ namespace content { @@ -55,10 +55,10 @@ index 2c4bd947eca08223c541de53390a18d19208397e..6ef28fe7ebfd3dfa60995184772e3e2d const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -58,6 +61,9 @@ RendererSandboxedProcessLauncherDelegateWin:: - bool is_jit_disabled) - : renderer_code_integrity_enabled_( - GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { +@@ -60,6 +63,9 @@ RendererSandboxedProcessLauncherDelegateWin:: + GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()), + renderer_app_container_disabled_( + GetContentClient()->browser()->IsRendererAppContainerDisabled()) { +#if BUILDFLAG(USE_ZYGOTE_HANDLE) + use_zygote_ = !cmd_line->HasSwitch(switches::kNoZygote); +#endif @@ -66,7 +66,7 @@ index 2c4bd947eca08223c541de53390a18d19208397e..6ef28fe7ebfd3dfa60995184772e3e2d 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 576a2c0782bf49cb57c973434b5d1f2ec9fdcbc5..24d1854c261372353c9bf69a6cb0cf2d24e9ebef 100644 +index 3a0e25b38965de5b57fd0be1112cf62dfda846d7..f412080cfb49330d855fdf1cbc13ff8850530401 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 diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 9239a84e8dd6a..360dd0395bc2e 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 407f734b77d1ed4876f01327df958847d60e9128..ddfa7cf439244a6d58ab73dea014b341912f503f 100644 +index eb94d05bf03d04b508123675c31957b8d22ee13a..035aa45845d56d0a8edaa693689bb27e6cd3b158 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3026,6 +3026,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3032,6 +3032,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 407f734b77d1ed4876f01327df958847d60e9128..ddfa7cf439244a6d58ab73dea014b341 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3036,6 +3043,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3042,6 +3049,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index 407f734b77d1ed4876f01327df958847d60e9128..ddfa7cf439244a6d58ab73dea014b341 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index e82a5b71eb8a6ee2df8478ccd3432b4afbb096aa..d5c2a922bba0ff0d5a4a22d9cd25be46fd09d4e1 100644 +index 92a075098c41f118a4114424715eb61f212b43b7..a99435a0a9c1c4e26a53d513f180a07f8308cbc9 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 913a437ac1e98..4377c64198a83 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 bb9b9d0ce53ce427075fd92ab1da119c08f6e591..6792e64b2f0f4a5080beb57804f861d8297524d2 100644 +index 6f963b0a1fcb00a16bcf423a494aad29b4c86b52..004fbb98b212372f7af73b9334ff44fb7a2a5eba 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -899,10 +899,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -901,10 +901,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 1653f6c8f33ce..a476327757682 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 e612764997277da3411d8040850756eb38996cca..f0341511d7d00f03a52bdead457f1f9d60ac5486 100644 +index bdf2fa0461840d6059b4a7d6660a356be5c38ba0..867b0efca67ce1d4198c2312a6ddc6a784784913 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6284,6 +6284,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6421,6 +6421,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } @@ -30,6 +30,6 @@ index e612764997277da3411d8040850756eb38996cca..f0341511d7d00f03a52bdead457f1f9d + options.Clone()); + } + - delegate_->EnterFullscreenMode(this, *options); - delegate_->FullscreenStateChanged(this, /*is_fullscreen=*/true, - std::move(options)); + // Focus the window if another frame may have delegated the capability. + if (had_fullscreen_token && !GetView()->HasFocus()) + GetView()->Focus(); diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 00b3be1ea6281..9cb4db7e26b71 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 eb8968c2a86102d0d3a21f07c394f1c360083c6c..025ef3f70a5ae34faf8c6013fbfba171c7f501ac 100644 +index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df28cf05e4 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 { +@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index eb8968c2a86102d0d3a21f07c394f1c360083c6c..025ef3f70a5ae34faf8c6013fbfba171 // 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 16322f245b51465d77b08c0c5d4da0b79ba8ae03..bd63f484db056d099bada03a0d3aab7742016110 100644 +index d4e55604b9a8485bb9088a272abca4a6d4e7494d..e842f73029cd7a7a2bdfd7b7d7483a6ecca8527c 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -966,6 +966,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -909,6 +909,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 16322f245b51465d77b08c0c5d4da0b79ba8ae03..bd63f484db056d099bada03a0d3aab77 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 213b0b9c28974aecbdd2dd1297dfa21cd716a337..f77763977aee112b854ade93b59172247599a16b 100644 +index 0d484ebcc48d5b230ba94a07745e14f4cf706702..0387f4de1e181200ecd7323d2cea2fa854de62c0 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -209,6 +209,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -191,6 +191,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 213b0b9c28974aecbdd2dd1297dfa21cd716a337..f77763977aee112b854ade93b5917224 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 3f8fbe6330051d96715706801efdefcb2ee3b971..be0eb834ba868bb7f6f40e08277f4475a6a92f7d 100644 +index 00a10e9d00f0aad692fd87b9ea51085ef3fbfd1f..f346dfc768dca2f616e6e3197a98a8c896516568 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -722,6 +722,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -676,6 +676,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 4d3c34796e359..fe77a9ab717ab 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 025ef3f70a5ae34faf8c6013fbfba171c7f501ac..cea3f3dc05f91927f4ee8be5eec85ec26c8e1e07 100644 +index dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7b491b9ba 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 { +@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index 025ef3f70a5ae34faf8c6013fbfba171c7f501ac..cea3f3dc05f91927f4ee8be5eec85ec2 // 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 bd63f484db056d099bada03a0d3aab7742016110..7aea168344138d6210216997047bdcd8edfab6cc 100644 +index e842f73029cd7a7a2bdfd7b7d7483a6ecca8527c..21b9c228654222263e4ec5b028f098e417ee45fc 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -978,6 +978,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -921,6 +921,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index bd63f484db056d099bada03a0d3aab7742016110..7aea168344138d6210216997047bdcd8 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 f77763977aee112b854ade93b59172247599a16b..f3518973a5e071bf428d928f20255c208cf4d0b9 100644 +index 0387f4de1e181200ecd7323d2cea2fa854de62c0..d1da5a8cd5c7967e5ace9050110314f9ea5d605d 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -209,6 +209,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -191,6 +191,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 f77763977aee112b854ade93b59172247599a16b..f3518973a5e071bf428d928f20255c20 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 be0eb834ba868bb7f6f40e08277f4475a6a92f7d..00db8b6bdbf005a9aac20ede6ce810aefac4d03e 100644 +index f346dfc768dca2f616e6e3197a98a8c896516568..bcf4ac6bce4f83a7fe97621a8c9b49e6684fed95 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -722,6 +722,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -676,6 +676,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/nan/.patches b/patches/nan/.patches index 3b26a944836c5..55f1dd90c6bb6 100644 --- a/patches/nan/.patches +++ b/patches/nan/.patches @@ -1 +1,2 @@ use_new_constructor_for_scriptorigin_when_17_x.patch +chore_remove_deprecated_accessorsignatures.patch diff --git a/patches/nan/chore_remove_deprecated_accessorsignatures.patch b/patches/nan/chore_remove_deprecated_accessorsignatures.patch new file mode 100644 index 0000000000000..8cd9f2000153a --- /dev/null +++ b/patches/nan/chore_remove_deprecated_accessorsignatures.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Thu, 2 Jun 2022 15:45:21 +0200 +Subject: chore: remove deprecated AccessorSignatures + +Removed in https://chromium-review.googlesource.com/c/v8/v8/+/3654096 +Upstreamed to nan: https://github.com/nodejs/nan/pull/941 + +diff --git a/nan.h b/nan.h +index df5496c1a001120d10cd7c4b87d5e7bce8169f38..c29a99b79970421a15c5520a94ab65b1c3c473ff 100644 +--- a/nan.h ++++ b/nan.h +@@ -2516,8 +2516,7 @@ inline void SetAccessor( + , SetterCallback setter = 0 + , v8::Local data = v8::Local() + , v8::AccessControl settings = v8::DEFAULT +- , v8::PropertyAttribute attribute = v8::None +- , imp::Sig signature = imp::Sig()) { ++ , v8::PropertyAttribute attribute = v8::None) { + HandleScope scope; + + imp::NativeGetter getter_ = +@@ -2550,9 +2549,6 @@ inline void SetAccessor( + , obj + , settings + , attribute +-#if (NODE_MODULE_VERSION < NODE_18_0_MODULE_VERSION) +- , signature +-#endif + ); + } + +diff --git a/nan_callbacks.h b/nan_callbacks.h +index 53ede846ac9a865a737218dabbbd48305d3d6b63..ea81e452d364e3d3c15a121dc69ae21134bfb586 100644 +--- a/nan_callbacks.h ++++ b/nan_callbacks.h +@@ -52,8 +52,6 @@ typedef void(*IndexQueryCallback)( + const PropertyCallbackInfo&); + + namespace imp { +-typedef v8::Local Sig; +- + static const int kDataIndex = 0; + + static const int kFunctionIndex = 1; diff --git a/patches/node/.patches b/patches/node/.patches index 2c31d38101c8a..2066849e25cbb 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -43,3 +43,5 @@ macos_avoid_posix_spawnp_cwd_bug_3597.patch src_update_importmoduledynamically.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch json_parse_errors_made_user-friendly.patch +build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch +support_v8_sandboxed_pointers.patch diff --git a/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch b/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch new file mode 100644 index 0000000000000..1c47ff5336b9d --- /dev/null +++ b/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Mon, 6 Jun 2022 14:46:40 -0700 +Subject: build: define _LIBCPP_ABI_NAMESPACE as Cr to align with chromium + +Without this define native modules will be built trying to link to _LIBCPP_ABI_NAMESPACE which is the default name, chromium overrides this to Cr for PDB size reasons but they override it on all platforms. Setting this define allows native modules to actually work. This should not be upstreamed as it is Electron specific. + +Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3655638 + +diff --git a/common.gypi b/common.gypi +index bdfe81d11cc50f492c93fe48f6946765b6fb5238..559b7f7c220cb98946285bb15d0d63e203bbcea4 100644 +--- a/common.gypi ++++ b/common.gypi +@@ -288,6 +288,7 @@ + 'V8_DEPRECATION_WARNINGS', + 'V8_IMMINENT_DEPRECATION_WARNINGS', + '_GLIBCXX_USE_CXX11_ABI=1', ++ '_LIBCPP_ABI_NAMESPACE=Cr', + ], + + # Forcibly disable -Werror. We support a wide range of compilers, it's 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 44a303b93a03b..878160f610ebf 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -251,6 +251,35 @@ index 3bbca5b0da395b94c04da7bb7c55b107e41367d8..af62558c4f23aa82804e0077da7b7f3a // +diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js +index 4a5f1f149fe6c739f7f1d2ee17df6e61a942d621..b3287f428ce6b3fde11d449c601a57ff5e3843f9 100644 +--- a/test/parallel/test-crypto-certificate.js ++++ b/test/parallel/test-crypto-certificate.js +@@ -40,8 +40,10 @@ function copyArrayBuffer(buf) { + } + + function checkMethods(certificate) { +- ++ /* spkacValid has a md5 based signature which is not allowed in boringssl ++ https://boringssl.googlesource.com/boringssl/+/33d7e32ce40c04e8f1b99c05964956fda187819f + assert.strictEqual(certificate.verifySpkac(spkacValid), true); ++ */ + assert.strictEqual(certificate.verifySpkac(spkacFail), false); + + assert.strictEqual( +@@ -56,10 +58,12 @@ function checkMethods(certificate) { + ); + assert.strictEqual(certificate.exportChallenge(spkacFail), ''); + ++ /* spkacValid has a md5 based signature which is not allowed in boringssl + const ab = copyArrayBuffer(spkacValid); + assert.strictEqual(certificate.verifySpkac(ab), true); + assert.strictEqual(certificate.verifySpkac(new Uint8Array(ab)), true); + assert.strictEqual(certificate.verifySpkac(new DataView(ab)), true); ++ */ + } + + { diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js index 35514afbea92562a81c163b1e4d918b4ab609f71..13098e1acf12c309f2ed6f6143a2c2eeb8a2763d 100644 --- a/test/parallel/test-crypto-cipher-decipher.js diff --git a/patches/node/support_v8_sandboxed_pointers.patch b/patches/node/support_v8_sandboxed_pointers.patch new file mode 100644 index 0000000000000..a07e9f2560115 --- /dev/null +++ b/patches/node/support_v8_sandboxed_pointers.patch @@ -0,0 +1,375 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Tue, 21 Jun 2022 10:04:21 -0700 +Subject: support V8 sandboxed pointers + +This refactors several allocators to allocate within the V8 memory cage, +allowing them to be compatible with the V8_SANDBOXED_POINTERS feature. + +diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js +index 4c459b58b5a048d9d8a4f15f4011e7cce68089f4..6fb4c8d4567aee5b313ad621ea42699a196f18c7 100644 +--- a/lib/internal/bootstrap/pre_execution.js ++++ b/lib/internal/bootstrap/pre_execution.js +@@ -14,7 +14,6 @@ const { + getOptionValue, + getEmbedderOptions, + } = require('internal/options'); +-const { reconnectZeroFillToggle } = require('internal/buffer'); + const { + defineOperation, + emitExperimentalWarning, +@@ -26,10 +25,6 @@ const { ERR_MANIFEST_ASSERT_INTEGRITY } = require('internal/errors').codes; + const assert = require('internal/assert'); + + function prepareMainThreadExecution(expandArgv1 = false) { +- // TODO(joyeecheung): this is also necessary for workers when they deserialize +- // this toggle from the snapshot. +- reconnectZeroFillToggle(); +- + // Patch the process object with legacy properties and normalizations + patchProcessObject(expandArgv1); + setupTraceCategoryState(); +diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js +index bd38cf48a7fc6e8d61d8f11fa15c34aee182cbe3..1aa071cdc071dcdaf5c3b4bed0d3d76e5871731d 100644 +--- a/lib/internal/buffer.js ++++ b/lib/internal/buffer.js +@@ -30,7 +30,7 @@ const { + hexWrite, + ucs2Write, + utf8Write, +- getZeroFillToggle ++ setZeroFillToggle + } = internalBinding('buffer'); + const { + untransferable_object_private_symbol, +@@ -1055,24 +1055,15 @@ function markAsUntransferable(obj) { + // in C++. + // |zeroFill| can be undefined when running inside an isolate where we + // do not own the ArrayBuffer allocator. Zero fill is always on in that case. +-let zeroFill = getZeroFillToggle(); + function createUnsafeBuffer(size) { +- zeroFill[0] = 0; ++ setZeroFillToggle(false); + try { + return new FastBuffer(size); + } finally { +- zeroFill[0] = 1; ++ setZeroFillToggle(true) + } + } + +-// The connection between the JS land zero fill toggle and the +-// C++ one in the NodeArrayBufferAllocator gets lost if the toggle +-// is deserialized from the snapshot, because V8 owns the underlying +-// memory of this toggle. This resets the connection. +-function reconnectZeroFillToggle() { +- zeroFill = getZeroFillToggle(); +-} +- + module.exports = { + FastBuffer, + addBufferPrototypeMethods, +@@ -1080,5 +1071,4 @@ module.exports = { + createUnsafeBuffer, + readUInt16BE, + readUInt32BE, +- reconnectZeroFillToggle + }; +diff --git a/src/api/environment.cc b/src/api/environment.cc +index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e32cf0107f 100644 +--- a/src/api/environment.cc ++++ b/src/api/environment.cc +@@ -83,16 +83,16 @@ MaybeLocal PrepareStackTraceCallback(Local context, + void* NodeArrayBufferAllocator::Allocate(size_t size) { + void* ret; + if (zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers) +- ret = UncheckedCalloc(size); ++ ret = allocator_->Allocate(size); + else +- ret = UncheckedMalloc(size); ++ ret = allocator_->AllocateUninitialized(size); + if (LIKELY(ret != nullptr)) + total_mem_usage_.fetch_add(size, std::memory_order_relaxed); + return ret; + } + + void* NodeArrayBufferAllocator::AllocateUninitialized(size_t size) { +- void* ret = node::UncheckedMalloc(size); ++ void* ret = allocator_->AllocateUninitialized(size); + if (LIKELY(ret != nullptr)) + total_mem_usage_.fetch_add(size, std::memory_order_relaxed); + return ret; +@@ -100,7 +100,7 @@ void* NodeArrayBufferAllocator::AllocateUninitialized(size_t size) { + + void* NodeArrayBufferAllocator::Reallocate( + void* data, size_t old_size, size_t size) { +- void* ret = UncheckedRealloc(static_cast(data), size); ++ void* ret = allocator_->Reallocate(data, old_size, size); + if (LIKELY(ret != nullptr) || UNLIKELY(size == 0)) + total_mem_usage_.fetch_add(size - old_size, std::memory_order_relaxed); + return ret; +@@ -108,7 +108,7 @@ void* NodeArrayBufferAllocator::Reallocate( + + void NodeArrayBufferAllocator::Free(void* data, size_t size) { + total_mem_usage_.fetch_sub(size, std::memory_order_relaxed); +- free(data); ++ allocator_->Free(data, size); + } + + DebuggingArrayBufferAllocator::~DebuggingArrayBufferAllocator() { +diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc +index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c28152e2bfd0 100644 +--- a/src/crypto/crypto_util.cc ++++ b/src/crypto/crypto_util.cc +@@ -318,10 +318,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept { + return *this; + } + +-std::unique_ptr ByteSource::ReleaseToBackingStore() { ++std::unique_ptr ByteSource::ReleaseToBackingStore(Environment* env) { + // It's ok for allocated_data_ to be nullptr but + // only if size_ is zero. + CHECK_IMPLIES(size_ > 0, allocated_data_ != nullptr); ++#if defined(V8_SANDBOXED_POINTERS) ++ // When V8 sandboxed pointers are enabled, we have to copy into the memory ++ // cage. We still want to ensure we erase the data on free though, so ++ // provide a custom deleter that calls OPENSSL_cleanse. ++ if (!size()) ++ return ArrayBuffer::NewBackingStore(env->isolate(), 0); ++ std::unique_ptr allocator(ArrayBuffer::Allocator::NewDefaultAllocator()); ++ void* v8_data = allocator->Allocate(size()); ++ CHECK(v8_data); ++ memcpy(v8_data, allocated_data_, size()); ++ OPENSSL_clear_free(allocated_data_, size()); ++ std::unique_ptr ptr = ArrayBuffer::NewBackingStore( ++ v8_data, ++ size(), ++ [](void* data, size_t length, void*) { ++ OPENSSL_cleanse(data, length); ++ std::unique_ptr allocator(ArrayBuffer::Allocator::NewDefaultAllocator()); ++ allocator->Free(data, length); ++ }, nullptr); ++ CHECK(ptr); ++ allocated_data_ = nullptr; ++ data_ = nullptr; ++ size_ = 0; ++ return ptr; ++#else + std::unique_ptr ptr = ArrayBuffer::NewBackingStore( + allocated_data_, + size(), +@@ -333,10 +358,11 @@ std::unique_ptr ByteSource::ReleaseToBackingStore() { + data_ = nullptr; + size_ = 0; + return ptr; ++#endif // defined(V8_SANDBOXED_POINTERS) + } + + Local ByteSource::ToArrayBuffer(Environment* env) { +- std::unique_ptr store = ReleaseToBackingStore(); ++ std::unique_ptr store = ReleaseToBackingStore(env); + return ArrayBuffer::New(env->isolate(), std::move(store)); + } + +@@ -665,6 +691,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local args) { + } + + namespace { ++#if defined(V8_SANDBOXED_POINTERS) ++// When V8 sandboxed pointers are enabled, the secure heap cannot be used as ++// all ArrayBuffers must be allocated inside the V8 memory cage. ++void SecureBuffer(const FunctionCallbackInfo& args) { ++ CHECK(args[0]->IsUint32()); ++ uint32_t len = args[0].As()->Value(); ++ Local buffer = ArrayBuffer::New(args.GetIsolate(), len); ++ args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len)); ++} ++#else + // SecureBuffer uses openssl to allocate a Uint8Array using + // OPENSSL_secure_malloc. Because we do not yet actually + // make use of secure heap, this has the same semantics as +@@ -692,6 +728,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { + Local buffer = ArrayBuffer::New(env->isolate(), store); + args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len)); + } ++#endif // defined(V8_SANDBOXED_POINTERS) + + void SecureHeapUsed(const FunctionCallbackInfo& args) { + #ifndef OPENSSL_IS_BORINGSSL +diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h +index 0ce3a8f219a2952f660ff72a6ce36ee109add649..06e9eb72e4ea60db4c63d08b24b80a1e6c4f3eaf 100644 +--- a/src/crypto/crypto_util.h ++++ b/src/crypto/crypto_util.h +@@ -257,7 +257,7 @@ class ByteSource { + // Creates a v8::BackingStore that takes over responsibility for + // any allocated data. The ByteSource will be reset with size = 0 + // after being called. +- std::unique_ptr ReleaseToBackingStore(); ++ std::unique_ptr ReleaseToBackingStore(Environment* env); + + v8::Local ToArrayBuffer(Environment* env); + +diff --git a/src/node_buffer.cc b/src/node_buffer.cc +index 215bd8003aabe17e43ac780c723cfe971b437eae..eb00eb6f592e20f3c17a529f30b09673774eb1c1 100644 +--- a/src/node_buffer.cc ++++ b/src/node_buffer.cc +@@ -1175,33 +1175,14 @@ void SetBufferPrototype(const FunctionCallbackInfo& args) { + env->set_buffer_prototype_object(proto); + } + +-void GetZeroFillToggle(const FunctionCallbackInfo& args) { ++void SetZeroFillToggle(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + NodeArrayBufferAllocator* allocator = env->isolate_data()->node_allocator(); + Local ab; +- // It can be a nullptr when running inside an isolate where we +- // do not own the ArrayBuffer allocator. +- if (allocator == nullptr) { +- // Create a dummy Uint32Array - the JS land can only toggle the C++ land +- // setting when the allocator uses our toggle. With this the toggle in JS +- // land results in no-ops. +- ab = ArrayBuffer::New(env->isolate(), sizeof(uint32_t)); +- } else { ++ if (allocator != nullptr) { + uint32_t* zero_fill_field = allocator->zero_fill_field(); +- std::unique_ptr backing = +- ArrayBuffer::NewBackingStore(zero_fill_field, +- sizeof(*zero_fill_field), +- [](void*, size_t, void*) {}, +- nullptr); +- ab = ArrayBuffer::New(env->isolate(), std::move(backing)); ++ *zero_fill_field = args[0]->BooleanValue(env->isolate()); + } +- +- ab->SetPrivate( +- env->context(), +- env->untransferable_object_private_symbol(), +- True(env->isolate())).Check(); +- +- args.GetReturnValue().Set(Uint32Array::New(ab, 0, 1)); + } + + void DetachArrayBuffer(const FunctionCallbackInfo& args) { +@@ -1310,7 +1291,7 @@ void Initialize(Local target, + env->SetMethod(target, "ucs2Write", StringWrite); + env->SetMethod(target, "utf8Write", StringWrite); + +- env->SetMethod(target, "getZeroFillToggle", GetZeroFillToggle); ++ env->SetMethod(target, "setZeroFillToggle", SetZeroFillToggle); + } + + } // anonymous namespace +@@ -1350,7 +1331,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { + registry->Register(StringWrite); + registry->Register(StringWrite); + registry->Register(StringWrite); +- registry->Register(GetZeroFillToggle); ++ registry->Register(SetZeroFillToggle); + + registry->Register(DetachArrayBuffer); + registry->Register(CopyArrayBuffer); +diff --git a/src/node_i18n.cc b/src/node_i18n.cc +index c537a247f55ff070da1988fc8b7309b5692b5c18..59bfb597849cd5a94800d6c83b238ef77245243e 100644 +--- a/src/node_i18n.cc ++++ b/src/node_i18n.cc +@@ -104,7 +104,7 @@ namespace { + + template + MaybeLocal ToBufferEndian(Environment* env, MaybeStackBuffer* buf) { +- MaybeLocal ret = Buffer::New(env, buf); ++ MaybeLocal ret = Buffer::Copy(env, reinterpret_cast(buf->out()), buf->length() * sizeof(T)); + if (ret.IsEmpty()) + return ret; + +diff --git a/src/node_internals.h b/src/node_internals.h +index d37be23cd63e82d4040777bd0e17ed449ec0b15b..0b66996f11c66800a7e21ee84fa101450b856227 100644 +--- a/src/node_internals.h ++++ b/src/node_internals.h +@@ -118,6 +118,8 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator { + private: + uint32_t zero_fill_field_ = 1; // Boolean but exposed as uint32 to JS land. + std::atomic total_mem_usage_ {0}; ++ ++ std::unique_ptr allocator_{v8::ArrayBuffer::Allocator::NewDefaultAllocator()}; + }; + + class DebuggingArrayBufferAllocator final : public NodeArrayBufferAllocator { +diff --git a/src/node_serdes.cc b/src/node_serdes.cc +index f6f0034bc24d09e3ad65491c7d6be0b9c9db1581..92d5020f293c98c81d3891a82f7320629bf9f926 100644 +--- a/src/node_serdes.cc ++++ b/src/node_serdes.cc +@@ -29,6 +29,11 @@ using v8::ValueSerializer; + + namespace serdes { + ++v8::ArrayBuffer::Allocator* GetAllocator() { ++ static v8::ArrayBuffer::Allocator* allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); ++ return allocator; ++}; ++ + class SerializerContext : public BaseObject, + public ValueSerializer::Delegate { + public: +@@ -37,10 +42,15 @@ class SerializerContext : public BaseObject, + + ~SerializerContext() override = default; + ++ // v8::ValueSerializer::Delegate + void ThrowDataCloneError(Local message) override; + Maybe WriteHostObject(Isolate* isolate, Local object) override; + Maybe GetSharedArrayBufferId( + Isolate* isolate, Local shared_array_buffer) override; ++ void* ReallocateBufferMemory(void* old_buffer, ++ size_t old_length, ++ size_t* new_length) override; ++ void FreeBufferMemory(void* buffer) override; + + static void SetTreatArrayBufferViewsAsHostObjects( + const FunctionCallbackInfo& args); +@@ -61,6 +71,7 @@ class SerializerContext : public BaseObject, + + private: + ValueSerializer serializer_; ++ size_t last_length_ = 0; + }; + + class DeserializerContext : public BaseObject, +@@ -144,6 +155,24 @@ Maybe SerializerContext::GetSharedArrayBufferId( + return id.ToLocalChecked()->Uint32Value(env()->context()); + } + ++void* SerializerContext::ReallocateBufferMemory(void* old_buffer, ++ size_t requested_size, ++ size_t* new_length) { ++ *new_length = std::max(static_cast(4096), requested_size); ++ if (old_buffer) { ++ void* ret = GetAllocator()->Reallocate(old_buffer, last_length_, *new_length); ++ last_length_ = *new_length; ++ return ret; ++ } else { ++ last_length_ = *new_length; ++ return GetAllocator()->Allocate(*new_length); ++ } ++} ++ ++void SerializerContext::FreeBufferMemory(void* buffer) { ++ GetAllocator()->Free(buffer, last_length_); ++} ++ + Maybe SerializerContext::WriteHostObject(Isolate* isolate, + Local input) { + MaybeLocal ret; +@@ -211,7 +240,12 @@ void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo& args) { + std::pair ret = ctx->serializer_.Release(); + auto buf = Buffer::New(ctx->env(), + reinterpret_cast(ret.first), +- ret.second); ++ ret.second, ++ [](char* data, void* hint){ ++ if (data) ++ GetAllocator()->Free(data, reinterpret_cast(hint)); ++ }, ++ reinterpret_cast(ctx->last_length_)); + + if (!buf.IsEmpty()) { + args.GetReturnValue().Set(buf.ToLocalChecked()); diff --git a/patches/v8/.patches b/patches/v8/.patches index aa4ed2c39d565..9df51315c6cfe 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -8,5 +8,6 @@ fix_build_deprecated_attribute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch -allow_disabling_of_v8_sandboxed_pointers.patch chore_disable_is_execution_terminating_dcheck.patch +build_remove_legacy_oom_error_callback.patch +force_disable_v8_sandboxed_pointers.patch diff --git a/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch b/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch deleted file mode 100644 index 2c98e2ad7c6d2..0000000000000 --- a/patches/v8/allow_disabling_of_v8_sandboxed_pointers.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 26 May 2022 10:45:49 -0400 -Subject: allow disabling of v8 sandboxed pointers - -V8 sandboxed pointers are incompatible with Node due to changes like -https://chromium-review.googlesource.com/c/v8/v8/+/3114136, so for -now we need a way to disable v8 sandboxed pointers. - -diff --git a/BUILD.gn b/BUILD.gn -index 114cfd757b60c14cfb7a6bc9f9f69765363c9c6c..5e8a6bb2c26c3e5701e628cbf4bfcf9b2eb6b82f 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -501,18 +501,6 @@ if (v8_enable_sandbox == "") { - v8_enable_external_code_space - } - --# Enable sandboxed pointers on desktop when the sandbox is enabled. --if (v8_enable_sandbox) { -- # When sanitizers are enabled, PartitionAlloc forwards allocations to malloc -- # instead of allocating from its Pools and so isn't compatible with the -- # sandbox. As such, disable the sandbox there. See https://crbug.com/1323174 -- if (!is_asan && !is_hwasan && !is_lsan && !is_tsan && !is_msan) { -- v8_enable_sandboxed_pointers = -- target_os != "fuchsia" && target_os != "android" && -- target_os != "chromeos" -- } --} -- - # Enable all available sandbox features if sandbox future is enabled. - if (v8_enable_sandbox_future) { - v8_enable_sandboxed_pointers = true diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index aec7148bcd45c..adab060b9821c 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 744ae6a11ffff47872da4141b3f0e4af5130fff9..31dfdf8a3facd470c3f92c58a5a12566af96521a 100644 +index 41dab6bec85e6898bb8bf78c6287178aa55a7e74..f5879e1361b127f1213e6abe649d7e82c45b43ce 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -620,7 +620,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 744ae6a11ffff47872da4141b3f0e4af5130fff9..31dfdf8a3facd470c3f92c58a5a12566 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5905,7 +5905,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5948,7 +5948,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 744ae6a11ffff47872da4141b3f0e4af5130fff9..31dfdf8a3facd470c3f92c58a5a12566 deps = [ ":v8_libbase", -@@ -5943,6 +5943,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5986,6 +5986,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/build_remove_legacy_oom_error_callback.patch b/patches/v8/build_remove_legacy_oom_error_callback.patch new file mode 100644 index 0000000000000..561e783936029 --- /dev/null +++ b/patches/v8/build_remove_legacy_oom_error_callback.patch @@ -0,0 +1,168 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 14 Jun 2022 15:12:43 -0700 +Subject: build: remove legacy oom error callback + +Addresses 3646014: [API] Deprecate LegacyOOMErrorCallback: +https://chromium-review.googlesource.com/c/v8/v8/+/3646014 + +This deprecation was added to warn embedders that the legacy method +was being replaced. However, Electron does not use the legacy method. +The deprecation causes build issues on Windows, this patch removes +the unused method entirely to avoid those errors. + +This patch can be removed in v8 10.6, when legacy_oom_error_callback +is removed. + +diff --git a/include/v8-callbacks.h b/include/v8-callbacks.h +index b39921dea0415362d1a30159f3fac0e345e2313e..810fc4edaf69565959148d3c1ec662f0db3e8490 100644 +--- a/include/v8-callbacks.h ++++ b/include/v8-callbacks.h +@@ -217,10 +217,6 @@ using AddHistogramSampleCallback = void (*)(void* histogram, int sample); + + using FatalErrorCallback = void (*)(const char* location, const char* message); + +-using LegacyOOMErrorCallback V8_DEPRECATED( +- "Use OOMErrorCallback (https://crbug.com/1323177)") = +- void (*)(const char* location, bool is_heap_oom); +- + struct OOMDetails { + bool is_heap_oom = false; + const char* detail = nullptr; +diff --git a/include/v8-initialization.h b/include/v8-initialization.h +index 5cadd1788926a7b305ba4d05792b9efa6183d73e..c01c337317afb088927cae0239542281a89d1bb1 100644 +--- a/include/v8-initialization.h ++++ b/include/v8-initialization.h +@@ -286,9 +286,6 @@ class V8_EXPORT V8 { + */ + static void SetFatalMemoryErrorCallback(OOMErrorCallback callback); + +- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)") +- static void SetFatalMemoryErrorCallback(LegacyOOMErrorCallback callback); +- + /** + * Get statistics about the shared memory usage. + */ +diff --git a/include/v8-isolate.h b/include/v8-isolate.h +index b54c7388603b4582356f6741c9a36f2835aa1928..b9533b78046228705e2038396eebf23b1d663df1 100644 +--- a/include/v8-isolate.h ++++ b/include/v8-isolate.h +@@ -288,9 +288,6 @@ class V8_EXPORT Isolate { + FatalErrorCallback fatal_error_callback = nullptr; + OOMErrorCallback oom_error_callback = nullptr; + +- V8_DEPRECATED("Use oom_error_callback (https://crbug.com/1323177)") +- LegacyOOMErrorCallback legacy_oom_error_callback = nullptr; +- + /** + * The following parameter is experimental and may change significantly. + * This is currently for internal testing. +@@ -1468,10 +1465,6 @@ class V8_EXPORT Isolate { + /** Set the callback to invoke in case of fatal errors. */ + void SetFatalErrorHandler(FatalErrorCallback that); + +- /** Set the callback to invoke in case of OOM errors (deprecated). */ +- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)") +- void SetOOMErrorHandler(LegacyOOMErrorCallback that); +- + /** Set the callback to invoke in case of OOM errors. */ + void SetOOMErrorHandler(OOMErrorCallback that); + +diff --git a/src/api/api.cc b/src/api/api.cc +index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332f8778136 100644 +--- a/src/api/api.cc ++++ b/src/api/api.cc +@@ -167,13 +167,6 @@ + + namespace v8 { + +-// Redefine LegacyOOMErrorCallback here for internal usage. We still need to +-// support it but it is deprecated so would trigger warnings. +-// TODO(chromium:1323177): Remove this. +-using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location, +- bool is_heap_oom); +- +-static DeprecatedLegacyOOMErrorCallback g_legacy_oom_error_callback = nullptr; + static OOMErrorCallback g_oom_error_callback = nullptr; + + static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate, +@@ -231,9 +224,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, + // Give the embedder a chance to handle the condition. If it doesn't, + // just crash. + if (g_oom_error_callback) g_oom_error_callback(location, details); +- if (g_legacy_oom_error_callback) { +- g_legacy_oom_error_callback(location, details.is_heap_oom); +- } + FATAL("Fatal process out of memory: %s", location); + UNREACHABLE(); + } +@@ -309,9 +299,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, + } + Utils::ReportOOMFailure(i_isolate, location, details); + if (g_oom_error_callback) g_oom_error_callback(location, details); +- if (g_legacy_oom_error_callback) { +- g_legacy_oom_error_callback(location, details.is_heap_oom); +- } + // If the fatal error handler returns, we stop execution. + FATAL("API fatal error handler returned after process out of memory"); + } +@@ -343,8 +330,6 @@ void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location, + const OOMDetails& details) { + if (auto oom_callback = i_isolate->oom_behavior()) { + oom_callback(location, details); +- } else if (auto legacy_oom_callback = i_isolate->legacy_oom_behavior()) { +- legacy_oom_callback(location, details.is_heap_oom); + } else { + // TODO(wfh): Remove this fallback once Blink is setting OOM handler. See + // crbug.com/614440. +@@ -6121,11 +6106,6 @@ void v8::V8::SetFatalMemoryErrorCallback( + g_oom_error_callback = oom_error_callback; + } + +-void v8::V8::SetFatalMemoryErrorCallback( +- v8::LegacyOOMErrorCallback legacy_oom_error_callback) { +- g_legacy_oom_error_callback = legacy_oom_error_callback; +-} +- + void v8::V8::SetEntropySource(EntropySource entropy_source) { + base::RandomNumberGenerator::SetEntropySource(entropy_source); + } +@@ -8633,8 +8613,6 @@ void Isolate::Initialize(Isolate* v8_isolate, + #endif + if (params.oom_error_callback) { + v8_isolate->SetOOMErrorHandler(params.oom_error_callback); +- } else if (params.legacy_oom_error_callback) { +- v8_isolate->SetOOMErrorHandler(params.legacy_oom_error_callback); + } + #if __clang__ + #pragma clang diagnostic pop +@@ -9376,8 +9354,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { + + CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior) + CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior) +-CALLBACK_SETTER(OOMErrorHandler, DeprecatedLegacyOOMErrorCallback, +- legacy_oom_behavior) + CALLBACK_SETTER(ModifyCodeGenerationFromStringsCallback, + ModifyCodeGenerationFromStringsCallback2, + modify_code_gen_callback2) +diff --git a/src/execution/isolate.h b/src/execution/isolate.h +index aed822d0779f3e7dac3c37b84b3aea277a5d57ea..ca9fd39138efb3196072b509ca9f5f9bae85c626 100644 +--- a/src/execution/isolate.h ++++ b/src/execution/isolate.h +@@ -489,16 +489,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob(); + + using DebugObjectCache = std::vector>; + +-// Redefine LegacyOOMErrorCallback here for internal usage. We still need to +-// support it but it is deprecated so would trigger warnings. +-// TODO(chromium:1323177): Remove this. +-using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location, +- bool is_heap_oom); +- + #define ISOLATE_INIT_LIST(V) \ + /* Assembler state. */ \ + V(FatalErrorCallback, exception_behavior, nullptr) \ +- V(DeprecatedLegacyOOMErrorCallback, legacy_oom_behavior, nullptr) \ + V(OOMErrorCallback, oom_behavior, nullptr) \ + V(LogEventCallback, event_logger, nullptr) \ + V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, nullptr) \ diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 156ab2298be93..9a9c02bce0af1 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 03bb3f062c5510292c2c983508d284f8cfde5b41..6d0622863ae436dfae6413126884e0f941a3f0b6 100644 +index 8cb7a34b1a48956737e9964151db80308479dcc9..7d8d8b699d2b10e026617ea9716ac913a2d44aea 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9168,7 +9168,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9125,7 +9125,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 03bb3f062c5510292c2c983508d284f8cfde5b41..6d0622863ae436dfae6413126884e0f9 i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index a2a22674d1d50926fefac037f837d0e33d9b5220..214c0ac8d83fc74d40eb00d4d2641f329500e33c 100644 +index a581b318b8cd729370a027fe6b2135dea42a7e78..8f6a2164fbf8016a57742e6048e7f99c5af86d0d 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6208,9 +6208,9 @@ void Heap::TearDown() { +@@ -6211,9 +6211,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 70f4cab7eb7fe..ededb3c9c6d51 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,7 +12,7 @@ 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 29ce9b289eb33526abd6a430428b82e9dc8c7027..114cfd757b60c14cfb7a6bc9f9f69765363c9c6c 100644 +index 1859c2bc4fa262aa4a7f28a5d36d222fc195de2e..71ee04624868f23a2e204b5ff1e973b45e2f1202 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -620,6 +620,10 @@ config("internal_config") { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index c9836854ec41a..6e46db75295f4 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 316f870e31f33c990793fdfe7ecb69bb120bb024..5db324b2bf0169657fc6e9dc3b15fa3ccaeac9c4 100644 +index 104a524dc45433b15f30529ecb4815210e72d90d..f3e234be7e3d63afb2c4560fe4d243dfa81e12a6 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -927,7 +927,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -925,7 +925,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 f69f6226168e5..05a232bf5d8fb 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 31dfdf8a3facd470c3f92c58a5a12566af96521a..29ce9b289eb33526abd6a430428b82e9dc8c7027 100644 +index f5879e1361b127f1213e6abe649d7e82c45b43ce..1859c2bc4fa262aa4a7f28a5d36d222fc195de2e 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5917,7 +5917,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5960,7 +5960,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/force_disable_v8_sandboxed_pointers.patch b/patches/v8/force_disable_v8_sandboxed_pointers.patch new file mode 100644 index 0000000000000..ed88bbb205cb7 --- /dev/null +++ b/patches/v8/force_disable_v8_sandboxed_pointers.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Thu, 23 Jun 2022 16:49:28 -0700 +Subject: force disable v8 sandboxed pointers + +temporarily, until we can fix node to be compatible + +diff --git a/BUILD.gn b/BUILD.gn +index 71ee04624868f23a2e204b5ff1e973b45e2f1202..6aa33fdd3c767eb0045db918d2535fe35c98ca4b 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -506,9 +506,9 @@ if (v8_enable_sandbox == "") { + } + + # Enable sandboxed pointers when the sandbox is enabled. +-if (v8_enable_sandbox) { +- v8_enable_sandboxed_pointers = true +-} ++#if (v8_enable_sandbox) { ++# v8_enable_sandboxed_pointers = true ++#} + + # Enable all available sandbox features if sandbox future is enabled. + if (v8_enable_sandbox_future) { diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index 04f2010a887b9..94b427ba183b9 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index 400d8cb85ea3b45448e79903b05936998b1941b3..2405b99a5badd2ee266459d17d2ec352b4ef71c5 100644 +index 8b7cc072de2745002ebb715b606cf5f6f735a5f7..89162633cabc2d3f22e2fb4dd76321994e8fe66b 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6170,12 +6170,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6142,12 +6142,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index 400d8cb85ea3b45448e79903b05936998b1941b3..2405b99a5badd2ee266459d17d2ec352 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index d49403e9326b85ae4e52e7bc3e232834038fbe09..64f554332b1241aa22f1e292ebf9d0bc667a647a 100644 +index a8dda45985e8e74b1b7c0200779fe8a3844617b0..c017dafaeff050045b4cf4d2a76a474b7b0a2c27 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2522,7 +2522,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2528,7 +2528,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index ee905e4f0f881..164c824a19d6c 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 2511a0752037939562e861a8f492f6c9496453c6..8762c4dfa25dd17d7f36962410aeb9846593073e 100644 +index 52c5d32227029a24d9576967f27e7a8554edd66b..35c5cbe4ce68539ed29e6b365651e6b2c678d457 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, diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index c03f3f36ca984..8f14c6ef9bae7 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -59,7 +59,7 @@ async function main () { const cxxflags = [ '-std=c++17', '-nostdinc++', - `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`, + `-I"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`, '-fPIC', @@ -108,7 +108,8 @@ async function main () { const onlyTests = args.only && args.only.split(','); const DISABLED_TESTS = [ - 'nannew-test.js' + 'nannew-test.js', + 'buffer-test.js' ]; const testsToRun = fs.readdirSync(path.resolve(NAN_DIR, 'test', 'js')) .filter(test => !DISABLED_TESTS.includes(test)) diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index ba2bc83e85ac3..fe69ab29c7e22 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -127,6 +127,7 @@ "report/test-report-writereport", "sequential/test-cpu-prof-kill", "sequential/test-diagnostic-dir-cpu-prof", + "sequential/test-cpu-prof-drained.js", "sequential/test-tls-connect", "wpt/test-webcrypto" ] diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index b757c598891bc..8179c7b6234a1 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -460,8 +460,8 @@ ElectronMainDelegate::RunProcess( return std::move(main_function_params); } -bool ElectronMainDelegate::ShouldCreateFeatureList() { - return false; +bool ElectronMainDelegate::ShouldCreateFeatureList(InvokedIn invoked_in) { + return invoked_in == InvokedIn::kChildProcess; } bool ElectronMainDelegate::ShouldLockSchemeRegistry() { diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index 255df5c235d8f..dd43875cc5d17 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -43,7 +43,7 @@ class ElectronMainDelegate : public content::ContentMainDelegate { absl::variant RunProcess( const std::string& process_type, content::MainFunctionParams main_function_params) override; - bool ShouldCreateFeatureList() override; + bool ShouldCreateFeatureList(InvokedIn invoked_in) override; bool ShouldLockSchemeRegistry() override; #if BUILDFLAG(IS_LINUX) void ZygoteForked() override; diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index 1c74cee891155..895b6b12b2008 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -103,39 +103,19 @@ class DataPipeReader { } void OnSuccess() { - // Pass the buffer to JS. - // - // Note that the lifetime of the native buffer belongs to us, and we will - // free memory when JS buffer gets garbage collected. + // Copy the buffer to JS. + // TODO(nornagon): make this zero-copy by allocating the array buffer + // inside the sandbox v8::HandleScope handle_scope(promise_.isolate()); -#if defined(V8_SANDBOX) v8::Local buffer = node::Buffer::Copy(promise_.isolate(), &buffer_.front(), buffer_.size()) .ToLocalChecked(); promise_.Resolve(buffer); -#else - v8::Local buffer = - node::Buffer::New(promise_.isolate(), &buffer_.front(), buffer_.size(), - &DataPipeReader::FreeBuffer, this) - .ToLocalChecked(); - promise_.Resolve(buffer); -#endif // Destroy data pipe. handle_watcher_.Cancel(); -#if defined(V8_SANDBOX) delete this; -#else - data_pipe_.reset(); - data_pipe_getter_.reset(); -#endif - } - -#if !defined(V8_SANDBOX) - static void FreeBuffer(char* data, void* self) { - delete static_cast(self); } -#endif gin_helper::Promise> promise_; diff --git a/shell/browser/api/electron_api_net_log.cc b/shell/browser/api/electron_api_net_log.cc index f30aa2aebf8fe..8cf645acbdc31 100644 --- a/shell/browser/api/electron_api_net_log.cc +++ b/shell/browser/api/electron_api_net_log.cc @@ -132,9 +132,8 @@ v8::Local NetLog::StartLogging(base::FilePath log_path, auto command_line_string = base::CommandLine::ForCurrentProcess()->GetCommandLineString(); auto channel_string = std::string("Electron " ELECTRON_VERSION); - base::Value custom_constants = - base::Value::FromUniquePtrValue(net_log::GetPlatformConstantsForNetLog( - command_line_string, channel_string)); + base::Value::Dict custom_constants = net_log::GetPlatformConstantsForNetLog( + command_line_string, channel_string); auto* network_context = browser_context_->GetDefaultStoragePartition()->GetNetworkContext(); @@ -156,7 +155,7 @@ v8::Local NetLog::StartLogging(base::FilePath log_path, void NetLog::StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode, uint64_t max_file_size, - base::Value custom_constants, + base::Value::Dict custom_constants, base::File output_file) { if (!net_log_exporter_) { // Theoretically the mojo pipe could have been closed by the time we get @@ -204,7 +203,7 @@ v8::Local NetLog::StopLogging(gin::Arguments* args) { // pointer lives long enough to resolve the promise. Moving it into the // callback will cause the instance variable to become empty. net_log_exporter_->Stop( - base::Value(base::Value::Type::DICTIONARY), + base::Value::Dict(), base::BindOnce( [](mojo::Remote, gin_helper::Promise promise, int32_t error) { diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index 30a6ad6981a1d..26450517c687e 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -57,7 +57,7 @@ class NetLog : public gin::Wrappable { void StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode, uint64_t max_file_size, - base::Value custom_constants, + base::Value::Dict custom_constants, base::File output_file); void NetLogStarted(int32_t error); diff --git a/shell/browser/api/electron_api_printing.cc b/shell/browser/api/electron_api_printing.cc index 75067584b1465..a8f3a035ba9e0 100644 --- a/shell/browser/api/electron_api_printing.cc +++ b/shell/browser/api/electron_api_printing.cc @@ -55,7 +55,7 @@ printing::PrinterList GetPrinterList(v8::Isolate* isolate) { { base::ThreadRestrictions::ScopedAllowIO allow_io; printing::mojom::ResultCode code = - print_backend->EnumeratePrinters(&printers); + print_backend->EnumeratePrinters(printers); if (code != printing::mojom::ResultCode::kSuccess) LOG(INFO) << "Failed to enumerate printers"; } @@ -73,7 +73,7 @@ v8::Local GetPrinterListAsync(v8::Isolate* isolate) { auto print_backend = printing::PrintBackend::CreateInstance( g_browser_process->GetApplicationLocale()); printing::mojom::ResultCode code = - print_backend->EnumeratePrinters(&printers); + print_backend->EnumeratePrinters(printers); if (code != printing::mojom::ResultCode::kSuccess) LOG(INFO) << "Failed to enumerate printers"; return printers; diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index eec3e6bb9643d..15312c2f94076 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -451,7 +451,7 @@ std::pair GetDefaultPrinterAsync() { // Check for existing printers and pick the first one should it exist. if (printer_name.empty()) { printing::PrinterList printers; - if (print_backend->EnumeratePrinters(&printers) != + if (print_backend->EnumeratePrinters(printers) != printing::mojom::ResultCode::kSuccess) return std::make_pair("Failed to enumerate printers", std::u16string()); if (!printers.empty()) @@ -944,12 +944,6 @@ void WebContents::InitWithWebContents( } WebContents::~WebContents() { - // clear out objects that have been granted permissions so that when - // WebContents::RenderFrameDeleted is called as a result of WebContents - // destruction it doesn't try to clear out a granted_devices_ - // on a destructed object. - granted_devices_.clear(); - if (!inspectable_web_contents_) { WebContentsDestroyed(); return; @@ -1557,11 +1551,6 @@ void WebContents::RenderFrameDeleted( // is swapped by content::RenderFrameHostManager. // - // clear out objects that have been granted permissions - if (!granted_devices_.empty()) { - granted_devices_.erase(render_frame_host->GetFrameTreeNodeId()); - } - // WebFrameMain::FromRenderFrameHost(rfh) will use the RFH's FrameTreeNode ID // to find an existing instance of WebFrameMain. During a cross-origin // navigation, the deleted RFH will be the old host which was swapped out. In @@ -1771,7 +1760,7 @@ void WebContents::Invoke( void WebContents::OnFirstNonEmptyLayout( content::RenderFrameHost* render_frame_host) { - if (render_frame_host == web_contents()->GetMainFrame()) { + if (render_frame_host == web_contents()->GetPrimaryMainFrame()) { Emit("ready-to-show"); } } @@ -2088,7 +2077,7 @@ bool WebContents::GetBackgroundThrottling() const { void WebContents::SetBackgroundThrottling(bool allowed) { background_throttling_ = allowed; - auto* rfh = web_contents()->GetMainFrame(); + auto* rfh = web_contents()->GetPrimaryMainFrame(); if (!rfh) return; @@ -2110,12 +2099,15 @@ void WebContents::SetBackgroundThrottling(bool allowed) { } int WebContents::GetProcessID() const { - return web_contents()->GetMainFrame()->GetProcess()->GetID(); + return web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(); } base::ProcessId WebContents::GetOSProcessID() const { - base::ProcessHandle process_handle = - web_contents()->GetMainFrame()->GetProcess()->GetProcess().Handle(); + base::ProcessHandle process_handle = web_contents() + ->GetPrimaryMainFrame() + ->GetProcess() + ->GetProcess() + .Handle(); return base::GetProcId(process_handle); } @@ -2311,7 +2303,7 @@ void WebContents::SetWebRTCIPHandlingPolicy( std::string WebContents::GetMediaSourceID( content::WebContents* request_web_contents) { - auto* frame_host = web_contents()->GetMainFrame(); + auto* frame_host = web_contents()->GetPrimaryMainFrame(); if (!frame_host) return std::string(); @@ -2321,7 +2313,7 @@ std::string WebContents::GetMediaSourceID( content::WebContentsMediaCaptureId(frame_host->GetProcess()->GetID(), frame_host->GetRoutingID())); - auto* request_frame_host = request_web_contents->GetMainFrame(); + auto* request_frame_host = request_web_contents->GetPrimaryMainFrame(); if (!request_frame_host) return std::string(); @@ -2453,7 +2445,7 @@ void WebContents::EnableDeviceEmulation( return; DCHECK(web_contents()); - auto* frame_host = web_contents()->GetMainFrame(); + auto* frame_host = web_contents()->GetPrimaryMainFrame(); if (frame_host) { auto* widget_host_impl = static_cast( frame_host->GetView()->GetRenderWidgetHost()); @@ -2469,7 +2461,7 @@ void WebContents::DisableDeviceEmulation() { return; DCHECK(web_contents()); - auto* frame_host = web_contents()->GetMainFrame(); + auto* frame_host = web_contents()->GetPrimaryMainFrame(); if (frame_host) { auto* widget_host_impl = static_cast( frame_host->GetView()->GetRenderWidgetHost()); @@ -2632,7 +2624,7 @@ void WebContents::OnGetDefaultPrinter( auto* focused_frame = web_contents()->GetFocusedFrame(); auto* rfh = focused_frame && focused_frame->HasSelection() ? focused_frame - : web_contents()->GetMainFrame(); + : web_contents()->GetPrimaryMainFrame(); print_view_manager->PrintNow(rfh, silent, std::move(print_settings), std::move(print_callback)); @@ -2839,10 +2831,10 @@ v8::Local WebContents::PrintToPDF(const base::Value& settings) { absl::variant print_pages_params = print_to_pdf::GetPrintPagesParams( - web_contents()->GetMainFrame()->GetLastCommittedURL(), landscape, - display_header_footer, print_background, scale, paper_width, - paper_height, margin_top, margin_bottom, margin_left, margin_right, - absl::make_optional(header_template), + web_contents()->GetPrimaryMainFrame()->GetLastCommittedURL(), + landscape, display_header_footer, print_background, scale, + paper_width, paper_height, margin_top, margin_bottom, margin_left, + margin_right, absl::make_optional(header_template), absl::make_optional(footer_template), prefer_css_page_size); if (absl::holds_alternative(print_pages_params)) { @@ -2861,7 +2853,7 @@ v8::Local WebContents::PrintToPDF(const base::Value& settings) { absl::get(print_pages_params)); params->params->document_cookie = unique_id.value_or(0); - manager->PrintToPdf(web_contents()->GetMainFrame(), page_ranges, + manager->PrintToPdf(web_contents()->GetPrimaryMainFrame(), page_ranges, std::move(params), base::BindOnce(&WebContents::OnPDFCreated, GetWeakPtr(), std::move(promise))); @@ -2993,7 +2985,7 @@ void WebContents::ShowDefinitionForSelection() { } void WebContents::CopyImageAt(int x, int y) { - auto* const host = web_contents()->GetMainFrame(); + auto* const host = web_contents()->GetPrimaryMainFrame(); if (host) host->CopyImageAt(x, y); } @@ -3159,7 +3151,7 @@ v8::Local WebContents::CapturePage(gin::Arguments* args) { // If the view's renderer is suspended this may fail on Windows/Linux - // bail if so. See CopyFromSurface in // content/public/browser/render_widget_host_view.h. - auto* rfh = web_contents()->GetMainFrame(); + auto* rfh = web_contents()->GetPrimaryMainFrame(); if (rfh && rfh->GetVisibilityState() == blink::mojom::PageVisibilityState::kHidden) { promise.Resolve(gfx::Image()); @@ -3437,11 +3429,11 @@ v8::Local WebContents::Debugger(v8::Isolate* isolate) { } content::RenderFrameHost* WebContents::MainFrame() { - return web_contents()->GetMainFrame(); + return web_contents()->GetPrimaryMainFrame(); } void WebContents::NotifyUserActivation() { - content::RenderFrameHost* frame = web_contents()->GetMainFrame(); + content::RenderFrameHost* frame = web_contents()->GetPrimaryMainFrame(); if (frame) frame->NotifyUserActivation( blink::mojom::UserActivationNotificationType::kInteraction); @@ -3457,7 +3449,7 @@ v8::Local WebContents::GetProcessMemoryInfo(v8::Isolate* isolate) { gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); - auto* frame_host = web_contents()->GetMainFrame(); + auto* frame_host = web_contents()->GetPrimaryMainFrame(); if (!frame_host) { promise.RejectWithErrorMessage("Failed to create memory dump"); return handle; @@ -3487,13 +3479,13 @@ v8::Local WebContents::TakeHeapSnapshot( return handle; } - auto* frame_host = web_contents()->GetMainFrame(); + auto* frame_host = web_contents()->GetPrimaryMainFrame(); if (!frame_host) { promise.RejectWithErrorMessage("takeHeapSnapshot failed"); return handle; } - if (!frame_host->IsRenderFrameCreated()) { + if (!frame_host->IsRenderFrameLive()) { promise.RejectWithErrorMessage("takeHeapSnapshot failed"); return handle; } @@ -3521,132 +3513,6 @@ v8::Local WebContents::TakeHeapSnapshot( return handle; } -void WebContents::GrantDevicePermission( - const url::Origin& origin, - const base::Value* device, - blink::PermissionType permission_type, - content::RenderFrameHost* render_frame_host) { - granted_devices_[render_frame_host->GetFrameTreeNodeId()][permission_type] - [origin] - .push_back( - std::make_unique(device->Clone())); -} - -void WebContents::RevokeDevicePermission( - const url::Origin& origin, - const base::Value* device, - blink::PermissionType permission_type, - content::RenderFrameHost* render_frame_host) { - const auto& devices_for_frame_host_it = - granted_devices_.find(render_frame_host->GetFrameTreeNodeId()); - if (devices_for_frame_host_it == granted_devices_.end()) - return; - - const auto& current_devices_it = - devices_for_frame_host_it->second.find(permission_type); - if (current_devices_it == devices_for_frame_host_it->second.end()) - return; - - const auto& origin_devices_it = current_devices_it->second.find(origin); - if (origin_devices_it == current_devices_it->second.end()) - return; - - for (auto it = origin_devices_it->second.begin(); - it != origin_devices_it->second.end();) { - if (DoesDeviceMatch(device, it->get(), permission_type)) { - it = origin_devices_it->second.erase(it); - } else { - ++it; - } - } -} - -bool WebContents::DoesDeviceMatch(const base::Value* device, - const base::Value* device_to_compare, - blink::PermissionType permission_type) { - if (permission_type == - static_cast( - WebContentsPermissionHelper::PermissionType::HID)) { - if (device->GetDict().FindInt(kHidVendorIdKey) != - device_to_compare->GetDict().FindInt(kHidVendorIdKey) || - device->GetDict().FindInt(kHidProductIdKey) != - device_to_compare->GetDict().FindInt(kHidProductIdKey)) { - return false; - } - - const auto* serial_number = - device_to_compare->GetDict().FindString(kHidSerialNumberKey); - const auto* device_serial_number = - device->GetDict().FindString(kHidSerialNumberKey); - - if (serial_number && device_serial_number && - *device_serial_number == *serial_number) - return true; - } else if (permission_type == - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL)) { -#if BUILDFLAG(IS_WIN) - const auto* instance_id = - device->GetDict().FindString(kDeviceInstanceIdKey); - const auto* port_instance_id = - device_to_compare->GetDict().FindString(kDeviceInstanceIdKey); - if (instance_id && port_instance_id && *instance_id == *port_instance_id) - return true; -#else - const auto* serial_number = device->GetDict().FindString(kSerialNumberKey); - const auto* port_serial_number = - device_to_compare->GetDict().FindString(kSerialNumberKey); - if (device->GetDict().FindInt(kVendorIdKey) != - device_to_compare->GetDict().FindInt(kVendorIdKey) || - device->GetDict().FindInt(kProductIdKey) != - device_to_compare->GetDict().FindInt(kProductIdKey) || - (serial_number && port_serial_number && - *port_serial_number != *serial_number)) { - return false; - } - -#if BUILDFLAG(IS_MAC) - const auto* usb_driver_key = device->GetDict().FindString(kUsbDriverKey); - const auto* port_usb_driver_key = - device_to_compare->GetDict().FindString(kUsbDriverKey); - if (usb_driver_key && port_usb_driver_key && - *usb_driver_key != *port_usb_driver_key) { - return false; - } -#endif // BUILDFLAG(IS_MAC) - return true; -#endif // BUILDFLAG(IS_WIN) - } - return false; -} - -bool WebContents::CheckDevicePermission( - const url::Origin& origin, - const base::Value* device, - blink::PermissionType permission_type, - content::RenderFrameHost* render_frame_host) { - const auto& devices_for_frame_host_it = - granted_devices_.find(render_frame_host->GetFrameTreeNodeId()); - if (devices_for_frame_host_it == granted_devices_.end()) - return false; - - const auto& current_devices_it = - devices_for_frame_host_it->second.find(permission_type); - if (current_devices_it == devices_for_frame_host_it->second.end()) - return false; - - const auto& origin_devices_it = current_devices_it->second.find(origin); - if (origin_devices_it == current_devices_it->second.end()) - return false; - - for (const auto& device_to_compare : origin_devices_it->second) { - if (DoesDeviceMatch(device, device_to_compare.get(), permission_type)) - return true; - } - - return false; -} - void WebContents::UpdatePreferredSize(content::WebContents* web_contents, const gfx::Size& pref_size) { Emit("preferred-size-changed", pref_size); @@ -3784,7 +3650,8 @@ void WebContents::DevToolsRequestFileSystems() { base::ListValue file_system_value; for (const auto& file_system : file_systems) - file_system_value.Append(CreateFileSystemValue(file_system)); + file_system_value.Append( + base::Value::FromUniquePtrValue(CreateFileSystemValue(file_system))); inspectable_web_contents_->CallClientFunction( "DevToolsAPI.fileSystemsLoaded", &file_system_value, nullptr, nullptr); } diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index c85708f45cd16..1090adca3da25 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -42,7 +42,6 @@ #include "shell/common/gin_helper/constructible.h" #include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/pinnable.h" -#include "third_party/blink/public/common/permissions/permission_utils.h" #include "ui/base/models/image_model.h" #include "ui/gfx/image/image.h" @@ -95,11 +94,6 @@ class OffScreenWebContentsView; namespace api { -using DevicePermissionMap = std::map< - int, - std::map>>>>; - // Wrapper around the content::WebContents. class WebContents : public ExclusiveAccessContext, public gin::Wrappable, @@ -438,28 +432,6 @@ class WebContents : public ExclusiveAccessContext, void SetImageAnimationPolicy(const std::string& new_policy); - // Grants |origin| access to |device|. - // To be used in place of ObjectPermissionContextBase::GrantObjectPermission. - void GrantDevicePermission(const url::Origin& origin, - const base::Value* device, - blink::PermissionType permissionType, - content::RenderFrameHost* render_frame_host); - - // Revokes |origin| access to |device|. - // To be used in place of ObjectPermissionContextBase::RevokeObjectPermission. - void RevokeDevicePermission(const url::Origin& origin, - const base::Value* device, - blink::PermissionType permission_type, - content::RenderFrameHost* render_frame_host); - - // Returns the list of devices that |origin| has been granted permission to - // access. To be used in place of - // ObjectPermissionContextBase::GetGrantedObjects. - bool CheckDevicePermission(const url::Origin& origin, - const base::Value* device, - blink::PermissionType permissionType, - content::RenderFrameHost* render_frame_host); - // disable copy WebContents(const WebContents&) = delete; WebContents& operator=(const WebContents&) = delete; @@ -755,10 +727,6 @@ class WebContents : public ExclusiveAccessContext, // Update the html fullscreen flag in both browser and renderer. void UpdateHtmlApiFullscreen(bool fullscreen); - bool DoesDeviceMatch(const base::Value* device, - const base::Value* device_to_compare, - blink::PermissionType permission_type); - v8::Global session_; v8::Global devtools_web_contents_; v8::Global debugger_; @@ -843,9 +811,6 @@ class WebContents : public ExclusiveAccessContext, // Stores the frame thats currently in fullscreen, nullptr if there is none. content::RenderFrameHost* fullscreen_frame_ = nullptr; - // In-memory cache that holds objects that have been granted permissions. - DevicePermissionMap granted_devices_; - base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index 5bea00749976d..42bae87cf1c58 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -206,7 +206,7 @@ void WebFrameMain::MaybeSetupMojoConnection() { // Wait for RenderFrame to be created in renderer before accessing remote. if (pending_receiver_ && render_frame_ && - render_frame_->IsRenderFrameCreated()) { + render_frame_->IsRenderFrameLive()) { render_frame_->GetRemoteInterfaces()->GetInterface( std::move(pending_receiver_)); } diff --git a/shell/browser/api/gpu_info_enumerator.cc b/shell/browser/api/gpu_info_enumerator.cc index 75b330a3264fc..23b2ccd345a4f 100644 --- a/shell/browser/api/gpu_info_enumerator.cc +++ b/shell/browser/api/gpu_info_enumerator.cc @@ -49,13 +49,13 @@ void GPUInfoEnumerator::EndGPUDevice() { auto& top_value = value_stack.top(); // GPUDevice can be more than one. So create a list of all. // The first one is the active GPU device. - if (top_value->HasKey(kGPUDeviceKey)) { + if (top_value->FindKey(kGPUDeviceKey)) { base::ListValue* list; top_value->GetList(kGPUDeviceKey, &list); - list->Append(std::move(current)); + list->Append(base::Value::FromUniquePtrValue(std::move(current))); } else { - auto gpus = std::make_unique(); - gpus->Append(std::move(current)); + std::unique_ptr gpus(new base::ListValue()); + gpus->Append(base::Value::FromUniquePtrValue(std::move(current))); top_value->SetList(kGPUDeviceKey, std::move(gpus)); } current = std::move(top_value); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index fcc90988bffb5..70fc5c6d84775 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -138,4 +138,11 @@ ElectronBluetoothDelegate::GetPermittedDevices( return permitted_devices; } +void ElectronBluetoothDelegate::ShowDevicePairConfirmPrompt( + RenderFrameHost* frame, + const std::u16string& device_identifier, + PairConfirmCallback callback) { + NOTIMPLEMENTED(); +} + } // namespace electron diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 9e9888ab42210..39918dc2bfbc3 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -55,6 +55,9 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { void ShowDeviceCredentialsPrompt(content::RenderFrameHost* frame, const std::u16string& device_identifier, CredentialsCallback callback) override; + void ShowDevicePairConfirmPrompt(content::RenderFrameHost* frame, + const std::u16string& device_identifier, + PairConfirmCallback callback) override; blink::WebBluetoothDeviceId GetWebBluetoothDeviceId( content::RenderFrameHost* frame, const std::string& device_address) override; diff --git a/shell/browser/electron_autofill_driver.cc b/shell/browser/electron_autofill_driver.cc index 45b6aadd53ea7..30c63592e1edb 100644 --- a/shell/browser/electron_autofill_driver.cc +++ b/shell/browser/electron_autofill_driver.cc @@ -46,12 +46,13 @@ void AutofillDriver::ShowAutofillPopup( gfx::RectF popup_bounds(bounds); content::RenderFrameHost* embedder_frame_host = nullptr; if (embedder) { - auto* embedder_view = embedder->web_contents()->GetMainFrame()->GetView(); - auto* view = web_contents->web_contents()->GetMainFrame()->GetView(); + auto* embedder_view = + embedder->web_contents()->GetPrimaryMainFrame()->GetView(); + auto* view = web_contents->web_contents()->GetPrimaryMainFrame()->GetView(); auto offset = view->GetViewBounds().origin() - embedder_view->GetViewBounds().origin(); popup_bounds.Offset(offset); - embedder_frame_host = embedder->web_contents()->GetMainFrame(); + embedder_frame_host = embedder->web_contents()->GetPrimaryMainFrame(); } autofill_popup_->CreateView(render_frame_host_, embedder_frame_host, osr, diff --git a/shell/browser/electron_autofill_driver_factory.cc b/shell/browser/electron_autofill_driver_factory.cc index e49683744baa6..254836b82408d 100644 --- a/shell/browser/electron_autofill_driver_factory.cc +++ b/shell/browser/electron_autofill_driver_factory.cc @@ -80,7 +80,7 @@ AutofillDriver* AutofillDriverFactory::DriverForFrame( // 3. `SomeOtherWebContentsObserver::RenderFrameDeleted(render_frame_host)` // calls `DriverForFrame(render_frame_host)`. // 5. `render_frame_host->~RenderFrameHostImpl()` finishes. - if (render_frame_host->IsRenderFrameCreated()) { + if (render_frame_host->IsRenderFrameLive()) { driver = std::make_unique(render_frame_host); DCHECK_EQ(driver_map_.find(render_frame_host)->second.get(), driver.get()); diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 91c597f205309..d3b5f7902fdba 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1560,7 +1560,7 @@ void ElectronBrowserClient:: if (contents) { auto* prefs = WebContentsPreferences::From(contents); if (render_frame_host.GetFrameTreeNodeId() == - contents->GetMainFrame()->GetFrameTreeNodeId() || + contents->GetPrimaryMainFrame()->GetFrameTreeNodeId() || (prefs && prefs->AllowsNodeIntegrationInSubFrames())) { associated_registry.AddInterface(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 2b7aa145f796a..e2408f01e91d9 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -46,6 +46,7 @@ #include "shell/browser/protocol_registry.h" #include "shell/browser/special_storage_policy.h" #include "shell/browser/ui/inspectable_web_contents.h" +#include "shell/browser/web_contents_permission_helper.h" #include "shell/browser/web_view_manager.h" #include "shell/browser/zoom_level_delegate.h" #include "shell/common/application_info.h" @@ -416,6 +417,115 @@ void ElectronBrowserContext::SetSSLConfigClient( ssl_config_client_ = std::move(client); } +void ElectronBrowserContext::GrantDevicePermission( + const url::Origin& origin, + const base::Value& device, + blink::PermissionType permission_type) { + granted_devices_[permission_type][origin].push_back( + std::make_unique(device.Clone())); +} + +void ElectronBrowserContext::RevokeDevicePermission( + const url::Origin& origin, + const base::Value& device, + blink::PermissionType permission_type) { + const auto& current_devices_it = granted_devices_.find(permission_type); + if (current_devices_it == granted_devices_.end()) + return; + + const auto& origin_devices_it = current_devices_it->second.find(origin); + if (origin_devices_it == current_devices_it->second.end()) + return; + + for (auto it = origin_devices_it->second.begin(); + it != origin_devices_it->second.end();) { + if (DoesDeviceMatch(device, it->get(), permission_type)) { + it = origin_devices_it->second.erase(it); + } else { + ++it; + } + } +} + +bool ElectronBrowserContext::DoesDeviceMatch( + const base::Value& device, + const base::Value* device_to_compare, + blink::PermissionType permission_type) { + if (permission_type == + static_cast( + WebContentsPermissionHelper::PermissionType::HID)) { + if (device.GetDict().FindInt(kHidVendorIdKey) != + device_to_compare->GetDict().FindInt(kHidVendorIdKey) || + device.GetDict().FindInt(kHidProductIdKey) != + device_to_compare->GetDict().FindInt(kHidProductIdKey)) { + return false; + } + + const auto* serial_number = + device_to_compare->GetDict().FindString(kHidSerialNumberKey); + const auto* device_serial_number = + device.GetDict().FindString(kHidSerialNumberKey); + + if (serial_number && device_serial_number && + *device_serial_number == *serial_number) + return true; + } else if (permission_type == + static_cast( + WebContentsPermissionHelper::PermissionType::SERIAL)) { +#if BUILDFLAG(IS_WIN) + const auto* instance_id = device.GetDict().FindString(kDeviceInstanceIdKey); + const auto* port_instance_id = + device_to_compare->GetDict().FindString(kDeviceInstanceIdKey); + if (instance_id && port_instance_id && *instance_id == *port_instance_id) + return true; +#else + const auto* serial_number = device.GetDict().FindString(kSerialNumberKey); + const auto* port_serial_number = + device_to_compare->GetDict().FindString(kSerialNumberKey); + if (device.GetDict().FindInt(kVendorIdKey) != + device_to_compare->GetDict().FindInt(kVendorIdKey) || + device.GetDict().FindInt(kProductIdKey) != + device_to_compare->GetDict().FindInt(kProductIdKey) || + (serial_number && port_serial_number && + *port_serial_number != *serial_number)) { + return false; + } + +#if BUILDFLAG(IS_MAC) + const auto* usb_driver_key = device.GetDict().FindString(kUsbDriverKey); + const auto* port_usb_driver_key = + device_to_compare->GetDict().FindString(kUsbDriverKey); + if (usb_driver_key && port_usb_driver_key && + *usb_driver_key != *port_usb_driver_key) { + return false; + } +#endif // BUILDFLAG(IS_MAC) + return true; +#endif // BUILDFLAG(IS_WIN) + } + return false; +} + +bool ElectronBrowserContext::CheckDevicePermission( + const url::Origin& origin, + const base::Value& device, + blink::PermissionType permission_type) { + const auto& current_devices_it = granted_devices_.find(permission_type); + if (current_devices_it == granted_devices_.end()) + return false; + + const auto& origin_devices_it = current_devices_it->second.find(origin); + if (origin_devices_it == current_devices_it->second.end()) + return false; + + for (const auto& device_to_compare : origin_devices_it->second) { + if (DoesDeviceMatch(device, device_to_compare.get(), permission_type)) + return true; + } + + return false; +} + // static ElectronBrowserContext* ElectronBrowserContext::From( const std::string& partition, diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index c585859ce038f..844df7f65e65b 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "base/memory/weak_ptr.h" #include "chrome/browser/predictors/preconnect_manager.h" @@ -18,6 +19,7 @@ #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" #include "shell/browser/media/media_device_id_salt.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" class PrefService; class ValueMapPrefStore; @@ -38,6 +40,10 @@ class ElectronExtensionSystem; namespace electron { +using DevicePermissionMap = + std::map>>>; + class ElectronBrowserContext; class ElectronDownloadManagerDelegate; class ElectronPermissionManager; @@ -149,6 +155,25 @@ class ElectronBrowserContext : public content::BrowserContext { ~ElectronBrowserContext() override; + // Grants |origin| access to |device|. + // To be used in place of ObjectPermissionContextBase::GrantObjectPermission. + void GrantDevicePermission(const url::Origin& origin, + const base::Value& device, + blink::PermissionType permissionType); + + // Revokes |origin| access to |device|. + // To be used in place of ObjectPermissionContextBase::RevokeObjectPermission. + void RevokeDevicePermission(const url::Origin& origin, + const base::Value& device, + blink::PermissionType permission_type); + + // Returns the list of devices that |origin| has been granted permission to + // access. To be used in place of + // ObjectPermissionContextBase::GetGrantedObjects. + bool CheckDevicePermission(const url::Origin& origin, + const base::Value& device, + blink::PermissionType permissionType); + private: ElectronBrowserContext(const std::string& partition, bool in_memory, @@ -157,6 +182,10 @@ class ElectronBrowserContext : public content::BrowserContext { // Initialize pref registry. void InitPrefs(); + bool DoesDeviceMatch(const base::Value& device, + const base::Value* device_to_compare, + blink::PermissionType permission_type); + ValueMapPrefStore* in_memory_pref_store_ = nullptr; std::unique_ptr resource_context_; @@ -188,6 +217,9 @@ class ElectronBrowserContext : public content::BrowserContext { network::mojom::SSLConfigPtr ssl_config_; mojo::Remote ssl_config_client_; + // In-memory cache that holds objects that have been granted permissions. + DevicePermissionMap granted_devices_; + base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index b4747f06824a6..8ffd3e4a3089f 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -219,6 +219,9 @@ int ElectronBrowserMainParts::PreEarlyInitialization() { #if BUILDFLAG(IS_LINUX) ui::OzonePlatform::PreEarlyInitialization(); #endif +#if BUILDFLAG(IS_MAC) + screen_ = std::make_unique(); +#endif return GetExitCode(); } @@ -275,8 +278,9 @@ void ElectronBrowserMainParts::PostEarlyInitialization() { int ElectronBrowserMainParts::PreCreateThreads() { #if defined(USE_AURA) - screen_ = views::CreateDesktopScreen(); - display::Screen::SetScreenInstance(screen_.get()); + if (!display::Screen::GetScreen()) { + screen_ = views::CreateDesktopScreen(); + } #endif if (!views::LayoutProvider::Get()) diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index d0f813544f8d2..95ced64ed7c9e 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -16,6 +16,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "services/device/public/mojom/geolocation_control.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/display/screen.h" #include "ui/views/layout/layout_provider.h" class BrowserProcessImpl; @@ -169,6 +170,7 @@ class ElectronBrowserMainParts : public content::BrowserMainParts { #if BUILDFLAG(IS_MAC) std::unique_ptr geolocation_manager_; + std::unique_ptr screen_; #endif static ElectronBrowserMainParts* self_; diff --git a/shell/browser/electron_pdf_web_contents_helper_client.cc b/shell/browser/electron_pdf_web_contents_helper_client.cc index 0ddf94fe49cb5..ad0636bec40ac 100644 --- a/shell/browser/electron_pdf_web_contents_helper_client.cc +++ b/shell/browser/electron_pdf_web_contents_helper_client.cc @@ -14,7 +14,7 @@ ElectronPDFWebContentsHelperClient::~ElectronPDFWebContentsHelperClient() = content::RenderFrameHost* ElectronPDFWebContentsHelperClient::FindPdfFrame( content::WebContents* contents) { - content::RenderFrameHost* main_frame = contents->GetMainFrame(); + content::RenderFrameHost* main_frame = contents->GetPrimaryMainFrame(); content::RenderFrameHost* pdf_frame = pdf_frame_util::FindPdfChildFrame(main_frame); return pdf_frame ? pdf_frame : main_frame; diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index f41683704d651..248d5c71d1008 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -307,25 +307,17 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( bool ElectronPermissionManager::CheckDevicePermission( blink::PermissionType permission, const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - api::WebContents* api_web_contents = api::WebContents::From(web_contents); + const base::Value& device, + ElectronBrowserContext* browser_context) const { if (device_permission_handler_.is_null()) { - if (api_web_contents) { - return api_web_contents->CheckDevicePermission(origin, device, permission, - render_frame_host); - } - return false; + return browser_context->CheckDevicePermission(origin, device, permission); } else { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); v8::Local details = gin::DataObjectBuilder(isolate) .Set("deviceType", permission) .Set("origin", origin.Serialize()) - .Set("device", device->Clone()) - .Set("frame", render_frame_host) + .Set("device", device.Clone()) .Build(); return device_permission_handler_.Run(details); } @@ -334,29 +326,19 @@ bool ElectronPermissionManager::CheckDevicePermission( void ElectronPermissionManager::GrantDevicePermission( blink::PermissionType permission, const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { + const base::Value& device, + ElectronBrowserContext* browser_context) const { if (device_permission_handler_.is_null()) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - api::WebContents* api_web_contents = api::WebContents::From(web_contents); - if (api_web_contents) - api_web_contents->GrantDevicePermission(origin, device, permission, - render_frame_host); + browser_context->GrantDevicePermission(origin, device, permission); } } void ElectronPermissionManager::RevokeDevicePermission( blink::PermissionType permission, const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - api::WebContents* api_web_contents = api::WebContents::From(web_contents); - if (api_web_contents) - api_web_contents->RevokeDevicePermission(origin, device, permission, - render_frame_host); + const base::Value& device, + ElectronBrowserContext* browser_context) const { + browser_context->RevokeDevicePermission(origin, device, permission); } blink::mojom::PermissionStatus diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index e2cd6655b8819..aacbd18c650fa 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -12,6 +12,7 @@ #include "base/containers/id_map.h" #include "content/public/browser/permission_controller_delegate.h" #include "gin/dictionary.h" +#include "shell/browser/electron_browser_context.h" namespace base { class DictionaryValue; @@ -91,19 +92,18 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { bool CheckDevicePermission(blink::PermissionType permission, const url::Origin& origin, - const base::Value* object, - content::RenderFrameHost* render_frame_host) const; + const base::Value& object, + ElectronBrowserContext* browser_context) const; void GrantDevicePermission(blink::PermissionType permission, const url::Origin& origin, - const base::Value* object, - content::RenderFrameHost* render_frame_host) const; + const base::Value& object, + ElectronBrowserContext* browser_context) const; - void RevokeDevicePermission( - blink::PermissionType permission, - const url::Origin& origin, - const base::Value* object, - content::RenderFrameHost* render_frame_host) const; + void RevokeDevicePermission(blink::PermissionType permission, + const url::Origin& origin, + const base::Value& object, + ElectronBrowserContext* browser_context) const; protected: void OnPermissionResponse(int request_id, diff --git a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc index f30b1bd24a62e..adab99632f5c8 100644 --- a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc +++ b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc @@ -255,18 +255,18 @@ CryptotokenPrivateCanAppIdGetAttestationFunction::Run() { return RespondNow(Error("no PermissionRequestManager")); // } - // // The created AttestationPermissionRequest deletes itself once complete. - // permission_request_manager->AddRequest( - // web_contents->GetMainFrame(), // Extension API targets a particular - // tab, - // // so select the current main frame to - // // handle the request. - // NewAttestationPermissionRequest( - // origin, - // base::BindOnce( - // &CryptotokenPrivateCanAppIdGetAttestationFunction::Complete, - // this))); - // return RespondLater(); +#if 0 // TODO(MarshallOfSound): why is this commented out? + // The created AttestationPermissionRequest deletes itself once complete. + permission_request_manager->AddRequest( + web_contents->GetPrimaryMainFrame(), + tab, + NewAttestationPermissionRequest( + origin, + base::BindOnce( + &CryptotokenPrivateCanAppIdGetAttestationFunction::Complete, + this))); + return RespondLater(); +#endif #endif } diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index 416254206dfa4..a2f509ea655c6 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/shell/browser/extensions/electron_messaging_delegate.cc @@ -15,6 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" +#include "electron/shell/common/extensions/api/tabs.h" #include "extensions/browser/api/messaging/extension_message_port.h" #include "extensions/browser/api/messaging/native_message_host.h" #include "extensions/browser/extension_api_frame_id_map.h" @@ -44,17 +45,13 @@ ElectronMessagingDelegate::MaybeGetTabInfo(content::WebContents* web_contents) { if (web_contents) { auto* api_contents = electron::api::WebContents::From(web_contents); if (api_contents) { - auto tab = std::make_unique(); - tab->SetWithoutPathExpansion( - "id", std::make_unique(api_contents->ID())); - tab->SetWithoutPathExpansion( - "url", std::make_unique(api_contents->GetURL().spec())); - tab->SetWithoutPathExpansion( - "title", std::make_unique(api_contents->GetTitle())); - tab->SetWithoutPathExpansion( - "audible", - std::make_unique(api_contents->IsCurrentlyAudible())); - return tab; + api::tabs::Tab tab; + tab.id = std::make_unique(api_contents->ID()); + tab.url = std::make_unique(api_contents->GetURL().spec()); + tab.title = std::make_unique( + base::UTF16ToUTF8(api_contents->GetTitle())); + tab.audible = std::make_unique(api_contents->IsCurrentlyAudible()); + return tab.ToValue(); } } return nullptr; @@ -84,7 +81,7 @@ std::unique_ptr ElectronMessagingDelegate::CreateReceiverForTab( content::RenderFrameHost* receiver_rfh = nullptr; if (include_child_frames) { // The target is the active outermost main frame of the WebContents. - receiver_rfh = receiver_contents->GetMainFrame(); + receiver_rfh = receiver_contents->GetPrimaryMainFrame(); } else if (!receiver_document_id.empty()) { ExtensionApiFrameIdMap::DocumentId document_id = ExtensionApiFrameIdMap::DocumentIdFromString(receiver_document_id); diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 75298a5870046..13b36dd75bb12 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -10,17 +10,17 @@ #include "base/command_line.h" #include "content/public/browser/web_contents.h" #include "services/device/public/cpp/hid/hid_switches.h" +#include "shell/browser/electron_permission_manager.h" #include "shell/browser/hid/hid_chooser_context.h" #include "shell/browser/hid/hid_chooser_context_factory.h" #include "shell/browser/hid/hid_chooser_controller.h" #include "shell/browser/web_contents_permission_helper.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" namespace { electron::HidChooserContext* GetChooserContext( - content::RenderFrameHost* frame) { - auto* web_contents = content::WebContents::FromRenderFrameHost(frame); - auto* browser_context = web_contents->GetBrowserContext(); + content::BrowserContext* browser_context) { return electron::HidChooserContextFactory::GetForBrowserContext( browser_context); } @@ -38,8 +38,9 @@ std::unique_ptr ElectronHidDelegate::RunChooser( std::vector filters, std::vector exclusion_filters, content::HidChooser::Callback callback) { - electron::HidChooserContext* chooser_context = - GetChooserContext(render_frame_host); + DCHECK(render_frame_host); + auto* chooser_context = + GetChooserContext(render_frame_host->GetBrowserContext()); if (!device_observation_.IsObserving()) device_observation_.Observe(chooser_context); @@ -58,65 +59,61 @@ std::unique_ptr ElectronHidDelegate::RunChooser( } bool ElectronHidDelegate::CanRequestDevicePermission( - content::RenderFrameHost* render_frame_host) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - return permission_helper->CheckHIDAccessPermission( - web_contents->GetMainFrame()->GetLastCommittedOrigin()); + content::BrowserContext* browser_context, + const url::Origin& origin) { + base::DictionaryValue details; + details.SetString("securityOrigin", origin.GetURL().spec()); + auto* permission_manager = static_cast( + browser_context->GetPermissionControllerDelegate()); + return permission_manager->CheckPermissionWithDetails( + static_cast( + WebContentsPermissionHelper::PermissionType::HID), + nullptr, origin.GetURL(), &details); } bool ElectronHidDelegate::HasDevicePermission( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, + const url::Origin& origin, const device::mojom::HidDeviceInfo& device) { - auto* chooser_context = GetChooserContext(render_frame_host); - const auto& origin = - render_frame_host->GetMainFrame()->GetLastCommittedOrigin(); - return chooser_context->HasDevicePermission(origin, device, - render_frame_host); + return GetChooserContext(browser_context) + ->HasDevicePermission(origin, device); } void ElectronHidDelegate::RevokeDevicePermission( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, + const url::Origin& origin, const device::mojom::HidDeviceInfo& device) { - auto* chooser_context = GetChooserContext(render_frame_host); - const auto& origin = - render_frame_host->GetMainFrame()->GetLastCommittedOrigin(); - return chooser_context->RevokeDevicePermission(origin, device, - render_frame_host); + return GetChooserContext(browser_context) + ->RevokeDevicePermission(origin, device); } device::mojom::HidManager* ElectronHidDelegate::GetHidManager( - content::RenderFrameHost* render_frame_host) { - auto* chooser_context = GetChooserContext(render_frame_host); - return chooser_context->GetHidManager(); + content::BrowserContext* browser_context) { + return GetChooserContext(browser_context)->GetHidManager(); } -void ElectronHidDelegate::AddObserver( - content::RenderFrameHost* render_frame_host, - Observer* observer) { +void ElectronHidDelegate::AddObserver(content::BrowserContext* browser_context, + Observer* observer) { observer_list_.AddObserver(observer); - auto* chooser_context = GetChooserContext(render_frame_host); + auto* chooser_context = GetChooserContext(browser_context); if (!device_observation_.IsObserving()) device_observation_.Observe(chooser_context); } void ElectronHidDelegate::RemoveObserver( - content::RenderFrameHost* render_frame_host, content::HidDelegate::Observer* observer) { observer_list_.RemoveObserver(observer); } const device::mojom::HidDeviceInfo* ElectronHidDelegate::GetDeviceInfo( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, const std::string& guid) { - auto* chooser_context = GetChooserContext(render_frame_host); + auto* chooser_context = GetChooserContext(browser_context); return chooser_context->GetDeviceInfo(guid); } bool ElectronHidDelegate::IsFidoAllowedForOrigin( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, const url::Origin& origin) { return base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableHidBlocklist); diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index 0305828750035..2fc81abd3c172 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/shell/browser/hid/electron_hid_delegate.h @@ -33,23 +33,24 @@ class ElectronHidDelegate : public content::HidDelegate, std::vector filters, std::vector exclusion_filters, content::HidChooser::Callback callback) override; - bool CanRequestDevicePermission( - content::RenderFrameHost* render_frame_host) override; - bool HasDevicePermission(content::RenderFrameHost* render_frame_host, + bool CanRequestDevicePermission(content::BrowserContext* browser_context, + const url::Origin& origin) override; + bool HasDevicePermission(content::BrowserContext* browser_context, + const url::Origin& origin, const device::mojom::HidDeviceInfo& device) override; void RevokeDevicePermission( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, + const url::Origin& origin, const device::mojom::HidDeviceInfo& device) override; device::mojom::HidManager* GetHidManager( - content::RenderFrameHost* render_frame_host) override; - void AddObserver(content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context) override; + void AddObserver(content::BrowserContext* browser_context, content::HidDelegate::Observer* observer) override; - void RemoveObserver(content::RenderFrameHost* render_frame_host, - content::HidDelegate::Observer* observer) override; + void RemoveObserver(content::HidDelegate::Observer* observer) override; const device::mojom::HidDeviceInfo* GetDeviceInfo( - content::RenderFrameHost* render_frame_host, + content::BrowserContext* browser_context, const std::string& guid) override; - bool IsFidoAllowedForOrigin(content::RenderFrameHost* render_frame_host, + bool IsFidoAllowedForOrigin(content::BrowserContext* browser_context, const url::Origin& origin) override; // HidChooserContext::DeviceObserver: diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 84231d6eb5dbe..108ecb28f49fb 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -20,12 +20,15 @@ #include "services/device/public/cpp/hid/hid_blocklist.h" #include "services/device/public/cpp/hid/hid_switches.h" #include "shell/browser/api/electron_api_session.h" +#include "shell/browser/electron_permission_manager.h" #include "shell/browser/web_contents_permission_helper.h" #include "shell/common/gin_converters/content_converter.h" #include "shell/common/gin_converters/frame_converter.h" #include "shell/common/gin_converters/hid_device_info_converter.h" #include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_helper/dictionary.h" +#include "third_party/blink/public/common/permissions/permission_utils.h" + #include "ui/base/l10n/l10n_util.h" namespace electron { @@ -90,16 +93,16 @@ base::Value HidChooserContext::DeviceInfoToValue( void HidChooserContext::GrantDevicePermission( const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host) { + const device::mojom::HidDeviceInfo& device) { DCHECK(base::Contains(devices_, device.guid)); if (CanStorePersistentEntry(device)) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - permission_helper->GrantHIDDevicePermission( - origin, DeviceInfoToValue(device), render_frame_host); + auto* permission_manager = static_cast( + browser_context_->GetPermissionControllerDelegate()); + + permission_manager->GrantDevicePermission( + static_cast( + WebContentsPermissionHelper::PermissionType::HID), + origin, DeviceInfoToValue(device), browser_context_); } else { ephemeral_devices_[origin].insert(device.guid); } @@ -107,40 +110,34 @@ void HidChooserContext::GrantDevicePermission( void HidChooserContext::RevokeDevicePermission( const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host) { + const device::mojom::HidDeviceInfo& device) { DCHECK(base::Contains(devices_, device.guid)); if (CanStorePersistentEntry(device)) { - RevokePersistentDevicePermission(origin, device, render_frame_host); + RevokePersistentDevicePermission(origin, device); } else { RevokeEphemeralDevicePermission(origin, device); } - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - - api::Session* session = - api::Session::FromBrowserContext(web_contents->GetBrowserContext()); + api::Session* session = api::Session::FromBrowserContext(browser_context_); if (session) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); gin_helper::Dictionary details = gin_helper::Dictionary::CreateEmpty(isolate); details.Set("device", device.Clone()); - details.SetGetter("frame", render_frame_host); + details.Set("origin", origin.Serialize()); session->Emit("hid-device-revoked", details); } } void HidChooserContext::RevokePersistentDevicePermission( const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - permission_helper->RevokeHIDDevicePermission( - origin, DeviceInfoToValue(device), render_frame_host); + const device::mojom::HidDeviceInfo& device) { + auto* permission_manager = static_cast( + browser_context_->GetPermissionControllerDelegate()); + permission_manager->RevokeDevicePermission( + static_cast( + WebContentsPermissionHelper::PermissionType::HID), + origin, DeviceInfoToValue(device), browser_context_); RevokeEphemeralDevicePermission(origin, device); } @@ -167,11 +164,10 @@ void HidChooserContext::RevokeEphemeralDevicePermission( bool HidChooserContext::HasDevicePermission( const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host) { + const device::mojom::HidDeviceInfo& device) { if (!base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableHidBlocklist) && - device::HidBlocklist::IsDeviceExcluded(device)) + device.is_excluded_by_blocklist) return false; auto it = ephemeral_devices_.find(origin); @@ -180,12 +176,12 @@ bool HidChooserContext::HasDevicePermission( return true; } - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - return permission_helper->CheckHIDDevicePermission( - origin, DeviceInfoToValue(device), render_frame_host); + auto* permission_manager = static_cast( + browser_context_->GetPermissionControllerDelegate()); + return permission_manager->CheckDevicePermission( + static_cast( + WebContentsPermissionHelper::PermissionType::HID), + origin, DeviceInfoToValue(device), browser_context_); } void HidChooserContext::AddDeviceObserver(DeviceObserver* observer) { diff --git a/shell/browser/hid/hid_chooser_context.h b/shell/browser/hid/hid_chooser_context.h index 544984004e654..6e7bf2262f642 100644 --- a/shell/browser/hid/hid_chooser_context.h +++ b/shell/browser/hid/hid_chooser_context.h @@ -16,7 +16,6 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/unguessable_token.h" -#include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "mojo/public/cpp/bindings/associated_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" @@ -74,14 +73,11 @@ class HidChooserContext : public KeyedService, // HID-specific interface for granting and checking permissions. void GrantDevicePermission(const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host); + const device::mojom::HidDeviceInfo& device); void RevokeDevicePermission(const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host); + const device::mojom::HidDeviceInfo& device); bool HasDevicePermission(const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host); + const device::mojom::HidDeviceInfo& device); // For ScopedObserver. void AddDeviceObserver(DeviceObserver* observer); @@ -117,8 +113,7 @@ class HidChooserContext : public KeyedService, // HID-specific interface for revoking device permissions. void RevokePersistentDevicePermission( const url::Origin& origin, - const device::mojom::HidDeviceInfo& device, - content::RenderFrameHost* render_frame_host); + const device::mojom::HidDeviceInfo& device); void RevokeEphemeralDevicePermission( const url::Origin& origin, const device::mojom::HidDeviceInfo& device); diff --git a/shell/browser/hid/hid_chooser_controller.cc b/shell/browser/hid/hid_chooser_controller.cc index 69f660fa03016..8e4fbd5443e99 100644 --- a/shell/browser/hid/hid_chooser_controller.cc +++ b/shell/browser/hid/hid_chooser_controller.cc @@ -86,7 +86,7 @@ HidChooserController::HidChooserController( exclusion_filters_(std::move(exclusion_filters)), callback_(std::move(callback)), origin_(content::WebContents::FromRenderFrameHost(render_frame_host) - ->GetMainFrame() + ->GetPrimaryMainFrame() ->GetLastCommittedOrigin()), frame_tree_node_id_(render_frame_host->GetFrameTreeNodeId()), hid_delegate_(hid_delegate), @@ -196,8 +196,7 @@ void HidChooserController::OnDeviceChosen(gin::Arguments* args) { std::vector devices; devices.reserve(device_infos.size()); for (auto& device : device_infos) { - chooser_context_->GrantDevicePermission(origin_, *device, - web_contents()->GetMainFrame()); + chooser_context_->GrantDevicePermission(origin_, *device); devices.push_back(device->Clone()); } RunCallback(std::move(devices)); @@ -262,7 +261,7 @@ bool HidChooserController::DisplayDevice( if (!base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableHidBlocklist)) { // Do not pass the device to the chooser if it is excluded by the blocklist. - if (device::HidBlocklist::IsDeviceExcluded(device)) + if (device.is_excluded_by_blocklist) return false; // Do not pass the device to the chooser if it has a top-level collection diff --git a/shell/browser/media/media_stream_devices_controller.cc b/shell/browser/media/media_stream_devices_controller.cc index c74f0c9ccfb61..c7594bfdd0bc9 100644 --- a/shell/browser/media/media_stream_devices_controller.cc +++ b/shell/browser/media/media_stream_devices_controller.cc @@ -45,7 +45,7 @@ MediaStreamDevicesController::MediaStreamDevicesController( MediaStreamDevicesController::~MediaStreamDevicesController() { if (!callback_.is_null()) { std::move(callback_).Run( - blink::mojom::StreamDevices(), + blink::mojom::StreamDevicesSet(), blink::mojom::MediaStreamRequestResult::FAILED_DUE_TO_SHUTDOWN, std::unique_ptr()); } @@ -77,7 +77,13 @@ bool MediaStreamDevicesController::TakeAction() { void MediaStreamDevicesController::Accept() { // Get the default devices for the request. - blink::mojom::StreamDevices stream_devices; + blink::mojom::StreamDevicesSetPtr stream_devices_set = + blink::mojom::StreamDevicesSet::New(); + stream_devices_set->stream_devices.emplace_back( + blink::mojom::StreamDevices::New()); + blink::mojom::StreamDevices& stream_devices = + *stream_devices_set->stream_devices[0]; + if (microphone_requested_ || webcam_requested_) { switch (request_.request_type) { case blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY: { @@ -164,19 +170,23 @@ void MediaStreamDevicesController::Accept() { } } - std::move(callback_).Run(stream_devices, + std::move(callback_).Run(*stream_devices_set, blink::mojom::MediaStreamRequestResult::OK, std::unique_ptr()); } void MediaStreamDevicesController::Deny( blink::mojom::MediaStreamRequestResult result) { - std::move(callback_).Run(blink::mojom::StreamDevices(), result, + std::move(callback_).Run(blink::mojom::StreamDevicesSet(), result, std::unique_ptr()); } void MediaStreamDevicesController::HandleUserMediaRequest() { - blink::mojom::StreamDevices devices; + blink::mojom::StreamDevicesSetPtr stream_devices_set = + blink::mojom::StreamDevicesSet::New(); + stream_devices_set->stream_devices.emplace_back( + blink::mojom::StreamDevices::New()); + blink::mojom::StreamDevices& devices = *stream_devices_set->stream_devices[0]; if (request_.audio_type == blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE) { @@ -215,7 +225,7 @@ void MediaStreamDevicesController::HandleUserMediaRequest() { bool empty = !devices.audio_device.has_value() && !devices.video_device.has_value(); std::move(callback_).Run( - devices, + *stream_devices_set, empty ? blink::mojom::MediaStreamRequestResult::NO_HARDWARE : blink::mojom::MediaStreamRequestResult::OK, std::unique_ptr()); diff --git a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc index d0de9f6ae1b65..ba6deb94882af 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc +++ b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc @@ -13,6 +13,7 @@ #include "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h" #include +#include #include #include "base/check.h" @@ -238,7 +239,7 @@ void DesktopNotificationController::AnimateAll() { it = stable_partition(it, it2, is_alive); // purge the dead items - for_each(it, it2, [this](auto&& inst) { DestroyToast(&inst); }); + std::for_each(it, it2, [this](auto&& inst) { DestroyToast(&inst); }); if (it2 == instances_.end()) { instances_.erase(it, it2); diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index 57a169a5f39bb..6a6338aae37c6 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -117,7 +117,7 @@ void PrintPreviewMessageHandler::DidPrepareDocumentForPreview( auto* focused_frame = web_contents_->GetFocusedFrame(); auto* rfh = focused_frame && focused_frame->HasSelection() ? focused_frame - : web_contents_->GetMainFrame(); + : web_contents_->GetPrimaryMainFrame(); client->DoPrepareForDocumentToPdf( document_cookie, rfh, @@ -179,7 +179,7 @@ void PrintPreviewMessageHandler::DidPreviewPage( auto* focused_frame = web_contents_->GetFocusedFrame(); auto* rfh = focused_frame && focused_frame->HasSelection() ? focused_frame - : web_contents_->GetMainFrame(); + : web_contents_->GetPrimaryMainFrame(); // Use utility process to convert skia metafile to pdf. client->DoCompositePageToPdf( @@ -217,7 +217,7 @@ void PrintPreviewMessageHandler::PrintToPDF( auto* focused_frame = web_contents_->GetFocusedFrame(); auto* rfh = focused_frame && focused_frame->HasSelection() ? focused_frame - : web_contents_->GetMainFrame(); + : web_contents_->GetPrimaryMainFrame(); if (!print_render_frame_.is_bound()) { rfh->GetRemoteAssociatedInterfaces()->GetInterface(&print_render_frame_); diff --git a/shell/browser/serial/electron_serial_delegate.cc b/shell/browser/serial/electron_serial_delegate.cc index 42b01a77f3d1b..1c4d534ba38e0 100644 --- a/shell/browser/serial/electron_serial_delegate.cc +++ b/shell/browser/serial/electron_serial_delegate.cc @@ -49,7 +49,7 @@ bool ElectronSerialDelegate::CanRequestPortPermission( auto* permission_helper = WebContentsPermissionHelper::FromWebContents(web_contents); return permission_helper->CheckSerialAccessPermission( - web_contents->GetMainFrame()->GetLastCommittedOrigin()); + web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin()); } bool ElectronSerialDelegate::HasPortPermission( @@ -60,7 +60,8 @@ bool ElectronSerialDelegate::HasPortPermission( auto* chooser_context = SerialChooserContextFactory::GetForBrowserContext(browser_context); return chooser_context->HasPortPermission( - web_contents->GetMainFrame()->GetLastCommittedOrigin(), port, frame); + web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin(), port, + frame); } device::mojom::SerialPortManager* ElectronSerialDelegate::GetPortManager( diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index c4001b529946f..356547f81a55f 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -15,6 +15,7 @@ #include "content/public/browser/device_service.h" #include "content/public/browser/web_contents.h" #include "mojo/public/cpp/bindings/pending_remote.h" +#include "shell/browser/electron_permission_manager.h" #include "shell/browser/web_contents_permission_helper.h" namespace electron { @@ -86,7 +87,8 @@ base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) { return value; } -SerialChooserContext::SerialChooserContext() = default; +SerialChooserContext::SerialChooserContext(ElectronBrowserContext* context) + : browser_context_(context) {} SerialChooserContext::~SerialChooserContext() = default; @@ -99,26 +101,24 @@ void SerialChooserContext::GrantPortPermission( const url::Origin& origin, const device::mojom::SerialPortInfo& port, content::RenderFrameHost* render_frame_host) { - base::Value value = PortInfoToValue(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); + auto* permission_manager = static_cast( + browser_context_->GetPermissionControllerDelegate()); + return permission_manager->GrantDevicePermission( + static_cast( + WebContentsPermissionHelper::PermissionType::SERIAL), + origin, PortInfoToValue(port), browser_context_); } bool SerialChooserContext::HasPortPermission( const url::Origin& origin, const device::mojom::SerialPortInfo& port, content::RenderFrameHost* render_frame_host) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - base::Value value = PortInfoToValue(port); - return permission_helper->CheckSerialPortPermission(origin, std::move(value), - render_frame_host); + auto* permission_manager = static_cast( + browser_context_->GetPermissionControllerDelegate()); + return permission_manager->CheckDevicePermission( + static_cast( + WebContentsPermissionHelper::PermissionType::SERIAL), + origin, PortInfoToValue(port), browser_context_); } void SerialChooserContext::RevokePortPermissionWebInitiated( diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index 2296668874115..a0426c8b8f0c4 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/shell/browser/serial/serial_chooser_context.h @@ -48,7 +48,7 @@ class SerialChooserContext : public KeyedService, public: using PortObserver = content::SerialDelegate::Observer; - SerialChooserContext(); + explicit SerialChooserContext(ElectronBrowserContext* context); ~SerialChooserContext() override; // disable copy @@ -104,6 +104,8 @@ class SerialChooserContext : public KeyedService, mojo::Receiver client_receiver_{this}; base::ObserverList port_observer_list_; + ElectronBrowserContext* browser_context_; + base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/browser/serial/serial_chooser_context_factory.cc b/shell/browser/serial/serial_chooser_context_factory.cc index 914bdd49998a2..c3f18c856b7a0 100644 --- a/shell/browser/serial/serial_chooser_context_factory.cc +++ b/shell/browser/serial/serial_chooser_context_factory.cc @@ -19,7 +19,9 @@ SerialChooserContextFactory::~SerialChooserContextFactory() = default; KeyedService* SerialChooserContextFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { - return new SerialChooserContext(); + auto* browser_context = + static_cast(context); + return new SerialChooserContext(browser_context); } // static diff --git a/shell/browser/serial/serial_chooser_controller.cc b/shell/browser/serial/serial_chooser_controller.cc index 5adfc5e63c583..f14811e65d1bc 100644 --- a/shell/browser/serial/serial_chooser_controller.cc +++ b/shell/browser/serial/serial_chooser_controller.cc @@ -69,7 +69,7 @@ SerialChooserController::SerialChooserController( callback_(std::move(callback)), serial_delegate_(serial_delegate), render_frame_host_id_(render_frame_host->GetGlobalId()) { - origin_ = web_contents->GetMainFrame()->GetLastCommittedOrigin(); + origin_ = web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin(); chooser_context_ = SerialChooserContextFactory::GetForBrowserContext( web_contents->GetBrowserContext()) diff --git a/shell/browser/ui/certificate_trust_mac.mm b/shell/browser/ui/certificate_trust_mac.mm index ae234d6fccf75..de9006728cec0 100644 --- a/shell/browser/ui/certificate_trust_mac.mm +++ b/shell/browser/ui/certificate_trust_mac.mm @@ -13,8 +13,7 @@ #include "base/strings/sys_string_conversions.h" #include "net/cert/cert_database.h" -#include "net/cert/x509_util_ios_and_mac.h" -#include "net/cert/x509_util_mac.h" +#include "net/cert/x509_util_apple.h" #include "shell/browser/native_window.h" @interface TrustDelegate : NSObject { diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 2c2594ef3ff83..42eaf58a98c1e 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -400,7 +400,7 @@ content::WebContents* InspectableWebContents::GetDevToolsWebContents() const { void InspectableWebContents::InspectElement(int x, int y) { if (agent_host_) - agent_host_->InspectElement(web_contents_->GetMainFrame(), x, y); + agent_host_->InspectElement(web_contents_->GetPrimaryMainFrame(), x, y); } void InspectableWebContents::SetDelegate( @@ -532,7 +532,7 @@ void InspectableWebContents::CallClientFunction( } } javascript.append(");"); - GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript( + GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScript( base::UTF8ToUTF16(javascript), base::NullCallback()); } @@ -580,7 +580,7 @@ void InspectableWebContents::LoadCompleted() { } std::u16string javascript = base::UTF8ToUTF16( "UI.DockController.instance().setDockSide(\"" + dock_state_ + "\");"); - GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript( + GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScript( javascript, base::NullCallback()); } @@ -612,7 +612,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { // process. Grant the devtools process the ability to request URLs from the // extension. content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestOrigin( - web_contents_->GetMainFrame()->GetProcess()->GetID(), + web_contents_->GetPrimaryMainFrame()->GetProcess()->GetID(), url::Origin::Create(extension->url())); auto extension_info = std::make_unique(); @@ -622,7 +622,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { "exposeExperimentalAPIs", extension->permissions_data()->HasAPIPermission( extensions::mojom::APIPermissionID::kExperimental)); - results.Append(std::move(extension_info)); + results.Append(base::Value::FromUniquePtrValue(std::move(extension_info))); } CallClientFunction("DevToolsAPI.addExtensions", &results, NULL, NULL); @@ -948,7 +948,7 @@ void InspectableWebContents::DispatchProtocolMessage( base::EscapeJSONString(str_message, true, ¶m); std::u16string javascript = base::UTF8ToUTF16("DevToolsAPI.dispatchMessage(" + param + ");"); - GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript( + GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScript( javascript, base::NullCallback()); return; } @@ -1032,12 +1032,12 @@ void InspectableWebContents::ReadyToCommitNavigation( content::NavigationHandle* navigation_handle) { if (navigation_handle->IsInMainFrame()) { if (navigation_handle->GetRenderFrameHost() == - GetDevToolsWebContents()->GetMainFrame() && + GetDevToolsWebContents()->GetPrimaryMainFrame() && frontend_host_) { return; } frontend_host_ = content::DevToolsFrontendHost::Create( - web_contents()->GetMainFrame(), + web_contents()->GetPrimaryMainFrame(), base::BindRepeating( &InspectableWebContents::HandleMessageFromDevToolsFrontend, base::Unretained(this))); diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 15e0b2311e433..f276f59a3e714 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -196,7 +196,7 @@ std::string RecursiveDumpAXPlatformNodeAsString( } } str += "\n"; - for (int i = 0; i < node->GetDelegate()->GetChildCount(); i++) { + for (size_t i = 0; i < node->GetDelegate()->GetChildCount(); i++) { gfx::NativeViewAccessible child = node->GetDelegate()->ChildAtIndex(i); const ui::AXPlatformNode* child_node = ui::AXPlatformNode::FromNativeViewAccessible(child); @@ -286,14 +286,15 @@ void HandleAccessibilityRequestCallback( descriptor->SetBoolean(kWeb, is_web_enabled); descriptor->SetBoolean(kLabelImages, are_accessibility_image_labels_enabled); - rvh_list->Append(std::move(descriptor)); + rvh_list->Append(base::Value::FromUniquePtrValue(std::move(descriptor))); } data.Set(kPagesField, std::move(rvh_list)); auto window_list = std::make_unique(); for (auto* window : electron::WindowList::GetWindows()) { - window_list->Append(BuildTargetDescriptor(window)); + window_list->Append( + base::Value::FromUniquePtrValue(BuildTargetDescriptor(window))); } data.Set(kBrowsersField, std::move(window_list)); diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 093f6504d3e99..7e4548e9bb783 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -65,7 +65,7 @@ void WebContentsPermissionHelper::RequestPermission( base::OnceCallback callback, bool user_gesture, const base::DictionaryValue* details) { - auto* rfh = web_contents_->GetMainFrame(); + auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); @@ -77,7 +77,7 @@ void WebContentsPermissionHelper::RequestPermission( bool WebContentsPermissionHelper::CheckPermission( blink::PermissionType permission, const base::DictionaryValue* details) const { - auto* rfh = web_contents_->GetMainFrame(); + auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); @@ -85,39 +85,6 @@ bool WebContentsPermissionHelper::CheckPermission( details); } -bool WebContentsPermissionHelper::CheckDevicePermission( - blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { - auto* permission_manager = static_cast( - web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); - return permission_manager->CheckDevicePermission(permission, origin, device, - render_frame_host); -} - -void WebContentsPermissionHelper::GrantDevicePermission( - blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { - auto* permission_manager = static_cast( - web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); - permission_manager->GrantDevicePermission(permission, origin, device, - render_frame_host); -} - -void WebContentsPermissionHelper::RevokeDevicePermission( - blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const { - auto* permission_manager = static_cast( - web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); - permission_manager->RevokeDevicePermission(permission, origin, device, - render_frame_host); -} - void WebContentsPermissionHelper::RequestFullscreenPermission( base::OnceCallback callback) { RequestPermission( @@ -197,59 +164,6 @@ bool WebContentsPermissionHelper::CheckSerialAccessPermission( static_cast(PermissionType::SERIAL), &details); } -bool WebContentsPermissionHelper::CheckSerialPortPermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const { - return CheckDevicePermission( - static_cast(PermissionType::SERIAL), origin, - &device, render_frame_host); -} - -void WebContentsPermissionHelper::GrantSerialPortPermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const { - return GrantDevicePermission( - static_cast(PermissionType::SERIAL), origin, - &device, render_frame_host); -} - -bool WebContentsPermissionHelper::CheckHIDAccessPermission( - const url::Origin& embedding_origin) const { - base::DictionaryValue details; - details.SetString("securityOrigin", embedding_origin.GetURL().spec()); - return CheckPermission( - static_cast(PermissionType::HID), &details); -} - -bool WebContentsPermissionHelper::CheckHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const { - return CheckDevicePermission( - static_cast(PermissionType::HID), origin, &device, - render_frame_host); -} - -void WebContentsPermissionHelper::GrantHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const { - return GrantDevicePermission( - static_cast(PermissionType::HID), origin, &device, - render_frame_host); -} - -void WebContentsPermissionHelper::RevokeHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const { - return RevokeDevicePermission( - static_cast(PermissionType::HID), origin, &device, - render_frame_host); -} - WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper); } // namespace electron diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 847093d559950..cfd4fc4600dcc 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -51,27 +51,6 @@ class WebContentsPermissionHelper bool CheckMediaAccessPermission(const GURL& security_origin, blink::mojom::MediaStreamType type) const; bool CheckSerialAccessPermission(const url::Origin& embedding_origin) const; - bool CheckSerialPortPermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const; - void GrantSerialPortPermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const; - bool CheckHIDAccessPermission(const url::Origin& embedding_origin) const; - bool CheckHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const; - void GrantHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const; - void RevokeHIDDevicePermission( - const url::Origin& origin, - base::Value device, - content::RenderFrameHost* render_frame_host) const; private: explicit WebContentsPermissionHelper(content::WebContents* web_contents); @@ -85,22 +64,6 @@ class WebContentsPermissionHelper bool CheckPermission(blink::PermissionType permission, const base::DictionaryValue* details) const; - bool CheckDevicePermission(blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const; - - void GrantDevicePermission(blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const; - - void RevokeDevicePermission( - blink::PermissionType permission, - const url::Origin& origin, - const base::Value* device, - content::RenderFrameHost* render_frame_host) const; - // TODO(clavin): refactor to use the WebContents provided by the // WebContentsUserData base class instead of storing a duplicate ref content::WebContents* web_contents_; diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index 734f3e48c3361..d15e99c36d6d6 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -327,7 +327,8 @@ content::WebContents* WebContentsPreferences::GetWebContentsFromProcessID( int process_id) { for (WebContentsPreferences* preferences : Instances()) { content::WebContents* web_contents = preferences->web_contents_; - if (web_contents->GetMainFrame()->GetProcess()->GetID() == process_id) + if (web_contents->GetPrimaryMainFrame()->GetProcess()->GetID() == + process_id) return web_contents; } return nullptr; diff --git a/shell/browser/web_contents_zoom_controller.cc b/shell/browser/web_contents_zoom_controller.cc index fafc0c450aa94..da377b5c20499 100644 --- a/shell/browser/web_contents_zoom_controller.cc +++ b/shell/browser/web_contents_zoom_controller.cc @@ -46,7 +46,7 @@ void WebContentsZoomController::SetEmbedderZoomController( } void WebContentsZoomController::SetZoomLevel(double level) { - if (!web_contents()->GetMainFrame()->IsRenderFrameLive() || + if (!web_contents()->GetPrimaryMainFrame()->IsRenderFrameLive() || blink::PageZoomValuesEqual(GetZoomLevel(), level) || zoom_mode_ == ZoomMode::kDisabled) return; diff --git a/shell/browser/web_view_guest_delegate.cc b/shell/browser/web_view_guest_delegate.cc index 8f8b24082b83a..884c4be1ab871 100644 --- a/shell/browser/web_view_guest_delegate.cc +++ b/shell/browser/web_view_guest_delegate.cc @@ -32,7 +32,7 @@ void WebViewGuestDelegate::AttachToIframe( embedder_web_contents_ = embedder_web_contents; int embedder_process_id = - embedder_web_contents_->GetMainFrame()->GetProcess()->GetID(); + embedder_web_contents_->GetPrimaryMainFrame()->GetProcess()->GetID(); auto* embedder_frame = content::RenderFrameHost::FromID(embedder_process_id, embedder_frame_id); DCHECK_EQ(embedder_web_contents_, diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 7fffb3c08a0a1..2a2e598f93632 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -271,12 +271,6 @@ std::string NativeImage::ToDataURL(gin::Arguments* args) { image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap()); } -#if !defined(V8_SANDBOX) -void SkUnref(char* data, void* hint) { - reinterpret_cast(hint)->unref(); -} -#endif - v8::Local NativeImage::GetBitmap(gin::Arguments* args) { float scale_factor = GetScaleFactorFromOptions(args); @@ -285,18 +279,10 @@ v8::Local NativeImage::GetBitmap(gin::Arguments* args) { SkPixelRef* ref = bitmap.pixelRef(); if (!ref) return node::Buffer::New(args->isolate(), 0).ToLocalChecked(); -#if defined(V8_SANDBOX) return node::Buffer::Copy(args->isolate(), reinterpret_cast(ref->pixels()), bitmap.computeByteSize()) .ToLocalChecked(); -#else - ref->ref(); - return node::Buffer::New(args->isolate(), - reinterpret_cast(ref->pixels()), - bitmap.computeByteSize(), &SkUnref, ref) - .ToLocalChecked(); -#endif } v8::Local NativeImage::GetNativeHandle( diff --git a/shell/common/v8_value_converter.cc b/shell/common/v8_value_converter.cc index 9dc372414bc31..971b16b07e330 100644 --- a/shell/common/v8_value_converter.cc +++ b/shell/common/v8_value_converter.cc @@ -395,7 +395,7 @@ std::unique_ptr V8ValueConverter::FromV8Array( scope = std::make_unique(val->GetCreationContextChecked()); - auto result = std::make_unique(); + std::unique_ptr result(new base::ListValue()); // Only fields with integer keys are carried over to the ListValue. for (uint32_t i = 0; i < val->Length(); ++i) { @@ -410,18 +410,19 @@ std::unique_ptr V8ValueConverter::FromV8Array( if (!val->HasRealIndexedProperty(isolate->GetCurrentContext(), i) .FromMaybe(false)) { - result->Append(std::make_unique()); + result->Append(base::Value()); continue; } std::unique_ptr child = FromV8ValueImpl(state, child_v8, isolate); - if (child) - result->Append(std::move(child)); - else + if (child) { + result->Append(base::Value::FromUniquePtrValue(std::move(child))); + } else { // JSON.stringify puts null in places where values don't serialize, for // example undefined and functions. Emulate that behavior. - result->Append(std::make_unique()); + result->Append(base::Value()); + } } return std::move(result); } diff --git a/spec/package.json b/spec/package.json index 5102db8eab7c5..38ccc292934a1 100644 --- a/spec/package.json +++ b/spec/package.json @@ -11,7 +11,7 @@ "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "coffeescript": "^2.4.1", - "dbus-native": "github:jkleinsc/dbus-native#master", + "dbus-native": "github:nornagon/dbus-native#master", "dirty-chai": "^2.0.1", "graceful-fs": "^4.1.15", "is-valid-window": "0.0.5", @@ -32,6 +32,6 @@ "mocha-appveyor-reporter": "^0.4.2" }, "resolutions": { - "nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac" + "nan": "github:jkleinsc/nan#remove_accessor_signature" } } diff --git a/spec/yarn.lock b/spec/yarn.lock index bc0113391a384..3bb7e4d164a92 100644 --- a/spec/yarn.lock +++ b/spec/yarn.lock @@ -12,9 +12,10 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"abstract-socket@github:saghul/node-abstractsocket#35b1b1491fabc04899bde5be3428abf5cf9cd528": - version "2.1.0" - resolved "https://codeload.github.com/saghul/node-abstractsocket/tar.gz/35b1b1491fabc04899bde5be3428abf5cf9cd528" +abstract-socket@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/abstract-socket/-/abstract-socket-2.1.1.tgz#243a7e6e6ff65bb9eab16a22fa90699b91e528f7" + integrity sha512-YZJizsvS1aBua5Gd01woe4zuyYBGgSMeqDOB6/ChwdTI904KP6QGtJswXl4hcqWxbz86hQBe++HWV0hF1aGUtA== dependencies: bindings "^1.2.1" nan "^2.12.1" @@ -212,9 +213,9 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -"dbus-native@github:jkleinsc/dbus-native#master": +"dbus-native@github:nornagon/dbus-native#master": version "0.4.0" - resolved "https://codeload.github.com/jkleinsc/dbus-native/tar.gz/bb7cba24533fac70f81b92f8357211a84f6e0c1f" + resolved "https://codeload.github.com/nornagon/dbus-native/tar.gz/b90ed62d0b5cb93909173c3e0551d9bff0602a90" dependencies: "@nornagon/put" "0.0.8" event-stream "^4.0.0" @@ -224,7 +225,7 @@ dashdash@^1.12.0: safe-buffer "^5.1.1" xml2js "^0.4.17" optionalDependencies: - abstract-socket "github:saghul/node-abstractsocket#35b1b1491fabc04899bde5be3428abf5cf9cd528" + abstract-socket "^2.0.0" debug@2.6.9, debug@^2.2.0: version "2.6.9" @@ -685,9 +686,9 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -nan@2.x, nan@^2.12.1, nan@nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac: - version "2.15.0" - resolved "https://codeload.github.com/nodejs/nan/tar.gz/16fa32231e2ccd89d2804b3f765319128b20c4ac" +nan@2.x, nan@^2.12.1, "nan@github:jkleinsc/nan#remove_accessor_signature": + version "2.16.0" + resolved "https://codeload.github.com/jkleinsc/nan/tar.gz/6a2f95a6a2209d8aa7542fb18099fd808a802059" oauth-sign@~0.9.0: version "0.9.0" From 59d3c12cae423c533de70f595f2a4fd4ca19856e Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 28 Jun 2022 01:08:55 -0700 Subject: [PATCH 531/811] chore: remove spurious trailing namespace comments (#34732) --- shell/browser/api/electron_api_browser_window.cc | 2 +- shell/browser/api/electron_api_url_loader.cc | 2 +- shell/browser/electron_autofill_driver.cc | 2 +- .../extensions/api/runtime/electron_runtime_api_delegate.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 92178079b3506..67cf2f213c1e3 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -290,7 +290,7 @@ void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) { } else { web_contents()->Close(); } -} // namespace api +} void BrowserWindow::OnWindowBlur() { if (api_web_contents_) diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 86a7eb0cc3f92..9f13f4d4b7f46 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -66,7 +66,7 @@ struct Converter { return false; return true; } -}; // namespace gin +}; } // namespace gin diff --git a/shell/browser/electron_autofill_driver.cc b/shell/browser/electron_autofill_driver.cc index 30c63592e1edb..951422d16d4f1 100644 --- a/shell/browser/electron_autofill_driver.cc +++ b/shell/browser/electron_autofill_driver.cc @@ -18,7 +18,7 @@ namespace electron { AutofillDriver::AutofillDriver(content::RenderFrameHost* render_frame_host) : render_frame_host_(render_frame_host) { autofill_popup_ = std::make_unique(); -} // namespace electron +} AutofillDriver::~AutofillDriver() = default; diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc index 7cf0c0ad92de9..7bdb2ef92babc 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc @@ -87,7 +87,7 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { } return true; -} // namespace extensions +} bool ElectronRuntimeAPIDelegate::RestartDevice(std::string* error_message) { *error_message = "Restart is not supported in Electron"; From 47afaddaf50e34c1b98c2dfbc38cf15cde3f49d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:18:47 +0200 Subject: [PATCH 532/811] build(deps-dev): bump got from 6.7.1 to 11.8.5 (#34697) Bumps [got](https://github.com/sindresorhus/got) from 6.7.1 to 11.8.5. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v6.7.1...v11.8.5) --- updated-dependencies: - dependency-name: got 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 | 232 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 155 insertions(+), 79 deletions(-) diff --git a/package.json b/package.json index a455fad3649ac..c5b0e2effb00d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "express": "^4.16.4", "folder-hash": "^2.1.1", "fs-extra": "^9.0.1", - "got": "^6.3.0", + "got": "^11.8.5", "husky": "^8.0.1", "klaw": "^3.0.0", "lint": "^1.1.2", diff --git a/yarn.lock b/yarn.lock index 2cf78d42fb160..8919a86531ea0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -286,6 +286,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sindresorhus/is@^4.0.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -293,6 +298,13 @@ dependencies: defer-to-connect "^1.0.1" +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + "@types/anymatch@*": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -320,6 +332,16 @@ dependencies: "@types/node" "*" +"@types/cacheable-request@^6.0.1": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" + integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "*" + "@types/node" "*" + "@types/responselike" "*" + "@types/chai-as-promised@*": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.1.tgz#004c27a4ac640e9590e25d8b0980cb0a6609bfd8" @@ -423,6 +445,11 @@ resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.4.tgz#8c3496bd1b50cc04aeefd691140aa571d4dbfa34" integrity sha512-t2szdkwmg2JJyuCM20e8kR2X59WCE5Zkl4bzm1u1Oukjm79zpbiAv+QjnwLnuuV0WHEcX2NgUItu0pAMKuOPww== +"@types/http-cache-semantics@*": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== + "@types/is-empty@^1.0.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/is-empty/-/is-empty-1.2.0.tgz#16bc578060c9b0b6953339eea906c255a375bf86" @@ -433,6 +460,11 @@ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.2.tgz#4117a7a378593a218e9d6f0ef44ce6d5d9edf7fa" integrity sha512-KbeHS/Y4R+k+5sWXEYzAZKuB1yQlZtEghuhRxrVRLaqhtoG5+26JwQsa4HyS3AWX8v1Uwukma5HheduUDskasA== +"@types/json-buffer@~3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64" + integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== + "@types/json-schema@^7.0.3": version "7.0.3" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" @@ -455,6 +487,13 @@ dependencies: "@types/node" "*" +"@types/keyv@*": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== + dependencies: + "@types/node" "*" + "@types/klaw@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@types/klaw/-/klaw-3.0.1.tgz#29f90021c0234976aa4eb97efced9cb6db9fa8b3" @@ -577,6 +616,13 @@ resolved "https://registry.yarnpkg.com/@types/repeat-string/-/repeat-string-1.6.1.tgz#8bb5686e662ce1d962271b0b043623bf51404cdc" integrity sha512-vdna8kjLGljgtPnYN6MBD2UwX62QE0EFLj9QlLXvg6dEu66NksXB900BNguBCMZZY2D9SSqncUskM23vT3uvWQ== +"@types/responselike@*", "@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.3": version "7.3.3" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.3.tgz#3ad6ed949e7487e7bda6f886b4a2434a2c3d7b1a" @@ -1492,6 +1538,11 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -1505,6 +1556,19 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1520,11 +1584,6 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -capture-stack-trace@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" - integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== - chai@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" @@ -1835,6 +1894,14 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== +compress-brotli@^1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/compress-brotli/-/compress-brotli-1.3.8.tgz#0c0a60c97a989145314ec381e84e26682e7b38db" + integrity sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ== + dependencies: + "@types/json-buffer" "~3.0.0" + json-buffer "~3.0.1" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1945,13 +2012,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= - dependencies: - capture-stack-trace "^1.0.0" - create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -2072,6 +2132,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -2106,6 +2173,11 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +defer-to-connect@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3270,11 +3342,6 @@ get-stdin@~8.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3282,14 +3349,7 @@ get-stream@^4.1.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" - integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: +get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -3402,22 +3462,22 @@ globby@^11.0.0, globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" -got@^6.3.0: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" +got@^11.8.5: + version "11.8.5" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" + integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" got@^9.6.0: version "9.6.0" @@ -3588,6 +3648,14 @@ http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" @@ -3957,11 +4025,6 @@ is-plain-object@^4.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= - is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -3981,16 +4044,6 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-stream@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - is-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" @@ -4078,6 +4131,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= +json-buffer@3.0.1, json-buffer@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -4183,6 +4241,14 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" +keyv@^4.0.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.3.1.tgz#7970672f137d987945821b1a07b524ce5a4edd27" + integrity sha512-nwP7AQOxFzELXsNq3zCx/oh81zu4DHWwCE6W9RaeHb7OHO0JpmKS8n801ovVQC7PTsZDWtPA5j1QY+/WWtARYg== + dependencies: + compress-brotli "^1.3.8" + json-buffer "3.0.1" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -4950,6 +5016,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -5187,6 +5258,11 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + npm-bundled@^1.0.1: version "1.0.6" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" @@ -5420,6 +5496,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +p-cancelable@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -5718,11 +5799,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" @@ -5856,6 +5932,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + ramda@^0.27.0: version "0.27.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.0.tgz#915dc29865c0800bf3f69b8fd6c279898b59de43" @@ -6559,6 +6640,11 @@ requireindex@~1.1.0: resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= +resolve-alpn@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -6619,6 +6705,13 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +responselike@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" + integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== + dependencies: + lowercase-keys "^2.0.0" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -7432,11 +7525,6 @@ through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -timed-out@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - timers-browserify@1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" @@ -7846,11 +7934,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= - upath@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" @@ -7868,13 +7951,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" From 9c311a205971cc17f79b9d7e2528b09edf1a361e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 06:01:35 -0700 Subject: [PATCH 533/811] Bump v21.0.0-nightly.20220628 --- 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 038611d37a56b..961c33635acac 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220627 \ No newline at end of file +21.0.0-nightly.20220628 \ No newline at end of file diff --git a/package.json b/package.json index c5b0e2effb00d..e1e01ee06d69e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220627", + "version": "21.0.0-nightly.20220628", "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 508be5195cf99..3ef2fe00dc1ad 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 21,0,0,20220627 - PRODUCTVERSION 21,0,0,20220627 + FILEVERSION 21,0,0,20220628 + PRODUCTVERSION 21,0,0,20220628 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d028044a2490cb5cd3af1ccb19764c8575c6da90 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 07:05:52 -0700 Subject: [PATCH 534/811] Revert "Bump v21.0.0-nightly.20220628" This reverts commit 9c311a205971cc17f79b9d7e2528b09edf1a361e. --- 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 961c33635acac..038611d37a56b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220628 \ No newline at end of file +21.0.0-nightly.20220627 \ No newline at end of file diff --git a/package.json b/package.json index e1e01ee06d69e..c5b0e2effb00d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220628", + "version": "21.0.0-nightly.20220627", "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 3ef2fe00dc1ad..508be5195cf99 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 21,0,0,20220628 - PRODUCTVERSION 21,0,0,20220628 + FILEVERSION 21,0,0,20220627 + PRODUCTVERSION 21,0,0,20220627 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f1087cc830872365c7e9dade7b44de099853b08c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 07:07:08 -0700 Subject: [PATCH 535/811] Bump v21.0.0-nightly.20220628 --- 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 038611d37a56b..961c33635acac 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220627 \ No newline at end of file +21.0.0-nightly.20220628 \ No newline at end of file diff --git a/package.json b/package.json index c5b0e2effb00d..e1e01ee06d69e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220627", + "version": "21.0.0-nightly.20220628", "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 508be5195cf99..3ef2fe00dc1ad 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 21,0,0,20220627 - PRODUCTVERSION 21,0,0,20220627 + FILEVERSION 21,0,0,20220628 + PRODUCTVERSION 21,0,0,20220628 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 704b2199b3457f01611795eb3d36b4cb85ff5641 Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Tue, 28 Jun 2022 16:34:00 +0200 Subject: [PATCH 536/811] build: fix building with enable_basic_printing false (#34711) * build: fix building with enable_basic_printing false * temp flags for ci builds * fix other systems * disable cups * disable print preview * revert changes * merge with printing.patch --- patches/chromium/printing.patch | 82 +++++++++++++++++++ .../browser/api/electron_api_web_contents.cc | 2 +- 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 826c1f5136be3..9c197997a832e 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -10,6 +10,29 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. +diff --git a/BUILD.gn b/BUILD.gn +index c46cbf1bec22c36b97fde5601ca9b2966ee80933..edf371d10bcac60db878c56c55e7244afa9106a9 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -960,7 +960,6 @@ if (is_win) { + "//media:media_unittests", + "//media/midi:midi_unittests", + "//net:net_unittests", +- "//printing:printing_unittests", + "//sql:sql_unittests", + "//third_party/breakpad:symupload($host_toolchain)", + "//ui/base:ui_base_unittests", +@@ -969,6 +968,10 @@ if (is_win) { + "//ui/views:views_unittests", + "//url:url_unittests", + ] ++ ++ if (enable_basic_printing) { ++ deps += [ "//printing:printing_unittests" ] ++ } + } + } + diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dcf54817e9 100644 --- a/chrome/browser/printing/print_job.cc @@ -720,6 +743,42 @@ index f118cae62de1cebb78c8193365bafcaba3b863a8..6c8bb35f6ea00b8366134a3f00d1a43f #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. +diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn +index 6fe723b5b4b645cb3d007787db2217bcaec7c257..e89d8b20aa27ac940e78d374ded9bca25940d3db 100644 +--- a/content/browser/BUILD.gn ++++ b/content/browser/BUILD.gn +@@ -2733,8 +2733,9 @@ source_set("browser") { + "//ppapi/shared_impl", + ] + +- assert(enable_basic_printing) +- deps += [ "//printing" ] ++ if (enable_basic_printing) { ++ deps += [ "//printing" ] ++ } + + if (is_chromeos_ash) { + sources += [ +diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc +index 75f0fade966646dc7e738c87a3300be1603ec7b7..27f71aef278781c214dc430af7cd16f32483e559 100644 +--- a/content/browser/utility_sandbox_delegate_win.cc ++++ b/content/browser/utility_sandbox_delegate_win.cc +@@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) { + return true; + } + ++#if BUILDFLAG(ENABLE_PRINTING) + // Sets the sandbox policy for the print backend service process. + bool PrintBackendPreSpawnTarget(sandbox::TargetPolicy* policy) { + // Print Backend policy lockdown level must be at least USER_LIMITED and +@@ -105,6 +106,7 @@ bool PrintBackendPreSpawnTarget(sandbox::TargetPolicy* policy) { + policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); + return true; + } ++#endif + } // namespace + + bool UtilitySandboxedProcessLauncherDelegate::GetAppContainerId( diff --git a/printing/printing_context.cc b/printing/printing_context.cc index 93db1a80a360702a36f2d3113c9a83105bf7fffe..c3e012ec8d9a1c19434240d27553e486c0729d43 100644 --- a/printing/printing_context.cc @@ -756,3 +815,26 @@ index 58fcf619add5093bd99fd9c561e8686b060a01c6..76db2a2438cef84fcb6dfd4a67d2e171 // Determine if system calls should be skipped by this instance. bool skip_system_calls() const { #if BUILDFLAG(ENABLE_OOP_PRINTING) +diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm +index 35d1091e0c555d00ac1fc5ac878fa2a6e09e718b..07411f07e69a645ba388348f01237f7d38755818 100644 +--- a/sandbox/policy/mac/sandbox_mac.mm ++++ b/sandbox/policy/mac/sandbox_mac.mm +@@ -21,7 +21,6 @@ + #include "sandbox/policy/mac/nacl_loader.sb.h" + #include "sandbox/policy/mac/network.sb.h" + #include "sandbox/policy/mac/ppapi.sb.h" +-#include "sandbox/policy/mac/print_backend.sb.h" + #include "sandbox/policy/mac/print_compositor.sb.h" + #include "sandbox/policy/mac/renderer.sb.h" + #include "sandbox/policy/mac/screen_ai.sb.h" +@@ -29,6 +28,10 @@ + #include "sandbox/policy/mac/utility.sb.h" + #include "sandbox/policy/mojom/sandbox.mojom.h" + ++#if BUILDFLAG(ENABLE_PRINTING) ++#include "sandbox/policy/mac/print_backend.sb.h" ++#endif ++ + namespace sandbox { + namespace policy { + diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 15312c2f94076..bab5d570cdf11 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -25,7 +25,6 @@ #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/printing/print_view_manager_base.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" #include "chrome/browser/ui/views/eye_dropper/eye_dropper.h" #include "chrome/common/pref_names.h" @@ -166,6 +165,7 @@ #endif #if BUILDFLAG(ENABLE_PRINTING) +#include "chrome/browser/printing/print_view_manager_base.h" #include "components/printing/browser/print_manager_utils.h" #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" #include "printing/backend/print_backend.h" // nogncheck From a4043237da51c0499daf378f422889e8accb3bfc Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 07:40:00 -0700 Subject: [PATCH 537/811] Revert "Bump v21.0.0-nightly.20220628" This reverts commit f1087cc830872365c7e9dade7b44de099853b08c. --- 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 961c33635acac..038611d37a56b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220628 \ No newline at end of file +21.0.0-nightly.20220627 \ No newline at end of file diff --git a/package.json b/package.json index e1e01ee06d69e..c5b0e2effb00d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220628", + "version": "21.0.0-nightly.20220627", "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 3ef2fe00dc1ad..508be5195cf99 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 21,0,0,20220628 - PRODUCTVERSION 21,0,0,20220628 + FILEVERSION 21,0,0,20220627 + PRODUCTVERSION 21,0,0,20220627 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 07294cbf15a94a6150877b67178911273cb022cf Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 28 Jun 2022 09:52:59 -0700 Subject: [PATCH 538/811] chore: modernize ListValue usage in gpu info (#34663) --- shell/browser/api/electron_api_app.cc | 2 +- shell/browser/api/gpu_info_enumerator.cc | 112 +++++++++++------------ shell/browser/api/gpu_info_enumerator.h | 6 +- shell/browser/api/gpuinfo_manager.cc | 15 ++- shell/browser/api/gpuinfo_manager.h | 12 +-- 5 files changed, 71 insertions(+), 76 deletions(-) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 77281437ef32b..e4fc3989f73fd 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1443,7 +1443,7 @@ v8::Local App::GetGPUFeatureStatus(v8::Isolate* isolate) { v8::Local App::GetGPUInfo(v8::Isolate* isolate, const std::string& info_type) { auto* const gpu_data_manager = content::GpuDataManagerImpl::GetInstance(); - gin_helper::Promise promise(isolate); + gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); if (info_type != "basic" && info_type != "complete") { promise.RejectWithErrorMessage( diff --git a/shell/browser/api/gpu_info_enumerator.cc b/shell/browser/api/gpu_info_enumerator.cc index 23b2ccd345a4f..57c3448068aa4 100644 --- a/shell/browser/api/gpu_info_enumerator.cc +++ b/shell/browser/api/gpu_info_enumerator.cc @@ -8,127 +8,125 @@ namespace electron { -GPUInfoEnumerator::GPUInfoEnumerator() - : value_stack(), current(std::make_unique()) {} +GPUInfoEnumerator::GPUInfoEnumerator() : value_stack_(), current_{} {} GPUInfoEnumerator::~GPUInfoEnumerator() = default; void GPUInfoEnumerator::AddInt64(const char* name, int64_t value) { - current->SetInteger(name, value); + // NOTE(nornagon): this loses precision. base::Value can't store int64_t. + current_.Set(name, static_cast(value)); } void GPUInfoEnumerator::AddInt(const char* name, int value) { - current->SetInteger(name, value); + current_.Set(name, value); } void GPUInfoEnumerator::AddString(const char* name, const std::string& value) { if (!value.empty()) - current->SetString(name, value); + current_.Set(name, value); } void GPUInfoEnumerator::AddBool(const char* name, bool value) { - current->SetBoolean(name, value); + current_.Set(name, value); } void GPUInfoEnumerator::AddTimeDeltaInSecondsF(const char* name, const base::TimeDelta& value) { - current->SetInteger(name, value.InMilliseconds()); + current_.Set(name, value.InMillisecondsF()); } void GPUInfoEnumerator::AddBinary(const char* name, const base::span& value) { - current->Set(name, std::make_unique(value)); + current_.Set(name, base::Value(value)); } void GPUInfoEnumerator::BeginGPUDevice() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndGPUDevice() { - auto& top_value = value_stack.top(); + auto& top_value = value_stack_.top(); // GPUDevice can be more than one. So create a list of all. // The first one is the active GPU device. - if (top_value->FindKey(kGPUDeviceKey)) { - base::ListValue* list; - top_value->GetList(kGPUDeviceKey, &list); - list->Append(base::Value::FromUniquePtrValue(std::move(current))); + if (base::Value* list_value = top_value.Find(kGPUDeviceKey)) { + DCHECK(list_value->is_list()); + base::Value::List& list = list_value->GetList(); + list.Append(std::move(current_)); } else { - std::unique_ptr gpus(new base::ListValue()); - gpus->Append(base::Value::FromUniquePtrValue(std::move(current))); - top_value->SetList(kGPUDeviceKey, std::move(gpus)); + base::Value::List gpus; + gpus.Append(std::move(current_)); + top_value.Set(kGPUDeviceKey, std::move(gpus)); } - current = std::move(top_value); - value_stack.pop(); + current_ = std::move(top_value); + value_stack_.pop(); } void GPUInfoEnumerator::BeginVideoDecodeAcceleratorSupportedProfile() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndVideoDecodeAcceleratorSupportedProfile() { - auto& top_value = value_stack.top(); - top_value->SetKey(kVideoDecodeAcceleratorSupportedProfileKey, - base::Value::FromUniquePtrValue(std::move(current))); - current = std::move(top_value); - value_stack.pop(); + auto& top_value = value_stack_.top(); + top_value.Set(kVideoDecodeAcceleratorSupportedProfileKey, + std::move(current_)); + current_ = std::move(top_value); + value_stack_.pop(); } void GPUInfoEnumerator::BeginVideoEncodeAcceleratorSupportedProfile() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndVideoEncodeAcceleratorSupportedProfile() { - auto& top_value = value_stack.top(); - top_value->SetKey(kVideoEncodeAcceleratorSupportedProfileKey, - base::Value::FromUniquePtrValue(std::move(current))); - current = std::move(top_value); - value_stack.pop(); + auto& top_value = value_stack_.top(); + top_value.Set(kVideoEncodeAcceleratorSupportedProfileKey, + std::move(current_)); + current_ = std::move(top_value); + value_stack_.pop(); } void GPUInfoEnumerator::BeginImageDecodeAcceleratorSupportedProfile() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndImageDecodeAcceleratorSupportedProfile() { - auto& top_value = value_stack.top(); - top_value->SetKey(kImageDecodeAcceleratorSupportedProfileKey, - base::Value::FromUniquePtrValue(std::move(current))); - current = std::move(top_value); - value_stack.pop(); + auto& top_value = value_stack_.top(); + top_value.Set(kImageDecodeAcceleratorSupportedProfileKey, + std::move(current_)); + current_ = std::move(top_value); + value_stack_.pop(); } void GPUInfoEnumerator::BeginAuxAttributes() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndAuxAttributes() { - auto& top_value = value_stack.top(); - top_value->SetKey(kAuxAttributesKey, - base::Value::FromUniquePtrValue(std::move(current))); - current = std::move(top_value); - value_stack.pop(); + auto& top_value = value_stack_.top(); + top_value.Set(kAuxAttributesKey, std::move(current_)); + current_ = std::move(top_value); + value_stack_.pop(); } void GPUInfoEnumerator::BeginOverlayInfo() { - value_stack.push(std::move(current)); - current = std::make_unique(); + value_stack_.push(std::move(current_)); + current_ = {}; } void GPUInfoEnumerator::EndOverlayInfo() { - auto& top_value = value_stack.top(); - top_value->SetKey(kOverlayInfo, - base::Value::FromUniquePtrValue(std::move(current))); - current = std::move(top_value); - value_stack.pop(); + auto& top_value = value_stack_.top(); + top_value.Set(kOverlayInfo, std::move(current_)); + current_ = std::move(top_value); + value_stack_.pop(); } -std::unique_ptr GPUInfoEnumerator::GetDictionary() { - return std::move(current); +base::Value::Dict GPUInfoEnumerator::GetDictionary() { + return std::move(current_); } } // namespace electron diff --git a/shell/browser/api/gpu_info_enumerator.h b/shell/browser/api/gpu_info_enumerator.h index 389aa9d604d48..bd1af0799cec4 100644 --- a/shell/browser/api/gpu_info_enumerator.h +++ b/shell/browser/api/gpu_info_enumerator.h @@ -50,12 +50,12 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { void EndAuxAttributes() override; void BeginOverlayInfo() override; void EndOverlayInfo() override; - std::unique_ptr GetDictionary(); + base::Value::Dict GetDictionary(); private: // The stack is used to manage nested values - std::stack> value_stack; - std::unique_ptr current; + std::stack value_stack_; + base::Value::Dict current_; }; } // namespace electron diff --git a/shell/browser/api/gpuinfo_manager.cc b/shell/browser/api/gpuinfo_manager.cc index d797d0ec4a6da..e4bcf0dcad0ce 100644 --- a/shell/browser/api/gpuinfo_manager.cc +++ b/shell/browser/api/gpuinfo_manager.cc @@ -41,11 +41,11 @@ bool GPUInfoManager::NeedsCompleteGpuInfoCollection() const { // Should be posted to the task runner void GPUInfoManager::ProcessCompleteInfo() { - const auto result = EnumerateGPUInfo(gpu_data_manager_->GetGPUInfo()); + base::Value::Dict result = EnumerateGPUInfo(gpu_data_manager_->GetGPUInfo()); // We have received the complete information, resolve all promises that // were waiting for this info. for (auto& promise : complete_info_promise_set_) { - promise.Resolve(*result); + promise.Resolve(base::Value(result.Clone())); } complete_info_promise_set_.clear(); } @@ -61,7 +61,7 @@ void GPUInfoManager::OnGpuInfoUpdate() { // Should be posted to the task runner void GPUInfoManager::CompleteInfoFetcher( - gin_helper::Promise promise) { + gin_helper::Promise promise) { complete_info_promise_set_.emplace_back(std::move(promise)); if (NeedsCompleteGpuInfoCollection()) { @@ -73,7 +73,7 @@ void GPUInfoManager::CompleteInfoFetcher( } void GPUInfoManager::FetchCompleteInfo( - gin_helper::Promise promise) { + gin_helper::Promise promise) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&GPUInfoManager::CompleteInfoFetcher, base::Unretained(this), std::move(promise))); @@ -81,14 +81,13 @@ void GPUInfoManager::FetchCompleteInfo( // This fetches the info synchronously, so no need to post to the task queue. // There cannot be multiple promises as they are resolved synchronously. -void GPUInfoManager::FetchBasicInfo( - gin_helper::Promise promise) { +void GPUInfoManager::FetchBasicInfo(gin_helper::Promise promise) { gpu::GPUInfo gpu_info; CollectBasicGraphicsInfo(&gpu_info); - promise.Resolve(*EnumerateGPUInfo(gpu_info)); + promise.Resolve(base::Value(EnumerateGPUInfo(gpu_info))); } -std::unique_ptr GPUInfoManager::EnumerateGPUInfo( +base::Value::Dict GPUInfoManager::EnumerateGPUInfo( gpu::GPUInfo gpu_info) const { GPUInfoEnumerator enumerator; gpu_info.EnumerateFields(&enumerator); diff --git a/shell/browser/api/gpuinfo_manager.h b/shell/browser/api/gpuinfo_manager.h index 43357ececc22b..8b134e50bf97c 100644 --- a/shell/browser/api/gpuinfo_manager.h +++ b/shell/browser/api/gpuinfo_manager.h @@ -28,22 +28,20 @@ class GPUInfoManager : public content::GpuDataManagerObserver { GPUInfoManager& operator=(const GPUInfoManager&) = delete; bool NeedsCompleteGpuInfoCollection() const; - void FetchCompleteInfo(gin_helper::Promise promise); - void FetchBasicInfo(gin_helper::Promise promise); + void FetchCompleteInfo(gin_helper::Promise promise); + void FetchBasicInfo(gin_helper::Promise promise); void OnGpuInfoUpdate() override; private: - std::unique_ptr EnumerateGPUInfo( - gpu::GPUInfo gpu_info) const; + base::Value::Dict EnumerateGPUInfo(gpu::GPUInfo gpu_info) const; // These should be posted to the task queue - void CompleteInfoFetcher(gin_helper::Promise promise); + void CompleteInfoFetcher(gin_helper::Promise promise); void ProcessCompleteInfo(); // This set maintains all the promises that should be fulfilled // once we have the complete information data - std::vector> - complete_info_promise_set_; + std::vector> complete_info_promise_set_; content::GpuDataManagerImpl* gpu_data_manager_; }; From 44b9ee51f45466603728721d23fb4dd95061c142 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 28 Jun 2022 16:02:00 -0700 Subject: [PATCH 539/811] fix: resolve symlinks when computing relative asar paths for integrity (#34776) --- shell/common/asar/archive_mac.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/common/asar/archive_mac.mm b/shell/common/asar/archive_mac.mm index 3ad60faf24c58..c3550e24e26f9 100644 --- a/shell/common/asar/archive_mac.mm +++ b/shell/common/asar/archive_mac.mm @@ -11,6 +11,7 @@ #include #include +#include "base/files/file_util.h" #include "base/logging.h" #include "base/mac/bundle_locations.h" #include "base/mac/foundation_util.h" @@ -21,7 +22,8 @@ namespace asar { absl::optional Archive::RelativePath() const { - base::FilePath bundle_path = base::mac::MainBundlePath().Append("Contents"); + base::FilePath bundle_path = base::MakeAbsoluteFilePath( + base::mac::MainBundlePath().Append("Contents")); base::FilePath relative_path; if (!bundle_path.AppendRelativePath(path_, &relative_path)) From 3458eac2760bac6bd022e3e770d31ff0eda150f4 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 28 Jun 2022 16:40:23 -0700 Subject: [PATCH 540/811] chore: update printing patch for main gclient sync (#34777) chore: update printing patch --- patches/chromium/printing.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 9c197997a832e..ae77976658d6f 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/BUILD.gn b/BUILD.gn -index c46cbf1bec22c36b97fde5601ca9b2966ee80933..edf371d10bcac60db878c56c55e7244afa9106a9 100644 +index a7a198ddd0f33bc0786b59e5027c72662d2c24ed..dfc5ba7e101ef8521bcb4d1ecdf68f1957b347e9 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -960,7 +960,6 @@ if (is_win) { +@@ -970,7 +970,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index c46cbf1bec22c36b97fde5601ca9b2966ee80933..edf371d10bcac60db878c56c55e7244a "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -969,6 +968,10 @@ if (is_win) { +@@ -979,6 +978,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -744,10 +744,10 @@ index f118cae62de1cebb78c8193365bafcaba3b863a8..6c8bb35f6ea00b8366134a3f00d1a43f #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 6fe723b5b4b645cb3d007787db2217bcaec7c257..e89d8b20aa27ac940e78d374ded9bca25940d3db 100644 +index 87c464f6a565b0ef4930c87b5e32329c55d0c223..26af5b09600e4e064b098bac884c4d941e88e3fc 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2733,8 +2733,9 @@ source_set("browser") { +@@ -2758,8 +2758,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -757,10 +757,10 @@ index 6fe723b5b4b645cb3d007787db2217bcaec7c257..e89d8b20aa27ac940e78d374ded9bca2 + deps += [ "//printing" ] + } - if (is_chromeos_ash) { + if (is_chromeos) { sources += [ diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc -index 75f0fade966646dc7e738c87a3300be1603ec7b7..27f71aef278781c214dc430af7cd16f32483e559 100644 +index 5f6847dcc9aa6970d7c8c4831f2be160c0aa15ad..4bd1f7e3b4c50a319043c8041a9ecf4fa8a99ac1 100644 --- a/content/browser/utility_sandbox_delegate_win.cc +++ b/content/browser/utility_sandbox_delegate_win.cc @@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) { From 40fbc05bb2fba653bfa490716285dcce6a355467 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 28 Jun 2022 16:40:56 -0700 Subject: [PATCH 541/811] chore: modernize base::Value usage in accessibility_ui (#34666) --- shell/browser/ui/webui/accessibility_ui.cc | 97 ++++++++++------------ 1 file changed, 45 insertions(+), 52 deletions(-) diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index f276f59a3e714..07dcb52162c45 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -83,7 +83,7 @@ static const char kDisabled[] = "disabled"; static const char kOff[] = "off"; static const char kOn[] = "on"; -std::unique_ptr BuildTargetDescriptor( +base::Value::Dict BuildTargetDescriptor( const GURL& url, const std::string& name, const GURL& favicon_url, @@ -91,20 +91,20 @@ std::unique_ptr BuildTargetDescriptor( int routing_id, ui::AXMode accessibility_mode, base::ProcessHandle handle = base::kNullProcessHandle) { - auto target_data = std::make_unique(); - target_data->SetInteger(kProcessIdField, process_id); - target_data->SetInteger(kRoutingIdField, routing_id); - target_data->SetString(kUrlField, url.spec()); - target_data->SetString(kNameField, base::EscapeForHTML(name)); - target_data->SetInteger(kPidField, base::GetProcId(handle)); - target_data->SetString(kFaviconUrlField, favicon_url.spec()); - target_data->SetInteger(kAccessibilityModeField, accessibility_mode.mode()); - target_data->SetString(kTypeField, kPage); + base::Value::Dict target_data; + target_data.Set(kProcessIdField, process_id); + target_data.Set(kRoutingIdField, routing_id); + target_data.Set(kUrlField, url.spec()); + target_data.Set(kNameField, base::EscapeForHTML(name)); + target_data.Set(kPidField, static_cast(base::GetProcId(handle))); + target_data.Set(kFaviconUrlField, favicon_url.spec()); + target_data.Set(kAccessibilityModeField, + static_cast(accessibility_mode.mode())); + target_data.Set(kTypeField, kPage); return target_data; } -std::unique_ptr BuildTargetDescriptor( - content::RenderViewHost* rvh) { +base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { content::WebContents* web_contents = content::WebContents::FromRenderViewHost(rvh); ui::AXMode accessibility_mode; @@ -132,12 +132,11 @@ std::unique_ptr BuildTargetDescriptor( accessibility_mode); } -std::unique_ptr BuildTargetDescriptor( - electron::NativeWindow* window) { - auto target_data = std::make_unique(); - target_data->SetInteger(kSessionIdField, window->window_id()); - target_data->SetString(kNameField, window->GetTitle()); - target_data->SetString(kTypeField, kBrowser); +base::Value::Dict BuildTargetDescriptor(electron::NativeWindow* window) { + base::Value::Dict target_data; + target_data.Set(kSessionIdField, window->window_id()); + target_data.Set(kNameField, window->GetTitle()); + target_data.Set(kTypeField, kBrowser); return target_data; } @@ -216,7 +215,7 @@ void HandleAccessibilityRequestCallback( content::WebUIDataSource::GotDataCallback callback) { DCHECK(ShouldHandleAccessibilityRequestCallback(path)); - base::DictionaryValue data; + base::Value::Dict data; ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() @@ -230,17 +229,16 @@ void HandleAccessibilityRequestCallback( // The "native" and "web" flags are disabled if // --disable-renderer-accessibility is set. - data.SetString(kNative, - is_native_enabled ? (native ? kOn : kOff) : kDisabled); - data.SetString(kWeb, is_native_enabled ? (web ? kOn : kOff) : kDisabled); + data.Set(kNative, is_native_enabled ? (native ? kOn : kOff) : kDisabled); + data.Set(kWeb, is_native_enabled ? (web ? kOn : kOff) : kDisabled); // The "text", "screenreader" and "html" flags are only // meaningful if "web" is enabled. bool is_web_enabled = is_native_enabled && web; - data.SetString(kText, is_web_enabled ? (text ? kOn : kOff) : kDisabled); - data.SetString(kScreenReader, - is_web_enabled ? (screenreader ? kOn : kOff) : kDisabled); - data.SetString(kHTML, is_web_enabled ? (html ? kOn : kOff) : kDisabled); + data.Set(kText, is_web_enabled ? (text ? kOn : kOff) : kDisabled); + data.Set(kScreenReader, + is_web_enabled ? (screenreader ? kOn : kOff) : kDisabled); + data.Set(kHTML, is_web_enabled ? (html ? kOn : kOff) : kDisabled); // TODO(codebytere): enable use of this flag. // @@ -249,15 +247,15 @@ void HandleAccessibilityRequestCallback( // command line switch has been used. Since this is so closely tied into user // prefs and causes bugs, we're disabling it for now. bool are_accessibility_image_labels_enabled = is_web_enabled; - data.SetString(kLabelImages, kDisabled); + data.Set(kLabelImages, kDisabled); // The "pdf" flag is independent of the others. - data.SetString(kPDF, pdf ? kOn : kOff); + data.Set(kPDF, pdf ? kOn : kOff); // Always dump the Accessibility tree. - data.SetString(kInternal, kOn); + data.Set(kInternal, kOn); - auto rvh_list = std::make_unique(); + base::Value::List rvh_list; std::unique_ptr widgets( content::RenderWidgetHost::GetRenderWidgetHosts()); @@ -280,27 +278,24 @@ void HandleAccessibilityRequestCallback( if (context != current_context) continue; - std::unique_ptr descriptor = - BuildTargetDescriptor(rvh); - descriptor->SetBoolean(kNative, is_native_enabled); - descriptor->SetBoolean(kWeb, is_web_enabled); - descriptor->SetBoolean(kLabelImages, - are_accessibility_image_labels_enabled); - rvh_list->Append(base::Value::FromUniquePtrValue(std::move(descriptor))); + base::Value::Dict descriptor = BuildTargetDescriptor(rvh); + descriptor.Set(kNative, is_native_enabled); + descriptor.Set(kWeb, is_web_enabled); + descriptor.Set(kLabelImages, are_accessibility_image_labels_enabled); + rvh_list.Append(base::Value(std::move(descriptor))); } data.Set(kPagesField, std::move(rvh_list)); - auto window_list = std::make_unique(); + base::Value::List window_list; for (auto* window : electron::WindowList::GetWindows()) { - window_list->Append( - base::Value::FromUniquePtrValue(BuildTargetDescriptor(window))); + window_list.Append(BuildTargetDescriptor(window)); } data.Set(kBrowsersField, std::move(window_list)); std::string json_string; - base::JSONWriter::Write(data, &json_string); + base::JSONWriter::Write(base::Value(std::move(data)), &json_string); std::move(callback).Run(base::RefCountedString::TakeString(&json_string)); } @@ -368,25 +363,23 @@ void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( for (auto* window : electron::WindowList::GetWindows()) { if (window->window_id() == window_id) { - std::unique_ptr result( - BuildTargetDescriptor(window)); + base::Value::Dict result = BuildTargetDescriptor(window); gfx::NativeWindow native_window = window->GetNativeWindow(); ui::AXPlatformNode* node = ui::AXPlatformNode::FromNativeWindow(native_window); - result->SetKey(kTreeField, - base::Value(RecursiveDumpAXPlatformNodeAsString( - node, 0, property_filters))); - CallJavascriptFunction(request_type, *(result.get())); + result.Set(kTreeField, base::Value(RecursiveDumpAXPlatformNodeAsString( + node, 0, property_filters))); + CallJavascriptFunction(request_type, base::Value(std::move(result))); return; } } // No browser with the specified |id| was found. - auto result = std::make_unique(); - result->SetInteger(kSessionIdField, window_id); - result->SetString(kTypeField, kBrowser); - result->SetString(kErrorField, "Window no longer exists."); - CallJavascriptFunction(request_type, *(result.get())); + base::Value::Dict result; + result.Set(kSessionIdField, window_id); + result.Set(kTypeField, kBrowser); + result.Set(kErrorField, "Window no longer exists."); + CallJavascriptFunction(request_type, base::Value(std::move(result))); } void ElectronAccessibilityUIMessageHandler::RegisterMessages() { From 3310e4039fa517d9216378804cda73ee77b8c0a9 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 28 Jun 2022 20:26:00 -0700 Subject: [PATCH 542/811] build: update makeRequest parameters (#34782) --- script/release/ci-release-build.js | 50 +++++++++++++++++------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index b584a998188db..b31cfaa980784 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -35,19 +35,27 @@ const vstsArmJobs = [ let jobRequestedCount = 0; -async function makeRequest ({ auth, url, headers, body, method }) { +async function makeRequest ({ auth, username, password, url, headers, body, method }) { const clonedHeaders = { ...(headers || {}) }; - if (auth && auth.bearer) { + if (auth?.bearer) { clonedHeaders.Authorization = `Bearer ${auth.bearer}`; } - const response = await got(url, { + + const options = { headers: clonedHeaders, body, - method, - auth: auth && (auth.username || auth.password) ? `${auth.username}:${auth.password}` : undefined - }); + method + }; + + if (username || password) { + options.username = username; + options.password = password; + } + + const response = await got(url, options); + if (response.statusCode < 200 || response.statusCode >= 300) { console.error('Error: ', `(status ${response.statusCode})`, response.body); throw new Error(`Unexpected status code ${response.statusCode} from ${url}`); @@ -170,19 +178,21 @@ async function getCircleCIJobNumber (workflowId) { } async function circleCIRequest (url, method, requestBody) { - return makeRequest({ - auth: { - username: process.env.CIRCLE_TOKEN, - password: '' - }, + const requestOpts = { + username: process.env.CIRCLE_TOKEN, + password: '', method, url, headers: { 'Content-Type': 'application/json', Accept: 'application/json' - }, - body: requestBody ? JSON.stringify(requestBody) : null - }, true).catch(err => { + } + }; + if (requestBody) { + requestOpts.body = JSON.stringify(requestBody); + } + + return makeRequest(requestOpts, true).catch(err => { console.log('Error calling CircleCI:', err); }); } @@ -269,10 +279,8 @@ async function buildVSTS (targetBranch, options) { } const requestOpts = { url: `${vstsURL}/definitions?api-version=4.1`, - auth: { - user: '', - password: vstsToken - }, + user: '', + password: vstsToken, headers: { 'Content-Type': 'application/json' } @@ -300,10 +308,8 @@ async function callVSTSBuild (build, targetBranch, environmentVariables, vstsURL } const requestOpts = { url: `${vstsURL}/builds?api-version=4.1`, - auth: { - user: '', - password: vstsToken - }, + user: '', + password: vstsToken, headers: { 'Content-Type': 'application/json' }, From 6257e0c348ed3e30b8b7799475adeb6019138f95 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:28:29 -0700 Subject: [PATCH 543/811] Bump v21.0.0-nightly.20220628 --- 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 038611d37a56b..961c33635acac 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220627 \ No newline at end of file +21.0.0-nightly.20220628 \ No newline at end of file diff --git a/package.json b/package.json index c5b0e2effb00d..e1e01ee06d69e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220627", + "version": "21.0.0-nightly.20220628", "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 508be5195cf99..3ef2fe00dc1ad 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 21,0,0,20220627 - PRODUCTVERSION 21,0,0,20220627 + FILEVERSION 21,0,0,20220628 + PRODUCTVERSION 21,0,0,20220628 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 35ff95d3c71849ac97ced178a2330b9d4651f250 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 29 Jun 2022 10:14:03 +0200 Subject: [PATCH 544/811] fix: `` bounds vertical cutoff (#34759) --- shell/browser/ui/views/autofill_popup_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index ce651f28becf6..fd2e50921460a 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -174,7 +174,7 @@ void AutofillPopupView::DrawAutofillEntry(gfx::Canvas* canvas, const int text_align = is_rtl ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT; gfx::Rect value_rect = entry_rect; - value_rect.Inset(gfx::Insets::VH(kEndPadding, 0)); + value_rect.Inset(gfx::Insets::VH(0, kEndPadding)); int x_align_left = value_rect.x(); const int value_width = gfx::GetStringWidth( From ad2b1fee59c2e4352b0c5664f72c0067a2ef4d7f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 29 Jun 2022 14:53:57 +0200 Subject: [PATCH 545/811] fix: re-enable HKDF crypto functionality (#34767) * fix: re-enable HKDF crypto functionality * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- .../fix_crypto_tests_to_run_with_bssl.patch | 13 +++++ ...ingssl_and_openssl_incompatibilities.patch | 47 +++---------------- .../node/support_v8_sandboxed_pointers.patch | 10 ++-- script/node-disabled-tests.json | 2 - 4 files changed, 24 insertions(+), 48 deletions(-) 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 878160f610ebf..052e1e10ffaec 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -537,6 +537,19 @@ index af2146982c7a3bf7bd7527f44e4b17a3b605026e..f6b91f675cfea367c608892dee078b56 // Non-XOF hash functions should accept valid outputLength options as well. assert.strictEqual(crypto.createHash('sha224', { outputLength: 28 }) +diff --git a/test/parallel/test-crypto-hkdf.js b/test/parallel/test-crypto-hkdf.js +index 16744201a935dcd25af4e0f446701b08fe08dd64..e7ef0b78a19fb755456d038fc676eedb2f71ff07 100644 +--- a/test/parallel/test-crypto-hkdf.js ++++ b/test/parallel/test-crypto-hkdf.js +@@ -117,8 +117,6 @@ const algorithms = [ + ['sha256', 'secret', 'salt', 'info', 10], + ['sha512', 'secret', 'salt', '', 15], + ]; +-if (!common.hasOpenSSL3) +- algorithms.push(['whirlpool', 'secret', '', 'info', 20]); + + algorithms.forEach(([ hash, secret, salt, info, length ]) => { + { diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ceed84e6f7 100644 --- a/test/parallel/test-crypto-padding.js diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index 5f0d8ae50dab9..1e6d8e14b488b 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -188,28 +188,6 @@ index c7894baf00ee9ce4684f4c752f1c7c9b98163741..655895dbff8b88daa53c7b40a5feca42 if (EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0) return EVPKeyCtxPointer(); -diff --git a/src/crypto/crypto_hkdf.cc b/src/crypto/crypto_hkdf.cc -index 0aa96ada47abe4b66fb616c665101278bbe0afb6..1e9a4863c5faea5f6b275483ca16f3a6e8dac25b 100644 ---- a/src/crypto/crypto_hkdf.cc -+++ b/src/crypto/crypto_hkdf.cc -@@ -101,6 +101,7 @@ bool HKDFTraits::DeriveBits( - Environment* env, - const HKDFConfig& params, - ByteSource* out) { -+#ifndef OPENSSL_IS_BORINGSSL - EVPKeyCtxPointer ctx = - EVPKeyCtxPointer(EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, nullptr)); - if (!ctx || -@@ -132,6 +133,9 @@ bool HKDFTraits::DeriveBits( - - *out = std::move(buf); - return true; -+#else -+ return false; -+#endif - } - - void HKDFConfig::MemoryInfo(MemoryTracker* tracker) const { diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc index fc88deb460314c2620d842ec30141bcd13109d60..c097ccfcffb1158317ba09e7c4beb725ccbab74f 100644 --- a/src/crypto/crypto_random.cc @@ -244,10 +222,10 @@ index ae4550e9fde8120c35409e495d5b763a95546509..188a7efe76df2a1aa2eb2746f4d74836 if (target diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba1e76ce0a 100644 +index e1ef170a9f17634d218492a2ce888c3a4365e097..f55e292fbbc75448b15dc9be0327ad2dedef49e0 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc -@@ -508,24 +508,14 @@ Maybe Decorate(Environment* env, Local obj, +@@ -508,24 +508,15 @@ Maybe Decorate(Environment* env, Local obj, V(BIO) \ V(PKCS7) \ V(X509V3) \ @@ -269,10 +247,11 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba - V(ASYNC) \ - V(KDF) \ - V(SM2) \ ++ V(HKDF) \ V(USER) \ #define V(name) case ERR_LIB_##name: lib = #name "_"; break; -@@ -684,7 +674,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -684,7 +675,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { CHECK(args[0]->IsUint32()); Environment* env = Environment::GetCurrent(args); uint32_t len = args[0].As()->Value(); @@ -281,7 +260,7 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba if (data == nullptr) { // There's no memory available for the allocation. // Return nothing. -@@ -696,7 +686,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -696,7 +687,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { data, len, [](void* data, size_t len, void* deleter_data) { @@ -290,7 +269,7 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba }, data); Local buffer = ArrayBuffer::New(env->isolate(), store); -@@ -704,10 +694,12 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -704,10 +695,12 @@ void SecureBuffer(const FunctionCallbackInfo& args) { } void SecureHeapUsed(const FunctionCallbackInfo& args) { @@ -303,20 +282,6 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba } } // namespace -diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index c431159e6f77f8c86844bcadb86012b056d03372..0ce3a8f219a2952f660ff72a6ce36ee109add649 100644 ---- a/src/crypto/crypto_util.h -+++ b/src/crypto/crypto_util.h -@@ -16,7 +16,9 @@ - #include - #include - #include -+#ifndef OPENSSL_IS_BORINGSSL - #include -+#endif - #include - #include - #include diff --git a/src/node_metadata.h b/src/node_metadata.h index 4486d5af2c1622c7c8f44401dc3ebb986d8e3c2e..db1769f1b3f1617ed8dbbea57b5e324183b42be2 100644 --- a/src/node_metadata.h diff --git a/patches/node/support_v8_sandboxed_pointers.patch b/patches/node/support_v8_sandboxed_pointers.patch index a07e9f2560115..08a61216abb4a 100644 --- a/patches/node/support_v8_sandboxed_pointers.patch +++ b/patches/node/support_v8_sandboxed_pointers.patch @@ -118,7 +118,7 @@ index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e3 DebuggingArrayBufferAllocator::~DebuggingArrayBufferAllocator() { diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c28152e2bfd0 100644 +index f55e292fbbc75448b15dc9be0327ad2dedef49e0..7719574859637aecc98f8a4b00ba6ebca8280631 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc @@ -318,10 +318,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept { @@ -171,7 +171,7 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281 return ArrayBuffer::New(env->isolate(), std::move(store)); } -@@ -665,6 +691,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local args) { +@@ -666,6 +692,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local args) { } namespace { @@ -188,7 +188,7 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281 // SecureBuffer uses openssl to allocate a Uint8Array using // OPENSSL_secure_malloc. Because we do not yet actually // make use of secure heap, this has the same semantics as -@@ -692,6 +728,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -693,6 +729,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { Local buffer = ArrayBuffer::New(env->isolate(), store); args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len)); } @@ -197,10 +197,10 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281 void SecureHeapUsed(const FunctionCallbackInfo& args) { #ifndef OPENSSL_IS_BORINGSSL diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index 0ce3a8f219a2952f660ff72a6ce36ee109add649..06e9eb72e4ea60db4c63d08b24b80a1e6c4f3eaf 100644 +index c431159e6f77f8c86844bcadb86012b056d03372..9f57ac58d826cb0aae422ddca54e2136618c4bfe 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h -@@ -257,7 +257,7 @@ class ByteSource { +@@ -255,7 +255,7 @@ class ByteSource { // Creates a v8::BackingStore that takes over responsibility for // any allocated data. The ByteSource will be reset with size = 0 // after being called. diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index fe69ab29c7e22..8870c8fe8492e 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -15,7 +15,6 @@ "parallel/test-crypto-ecb", "parallel/test-crypto-engine", "parallel/test-crypto-fips", - "parallel/test-crypto-hkdf.js", "parallel/test-crypto-keygen", "parallel/test-crypto-keygen-deprecation", "parallel/test-crypto-key-objects", @@ -104,7 +103,6 @@ "parallel/test-trace-events-vm", "parallel/test-trace-events-worker-metadata", "parallel/test-v8-untrusted-code-mitigations", - "parallel/test-webcrypto-derivebits-hkdf", "parallel/test-webcrypto-derivebits-node-dh", "parallel/test-webcrypto-ed25519-ed448", "parallel/test-webcrypto-encrypt-decrypt", From 1f814eacb2875c17d6ef6d0f702fc1c4003bcde6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 29 Jun 2022 08:55:59 -0400 Subject: [PATCH 546/811] build: fix release_dependency_versions workflow (#34573) Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .github/workflows/release_dependency_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_dependency_versions.yml b/.github/workflows/release_dependency_versions.yml index 7039b9028629b..d03cf272cc30f 100644 --- a/.github/workflows/release_dependency_versions.yml +++ b/.github/workflows/release_dependency_versions.yml @@ -10,7 +10,7 @@ env: jobs: check_tag: runs-on: ubuntu-latest - id: check_tag + steps: - uses: actions/checkout@v3 - name: Check Tag run: | From 461561c19caecc79009e1d45c5172df375d3484f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 06:01:40 -0700 Subject: [PATCH 547/811] Bump v21.0.0-nightly.20220629 --- 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 961c33635acac..45dd56b31f751 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220628 \ No newline at end of file +21.0.0-nightly.20220629 \ No newline at end of file diff --git a/package.json b/package.json index e1e01ee06d69e..272abf0eda703 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220628", + "version": "21.0.0-nightly.20220629", "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 3ef2fe00dc1ad..d4904ad4b3a19 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 21,0,0,20220628 - PRODUCTVERSION 21,0,0,20220628 + FILEVERSION 21,0,0,20220629 + PRODUCTVERSION 21,0,0,20220629 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7c12baccab6b7589db5f941fa9306e0aa4373b60 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 29 Jun 2022 17:19:05 +0200 Subject: [PATCH 548/811] build: remove appveyor hook to defunct service (#34789) --- appveyor.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0d12169703792..04cdb20e35447 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,16 +34,6 @@ environment: MOCHA_REPORTER: mocha-multi-reporters MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap GOMA_FALLBACK_ON_AUTH_FAILURE: true -notifications: - - provider: Webhook - url: https://electron-mission-control.herokuapp.com/rest/appveyor-hook - method: POST - headers: - x-mission-control-secret: - secure: 90BLVPcqhJPG7d24v0q/RRray6W3wDQ8uVQlQjOHaBWkw1i8FoA1lsjr2C/v1dVok+tS2Pi6KxDctPUkwIb4T27u4RhvmcPzQhVpfwVJAG9oNtq+yKN7vzHfg7k/pojEzVdJpQLzeJGcSrZu7VY39Q== - on_build_success: false - on_build_failure: true - on_build_status_changed: false build_script: - ps: >- if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { From 4ddd03b1b3f1224bfe3dfb094cb998f64fc8ce4f Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 29 Jun 2022 09:39:48 -0700 Subject: [PATCH 549/811] chore: modernize some devtools code using deprecated ListValue (#34655) --- .../browser/api/electron_api_web_contents.cc | 103 +++++++----------- shell/browser/ui/inspectable_web_contents.cc | 100 +++++++++-------- shell/browser/ui/inspectable_web_contents.h | 11 +- 3 files changed, 101 insertions(+), 113 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index bab5d570cdf11..0c31c8b8702c3 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -547,14 +547,13 @@ FileSystem CreateFileSystemStruct(content::WebContents* web_contents, return FileSystem(type, file_system_name, root_url, file_system_path); } -std::unique_ptr CreateFileSystemValue( - const FileSystem& file_system) { - auto file_system_value = std::make_unique(); - file_system_value->SetString("type", file_system.type); - file_system_value->SetString("fileSystemName", file_system.file_system_name); - file_system_value->SetString("rootURL", file_system.root_url); - file_system_value->SetString("fileSystemPath", file_system.file_system_path); - return file_system_value; +base::Value::Dict CreateFileSystemValue(const FileSystem& file_system) { + base::Value::Dict value; + value.Set("type", file_system.type); + value.Set("fileSystemName", file_system.file_system_name); + value.Set("rootURL", file_system.root_url); + value.Set("fileSystemPath", file_system.file_system_path); + return value; } void WriteToFile(const base::FilePath& path, const std::string& content) { @@ -1986,9 +1985,8 @@ void WebContents::DevToolsOpened() { devtools_web_contents_.Reset(isolate, handle.ToV8()); // Set inspected tabID. - base::Value tab_id(ID()); - inspectable_web_contents_->CallClientFunction("DevToolsAPI.setInspectedTabId", - &tab_id, nullptr, nullptr); + inspectable_web_contents_->CallClientFunction( + "DevToolsAPI", "setInspectedTabId", base::Value(ID())); // Inherit owner window in devtools when it doesn't have one. auto* devtools = inspectable_web_contents_->GetDevToolsWebContents(); @@ -3595,19 +3593,17 @@ void WebContents::DevToolsSaveToFile(const std::string& url, settings.title = url; settings.default_path = base::FilePath::FromUTF8Unsafe(url); if (!file_dialog::ShowSaveDialogSync(settings, &path)) { - base::Value url_value(url); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.canceledSaveURL", &url_value, nullptr, nullptr); + "DevToolsAPI", "canceledSaveURL", base::Value(url)); return; } } saved_files_[url] = path; // Notify DevTools. - base::Value url_value(url); - base::Value file_system_path_value(path.AsUTF8Unsafe()); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.savedURL", &url_value, &file_system_path_value, nullptr); + "DevToolsAPI", "savedURL", base::Value(url), + base::Value(path.AsUTF8Unsafe())); file_task_runner_->PostTask(FROM_HERE, base::BindOnce(&WriteToFile, path, content)); } @@ -3619,9 +3615,8 @@ void WebContents::DevToolsAppendToFile(const std::string& url, return; // Notify DevTools. - base::Value url_value(url); - inspectable_web_contents_->CallClientFunction("DevToolsAPI.appendedToURL", - &url_value, nullptr, nullptr); + inspectable_web_contents_->CallClientFunction("DevToolsAPI", "appendedToURL", + base::Value(url)); file_task_runner_->PostTask( FROM_HERE, base::BindOnce(&AppendToFile, it->second, content)); } @@ -3629,10 +3624,8 @@ void WebContents::DevToolsAppendToFile(const std::string& url, void WebContents::DevToolsRequestFileSystems() { auto file_system_paths = GetAddedFileSystemPaths(GetDevToolsWebContents()); if (file_system_paths.empty()) { - base::ListValue empty_file_system_value; inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.fileSystemsLoaded", &empty_file_system_value, nullptr, - nullptr); + "DevToolsAPI", "fileSystemsLoaded", base::Value(base::Value::List())); return; } @@ -3648,12 +3641,12 @@ void WebContents::DevToolsRequestFileSystems() { file_systems.push_back(file_system); } - base::ListValue file_system_value; + base::Value::List file_system_value; for (const auto& file_system : file_systems) - file_system_value.Append( - base::Value::FromUniquePtrValue(CreateFileSystemValue(file_system))); + file_system_value.Append(CreateFileSystemValue(file_system)); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.fileSystemsLoaded", &file_system_value, nullptr, nullptr); + "DevToolsAPI", "fileSystemsLoaded", + base::Value(std::move(file_system_value))); } void WebContents::DevToolsAddFileSystem( @@ -3679,14 +3672,15 @@ void WebContents::DevToolsAddFileSystem( FileSystem file_system = CreateFileSystemStruct( GetDevToolsWebContents(), file_system_id, path.AsUTF8Unsafe(), type); - std::unique_ptr file_system_value( - CreateFileSystemValue(file_system)); + base::Value::Dict file_system_value = CreateFileSystemValue(file_system); auto* pref_service = GetPrefService(GetDevToolsWebContents()); DictionaryPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths); update.Get()->SetKey(path.AsUTF8Unsafe(), base::Value(type)); + std::string error = ""; // No error inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.fileSystemAdded", nullptr, file_system_value.get(), nullptr); + "DevToolsAPI", "fileSystemAdded", base::Value(error), + base::Value(std::move(file_system_value))); } void WebContents::DevToolsRemoveFileSystem( @@ -3702,10 +3696,8 @@ void WebContents::DevToolsRemoveFileSystem( DictionaryPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths); update.Get()->RemoveKey(path); - base::Value file_system_path_value(path); - inspectable_web_contents_->CallClientFunction("DevToolsAPI.fileSystemRemoved", - &file_system_path_value, - nullptr, nullptr); + inspectable_web_contents_->CallClientFunction( + "DevToolsAPI", "fileSystemRemoved", base::Value(path)); } void WebContents::DevToolsIndexPath( @@ -3781,13 +3773,13 @@ void WebContents::DevToolsSetEyeDropperActive(bool active) { } void WebContents::ColorPickedInEyeDropper(int r, int g, int b, int a) { - base::DictionaryValue color; - color.SetInteger("r", r); - color.SetInteger("g", g); - color.SetInteger("b", b); - color.SetInteger("a", a); + base::Value::Dict color; + color.Set("r", r); + color.Set("g", g); + color.Set("b", b); + color.Set("a", a); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.eyeDropperPickedColor", &color, nullptr, nullptr); + "DevToolsAPI", "eyeDropperPickedColor", base::Value(std::move(color))); } #if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC) @@ -3808,48 +3800,37 @@ void WebContents::OnDevToolsIndexingWorkCalculated( int request_id, const std::string& file_system_path, int total_work) { - base::Value request_id_value(request_id); - base::Value file_system_path_value(file_system_path); - base::Value total_work_value(total_work); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.indexingTotalWorkCalculated", &request_id_value, - &file_system_path_value, &total_work_value); + "DevToolsAPI", "indexingTotalWorkCalculated", base::Value(request_id), + base::Value(file_system_path), base::Value(total_work)); } void WebContents::OnDevToolsIndexingWorked(int request_id, const std::string& file_system_path, int worked) { - base::Value request_id_value(request_id); - base::Value file_system_path_value(file_system_path); - base::Value worked_value(worked); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.indexingWorked", &request_id_value, &file_system_path_value, - &worked_value); + "DevToolsAPI", "indexingWorked", base::Value(request_id), + base::Value(file_system_path), base::Value(worked)); } void WebContents::OnDevToolsIndexingDone(int request_id, const std::string& file_system_path) { devtools_indexing_jobs_.erase(request_id); - base::Value request_id_value(request_id); - base::Value file_system_path_value(file_system_path); - inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.indexingDone", &request_id_value, &file_system_path_value, - nullptr); + inspectable_web_contents_->CallClientFunction("DevToolsAPI", "indexingDone", + base::Value(request_id), + base::Value(file_system_path)); } void WebContents::OnDevToolsSearchCompleted( int request_id, const std::string& file_system_path, const std::vector& file_paths) { - base::ListValue file_paths_value; - for (const auto& file_path : file_paths) { + base::Value::List file_paths_value; + for (const auto& file_path : file_paths) file_paths_value.Append(file_path); - } - base::Value request_id_value(request_id); - base::Value file_system_path_value(file_system_path); inspectable_web_contents_->CallClientFunction( - "DevToolsAPI.searchCompleted", &request_id_value, &file_system_path_value, - &file_paths_value); + "DevToolsAPI", "searchCompleted", base::Value(request_id), + base::Value(file_system_path), base::Value(std::move(file_paths_value))); } void WebContents::SetHtmlApiFullscreen(bool enter_fullscreen) { diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 42eaf58a98c1e..d1c8e65426a68 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -271,8 +271,9 @@ class InspectableWebContents::NetworkResourceLoader base::Value id(stream_id_); base::Value encodedValue(encoded); - bindings_->CallClientFunction("DevToolsAPI.streamWrite", &id, &chunkValue, - &encodedValue); + bindings_->CallClientFunction("DevToolsAPI", "streamWrite", std::move(id), + std::move(chunkValue), + std::move(encodedValue)); std::move(resume).Run(); } @@ -510,30 +511,29 @@ void InspectableWebContents::Reattach(DispatchCallback callback) { } void InspectableWebContents::CallClientFunction( - const std::string& function_name, - const base::Value* arg1, - const base::Value* arg2, - const base::Value* arg3) { + const std::string& object_name, + const std::string& method_name, + base::Value arg1, + base::Value arg2, + base::Value arg3, + base::OnceCallback cb) { if (!GetDevToolsWebContents()) return; - std::string javascript = function_name + "("; - if (arg1) { - std::string json; - base::JSONWriter::Write(*arg1, &json); - javascript.append(json); - if (arg2) { - base::JSONWriter::Write(*arg2, &json); - javascript.append(", ").append(json); - if (arg3) { - base::JSONWriter::Write(*arg3, &json); - javascript.append(", ").append(json); + base::Value::List arguments; + if (!arg1.is_none()) { + arguments.Append(std::move(arg1)); + if (!arg2.is_none()) { + arguments.Append(std::move(arg2)); + if (!arg3.is_none()) { + arguments.Append(std::move(arg3)); } } } - javascript.append(");"); - GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScript( - base::UTF8ToUTF16(javascript), base::NullCallback()); + + GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScriptMethod( + base::ASCIIToUTF16(object_name), base::ASCIIToUTF16(method_name), + std::move(arguments), std::move(cb)); } gfx::Rect InspectableWebContents::GetDevToolsBounds() const { @@ -601,7 +601,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { if (!registry) return; - base::ListValue results; + base::Value::List results; for (auto& extension : registry->enabled_extensions()) { auto devtools_page_url = extensions::chrome_manifest_urls::GetDevToolsPage(extension.get()); @@ -615,17 +615,17 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { web_contents_->GetPrimaryMainFrame()->GetProcess()->GetID(), url::Origin::Create(extension->url())); - auto extension_info = std::make_unique(); - extension_info->SetString("startPage", devtools_page_url.spec()); - extension_info->SetString("name", extension->name()); - extension_info->SetBoolean( - "exposeExperimentalAPIs", - extension->permissions_data()->HasAPIPermission( - extensions::mojom::APIPermissionID::kExperimental)); - results.Append(base::Value::FromUniquePtrValue(std::move(extension_info))); + base::Value::Dict extension_info; + extension_info.Set("startPage", devtools_page_url.spec()); + extension_info.Set("name", extension->name()); + extension_info.Set("exposeExperimentalAPIs", + extension->permissions_data()->HasAPIPermission( + extensions::mojom::APIPermissionID::kExperimental)); + results.Append(base::Value(std::move(extension_info))); } - CallClientFunction("DevToolsAPI.addExtensions", &results, NULL, NULL); + CallClientFunction("DevToolsAPI", "addExtensions", + base::Value(std::move(results))); } #endif @@ -943,22 +943,21 @@ void InspectableWebContents::DispatchProtocolMessage( base::StringPiece str_message(reinterpret_cast(message.data()), message.size()); - if (str_message.size() < kMaxMessageChunkSize) { - std::string param; - base::EscapeJSONString(str_message, true, ¶m); - std::u16string javascript = - base::UTF8ToUTF16("DevToolsAPI.dispatchMessage(" + param + ");"); - GetDevToolsWebContents()->GetPrimaryMainFrame()->ExecuteJavaScript( - javascript, base::NullCallback()); - return; - } - - base::Value total_size(static_cast(str_message.length())); - for (size_t pos = 0; pos < str_message.length(); - pos += kMaxMessageChunkSize) { - base::Value message_value(str_message.substr(pos, kMaxMessageChunkSize)); - CallClientFunction("DevToolsAPI.dispatchMessageChunk", &message_value, - pos ? nullptr : &total_size, nullptr); + if (str_message.length() < kMaxMessageChunkSize) { + CallClientFunction("DevToolsAPI", "dispatchMessage", + base::Value(std::string(str_message))); + } else { + size_t total_size = str_message.length(); + for (size_t pos = 0; pos < str_message.length(); + pos += kMaxMessageChunkSize) { + base::StringPiece str_message_chunk = + str_message.substr(pos, kMaxMessageChunkSize); + + CallClientFunction( + "DevToolsAPI", "dispatchMessageChunk", + base::Value(std::string(str_message_chunk)), + base::Value(base::NumberToString(pos ? 0 : total_size))); + } } } @@ -1070,8 +1069,13 @@ void InspectableWebContents::DidFinishNavigation( void InspectableWebContents::SendMessageAck(int request_id, const base::Value* arg) { - base::Value id_value(request_id); - CallClientFunction("DevToolsAPI.embedderMessageAck", &id_value, arg, nullptr); + if (arg) { + CallClientFunction("DevToolsAPI", "embedderMessageAck", + base::Value(request_id), arg->Clone()); + } else { + CallClientFunction("DevToolsAPI", "embedderMessageAck", + base::Value(request_id)); + } } } // namespace electron diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 905d7cb372512..68548d0c3c427 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -70,10 +70,13 @@ class InspectableWebContents bool IsDevToolsViewShowing(); void AttachTo(scoped_refptr); void Detach(); - void CallClientFunction(const std::string& function_name, - const base::Value* arg1, - const base::Value* arg2, - const base::Value* arg3); + void CallClientFunction( + const std::string& object_name, + const std::string& method_name, + const base::Value arg1 = {}, + const base::Value arg2 = {}, + const base::Value arg3 = {}, + base::OnceCallback cb = base::NullCallback()); void InspectElement(int x, int y); // Return the last position and size of devtools window. From 0d4e417594dd54a75534d67388082f034868969c Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 29 Jun 2022 10:09:48 -0700 Subject: [PATCH 550/811] chore: modernize ListValue usage in permission manager (#34662) --- shell/browser/electron_permission_manager.cc | 52 ++++++++----------- shell/browser/electron_permission_manager.h | 7 ++- shell/browser/hid/electron_hid_delegate.cc | 6 +-- .../browser/web_contents_permission_helper.cc | 44 ++++++++-------- .../browser/web_contents_permission_helper.h | 4 +- 5 files changed, 54 insertions(+), 59 deletions(-) diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 248d5c71d1008..74c523b54a3e6 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -137,8 +137,7 @@ void ElectronPermissionManager::RequestPermission( bool user_gesture, StatusCallback response_callback) { RequestPermissionWithDetails(permission, render_frame_host, requesting_origin, - user_gesture, nullptr, - std::move(response_callback)); + user_gesture, {}, std::move(response_callback)); } void ElectronPermissionManager::RequestPermissionWithDetails( @@ -146,11 +145,11 @@ void ElectronPermissionManager::RequestPermissionWithDetails( content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, - const base::DictionaryValue* details, + base::Value::Dict details, StatusCallback response_callback) { RequestPermissionsWithDetails( std::vector(1, permission), render_frame_host, - user_gesture, details, + user_gesture, std::move(details), base::BindOnce(PermissionRequestResponseCallbackWrapper, std::move(response_callback))); } @@ -162,14 +161,14 @@ void ElectronPermissionManager::RequestPermissions( bool user_gesture, StatusesCallback response_callback) { RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, - nullptr, std::move(response_callback)); + {}, std::move(response_callback)); } void ElectronPermissionManager::RequestPermissionsWithDetails( const std::vector& permissions, content::RenderFrameHost* render_frame_host, bool user_gesture, - const base::DictionaryValue* details, + base::Value::Dict details, StatusesCallback response_callback) { if (permissions.empty()) { std::move(response_callback).Run({}); @@ -204,13 +203,11 @@ void ElectronPermissionManager::RequestPermissionsWithDetails( const auto callback = base::BindRepeating(&ElectronPermissionManager::OnPermissionResponse, base::Unretained(this), request_id, i); - auto mutable_details = - details == nullptr ? base::DictionaryValue() : details->Clone(); - mutable_details.SetStringKey( - "requestingUrl", render_frame_host->GetLastCommittedURL().spec()); - mutable_details.SetBoolKey("isMainFrame", - render_frame_host->GetParent() == nullptr); - request_handler_.Run(web_contents, permission, callback, mutable_details); + details.Set("requestingUrl", + render_frame_host->GetLastCommittedURL().spec()); + details.Set("isMainFrame", render_frame_host->GetParent() == nullptr); + request_handler_.Run(web_contents, permission, callback, + base::Value(std::move(details))); } } @@ -241,17 +238,17 @@ void ElectronPermissionManager::RequestPermissionsFromCurrentDocument( base::OnceCallback&)> callback) { RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, - nullptr, std::move(callback)); + {}, std::move(callback)); } blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { - base::DictionaryValue details; - details.SetString("embeddingOrigin", embedding_origin.spec()); - bool granted = CheckPermissionWithDetails(permission, nullptr, - requesting_origin, &details); + base::Value::Dict details; + details.Set("embeddingOrigin", embedding_origin.spec()); + bool granted = CheckPermissionWithDetails(permission, {}, requesting_origin, + std::move(details)); return granted ? blink::mojom::PermissionStatus::GRANTED : blink::mojom::PermissionStatus::DENIED; } @@ -273,7 +270,7 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, - const base::DictionaryValue* details) const { + base::Value::Dict details) const { if (check_handler_.is_null()) { return true; } @@ -281,27 +278,24 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( render_frame_host ? content::WebContents::FromRenderFrameHost(render_frame_host) : nullptr; - auto mutable_details = - details == nullptr ? base::DictionaryValue() : details->Clone(); if (render_frame_host) { - mutable_details.SetStringKey( - "requestingUrl", render_frame_host->GetLastCommittedURL().spec()); + details.Set("requestingUrl", + render_frame_host->GetLastCommittedURL().spec()); } - mutable_details.SetBoolKey( - "isMainFrame", - render_frame_host && render_frame_host->GetParent() == nullptr); + details.Set("isMainFrame", + render_frame_host && render_frame_host->GetParent() == nullptr); switch (permission) { case blink::PermissionType::AUDIO_CAPTURE: - mutable_details.SetStringKey("mediaType", "audio"); + details.Set("mediaType", "audio"); break; case blink::PermissionType::VIDEO_CAPTURE: - mutable_details.SetStringKey("mediaType", "video"); + details.Set("mediaType", "video"); break; default: break; } return check_handler_.Run(web_contents, permission, requesting_origin, - mutable_details); + base::Value(std::move(details))); } bool ElectronPermissionManager::CheckDevicePermission( diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index aacbd18c650fa..bf98621105b56 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -15,7 +15,6 @@ #include "shell/browser/electron_browser_context.h" namespace base { -class DictionaryValue; class Value; } // namespace base @@ -67,7 +66,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, - const base::DictionaryValue* details, + base::Value::Dict details, StatusCallback callback); void RequestPermissions(const std::vector& permissions, content::RenderFrameHost* render_frame_host, @@ -78,7 +77,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { const std::vector& permissions, content::RenderFrameHost* render_frame_host, bool user_gesture, - const base::DictionaryValue* details, + base::Value::Dict details, StatusesCallback callback); blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( @@ -88,7 +87,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { bool CheckPermissionWithDetails(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, - const base::DictionaryValue* details) const; + base::Value::Dict details) const; bool CheckDevicePermission(blink::PermissionType permission, const url::Origin& origin, diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 13b36dd75bb12..abdf7a53efeb1 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -61,14 +61,14 @@ std::unique_ptr ElectronHidDelegate::RunChooser( bool ElectronHidDelegate::CanRequestDevicePermission( content::BrowserContext* browser_context, const url::Origin& origin) { - base::DictionaryValue details; - details.SetString("securityOrigin", origin.GetURL().spec()); + base::Value::Dict details; + details.Set("securityOrigin", origin.GetURL().spec()); auto* permission_manager = static_cast( browser_context->GetPermissionControllerDelegate()); return permission_manager->CheckPermissionWithDetails( static_cast( WebContentsPermissionHelper::PermissionType::HID), - nullptr, origin.GetURL(), &details); + nullptr, origin.GetURL(), std::move(details)); } bool ElectronHidDelegate::HasDevicePermission( diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 7e4548e9bb783..1d9ab4683859b 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -64,25 +64,25 @@ void WebContentsPermissionHelper::RequestPermission( blink::PermissionType permission, base::OnceCallback callback, bool user_gesture, - const base::DictionaryValue* details) { + base::Value::Dict details) { auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); permission_manager->RequestPermissionWithDetails( - permission, rfh, origin, false, details, + permission, rfh, origin, false, std::move(details), base::BindOnce(&OnPermissionResponse, std::move(callback))); } bool WebContentsPermissionHelper::CheckPermission( blink::PermissionType permission, - const base::DictionaryValue* details) const { + base::Value::Dict details) const { auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); return permission_manager->CheckPermissionWithDetails(permission, rfh, origin, - details); + std::move(details)); } void WebContentsPermissionHelper::RequestFullscreenPermission( @@ -98,23 +98,23 @@ void WebContentsPermissionHelper::RequestMediaAccessPermission( auto callback = base::BindOnce(&MediaAccessAllowed, request, std::move(response_callback)); - base::DictionaryValue details; - auto media_types = std::make_unique(); + base::Value::Dict details; + base::Value::List media_types; if (request.audio_type == blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE) { - media_types->Append("audio"); + media_types.Append("audio"); } if (request.video_type == blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE) { - media_types->Append("video"); + media_types.Append("video"); } - details.SetList("mediaTypes", std::move(media_types)); - details.SetString("securityOrigin", request.security_origin.spec()); + details.Set("mediaTypes", std::move(media_types)); + details.Set("securityOrigin", request.security_origin.spec()); // The permission type doesn't matter here, AUDIO_CAPTURE/VIDEO_CAPTURE // are presented as same type in content_converter.h. RequestPermission(blink::PermissionType::AUDIO_CAPTURE, std::move(callback), - false, &details); + false, std::move(details)); } void WebContentsPermissionHelper::RequestWebNotificationPermission( @@ -138,30 +138,32 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( base::OnceCallback callback, bool user_gesture, const GURL& url) { - base::DictionaryValue details; - details.SetString("externalURL", url.spec()); + base::Value::Dict details; + details.Set("externalURL", url.spec()); RequestPermission( static_cast(PermissionType::OPEN_EXTERNAL), - std::move(callback), user_gesture, &details); + std::move(callback), user_gesture, std::move(details)); } bool WebContentsPermissionHelper::CheckMediaAccessPermission( const GURL& security_origin, blink::mojom::MediaStreamType type) const { - base::DictionaryValue details; - details.SetString("securityOrigin", security_origin.spec()); - details.SetString("mediaType", MediaStreamTypeToString(type)); + base::Value::Dict details; + details.Set("securityOrigin", security_origin.spec()); + details.Set("mediaType", MediaStreamTypeToString(type)); // The permission type doesn't matter here, AUDIO_CAPTURE/VIDEO_CAPTURE // are presented as same type in content_converter.h. - return CheckPermission(blink::PermissionType::AUDIO_CAPTURE, &details); + return CheckPermission(blink::PermissionType::AUDIO_CAPTURE, + std::move(details)); } bool WebContentsPermissionHelper::CheckSerialAccessPermission( const url::Origin& embedding_origin) const { - base::DictionaryValue details; - details.SetString("securityOrigin", embedding_origin.GetURL().spec()); + base::Value::Dict details; + details.Set("securityOrigin", embedding_origin.GetURL().spec()); return CheckPermission( - static_cast(PermissionType::SERIAL), &details); + static_cast(PermissionType::SERIAL), + std::move(details)); } WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper); diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index cfd4fc4600dcc..2f0012837ffd5 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -59,10 +59,10 @@ class WebContentsPermissionHelper void RequestPermission(blink::PermissionType permission, base::OnceCallback callback, bool user_gesture = false, - const base::DictionaryValue* details = nullptr); + base::Value::Dict details = {}); bool CheckPermission(blink::PermissionType permission, - const base::DictionaryValue* details) const; + base::Value::Dict details) const; // TODO(clavin): refactor to use the WebContents provided by the // WebContentsUserData base class instead of storing a duplicate ref From 5d120359f6f6adf730455189d099b0a63a0e5cc9 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 29 Jun 2022 12:55:47 -0700 Subject: [PATCH 551/811] chore: used nested namespaces (#34737) --- build/fuses/build.py | 16 ++++------------ build/js2c.py | 8 ++------ shell/browser/api/electron_api_app.cc | 8 ++------ shell/browser/api/electron_api_app_mac.mm | 8 ++------ shell/browser/api/electron_api_app_mas.mm | 8 ++------ shell/browser/api/electron_api_auto_updater.cc | 8 ++------ shell/browser/api/electron_api_auto_updater.h | 8 ++------ shell/browser/api/electron_api_base_window.cc | 8 ++------ shell/browser/api/electron_api_base_window.h | 8 ++------ shell/browser/api/electron_api_browser_view.cc | 8 ++------ shell/browser/api/electron_api_browser_view.h | 8 ++------ shell/browser/api/electron_api_browser_window.cc | 8 ++------ shell/browser/api/electron_api_browser_window.h | 8 ++------ .../api/electron_api_browser_window_mac.mm | 8 ++------ .../api/electron_api_browser_window_views.cc | 8 ++------ shell/browser/api/electron_api_cookies.cc | 8 ++------ shell/browser/api/electron_api_crash_reporter.cc | 12 ++---------- shell/browser/api/electron_api_crash_reporter.h | 12 ++---------- .../browser/api/electron_api_data_pipe_holder.cc | 8 ++------ .../browser/api/electron_api_data_pipe_holder.h | 8 ++------ shell/browser/api/electron_api_debugger.cc | 8 ++------ shell/browser/api/electron_api_debugger.h | 8 ++------ .../browser/api/electron_api_desktop_capturer.cc | 8 ++------ .../browser/api/electron_api_desktop_capturer.h | 8 ++------ shell/browser/api/electron_api_download_item.cc | 8 ++------ shell/browser/api/electron_api_download_item.h | 8 ++------ .../browser/api/electron_api_global_shortcut.cc | 8 ++------ shell/browser/api/electron_api_global_shortcut.h | 8 ++------ .../browser/api/electron_api_in_app_purchase.cc | 8 ++------ shell/browser/api/electron_api_in_app_purchase.h | 8 ++------ shell/browser/api/electron_api_menu.cc | 8 ++------ shell/browser/api/electron_api_menu.h | 8 ++------ shell/browser/api/electron_api_menu_mac.h | 8 ++------ shell/browser/api/electron_api_menu_mac.mm | 8 ++------ shell/browser/api/electron_api_menu_views.cc | 8 ++------ shell/browser/api/electron_api_menu_views.h | 8 ++------ shell/browser/api/electron_api_native_theme.cc | 8 ++------ shell/browser/api/electron_api_native_theme.h | 8 ++------ .../browser/api/electron_api_native_theme_mac.mm | 8 ++------ shell/browser/api/electron_api_notification.cc | 8 ++------ shell/browser/api/electron_api_notification.h | 8 ++------ shell/browser/api/electron_api_power_monitor.cc | 8 ++------ shell/browser/api/electron_api_power_monitor.h | 8 ++------ .../api/electron_api_power_monitor_mac.mm | 8 ++------ .../api/electron_api_power_save_blocker.cc | 8 ++------ .../api/electron_api_power_save_blocker.h | 8 ++------ shell/browser/api/electron_api_printing.cc | 8 ++------ shell/browser/api/electron_api_protocol.cc | 6 ++---- shell/browser/api/electron_api_safe_storage.cc | 8 ++------ shell/browser/api/electron_api_safe_storage.h | 8 ++------ shell/browser/api/electron_api_screen.cc | 8 ++------ shell/browser/api/electron_api_screen.h | 8 ++------ .../api/electron_api_service_worker_context.cc | 8 ++------ shell/browser/api/electron_api_session.cc | 8 ++------ .../api/electron_api_system_preferences.cc | 8 ++------ .../api/electron_api_system_preferences.h | 8 ++------ .../api/electron_api_system_preferences_mac.mm | 8 ++------ shell/browser/api/electron_api_tray.cc | 8 ++------ shell/browser/api/electron_api_tray.h | 8 ++------ shell/browser/api/electron_api_url_loader.cc | 8 ++------ shell/browser/api/electron_api_url_loader.h | 8 ++------ shell/browser/api/electron_api_view.cc | 8 ++------ shell/browser/api/electron_api_view.h | 8 ++------ shell/browser/api/electron_api_web_contents.cc | 8 ++------ .../api/electron_api_web_contents_impl.cc | 8 ++------ .../browser/api/electron_api_web_contents_mac.mm | 8 ++------ .../api/electron_api_web_contents_view.cc | 8 ++------ .../browser/api/electron_api_web_contents_view.h | 8 ++------ shell/browser/api/electron_api_web_frame_main.cc | 8 ++------ shell/browser/api/electron_api_web_frame_main.h | 8 ++------ shell/browser/api/electron_api_web_request.cc | 8 ++------ shell/browser/api/electron_api_web_request.h | 8 ++------ shell/browser/api/frame_subscriber.cc | 8 ++------ shell/browser/api/frame_subscriber.h | 8 ++------ shell/browser/api/save_page_handler.cc | 8 ++------ shell/browser/api/save_page_handler.h | 8 ++------ shell/browser/api/ui_event.cc | 6 ++---- shell/browser/api/ui_event.h | 6 ++---- .../browser/api/views/electron_api_image_view.cc | 8 ++------ .../browser/api/views/electron_api_image_view.h | 8 ++------ shell/browser/event_emitter_mixin.cc | 8 ++------ .../cryptotoken_private_api.cc | 7 ++----- .../cryptotoken_private_api.h | 6 ++---- ...on_browser_context_keyed_service_factories.cc | 6 ++---- ...ron_browser_context_keyed_service_factories.h | 6 ++---- shell/browser/relauncher_linux.cc | 8 ++------ shell/browser/relauncher_mac.cc | 8 ++------ shell/browser/relauncher_win.cc | 8 ++------ shell/browser/ui/gtk/app_indicator_icon.cc | 8 ++------ shell/browser/ui/gtk/app_indicator_icon.h | 8 ++------ shell/browser/ui/gtk/app_indicator_icon_menu.cc | 8 ++------ shell/browser/ui/gtk/app_indicator_icon_menu.h | 8 ++------ shell/browser/ui/gtk/gtk_status_icon.cc | 8 ++------ shell/browser/ui/gtk/gtk_status_icon.h | 7 ++----- shell/browser/ui/gtk/menu_util.cc | 8 ++------ shell/browser/ui/gtk/menu_util.h | 8 ++------ shell/browser/ui/gtk/status_icon.cc | 8 ++------ shell/browser/ui/gtk/status_icon.h | 8 ++------ shell/browser/win/dark_mode.cc | 8 ++------ shell/browser/win/dark_mode.h | 8 ++------ shell/common/api/electron_api_clipboard.cc | 8 ++------ shell/common/api/electron_api_clipboard.h | 8 ++------ shell/common/api/electron_api_clipboard_mac.mm | 8 ++------ shell/common/api/electron_api_key_weak_map.h | 8 ++------ shell/common/api/electron_api_native_image.cc | 8 ++------ shell/common/api/electron_api_native_image.h | 8 ++------ .../common/api/electron_api_native_image_mac.mm | 8 ++------ .../common/api/electron_api_native_image_win.cc | 8 ++------ shell/common/crash_keys.cc | 8 ++------ shell/common/crash_keys.h | 8 ++------ shell/common/gin_helper/event_emitter.cc | 8 ++------ shell/common/gin_helper/event_emitter_caller.cc | 8 ++------ shell/common/node_util.cc | 8 ++------ shell/common/node_util.h | 8 ++------ shell/common/platform_util_internal.h | 6 ++---- shell/common/skia_util.cc | 8 ++------ shell/common/skia_util.h | 8 ++------ .../renderer/api/context_bridge/object_cache.cc | 12 ++---------- shell/renderer/api/context_bridge/object_cache.h | 12 ++---------- shell/renderer/api/electron_api_context_bridge.h | 8 ++------ .../api/electron_api_spell_check_client.cc | 8 ++------ .../api/electron_api_spell_check_client.h | 8 ++------ 122 files changed, 246 insertions(+), 738 deletions(-) diff --git a/build/fuses/build.py b/build/fuses/build.py index c82e6cfba02af..f5c9b89417a60 100755 --- a/build/fuses/build.py +++ b/build/fuses/build.py @@ -19,17 +19,13 @@ #define FUSE_EXPORT __attribute__((visibility("default"))) #endif -namespace electron { - -namespace fuses { +namespace electron::fuses { extern const volatile char kFuseWire[]; {getters} -} // namespace fuses - -} // namespace electron +} // namespace electron::fuses #endif // ELECTRON_FUSES_H_ """ @@ -37,17 +33,13 @@ TEMPLATE_CC = """ #include "electron/fuses.h" -namespace electron { - -namespace fuses { +namespace electron::fuses { const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version */ {fuse_version}, /* fuse_wire_length */ {fuse_wire_length}, /* fuse_wire */ {initial_config}}; {getters} -} - -} +} // namespace electron:fuses """ with open(os.path.join(dir_path, "fuses.json5"), 'r') as f: diff --git a/build/js2c.py b/build/js2c.py index 7024e7391d5bf..4abcdabb58141 100755 --- a/build/js2c.py +++ b/build/js2c.py @@ -8,9 +8,7 @@ #include "node_native_module.h" #include "node_internals.h" -namespace node {{ - -namespace native_module {{ +namespace node::native_module {{ {definitions} @@ -18,9 +16,7 @@ {initializers} }} -}} // namespace native_module - -}} // namespace node +}} // namespace node::native_module """ def main(): diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index e4fc3989f73fd..c3f9bf1ed827c 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -453,9 +453,7 @@ struct Converter { }; } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo App::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -1822,9 +1820,7 @@ const char* App::GetTypeName() { return "App"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_app_mac.mm b/shell/browser/api/electron_api_app_mac.mm index e9756836fb83f..3a42f85f6259e 100644 --- a/shell/browser/api/electron_api_app_mac.mm +++ b/shell/browser/api/electron_api_app_mac.mm @@ -13,9 +13,7 @@ #import #import -namespace electron { - -namespace api { +namespace electron::api { void App::SetAppLogsPath(gin_helper::ErrorThrower thrower, absl::optional custom_path) { @@ -82,6 +80,4 @@ return proc_translated == 1; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_app_mas.mm b/shell/browser/api/electron_api_app_mas.mm index 56f023d441021..9c924939f1bec 100644 --- a/shell/browser/api/electron_api_app_mas.mm +++ b/shell/browser/api/electron_api_app_mas.mm @@ -10,9 +10,7 @@ #include "base/strings/sys_string_conversions.h" -namespace electron { - -namespace api { +namespace electron::api { // Callback passed to js which will stop accessing the given bookmark. void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) { @@ -64,6 +62,4 @@ void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) { bookmarkUrl); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_auto_updater.cc b/shell/browser/api/electron_api_auto_updater.cc index c8f2c4fece090..c214b5c4c2c7d 100644 --- a/shell/browser/api/electron_api_auto_updater.cc +++ b/shell/browser/api/electron_api_auto_updater.cc @@ -16,9 +16,7 @@ #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo AutoUpdater::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -134,9 +132,7 @@ const char* AutoUpdater::GetTypeName() { return "AutoUpdater"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_auto_updater.h b/shell/browser/api/electron_api_auto_updater.h index 6cbb7440cff5a..e31310a5d9473 100644 --- a/shell/browser/api/electron_api_auto_updater.h +++ b/shell/browser/api/electron_api_auto_updater.h @@ -13,9 +13,7 @@ #include "shell/browser/event_emitter_mixin.h" #include "shell/browser/window_list_observer.h" -namespace electron { - -namespace api { +namespace electron::api { class AutoUpdater : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -60,8 +58,6 @@ class AutoUpdater : public gin::Wrappable, void QuitAndInstall(); }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index 3291cf5e7506f..3f4e529023b53 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -58,9 +58,7 @@ struct Converter { } // namespace gin #endif -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -1323,9 +1321,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate, .SetProperty("id", &BaseWindow::GetID); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index 9dfc40f84bf22..98fa9a5556a86 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -19,9 +19,7 @@ #include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/trackable_object.h" -namespace electron { - -namespace api { +namespace electron::api { class View; @@ -282,8 +280,6 @@ class BaseWindow : public gin_helper::TrackableObject, base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ diff --git a/shell/browser/api/electron_api_browser_view.cc b/shell/browser/api/electron_api_browser_view.cc index 18bbdea9c23ed..eb0ac8e908959 100644 --- a/shell/browser/api/electron_api_browser_view.cc +++ b/shell/browser/api/electron_api_browser_view.cc @@ -67,9 +67,7 @@ int32_t GetNextId() { } // namespace -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo BrowserView::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -200,9 +198,7 @@ v8::Local BrowserView::FillObjectTemplate( .Build(); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_browser_view.h b/shell/browser/api/electron_api_browser_view.h index f635b0d8de817..6caacf41c5c79 100644 --- a/shell/browser/api/electron_api_browser_view.h +++ b/shell/browser/api/electron_api_browser_view.h @@ -28,9 +28,7 @@ namespace gin_helper { class Dictionary; } -namespace electron { - -namespace api { +namespace electron::api { class WebContents; @@ -90,8 +88,6 @@ class BrowserView : public gin::Wrappable, int32_t id_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 67cf2f213c1e3..3d1ec969123c8 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -33,9 +33,7 @@ #include "shell/browser/ui/views/win_frame_view.h" #endif -namespace electron { - -namespace api { +namespace electron::api { BrowserWindow::BrowserWindow(gin::Arguments* args, const gin_helper::Dictionary& options) @@ -607,9 +605,7 @@ v8::Local BrowserWindow::From(v8::Isolate* isolate, return v8::Null(isolate); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_browser_window.h b/shell/browser/api/electron_api_browser_window.h index 00bdf694e8ff3..91195053495ba 100644 --- a/shell/browser/api/electron_api_browser_window.h +++ b/shell/browser/api/electron_api_browser_window.h @@ -14,9 +14,7 @@ #include "shell/browser/ui/drag_util.h" #include "shell/common/gin_helper/error_thrower.h" -namespace electron { - -namespace api { +namespace electron::api { class BrowserWindow : public BaseWindow, public content::RenderWidgetHost::InputEventObserver, @@ -133,8 +131,6 @@ class BrowserWindow : public BaseWindow, base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ diff --git a/shell/browser/api/electron_api_browser_window_mac.mm b/shell/browser/api/electron_api_browser_window_mac.mm index 759f85096f4fa..23d1fa35405a8 100644 --- a/shell/browser/api/electron_api_browser_window_mac.mm +++ b/shell/browser/api/electron_api_browser_window_mac.mm @@ -15,9 +15,7 @@ #include "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h" #include "shell/browser/ui/inspectable_web_contents_view.h" -namespace electron { - -namespace api { +namespace electron::api { void BrowserWindow::OverrideNSWindowContentView( InspectableWebContentsView* view) { @@ -102,6 +100,4 @@ [[webView window] setMovableByWindowBackground:YES]; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_browser_window_views.cc b/shell/browser/api/electron_api_browser_window_views.cc index 9fdbf039f3e0d..e5b37aaf5fd5b 100644 --- a/shell/browser/api/electron_api_browser_window_views.cc +++ b/shell/browser/api/electron_api_browser_window_views.cc @@ -8,9 +8,7 @@ #include "shell/browser/native_window_views.h" #include "ui/aura/window.h" -namespace electron { - -namespace api { +namespace electron::api { void BrowserWindow::UpdateDraggableRegions( const std::vector& regions) { @@ -36,6 +34,4 @@ void BrowserWindow::UpdateDraggableRegions( ->UpdateDraggableRegions(draggable_regions_); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 5afc6c711f223..7970f87474253 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -91,9 +91,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -397,6 +395,4 @@ const char* Cookies::GetTypeName() { return "Cookies"; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index 984c412bb6b71..76fd7ef64d4a4 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/shell/browser/api/electron_api_crash_reporter.cc @@ -64,11 +64,7 @@ bool g_crash_reporter_initialized = false; } // namespace -namespace electron { - -namespace api { - -namespace crash_reporter { +namespace electron::api::crash_reporter { #if defined(MAS_BUILD) namespace { @@ -196,11 +192,7 @@ void Start(const std::string& submit_url, #endif } -} // namespace crash_reporter - -} // namespace api - -} // namespace electron +} // namespace electron::api::crash_reporter namespace { diff --git a/shell/browser/api/electron_api_crash_reporter.h b/shell/browser/api/electron_api_crash_reporter.h index 598c343c03c69..8b96b8e929496 100644 --- a/shell/browser/api/electron_api_crash_reporter.h +++ b/shell/browser/api/electron_api_crash_reporter.h @@ -9,11 +9,7 @@ #include #include "base/files/file_path.h" -namespace electron { - -namespace api { - -namespace crash_reporter { +namespace electron::api::crash_reporter { bool IsCrashReporterEnabled(); @@ -32,10 +28,6 @@ void Start(const std::string& submit_url, const std::map& extra, bool is_node_process); -} // namespace crash_reporter - -} // namespace api - -} // namespace electron +} // namespace electron::api::crash_reporter #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index 895b6b12b2008..f33f1d9b85b99 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -18,9 +18,7 @@ #include "shell/common/node_includes.h" -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -181,6 +179,4 @@ gin::Handle DataPipeHolder::From(v8::Isolate* isolate, return gin::Handle(); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_data_pipe_holder.h b/shell/browser/api/electron_api_data_pipe_holder.h index 535440d26838a..17b9dd244abcb 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.h +++ b/shell/browser/api/electron_api_data_pipe_holder.h @@ -13,9 +13,7 @@ #include "services/network/public/cpp/data_element.h" #include "services/network/public/mojom/data_pipe_getter.mojom.h" -namespace electron { - -namespace api { +namespace electron::api { // Retains reference to the data pipe. class DataPipeHolder : public gin::Wrappable { @@ -49,8 +47,6 @@ class DataPipeHolder : public gin::Wrappable { mojo::Remote data_pipe_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ diff --git a/shell/browser/api/electron_api_debugger.cc b/shell/browser/api/electron_api_debugger.cc index 69c8ea7bcebfa..fcd44205d75e1 100644 --- a/shell/browser/api/electron_api_debugger.cc +++ b/shell/browser/api/electron_api_debugger.cc @@ -20,9 +20,7 @@ using content::DevToolsAgentHost; -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo Debugger::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -206,6 +204,4 @@ const char* Debugger::GetTypeName() { return "Debugger"; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index 204cd42365ebf..dc4f3b7eec427 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -22,9 +22,7 @@ class DevToolsAgentHost; class WebContents; } // namespace content -namespace electron { - -namespace api { +namespace electron::api { class Debugger : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -74,8 +72,6 @@ class Debugger : public gin::Wrappable, int previous_request_id_ = 0; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ diff --git a/shell/browser/api/electron_api_desktop_capturer.cc b/shell/browser/api/electron_api_desktop_capturer.cc index bea6a03547e58..60a7b31b231ef 100644 --- a/shell/browser/api/electron_api_desktop_capturer.cc +++ b/shell/browser/api/electron_api_desktop_capturer.cc @@ -59,9 +59,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo DesktopCapturer::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -217,9 +215,7 @@ const char* DesktopCapturer::GetTypeName() { return "DesktopCapturer"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_desktop_capturer.h b/shell/browser/api/electron_api_desktop_capturer.h index 85b0eaa191195..0d16711d28bdc 100644 --- a/shell/browser/api/electron_api_desktop_capturer.h +++ b/shell/browser/api/electron_api_desktop_capturer.h @@ -15,9 +15,7 @@ #include "gin/wrappable.h" #include "shell/common/gin_helper/pinnable.h" -namespace electron { - -namespace api { +namespace electron::api { class DesktopCapturer : public gin::Wrappable, public gin_helper::Pinnable, @@ -77,8 +75,6 @@ class DesktopCapturer : public gin::Wrappable, base::WeakPtrFactory weak_ptr_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ diff --git a/shell/browser/api/electron_api_download_item.cc b/shell/browser/api/electron_api_download_item.cc index 6943d8effcced..68a502a028844 100644 --- a/shell/browser/api/electron_api_download_item.cc +++ b/shell/browser/api/electron_api_download_item.cc @@ -48,9 +48,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -301,6 +299,4 @@ gin::Handle DownloadItem::FromOrCreate( return handle; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_download_item.h b/shell/browser/api/electron_api_download_item.h index 4ca867baf52f7..85e314d9c6ad0 100644 --- a/shell/browser/api/electron_api_download_item.h +++ b/shell/browser/api/electron_api_download_item.h @@ -18,9 +18,7 @@ class GURL; -namespace electron { - -namespace api { +namespace electron::api { class DownloadItem : public gin::Wrappable, public gin_helper::Pinnable, @@ -87,8 +85,6 @@ class DownloadItem : public gin::Wrappable, base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ diff --git a/shell/browser/api/electron_api_global_shortcut.cc b/shell/browser/api/electron_api_global_shortcut.cc index 28a2b8413479e..b78f67e06657a 100644 --- a/shell/browser/api/electron_api_global_shortcut.cc +++ b/shell/browser/api/electron_api_global_shortcut.cc @@ -51,9 +51,7 @@ bool MapHasMediaKeys( } // namespace -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo GlobalShortcut::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -182,9 +180,7 @@ const char* GlobalShortcut::GetTypeName() { return "GlobalShortcut"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_global_shortcut.h b/shell/browser/api/electron_api_global_shortcut.h index 19a86fe2963d1..4f843a487c510 100644 --- a/shell/browser/api/electron_api_global_shortcut.h +++ b/shell/browser/api/electron_api_global_shortcut.h @@ -14,9 +14,7 @@ #include "gin/wrappable.h" #include "ui/base/accelerators/accelerator.h" -namespace electron { - -namespace api { +namespace electron::api { class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, public gin::Wrappable { @@ -56,8 +54,6 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, AcceleratorCallbackMap accelerator_callback_map_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ diff --git a/shell/browser/api/electron_api_in_app_purchase.cc b/shell/browser/api/electron_api_in_app_purchase.cc index ef80526286c67..8162688bc8b30 100644 --- a/shell/browser/api/electron_api_in_app_purchase.cc +++ b/shell/browser/api/electron_api_in_app_purchase.cc @@ -135,9 +135,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo InAppPurchase::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -211,9 +209,7 @@ void InAppPurchase::OnTransactionsUpdated( } #endif -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_in_app_purchase.h b/shell/browser/api/electron_api_in_app_purchase.h index bd765bb178789..4b646410545d3 100644 --- a/shell/browser/api/electron_api_in_app_purchase.h +++ b/shell/browser/api/electron_api_in_app_purchase.h @@ -16,9 +16,7 @@ #include "shell/browser/mac/in_app_purchase_product.h" #include "v8/include/v8.h" -namespace electron { - -namespace api { +namespace electron::api { class InAppPurchase : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -51,8 +49,6 @@ class InAppPurchase : public gin::Wrappable, const std::vector& transactions) override; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ diff --git a/shell/browser/api/electron_api_menu.cc b/shell/browser/api/electron_api_menu.cc index ff18a7e76b98b..3bea4fcca49a8 100644 --- a/shell/browser/api/electron_api_menu.cc +++ b/shell/browser/api/electron_api_menu.cc @@ -44,9 +44,7 @@ struct Converter { #endif -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo Menu::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -301,9 +299,7 @@ v8::Local Menu::FillObjectTemplate( .Build(); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_menu.h b/shell/browser/api/electron_api_menu.h index 09756a1a773a0..eb2275b2656ea 100644 --- a/shell/browser/api/electron_api_menu.h +++ b/shell/browser/api/electron_api_menu.h @@ -16,9 +16,7 @@ #include "shell/common/gin_helper/constructible.h" #include "shell/common/gin_helper/pinnable.h" -namespace electron { - -namespace api { +namespace electron::api { class Menu : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -123,9 +121,7 @@ class Menu : public gin::Wrappable, bool WorksWhenHiddenAt(int index) const; }; -} // namespace api - -} // namespace electron +} // namespace electron::api namespace gin { diff --git a/shell/browser/api/electron_api_menu_mac.h b/shell/browser/api/electron_api_menu_mac.h index f47276ea8d848..074f850604d69 100644 --- a/shell/browser/api/electron_api_menu_mac.h +++ b/shell/browser/api/electron_api_menu_mac.h @@ -13,9 +13,7 @@ using base::scoped_nsobject; -namespace electron { - -namespace api { +namespace electron::api { class MenuMac : public Menu { protected: @@ -50,8 +48,6 @@ class MenuMac : public Menu { base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ diff --git a/shell/browser/api/electron_api_menu_mac.mm b/shell/browser/api/electron_api_menu_mac.mm index c61a02dca5d42..f0086d03fbbbb 100644 --- a/shell/browser/api/electron_api_menu_mac.mm +++ b/shell/browser/api/electron_api_menu_mac.mm @@ -42,9 +42,7 @@ } // namespace -namespace electron { - -namespace api { +namespace electron::api { MenuMac::MenuMac(gin::Arguments* args) : Menu(args) {} @@ -262,6 +260,4 @@ return handle; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_menu_views.cc b/shell/browser/api/electron_api_menu_views.cc index 447a6fbb96a58..908ae1bc925c1 100644 --- a/shell/browser/api/electron_api_menu_views.cc +++ b/shell/browser/api/electron_api_menu_views.cc @@ -13,9 +13,7 @@ using views::MenuRunner; -namespace electron { - -namespace api { +namespace electron::api { MenuViews::MenuViews(gin::Arguments* args) : Menu(args) {} @@ -91,6 +89,4 @@ gin::Handle Menu::New(gin::Arguments* args) { return handle; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_menu_views.h b/shell/browser/api/electron_api_menu_views.h index a0d40f9354a06..a89f9420e7c5d 100644 --- a/shell/browser/api/electron_api_menu_views.h +++ b/shell/browser/api/electron_api_menu_views.h @@ -13,9 +13,7 @@ #include "ui/display/screen.h" #include "ui/views/controls/menu/menu_runner.h" -namespace electron { - -namespace api { +namespace electron::api { class MenuViews : public Menu { public: @@ -39,8 +37,6 @@ class MenuViews : public Menu { base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ diff --git a/shell/browser/api/electron_api_native_theme.cc b/shell/browser/api/electron_api_native_theme.cc index 4577ee28a77c9..b56e7a1277e74 100644 --- a/shell/browser/api/electron_api_native_theme.cc +++ b/shell/browser/api/electron_api_native_theme.cc @@ -16,9 +16,7 @@ #include "ui/gfx/color_utils.h" #include "ui/native_theme/native_theme.h" -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo NativeTheme::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -117,9 +115,7 @@ const char* NativeTheme::GetTypeName() { return "NativeTheme"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_native_theme.h b/shell/browser/api/electron_api_native_theme.h index 5f26ab74d6ba9..3983360c98b4e 100644 --- a/shell/browser/api/electron_api_native_theme.h +++ b/shell/browser/api/electron_api_native_theme.h @@ -11,9 +11,7 @@ #include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme_observer.h" -namespace electron { - -namespace api { +namespace electron::api { class NativeTheme : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -57,9 +55,7 @@ class NativeTheme : public gin::Wrappable, ui::NativeTheme* web_theme_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api namespace gin { diff --git a/shell/browser/api/electron_api_native_theme_mac.mm b/shell/browser/api/electron_api_native_theme_mac.mm index 2dab1ea61ae0b..fefdf341e2910 100644 --- a/shell/browser/api/electron_api_native_theme_mac.mm +++ b/shell/browser/api/electron_api_native_theme_mac.mm @@ -7,9 +7,7 @@ #include "base/mac/sdk_forward_declarations.h" #include "shell/browser/mac/electron_application.h" -namespace electron { - -namespace api { +namespace electron::api { void NativeTheme::UpdateMacOSAppearanceForOverrideValue( ui::NativeTheme::ThemeSource override) { @@ -32,6 +30,4 @@ } } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_notification.cc b/shell/browser/api/electron_api_notification.cc index cdf77d0c41269..6f77147c4659e 100644 --- a/shell/browser/api/electron_api_notification.cc +++ b/shell/browser/api/electron_api_notification.cc @@ -45,9 +45,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo Notification::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -284,9 +282,7 @@ v8::Local Notification::FillObjectTemplate( .Build(); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_notification.h b/shell/browser/api/electron_api_notification.h index 8213c424ee64d..bbc35a9a52d9d 100644 --- a/shell/browser/api/electron_api_notification.h +++ b/shell/browser/api/electron_api_notification.h @@ -25,9 +25,7 @@ template class Handle; } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { class Notification : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -117,8 +115,6 @@ class Notification : public gin::Wrappable, base::WeakPtr notification_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ diff --git a/shell/browser/api/electron_api_power_monitor.cc b/shell/browser/api/electron_api_power_monitor.cc index 258fc1464f999..2f7ee06584ece 100644 --- a/shell/browser/api/electron_api_power_monitor.cc +++ b/shell/browser/api/electron_api_power_monitor.cc @@ -35,9 +35,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo PowerMonitor::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -116,9 +114,7 @@ const char* PowerMonitor::GetTypeName() { return "PowerMonitor"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_power_monitor.h b/shell/browser/api/electron_api_power_monitor.h index 26ee40cc3ccd0..7aab65e7f78e9 100644 --- a/shell/browser/api/electron_api_power_monitor.h +++ b/shell/browser/api/electron_api_power_monitor.h @@ -15,9 +15,7 @@ #include "shell/browser/lib/power_observer_linux.h" #endif -namespace electron { - -namespace api { +namespace electron::api { class PowerMonitor : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -86,8 +84,6 @@ class PowerMonitor : public gin::Wrappable, #endif }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ diff --git a/shell/browser/api/electron_api_power_monitor_mac.mm b/shell/browser/api/electron_api_power_monitor_mac.mm index 90ec3118d17c2..f7ba52967b0ac 100644 --- a/shell/browser/api/electron_api_power_monitor_mac.mm +++ b/shell/browser/api/electron_api_power_monitor_mac.mm @@ -108,9 +108,7 @@ - (void)onUserDidResignActive:(NSNotification*)notification { @end -namespace electron { - -namespace api { +namespace electron::api { static MacLockMonitor* g_lock_monitor = nil; @@ -120,6 +118,4 @@ - (void)onUserDidResignActive:(NSNotification*)notification { [g_lock_monitor addEmitter:this]; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_power_save_blocker.cc b/shell/browser/api/electron_api_power_save_blocker.cc index 22126be69e78f..0994cba7b6ea9 100644 --- a/shell/browser/api/electron_api_power_save_blocker.cc +++ b/shell/browser/api/electron_api_power_save_blocker.cc @@ -37,9 +37,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo PowerSaveBlocker::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -126,9 +124,7 @@ gin::ObjectTemplateBuilder PowerSaveBlocker::GetObjectTemplateBuilder( .SetMethod("isStarted", &PowerSaveBlocker::IsStarted); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_power_save_blocker.h b/shell/browser/api/electron_api_power_save_blocker.h index 74a08f55e4413..1e55e5299ec7a 100644 --- a/shell/browser/api/electron_api_power_save_blocker.h +++ b/shell/browser/api/electron_api_power_save_blocker.h @@ -13,9 +13,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "services/device/public/mojom/wake_lock.mojom.h" -namespace electron { - -namespace api { +namespace electron::api { class PowerSaveBlocker : public gin::Wrappable { public: @@ -56,8 +54,6 @@ class PowerSaveBlocker : public gin::Wrappable { mojo::Remote wake_lock_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ diff --git a/shell/browser/api/electron_api_printing.cc b/shell/browser/api/electron_api_printing.cc index a8f3a035ba9e0..fcb8f907fea47 100644 --- a/shell/browser/api/electron_api_printing.cc +++ b/shell/browser/api/electron_api_printing.cc @@ -38,9 +38,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { #if BUILDFLAG(ENABLE_PRINTING) printing::PrinterList GetPrinterList(v8::Isolate* isolate) { @@ -89,9 +87,7 @@ v8::Local GetPrinterListAsync(v8::Isolate* isolate) { } #endif -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_protocol.cc b/shell/browser/api/electron_api_protocol.cc index cd396e9662749..fabb5ec7859b3 100644 --- a/shell/browser/api/electron_api_protocol.cc +++ b/shell/browser/api/electron_api_protocol.cc @@ -78,8 +78,7 @@ struct Converter { } // namespace gin -namespace electron { -namespace api { +namespace electron::api { gin::WrapperInfo Protocol::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -312,8 +311,7 @@ const char* Protocol::GetTypeName() { return "Protocol"; } -} // namespace api -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_safe_storage.cc b/shell/browser/api/electron_api_safe_storage.cc index d0e3a73bcdb0d..d667590132ee0 100644 --- a/shell/browser/api/electron_api_safe_storage.cc +++ b/shell/browser/api/electron_api_safe_storage.cc @@ -15,9 +15,7 @@ #include "shell/common/node_includes.h" #include "shell/common/platform_util.h" -namespace electron { - -namespace safestorage { +namespace electron::safestorage { static const char* kEncryptionVersionPrefixV10 = "v10"; static const char* kEncryptionVersionPrefixV11 = "v11"; @@ -119,9 +117,7 @@ std::string DecryptString(v8::Isolate* isolate, v8::Local buffer) { return plaintext; } -} // namespace safestorage - -} // namespace electron +} // namespace electron::safestorage void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/electron_api_safe_storage.h b/shell/browser/api/electron_api_safe_storage.h index d312769a3f53d..1ecde80f8cee4 100644 --- a/shell/browser/api/electron_api_safe_storage.h +++ b/shell/browser/api/electron_api_safe_storage.h @@ -7,9 +7,7 @@ #include "base/dcheck_is_on.h" -namespace electron { - -namespace safestorage { +namespace electron::safestorage { // Used in a DCHECK to validate that our assumption that the network context // manager has initialized before app ready holds true. Only used in the @@ -18,8 +16,6 @@ namespace safestorage { void SetElectronCryptoReady(bool ready); #endif -} // namespace safestorage - -} // namespace electron +} // namespace electron::safestorage #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ diff --git a/shell/browser/api/electron_api_screen.cc b/shell/browser/api/electron_api_screen.cc index 990657662b0b7..53ae9f6b378d4 100644 --- a/shell/browser/api/electron_api_screen.cc +++ b/shell/browser/api/electron_api_screen.cc @@ -24,9 +24,7 @@ #include "ui/display/win/screen_win.h" #endif -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo Screen::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -166,9 +164,7 @@ const char* Screen::GetTypeName() { return "Screen"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_screen.h b/shell/browser/api/electron_api_screen.h index a8121b9ce54cc..67c8fa7226dbe 100644 --- a/shell/browser/api/electron_api_screen.h +++ b/shell/browser/api/electron_api_screen.h @@ -19,9 +19,7 @@ class Rect; class Screen; } // namespace gfx -namespace electron { - -namespace api { +namespace electron::api { class Screen : public gin::Wrappable, public gin_helper::EventEmitterMixin, @@ -58,8 +56,6 @@ class Screen : public gin::Wrappable, display::Screen* screen_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ diff --git a/shell/browser/api/electron_api_service_worker_context.cc b/shell/browser/api/electron_api_service_worker_context.cc index f148dc7a59de8..402f900d384e5 100644 --- a/shell/browser/api/electron_api_service_worker_context.cc +++ b/shell/browser/api/electron_api_service_worker_context.cc @@ -21,9 +21,7 @@ #include "shell/common/gin_helper/function_template_extensions.h" #include "shell/common/node_includes.h" -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -162,6 +160,4 @@ const char* ServiceWorkerContext::GetTypeName() { return "ServiceWorkerContext"; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 22bf54c8f14c6..3d2a13be44d68 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -242,9 +242,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -1255,9 +1253,7 @@ const char* Session::GetTypeName() { return "Session"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_system_preferences.cc b/shell/browser/api/electron_api_system_preferences.cc index 58df58f502e9a..e09503e344389 100644 --- a/shell/browser/api/electron_api_system_preferences.cc +++ b/shell/browser/api/electron_api_system_preferences.cc @@ -13,9 +13,7 @@ #include "ui/gfx/color_utils.h" #include "ui/native_theme/native_theme.h" -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo SystemPreferences::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -117,9 +115,7 @@ const char* SystemPreferences::GetTypeName() { return "SystemPreferences"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index 24096cd05cad2..b3ef33f5ff44a 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -21,9 +21,7 @@ #include "ui/gfx/sys_color_change_listener.h" #endif -namespace electron { - -namespace api { +namespace electron::api { #if BUILDFLAG(IS_MAC) enum class NotificationCenterKind { @@ -168,8 +166,6 @@ class SystemPreferences #endif }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index 371bf33af94ae..d8ef89fa4d98e 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -86,9 +86,7 @@ static bool FromV8(v8::Isolate* isolate, } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -657,6 +655,4 @@ AVMediaType ParseMediaType(const std::string& media_type) { } } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_tray.cc b/shell/browser/api/electron_api_tray.cc index dc57b2cbfe293..18d7a055e7de7 100644 --- a/shell/browser/api/electron_api_tray.cc +++ b/shell/browser/api/electron_api_tray.cc @@ -56,9 +56,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { gin::WrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -422,9 +420,7 @@ v8::Local Tray::FillObjectTemplate( .Build(); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index 8c4870b11ad89..64cc856df74bf 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/shell/browser/api/electron_api_tray.h @@ -29,9 +29,7 @@ namespace gin_helper { class Dictionary; } -namespace electron { - -namespace api { +namespace electron::api { class Menu; @@ -113,8 +111,6 @@ class Tray : public gin::Wrappable, std::unique_ptr tray_icon_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 9f13f4d4b7f46..3a2d329738966 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -70,9 +70,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -614,6 +612,4 @@ const char* SimpleURLLoaderWrapper::GetTypeName() { return "SimpleURLLoaderWrapper"; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_url_loader.h b/shell/browser/api/electron_api_url_loader.h index 9ab4d389418fc..adf8de0be458d 100644 --- a/shell/browser/api/electron_api_url_loader.h +++ b/shell/browser/api/electron_api_url_loader.h @@ -33,9 +33,7 @@ class SimpleURLLoader; struct ResourceRequest; } // namespace network -namespace electron { - -namespace api { +namespace electron::api { /** Wraps a SimpleURLLoader to make it usable from JavaScript */ class SimpleURLLoaderWrapper @@ -123,8 +121,6 @@ class SimpleURLLoaderWrapper base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ diff --git a/shell/browser/api/electron_api_view.cc b/shell/browser/api/electron_api_view.cc index e8e172b508094..861871fda68a2 100644 --- a/shell/browser/api/electron_api_view.cc +++ b/shell/browser/api/electron_api_view.cc @@ -8,9 +8,7 @@ #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" -namespace electron { - -namespace api { +namespace electron::api { View::View(views::View* view) : view_(view) { view_->set_owned_by_client(); @@ -55,9 +53,7 @@ void View::BuildPrototype(v8::Isolate* isolate, #endif } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_view.h b/shell/browser/api/electron_api_view.h index ed2e483de0e25..4c9b6df348290 100644 --- a/shell/browser/api/electron_api_view.h +++ b/shell/browser/api/electron_api_view.h @@ -12,9 +12,7 @@ #include "shell/common/gin_helper/wrappable.h" #include "ui/views/view.h" -namespace electron { - -namespace api { +namespace electron::api { class View : public gin_helper::Wrappable { public: @@ -49,8 +47,6 @@ class View : public gin_helper::Wrappable { views::View* view_ = nullptr; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 0c31c8b8702c3..5be62a176ef88 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -372,9 +372,7 @@ struct Converter> { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -4145,9 +4143,7 @@ WebContents* WebContents::FromID(int32_t id) { // static gin::WrapperInfo WebContents::kWrapperInfo = {gin::kEmbedderNativeGin}; -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_web_contents_impl.cc b/shell/browser/api/electron_api_web_contents_impl.cc index b7433097df435..0460480976b59 100644 --- a/shell/browser/api/electron_api_web_contents_impl.cc +++ b/shell/browser/api/electron_api_web_contents_impl.cc @@ -17,9 +17,7 @@ // have to isolate the usage of WebContentsImpl into a clean file to fix it: // error C2371: 'ssize_t': redefinition; different basic types -namespace electron { - -namespace api { +namespace electron::api { void WebContents::DetachFromOuterFrame() { // See detach_webview_frame.patch on how to detach. @@ -55,6 +53,4 @@ OffScreenRenderWidgetHostView* WebContents::GetOffScreenRenderWidgetHostView() } #endif -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_web_contents_mac.mm b/shell/browser/api/electron_api_web_contents_mac.mm index f9f1af380b974..f6aa567482b45 100644 --- a/shell/browser/api/electron_api_web_contents_mac.mm +++ b/shell/browser/api/electron_api_web_contents_mac.mm @@ -15,9 +15,7 @@ @interface NSWindow (EventDispatchingWindow) - (void)redispatchKeyEvent:(NSEvent*)event; @end -namespace electron { - -namespace api { +namespace electron::api { bool WebContents::IsFocused() const { auto* view = web_contents()->GetRenderWidgetHostView(); @@ -81,6 +79,4 @@ - (void)redispatchKeyEvent:(NSEvent*)event; return false; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_web_contents_view.cc b/shell/browser/api/electron_api_web_contents_view.cc index 8e9e281cc8bb9..7b74cb238cd08 100644 --- a/shell/browser/api/electron_api_web_contents_view.cc +++ b/shell/browser/api/electron_api_web_contents_view.cc @@ -19,9 +19,7 @@ #include "shell/browser/ui/cocoa/delayed_native_view_host.h" #endif -namespace electron { - -namespace api { +namespace electron::api { WebContentsView::WebContentsView(v8::Isolate* isolate, gin::Handle web_contents) @@ -105,9 +103,7 @@ void WebContentsView::BuildPrototype( .SetProperty("webContents", &WebContentsView::GetWebContents); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_web_contents_view.h b/shell/browser/api/electron_api_web_contents_view.h index d1f39ff26ef5d..057e31ec18b8d 100644 --- a/shell/browser/api/electron_api_web_contents_view.h +++ b/shell/browser/api/electron_api_web_contents_view.h @@ -12,9 +12,7 @@ namespace gin_helper { class Dictionary; } -namespace electron { - -namespace api { +namespace electron::api { class WebContents; @@ -53,8 +51,6 @@ class WebContentsView : public View, public content::WebContentsObserver { api::WebContents* api_web_contents_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index 42bae87cf1c58..1c98ed6376461 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -52,9 +52,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { typedef std::unordered_map WebFrameMainIdMap; @@ -391,9 +389,7 @@ const char* WebFrameMain::GetTypeName() { return "WebFrameMain"; } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index b45264db59627..eb6138351f330 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -28,9 +28,7 @@ namespace gin { class Arguments; } -namespace electron { - -namespace api { +namespace electron::api { class WebContents; @@ -131,8 +129,6 @@ class WebFrameMain : public gin::Wrappable, base::WeakPtrFactory weak_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ diff --git a/shell/browser/api/electron_api_web_request.cc b/shell/browser/api/electron_api_web_request.cc index a538901a1c91d..7189168db0268 100644 --- a/shell/browser/api/electron_api_web_request.cc +++ b/shell/browser/api/electron_api_web_request.cc @@ -81,9 +81,7 @@ struct Converter { } // namespace gin -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -551,6 +549,4 @@ gin::Handle WebRequest::From( return gin::CreateHandle(isolate, user_data->data); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/electron_api_web_request.h b/shell/browser/api/electron_api_web_request.h index fb8bee6a3c6ed..10575efafc2c3 100644 --- a/shell/browser/api/electron_api_web_request.h +++ b/shell/browser/api/electron_api_web_request.h @@ -19,9 +19,7 @@ namespace content { class BrowserContext; } -namespace electron { - -namespace api { +namespace electron::api { class WebRequest : public gin::Wrappable, public WebRequestAPI { public: @@ -151,8 +149,6 @@ class WebRequest : public gin::Wrappable, public WebRequestAPI { content::BrowserContext* browser_context_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 1718525f27abe..03dd6c9ecaa32 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -17,9 +17,7 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/skbitmap_operations.h" -namespace electron { - -namespace api { +namespace electron::api { constexpr static int kMaxFrameRate = 30; @@ -180,6 +178,4 @@ gfx::Size FrameSubscriber::GetRenderViewSize() const { gfx::ScaleSize(gfx::SizeF(size), view->GetDeviceScaleFactor())); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 0a6a003927622..00b512251e9cd 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -22,9 +22,7 @@ class Image; class Rect; } // namespace gfx -namespace electron { - -namespace api { +namespace electron::api { class WebContents; @@ -77,8 +75,6 @@ class FrameSubscriber : public content::WebContentsObserver, base::WeakPtrFactory weak_ptr_factory_{this}; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ diff --git a/shell/browser/api/save_page_handler.cc b/shell/browser/api/save_page_handler.cc index 5d45341192773..e6c451e3288b7 100644 --- a/shell/browser/api/save_page_handler.cc +++ b/shell/browser/api/save_page_handler.cc @@ -11,9 +11,7 @@ #include "content/public/browser/web_contents.h" #include "shell/browser/electron_browser_context.h" -namespace electron { - -namespace api { +namespace electron::api { SavePageHandler::SavePageHandler(content::WebContents* web_contents, gin_helper::Promise promise) @@ -65,6 +63,4 @@ void SavePageHandler::Destroy(download::DownloadItem* item) { delete this; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/save_page_handler.h b/shell/browser/api/save_page_handler.h index 00202a0d5a3f8..d7468ed1a6ded 100644 --- a/shell/browser/api/save_page_handler.h +++ b/shell/browser/api/save_page_handler.h @@ -19,9 +19,7 @@ namespace content { class WebContents; } -namespace electron { - -namespace api { +namespace electron::api { // A self-destroyed class for handling save page request. class SavePageHandler : public content::DownloadManager::Observer, @@ -48,8 +46,6 @@ class SavePageHandler : public content::DownloadManager::Observer, gin_helper::Promise promise_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ diff --git a/shell/browser/api/ui_event.cc b/shell/browser/api/ui_event.cc index 5721db147010e..bb39b32657faf 100644 --- a/shell/browser/api/ui_event.cc +++ b/shell/browser/api/ui_event.cc @@ -9,8 +9,7 @@ #include "ui/events/event_constants.h" #include "v8/include/v8.h" -namespace electron { -namespace api { +namespace electron::api { constexpr int mouse_button_flags = (ui::EF_RIGHT_MOUSE_BUTTON | ui::EF_LEFT_MOUSE_BUTTON | @@ -29,5 +28,4 @@ v8::Local CreateEventFromFlags(int flags) { .Build(); } -} // namespace api -} // namespace electron +} // namespace electron::api diff --git a/shell/browser/api/ui_event.h b/shell/browser/api/ui_event.h index 0f0ca1eb8397c..11c8fb1a6b210 100644 --- a/shell/browser/api/ui_event.h +++ b/shell/browser/api/ui_event.h @@ -11,12 +11,10 @@ template class Local; } // namespace v8 -namespace electron { -namespace api { +namespace electron::api { v8::Local CreateEventFromFlags(int flags); -} // namespace api -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_UI_EVENT_H_ diff --git a/shell/browser/api/views/electron_api_image_view.cc b/shell/browser/api/views/electron_api_image_view.cc index 3e26fa70d17cf..1841f2007cbd4 100644 --- a/shell/browser/api/views/electron_api_image_view.cc +++ b/shell/browser/api/views/electron_api_image_view.cc @@ -10,9 +10,7 @@ #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" -namespace electron { - -namespace api { +namespace electron::api { ImageView::ImageView() : View(new views::ImageView()) { view()->set_owned_by_client(); @@ -40,9 +38,7 @@ void ImageView::BuildPrototype(v8::Isolate* isolate, .SetMethod("setImage", &ImageView::SetImage); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/browser/api/views/electron_api_image_view.h b/shell/browser/api/views/electron_api_image_view.h index 332caa21b23b5..58c3c2f28e55e 100644 --- a/shell/browser/api/views/electron_api_image_view.h +++ b/shell/browser/api/views/electron_api_image_view.h @@ -10,9 +10,7 @@ #include "ui/gfx/image/image.h" #include "ui/views/controls/image_view.h" -namespace electron { - -namespace api { +namespace electron::api { class ImageView : public View { public: @@ -32,8 +30,6 @@ class ImageView : public View { } }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ diff --git a/shell/browser/event_emitter_mixin.cc b/shell/browser/event_emitter_mixin.cc index f13201c64a171..43e052a7715c8 100644 --- a/shell/browser/event_emitter_mixin.cc +++ b/shell/browser/event_emitter_mixin.cc @@ -7,9 +7,7 @@ #include "gin/public/wrapper_info.h" #include "shell/browser/api/electron_api_event_emitter.h" -namespace gin_helper { - -namespace internal { +namespace gin_helper::internal { gin::WrapperInfo kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -40,6 +38,4 @@ v8::Local GetEventEmitterTemplate(v8::Isolate* isolate) { return tmpl; } -} // namespace internal - -} // namespace gin_helper +} // namespace gin_helper::internal diff --git a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc index adab99632f5c8..b25e082a93d60 100644 --- a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc +++ b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc @@ -39,9 +39,7 @@ #include "device/fido/win/webauthn_api.h" #endif // BUILDFLAG(IS_WIN) -namespace extensions { - -namespace api { +namespace extensions::api { namespace { @@ -307,5 +305,4 @@ CryptotokenPrivateRecordSignRequestFunction::Run() { return RespondNow(NoArguments()); } -} // namespace api -} // namespace extensions +} // namespace extensions::api 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 4b4dd509e137f..bbfe79338a6c8 100644 --- a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h +++ b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h @@ -14,8 +14,7 @@ class PrefRegistrySyncable; // Implementations for chrome.cryptotokenPrivate API functions. -namespace extensions { -namespace api { +namespace extensions::api { // void CryptotokenRegisterProfilePrefs( // user_prefs::PrefRegistrySyncable* registry); @@ -80,7 +79,6 @@ class CryptotokenPrivateRecordSignRequestFunction : public ExtensionFunction { ResponseAction Run() override; }; -} // namespace api -} // namespace extensions +} // namespace extensions::api #endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ diff --git a/shell/browser/extensions/electron_browser_context_keyed_service_factories.cc b/shell/browser/extensions/electron_browser_context_keyed_service_factories.cc index 5b6213f260b40..7fcede792439a 100644 --- a/shell/browser/extensions/electron_browser_context_keyed_service_factories.cc +++ b/shell/browser/extensions/electron_browser_context_keyed_service_factories.cc @@ -7,8 +7,7 @@ #include "extensions/browser/updater/update_service_factory.h" #include "shell/browser/extensions/electron_extension_system_factory.h" -namespace extensions { -namespace electron { +namespace extensions::electron { void EnsureBrowserContextKeyedServiceFactoriesBuilt() { // TODO(rockot): Remove this once UpdateService is supported across all @@ -18,5 +17,4 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() { ElectronExtensionSystemFactory::GetInstance(); } -} // namespace electron -} // namespace extensions +} // namespace extensions::electron 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 7e9707d9cac33..b173755a9c5db 100644 --- a/shell/browser/extensions/electron_browser_context_keyed_service_factories.h +++ b/shell/browser/extensions/electron_browser_context_keyed_service_factories.h @@ -5,14 +5,12 @@ #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 { +namespace extensions::electron { // Ensures the existence of any BrowserContextKeyedServiceFactory provided by // the core extensions code. void EnsureBrowserContextKeyedServiceFactoriesBuilt(); -} // namespace electron -} // namespace extensions +} // namespace extensions::electron #endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ diff --git a/shell/browser/relauncher_linux.cc b/shell/browser/relauncher_linux.cc index a776309117369..9268775768d34 100644 --- a/shell/browser/relauncher_linux.cc +++ b/shell/browser/relauncher_linux.cc @@ -15,9 +15,7 @@ #include "base/process/launch.h" #include "base/synchronization/waitable_event.h" -namespace relauncher { - -namespace internal { +namespace relauncher::internal { // this is global to be visible to the sa_handler base::WaitableEvent parentWaiter; @@ -68,6 +66,4 @@ int LaunchProgram(const StringVector& relauncher_args, return process.IsValid() ? 0 : 1; } -} // namespace internal - -} // namespace relauncher +} // namespace relauncher::internal diff --git a/shell/browser/relauncher_mac.cc b/shell/browser/relauncher_mac.cc index 38294618d85f5..c46cec6aa5cde 100644 --- a/shell/browser/relauncher_mac.cc +++ b/shell/browser/relauncher_mac.cc @@ -16,9 +16,7 @@ #include "base/process/launch.h" #include "base/strings/sys_string_conversions.h" -namespace relauncher { - -namespace internal { +namespace relauncher::internal { void RelauncherSynchronizeWithParent() { base::ScopedFD relauncher_sync_fd(kRelauncherSyncFD); @@ -91,6 +89,4 @@ int LaunchProgram(const StringVector& relauncher_args, return process.IsValid() ? 0 : 1; } -} // namespace internal - -} // namespace relauncher +} // namespace relauncher::internal diff --git a/shell/browser/relauncher_win.cc b/shell/browser/relauncher_win.cc index 0a3a254ec1195..c732e9f287cb2 100644 --- a/shell/browser/relauncher_win.cc +++ b/shell/browser/relauncher_win.cc @@ -14,9 +14,7 @@ #include "sandbox/win/src/win_utils.h" #include "ui/base/win/shell.h" -namespace relauncher { - -namespace internal { +namespace relauncher::internal { namespace { @@ -125,6 +123,4 @@ int LaunchProgram(const StringVector& relauncher_args, return process.IsValid() ? 0 : 1; } -} // namespace internal - -} // namespace relauncher +} // namespace relauncher::internal diff --git a/shell/browser/ui/gtk/app_indicator_icon.cc b/shell/browser/ui/gtk/app_indicator_icon.cc index 4d45bbda91b79..602f2bf94ee72 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.cc +++ b/shell/browser/ui/gtk/app_indicator_icon.cc @@ -152,9 +152,7 @@ void DeleteTempDirectory(const base::FilePath& dir_path) { } // namespace -namespace electron { - -namespace gtkui { +namespace electron::gtkui { AppIndicatorIcon::AppIndicatorIcon(std::string id, const gfx::ImageSkia& image, @@ -375,6 +373,4 @@ void AppIndicatorIcon::OnClickActionReplacementMenuItemActivated() { delegate()->OnClick(); } -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui diff --git a/shell/browser/ui/gtk/app_indicator_icon.h b/shell/browser/ui/gtk/app_indicator_icon.h index 0e50b89148a3f..ab0f4d5634156 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.h +++ b/shell/browser/ui/gtk/app_indicator_icon.h @@ -28,9 +28,7 @@ namespace ui { class MenuModel; } -namespace electron { - -namespace gtkui { +namespace electron::gtkui { class AppIndicatorIconMenu; @@ -111,8 +109,6 @@ class AppIndicatorIcon : public views::StatusIconLinux { base::WeakPtrFactory weak_factory_{this}; }; -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui #endif // ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ diff --git a/shell/browser/ui/gtk/app_indicator_icon_menu.cc b/shell/browser/ui/gtk/app_indicator_icon_menu.cc index ea7c0f552f282..1d2cd04428e7e 100644 --- a/shell/browser/ui/gtk/app_indicator_icon_menu.cc +++ b/shell/browser/ui/gtk/app_indicator_icon_menu.cc @@ -11,9 +11,7 @@ #include "shell/browser/ui/gtk/menu_util.h" #include "ui/base/models/menu_model.h" -namespace electron { - -namespace gtkui { +namespace electron::gtkui { AppIndicatorIconMenu::AppIndicatorIconMenu(ui::MenuModel* model) : menu_model_(model) { @@ -115,6 +113,4 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) { ExecuteCommand(model, id); } -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui diff --git a/shell/browser/ui/gtk/app_indicator_icon_menu.h b/shell/browser/ui/gtk/app_indicator_icon_menu.h index e4987eb69df30..cafcb3c601de1 100644 --- a/shell/browser/ui/gtk/app_indicator_icon_menu.h +++ b/shell/browser/ui/gtk/app_indicator_icon_menu.h @@ -15,9 +15,7 @@ namespace ui { class MenuModel; } -namespace electron { - -namespace gtkui { +namespace electron::gtkui { // The app indicator icon's menu. class AppIndicatorIconMenu { @@ -70,8 +68,6 @@ class AppIndicatorIconMenu { bool block_activation_ = false; }; -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui #endif // ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ diff --git a/shell/browser/ui/gtk/gtk_status_icon.cc b/shell/browser/ui/gtk/gtk_status_icon.cc index ecad7d470c5e4..69843f30b8ac3 100644 --- a/shell/browser/ui/gtk/gtk_status_icon.cc +++ b/shell/browser/ui/gtk/gtk_status_icon.cc @@ -15,9 +15,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -namespace electron { - -namespace gtkui { +namespace electron::gtkui { GtkStatusIcon::GtkStatusIcon(const gfx::ImageSkia& image, const std::u16string& tool_tip) { @@ -81,6 +79,4 @@ void GtkStatusIcon::OnContextMenuRequested(GtkStatusIcon* status_icon, } } -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui diff --git a/shell/browser/ui/gtk/gtk_status_icon.h b/shell/browser/ui/gtk/gtk_status_icon.h index b8b67259c671a..22b0788026a13 100644 --- a/shell/browser/ui/gtk/gtk_status_icon.h +++ b/shell/browser/ui/gtk/gtk_status_icon.h @@ -21,9 +21,8 @@ namespace ui { class MenuModel; } -namespace electron { +namespace electron::gtkui { -namespace gtkui { class AppIndicatorIconMenu; // Status icon implementation which uses the system tray X11 spec (via @@ -58,8 +57,6 @@ class GtkStatusIcon : public views::StatusIconLinux { std::unique_ptr menu_; }; -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui #endif // ELECTRON_SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ diff --git a/shell/browser/ui/gtk/menu_util.cc b/shell/browser/ui/gtk/menu_util.cc index fb1c0e63e91ac..964099d690735 100644 --- a/shell/browser/ui/gtk/menu_util.cc +++ b/shell/browser/ui/gtk/menu_util.cc @@ -30,9 +30,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif -namespace electron { - -namespace gtkui { +namespace electron::gtkui { namespace { @@ -330,6 +328,4 @@ void SetMenuItemInfo(GtkWidget* widget, void* block_activation_ptr) { } } -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui diff --git a/shell/browser/ui/gtk/menu_util.h b/shell/browser/ui/gtk/menu_util.h index 6d46c49b3f7da..ee4042eea4534 100644 --- a/shell/browser/ui/gtk/menu_util.h +++ b/shell/browser/ui/gtk/menu_util.h @@ -15,9 +15,7 @@ namespace ui { class MenuModel; } -namespace electron { - -namespace gtkui { +namespace electron::gtkui { // Builds GtkImageMenuItems. GtkWidget* BuildMenuItemWithImage(const std::string& label, GtkWidget* image); @@ -56,8 +54,6 @@ void BuildSubmenuFromModel(ui::MenuModel* model, // Sets the check mark, enabled/disabled state and dynamic labels on menu items. void SetMenuItemInfo(GtkWidget* widget, void* block_activation_ptr); -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui #endif // ELECTRON_SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ diff --git a/shell/browser/ui/gtk/status_icon.cc b/shell/browser/ui/gtk/status_icon.cc index 975f2a2ef89a6..72eeeb81716a7 100644 --- a/shell/browser/ui/gtk/status_icon.cc +++ b/shell/browser/ui/gtk/status_icon.cc @@ -16,9 +16,7 @@ #include "shell/browser/ui/gtk/app_indicator_icon.h" #include "shell/browser/ui/gtk/gtk_status_icon.h" -namespace electron { - -namespace gtkui { +namespace electron::gtkui { namespace { @@ -55,6 +53,4 @@ std::unique_ptr CreateLinuxStatusIcon( #endif } -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui diff --git a/shell/browser/ui/gtk/status_icon.h b/shell/browser/ui/gtk/status_icon.h index 10e17f2781f09..43203d2c780b7 100644 --- a/shell/browser/ui/gtk/status_icon.h +++ b/shell/browser/ui/gtk/status_icon.h @@ -15,9 +15,7 @@ #include "ui/gfx/image/image_skia.h" #include "ui/views/linux_ui/status_icon_linux.h" -namespace electron { - -namespace gtkui { +namespace electron::gtkui { bool IsStatusIconSupported(); std::unique_ptr CreateLinuxStatusIcon( @@ -25,8 +23,6 @@ std::unique_ptr CreateLinuxStatusIcon( const std::u16string& tool_tip, const char* id_prefix); -} // namespace gtkui - -} // namespace electron +} // namespace electron::gtkui #endif // ELECTRON_SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ diff --git a/shell/browser/win/dark_mode.cc b/shell/browser/win/dark_mode.cc index 200ba8c1f13a5..559c572ddac62 100644 --- a/shell/browser/win/dark_mode.cc +++ b/shell/browser/win/dark_mode.cc @@ -40,9 +40,7 @@ HRESULT TrySetWindowTheme(HWND hWnd, bool dark) { } // namespace -namespace electron { - -namespace win { +namespace electron::win { bool IsDarkModeSupported() { auto* os_info = base::win::OSInfo::GetInstance(); @@ -59,6 +57,4 @@ void SetDarkModeForWindow(HWND hWnd) { TrySetWindowTheme(hWnd, dark); } -} // namespace win - -} // namespace electron +} // namespace electron::win diff --git a/shell/browser/win/dark_mode.h b/shell/browser/win/dark_mode.h index 12f6adb1dade9..8bd34a39e01fa 100644 --- a/shell/browser/win/dark_mode.h +++ b/shell/browser/win/dark_mode.h @@ -15,15 +15,11 @@ #include "ui/native_theme/native_theme.h" -namespace electron { - -namespace win { +namespace electron::win { bool IsDarkModeSupported(); void SetDarkModeForWindow(HWND hWnd); -} // namespace win - -} // namespace electron +} // namespace electron::win #endif // ELECTRON_SHELL_BROWSER_WIN_DARK_MODE_H_ diff --git a/shell/common/api/electron_api_clipboard.cc b/shell/common/api/electron_api_clipboard.cc index a130d0eb39a43..b7370b949378a 100644 --- a/shell/common/api/electron_api_clipboard.cc +++ b/shell/common/api/electron_api_clipboard.cc @@ -17,9 +17,7 @@ #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/gfx/codec/png_codec.h" -namespace electron { - -namespace api { +namespace electron::api { ui::ClipboardBuffer Clipboard::GetClipboardBuffer(gin_helper::Arguments* args) { std::string type; @@ -260,9 +258,7 @@ void Clipboard::Clear(gin_helper::Arguments* args) { ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardBuffer(args)); } -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/common/api/electron_api_clipboard.h b/shell/common/api/electron_api_clipboard.h index 158e33bb3bab8..b0fa62c3b6470 100644 --- a/shell/common/api/electron_api_clipboard.h +++ b/shell/common/api/electron_api_clipboard.h @@ -17,9 +17,7 @@ class Arguments; class Dictionary; } // namespace gin_helper -namespace electron { - -namespace api { +namespace electron::api { class Clipboard { public: @@ -67,8 +65,6 @@ class Clipboard { gin_helper::Arguments* args); }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ diff --git a/shell/common/api/electron_api_clipboard_mac.mm b/shell/common/api/electron_api_clipboard_mac.mm index 7f101c259bd26..5303b89af6ca7 100644 --- a/shell/common/api/electron_api_clipboard_mac.mm +++ b/shell/common/api/electron_api_clipboard_mac.mm @@ -6,9 +6,7 @@ #include "shell/common/api/electron_api_clipboard.h" #include "ui/base/cocoa/find_pasteboard.h" -namespace electron { - -namespace api { +namespace electron::api { void Clipboard::WriteFindText(const std::u16string& text) { NSString* text_ns = base::SysUTF16ToNSString(text); @@ -19,6 +17,4 @@ return GetFindPboardText(); } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/common/api/electron_api_key_weak_map.h b/shell/common/api/electron_api_key_weak_map.h index f26fa29297ad8..2b9d1e92d5883 100644 --- a/shell/common/api/electron_api_key_weak_map.h +++ b/shell/common/api/electron_api_key_weak_map.h @@ -11,9 +11,7 @@ #include "shell/common/gin_helper/wrappable.h" #include "shell/common/key_weak_map.h" -namespace electron { - -namespace api { +namespace electron::api { template class KeyWeakMap : public gin_helper::Wrappable> { @@ -59,8 +57,6 @@ class KeyWeakMap : public gin_helper::Wrappable> { electron::KeyWeakMap key_weak_map_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 2a2e598f93632..060c7022fc3cd 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -48,9 +48,7 @@ #include "ui/gfx/icon_util.h" #endif -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -613,9 +611,7 @@ const char* NativeImage::GetTypeName() { // static gin::WrapperInfo NativeImage::kWrapperInfo = {gin::kEmbedderNativeGin}; -} // namespace api - -} // namespace electron +} // namespace electron::api namespace { diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index 9c417fa6d200c..16c4f8ec0fbd7 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -40,9 +40,7 @@ namespace gin { class Arguments; } -namespace electron { - -namespace api { +namespace electron::api { class NativeImage : public gin::Wrappable { public: @@ -140,8 +138,6 @@ class NativeImage : public gin::Wrappable { int32_t memory_usage_ = 0; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ diff --git a/shell/common/api/electron_api_native_image_mac.mm b/shell/common/api/electron_api_native_image_mac.mm index 12cbad9f3e3b3..a6ba907a0992a 100644 --- a/shell/common/api/electron_api_native_image_mac.mm +++ b/shell/common/api/electron_api_native_image_mac.mm @@ -23,9 +23,7 @@ #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia_operations.h" -namespace electron { - -namespace api { +namespace electron::api { NSData* bufferFromNSImage(NSImage* image) { CGImageRef ref = [image CGImageForProposedRect:nil context:nil hints:nil]; @@ -183,6 +181,4 @@ return [image_.AsNSImage() isTemplate]; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/common/api/electron_api_native_image_win.cc b/shell/common/api/electron_api_native_image_win.cc index 3b971bee56d20..1cc998d3de53d 100644 --- a/shell/common/api/electron_api_native_image_win.cc +++ b/shell/common/api/electron_api_native_image_win.cc @@ -17,9 +17,7 @@ #include "ui/gfx/icon_util.h" #include "ui/gfx/image/image_skia.h" -namespace electron { - -namespace api { +namespace electron::api { // static v8::Local NativeImage::CreateThumbnailFromPath( @@ -102,6 +100,4 @@ v8::Local NativeImage::CreateThumbnailFromPath( return handle; } -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/common/crash_keys.cc b/shell/common/crash_keys.cc index 16e11125b21e5..d084adc257814 100644 --- a/shell/common/crash_keys.cc +++ b/shell/common/crash_keys.cc @@ -23,9 +23,7 @@ #include "shell/common/process_util.h" #include "third_party/crashpad/crashpad/client/annotation.h" -namespace electron { - -namespace crash_keys { +namespace electron::crash_keys { namespace { @@ -167,6 +165,4 @@ void SetPlatformCrashKey() { #endif } -} // namespace crash_keys - -} // namespace electron +} // namespace electron::crash_keys diff --git a/shell/common/crash_keys.h b/shell/common/crash_keys.h index 70f731d29f38c..e3c89f895be63 100644 --- a/shell/common/crash_keys.h +++ b/shell/common/crash_keys.h @@ -12,9 +12,7 @@ namespace base { class CommandLine; } -namespace electron { - -namespace crash_keys { +namespace electron::crash_keys { void SetCrashKey(const std::string& key, const std::string& value); void ClearCrashKey(const std::string& key); @@ -23,8 +21,6 @@ void GetCrashKeys(std::map* keys); void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); void SetPlatformCrashKey(); -} // namespace crash_keys - -} // namespace electron +} // namespace electron::crash_keys #endif // ELECTRON_SHELL_COMMON_CRASH_KEYS_H_ diff --git a/shell/common/gin_helper/event_emitter.cc b/shell/common/gin_helper/event_emitter.cc index 32a3e4b1b8183..5ebb9c93539b7 100644 --- a/shell/common/gin_helper/event_emitter.cc +++ b/shell/common/gin_helper/event_emitter.cc @@ -10,9 +10,7 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/object_template_builder.h" -namespace gin_helper { - -namespace internal { +namespace gin_helper::internal { namespace { @@ -75,6 +73,4 @@ v8::Local CreateNativeEvent( return event; } -} // namespace internal - -} // namespace gin_helper +} // namespace gin_helper::internal diff --git a/shell/common/gin_helper/event_emitter_caller.cc b/shell/common/gin_helper/event_emitter_caller.cc index 8676732d32402..be112f55fa5d1 100644 --- a/shell/common/gin_helper/event_emitter_caller.cc +++ b/shell/common/gin_helper/event_emitter_caller.cc @@ -8,9 +8,7 @@ #include "shell/common/gin_helper/microtasks_scope.h" #include "shell/common/node_includes.h" -namespace gin_helper { - -namespace internal { +namespace gin_helper::internal { v8::Local CallMethodWithArgs(v8::Isolate* isolate, v8::Local obj, @@ -33,6 +31,4 @@ v8::Local CallMethodWithArgs(v8::Isolate* isolate, return v8::Boolean::New(isolate, false); } -} // namespace internal - -} // namespace gin_helper +} // namespace gin_helper::internal diff --git a/shell/common/node_util.cc b/shell/common/node_util.cc index 09ae24a66ee89..7cee76b7c4fa8 100644 --- a/shell/common/node_util.cc +++ b/shell/common/node_util.cc @@ -7,9 +7,7 @@ #include "base/logging.h" #include "shell/common/node_includes.h" -namespace electron { - -namespace util { +namespace electron::util { v8::MaybeLocal CompileAndCall( v8::Local context, @@ -36,6 +34,4 @@ v8::MaybeLocal CompileAndCall( return ret; } -} // namespace util - -} // namespace electron +} // namespace electron::util diff --git a/shell/common/node_util.h b/shell/common/node_util.h index fd7db87a46937..e8cc05370c9af 100644 --- a/shell/common/node_util.h +++ b/shell/common/node_util.h @@ -13,9 +13,7 @@ namespace node { class Environment; } -namespace electron { - -namespace util { +namespace electron::util { // Run a script with JS source bundled inside the binary as if it's wrapped // in a function called with a null receiver and arguments specified in C++. @@ -29,8 +27,6 @@ v8::MaybeLocal CompileAndCall( std::vector>* arguments, node::Environment* optional_env); -} // namespace util - -} // namespace electron +} // namespace electron::util #endif // ELECTRON_SHELL_COMMON_NODE_UTIL_H_ diff --git a/shell/common/platform_util_internal.h b/shell/common/platform_util_internal.h index 9a3681bed5ae6..3eaa80a7828a6 100644 --- a/shell/common/platform_util_internal.h +++ b/shell/common/platform_util_internal.h @@ -13,14 +13,12 @@ namespace base { class FilePath; } -namespace platform_util { -namespace internal { +namespace platform_util::internal { // Called by platform_util.cc on to invoke platform specific logic to move // |path| to trash using a suitable handler. bool PlatformTrashItem(const base::FilePath& path, std::string* error); -} // namespace internal -} // namespace platform_util +} // namespace platform_util::internal #endif // ELECTRON_SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ diff --git a/shell/common/skia_util.cc b/shell/common/skia_util.cc index 21b47fc8c27f3..eeeccbac5cfc1 100644 --- a/shell/common/skia_util.cc +++ b/shell/common/skia_util.cc @@ -28,9 +28,7 @@ #include "ui/gfx/icon_util.h" #endif -namespace electron { - -namespace util { +namespace electron::util { struct ScaleFactorPair { const char* name; @@ -164,6 +162,4 @@ bool ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon) { } #endif -} // namespace util - -} // namespace electron +} // namespace electron::util diff --git a/shell/common/skia_util.h b/shell/common/skia_util.h index 76830d8443689..2fd4376595d68 100644 --- a/shell/common/skia_util.h +++ b/shell/common/skia_util.h @@ -13,9 +13,7 @@ namespace gfx { class ImageSkia; } -namespace electron { - -namespace util { +namespace electron::util { bool PopulateImageSkiaRepsFromPath(gfx::ImageSkia* image, const base::FilePath& path); @@ -41,8 +39,6 @@ bool AddImageSkiaRepFromPNG(gfx::ImageSkia* image, bool ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon); #endif -} // namespace util - -} // namespace electron +} // namespace electron::util #endif // ELECTRON_SHELL_COMMON_SKIA_UTIL_H_ diff --git a/shell/renderer/api/context_bridge/object_cache.cc b/shell/renderer/api/context_bridge/object_cache.cc index 928124bab451a..47870fd95ec70 100644 --- a/shell/renderer/api/context_bridge/object_cache.cc +++ b/shell/renderer/api/context_bridge/object_cache.cc @@ -8,11 +8,7 @@ #include "shell/common/api/object_life_monitor.h" -namespace electron { - -namespace api { - -namespace context_bridge { +namespace electron::api::context_bridge { ObjectCache::ObjectCache() = default; ObjectCache::~ObjectCache() = default; @@ -50,8 +46,4 @@ v8::MaybeLocal ObjectCache::GetCachedProxiedObject( return v8::MaybeLocal(); } -} // namespace context_bridge - -} // namespace api - -} // namespace electron +} // namespace electron::api::context_bridge diff --git a/shell/renderer/api/context_bridge/object_cache.h b/shell/renderer/api/context_bridge/object_cache.h index 4d6a2dbd2f95e..2039e061378eb 100644 --- a/shell/renderer/api/context_bridge/object_cache.h +++ b/shell/renderer/api/context_bridge/object_cache.h @@ -15,11 +15,7 @@ #include "shell/renderer/electron_render_frame_observer.h" #include "third_party/blink/public/web/web_local_frame.h" -namespace electron { - -namespace api { - -namespace context_bridge { +namespace electron::api::context_bridge { using ObjectCachePair = std::pair, v8::Local>; @@ -38,10 +34,6 @@ class ObjectCache final { std::unordered_map> proxy_map_; }; -} // namespace context_bridge - -} // namespace api - -} // namespace electron +} // namespace electron::api::context_bridge #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 86f793904ebb9..bc60d2356a92c 100644 --- a/shell/renderer/api/electron_api_context_bridge.h +++ b/shell/renderer/api/electron_api_context_bridge.h @@ -12,9 +12,7 @@ namespace gin_helper { class Arguments; } -namespace electron { - -namespace api { +namespace electron::api { void ProxyFunctionWrapper(const v8::FunctionCallbackInfo& info); @@ -51,8 +49,6 @@ v8::MaybeLocal CreateProxyForAPI( bool support_dynamic_properties, int recursion_depth); -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ diff --git a/shell/renderer/api/electron_api_spell_check_client.cc b/shell/renderer/api/electron_api_spell_check_client.cc index 21374c965b3f3..12d2e207bf06c 100644 --- a/shell/renderer/api/electron_api_spell_check_client.cc +++ b/shell/renderer/api/electron_api_spell_check_client.cc @@ -22,9 +22,7 @@ #include "third_party/blink/public/web/web_text_checking_result.h" #include "third_party/icu/source/common/unicode/uscript.h" -namespace electron { - -namespace api { +namespace electron::api { namespace { @@ -275,6 +273,4 @@ SpellCheckClient::SpellCheckScope::SpellCheckScope( SpellCheckClient::SpellCheckScope::~SpellCheckScope() = default; -} // namespace api - -} // namespace electron +} // namespace electron::api diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index d0b0a9b1956aa..bee731c1a68ec 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -23,9 +23,7 @@ struct WebTextCheckingResult; class WebTextCheckingCompletion; } // namespace blink -namespace electron { - -namespace api { +namespace electron::api { class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, public blink::WebTextCheckClient, @@ -109,8 +107,6 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, v8::Global spell_check_; }; -} // namespace api - -} // namespace electron +} // namespace electron::api #endif // ELECTRON_SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ From c3920c5c02a6875b444a7c4017ba85145b658fec Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 06:02:00 -0700 Subject: [PATCH 552/811] Bump v21.0.0-nightly.20220630 --- 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 45dd56b31f751..9f827e820d659 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220629 \ No newline at end of file +21.0.0-nightly.20220630 \ No newline at end of file diff --git a/package.json b/package.json index 272abf0eda703..b7fe1ca4c63fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220629", + "version": "21.0.0-nightly.20220630", "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 d4904ad4b3a19..4afb213922356 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 21,0,0,20220629 - PRODUCTVERSION 21,0,0,20220629 + FILEVERSION 21,0,0,20220630 + PRODUCTVERSION 21,0,0,20220630 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c885f9063bda5032fe430bbee724f77b66ce034a Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Thu, 30 Jun 2022 21:53:03 +0530 Subject: [PATCH 553/811] docs: document the removal of IA32 Linux support (#34787) * docs: document the removal of IA32 Linux support Chromium had dropped support for IA32 Linux, so the Chromium 102.0.4999.0 upgrade PR, https://github.com/electron/electron/pull/33731, had introduced the commit, https://github.com/electron/electron/pull/33731/commits/389ef0731efca802db2089486ad6d9a91cc02ba8, to drop support for IA32 Linux but the change landed without an addition to the documentation for the breaking changes, so this PR adds that. Closes: https://github.com/electron/electron/issues/34783 Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=1194538 Signed-off-by: Darshan Sen * Update docs/breaking-changes.md Co-authored-by: Keeley Hammond Co-authored-by: Jeremy Rose Co-authored-by: Keeley Hammond --- docs/breaking-changes.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 08136f49a514b..ad74ddcb1c200 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -98,7 +98,10 @@ is the origin that is checking for device permission. ## Planned Breaking API Changes (19.0) -None +### Removed: IA32 Linux binaries + +This is a result of Chromium 102.0.4999.0 dropping support for IA32 Linux. +This concludes the [removal of support for IA32 Linux](#removed-ia32-linux-support). ## Planned Breaking API Changes (18.0) @@ -1265,6 +1268,10 @@ not present, then the native module will fail to load on Windows, with an error message like `Cannot find module`. See the [native module guide](/docs/tutorial/using-native-node-modules.md) for more. +### Removed: IA32 Linux support + +Electron 18 will no longer run on 32-bit Linux systems. See [discontinuing support for 32-bit Linux](https://www.electronjs.org/blog/linux-32bit-support) for more information. + ## Breaking API Changes (3.0) The following list includes the breaking API changes in Electron 3.0. From d359736e653c343160517ad5fb8ef3d874bb0f3c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 06:00:58 -0700 Subject: [PATCH 554/811] Bump v21.0.0-nightly.20220701 --- 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 9f827e820d659..3002ff9823325 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220630 \ No newline at end of file +21.0.0-nightly.20220701 \ No newline at end of file diff --git a/package.json b/package.json index b7fe1ca4c63fe..31ff148c2a40f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220630", + "version": "21.0.0-nightly.20220701", "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 4afb213922356..626dd31101be5 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 21,0,0,20220630 - PRODUCTVERSION 21,0,0,20220630 + FILEVERSION 21,0,0,20220701 + PRODUCTVERSION 21,0,0,20220701 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1edf9d2ada2b5e7df2cd3c2e7e971b9db156e677 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 06:02:50 -0700 Subject: [PATCH 555/811] Bump v21.0.0-nightly.20220704 --- 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 3002ff9823325..6447e4aa3f9ec 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220701 \ No newline at end of file +21.0.0-nightly.20220704 \ No newline at end of file diff --git a/package.json b/package.json index 31ff148c2a40f..ee1cf6953861e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220701", + "version": "21.0.0-nightly.20220704", "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 626dd31101be5..2c4f316c5623b 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 21,0,0,20220701 - PRODUCTVERSION 21,0,0,20220701 + FILEVERSION 21,0,0,20220704 + PRODUCTVERSION 21,0,0,20220704 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d28ed0da20a26055f38341daa73c600e24fc4b0a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 5 Jul 2022 06:01:17 -0700 Subject: [PATCH 556/811] Bump v21.0.0-nightly.20220705 --- 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 6447e4aa3f9ec..118f51b1b228f 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220704 \ No newline at end of file +21.0.0-nightly.20220705 \ No newline at end of file diff --git a/package.json b/package.json index ee1cf6953861e..a8bc1ba4b573b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220704", + "version": "21.0.0-nightly.20220705", "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 2c4f316c5623b..125586262883f 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 21,0,0,20220704 - PRODUCTVERSION 21,0,0,20220704 + FILEVERSION 21,0,0,20220705 + PRODUCTVERSION 21,0,0,20220705 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0ee7f14190e75d0e7b669661c81235a4a2bfadb4 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 5 Jul 2022 08:25:18 -0700 Subject: [PATCH 557/811] chore: modernize Value usage in converters (#34794) * chore: modernize Value usage in converters * Date is parsed as an empty object now --- filenames.gni | 2 - shell/browser/api/electron_api_base_window.cc | 2 +- shell/browser/api/electron_api_base_window.h | 2 +- .../api/electron_api_content_tracing.cc | 5 +- shell/browser/api/electron_api_cookies.cc | 47 +- shell/browser/api/electron_api_cookies.h | 8 +- shell/browser/api/electron_api_debugger.cc | 66 +-- shell/browser/api/electron_api_debugger.h | 2 +- shell/browser/api/electron_api_session.cc | 4 +- shell/browser/api/electron_api_session.h | 7 +- .../api/electron_api_system_preferences.h | 6 +- .../electron_api_system_preferences_mac.mm | 43 +- shell/browser/browser.h | 6 +- shell/browser/browser_linux.cc | 4 +- shell/browser/browser_mac.mm | 15 +- shell/browser/browser_win.cc | 4 +- shell/browser/electron_browser_context.cc | 6 +- shell/browser/electron_browser_context.h | 10 +- shell/browser/native_window.cc | 5 +- shell/browser/native_window.h | 2 +- shell/browser/native_window_observer.h | 2 +- .../net/electron_url_loader_factory.cc | 6 +- shell/browser/net/url_pipe_loader.cc | 12 +- shell/browser/net/url_pipe_loader.h | 4 +- shell/browser/ui/cocoa/electron_touch_bar.mm | 45 +- shell/common/api/electron_api_native_image.cc | 21 +- shell/common/api/electron_api_native_image.h | 2 +- .../gin_converters/extension_converter.cc | 3 +- shell/common/gin_converters/net_converter.cc | 10 +- .../common/gin_converters/value_converter.cc | 59 +- shell/common/gin_converters/value_converter.h | 19 +- shell/common/v8_value_converter.cc | 524 ------------------ shell/common/v8_value_converter.h | 78 --- spec-main/api-system-preferences-spec.ts | 1 - 34 files changed, 203 insertions(+), 829 deletions(-) delete mode 100644 shell/common/v8_value_converter.cc delete mode 100644 shell/common/v8_value_converter.h diff --git a/filenames.gni b/filenames.gni index 3ce306928a96f..912d11ac9a07a 100644 --- a/filenames.gni +++ b/filenames.gni @@ -643,8 +643,6 @@ filenames = { "shell/common/process_util.h", "shell/common/skia_util.cc", "shell/common/skia_util.h", - "shell/common/v8_value_converter.cc", - "shell/common/v8_value_converter.h", "shell/common/v8_value_serializer.cc", "shell/common/v8_value_serializer.h", "shell/common/world_ids.h", diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index 3f4e529023b53..3a87a11d22f06 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -288,7 +288,7 @@ void BaseWindow::OnExecuteAppCommand(const std::string& command_name) { } void BaseWindow::OnTouchBarItemResult(const std::string& item_id, - const base::DictionaryValue& details) { + const base::Value::Dict& details) { Emit("-touch-bar-interaction", item_id, details); } diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index 98fa9a5556a86..482f510f4ed40 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -80,7 +80,7 @@ class BaseWindow : public gin_helper::TrackableObject, void OnWindowAlwaysOnTopChanged() override; void OnExecuteAppCommand(const std::string& command_name) override; void OnTouchBarItemResult(const std::string& item_id, - const base::DictionaryValue& details) override; + const base::Value::Dict& details) override; void OnNewWindowForTab() override; void OnSystemContextMenu(int x, int y, bool* prevent_default) override; #if BUILDFLAG(IS_WIN) diff --git a/shell/browser/api/electron_api_content_tracing.cc b/shell/browser/api/electron_api_content_tracing.cc index aa1047c403021..a1628bb7f37fa 100644 --- a/shell/browser/api/electron_api_content_tracing.cc +++ b/shell/browser/api/electron_api_content_tracing.cc @@ -42,9 +42,10 @@ struct Converter { } } - base::DictionaryValue memory_dump_config; + base::Value::Dict memory_dump_config; if (ConvertFromV8(isolate, val, &memory_dump_config)) { - *out = base::trace_event::TraceConfig(memory_dump_config); + *out = base::trace_event::TraceConfig( + base::Value(std::move(memory_dump_config))); return true; } diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 7970f87474253..e4cebe4fb572c 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -117,27 +117,27 @@ bool MatchesDomain(std::string filter, const std::string& domain) { } // Returns whether |cookie| matches |filter|. -bool MatchesCookie(const base::Value& filter, +bool MatchesCookie(const base::Value::Dict& filter, const net::CanonicalCookie& cookie) { const std::string* str; - if ((str = filter.FindStringKey("name")) && *str != cookie.Name()) + if ((str = filter.FindString("name")) && *str != cookie.Name()) return false; - if ((str = filter.FindStringKey("path")) && *str != cookie.Path()) + if ((str = filter.FindString("path")) && *str != cookie.Path()) return false; - if ((str = filter.FindStringKey("domain")) && + if ((str = filter.FindString("domain")) && !MatchesDomain(*str, cookie.Domain())) return false; - absl::optional secure_filter = filter.FindBoolKey("secure"); + absl::optional secure_filter = filter.FindBool("secure"); if (secure_filter && *secure_filter == cookie.IsSecure()) return false; - absl::optional session_filter = filter.FindBoolKey("session"); + absl::optional session_filter = filter.FindBool("session"); if (session_filter && *session_filter != !cookie.IsPersistent()) return false; return true; } // Remove cookies from |list| not matching |filter|, and pass it to |callback|. -void FilterCookies(const base::Value& filter, +void FilterCookies(base::Value::Dict filter, gin_helper::Promise promise, const net::CookieList& cookies) { net::CookieList result; @@ -149,11 +149,11 @@ void FilterCookies(const base::Value& filter, } void FilterCookieWithStatuses( - const base::Value& filter, + base::Value::Dict filter, gin_helper::Promise promise, const net::CookieAccessResultList& list, const net::CookieAccessResultList& excluded_list) { - FilterCookies(filter, std::move(promise), + FilterCookies(std::move(filter), std::move(promise), net::cookie_util::StripAccessResults(list)); } @@ -231,7 +231,7 @@ v8::Local Cookies::Get(v8::Isolate* isolate, auto* storage_partition = browser_context_->GetDefaultStoragePartition(); auto* manager = storage_partition->GetCookieManagerForBrowserProcess(); - base::DictionaryValue dict; + base::Value::Dict dict; gin::ConvertFromV8(isolate, filter.GetHandle(), &dict); std::string url; @@ -280,31 +280,31 @@ v8::Local Cookies::Remove(v8::Isolate* isolate, } v8::Local Cookies::Set(v8::Isolate* isolate, - const base::DictionaryValue& details) { + base::Value::Dict details) { gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); - const std::string* url_string = details.FindStringKey("url"); + const std::string* url_string = details.FindString("url"); if (!url_string) { promise.RejectWithErrorMessage("Missing required option 'url'"); return handle; } - const std::string* name = details.FindStringKey("name"); - const std::string* value = details.FindStringKey("value"); - const std::string* domain = details.FindStringKey("domain"); - const std::string* path = details.FindStringKey("path"); - bool http_only = details.FindBoolKey("httpOnly").value_or(false); - const std::string* same_site_string = details.FindStringKey("sameSite"); + const std::string* name = details.FindString("name"); + const std::string* value = details.FindString("value"); + const std::string* domain = details.FindString("domain"); + const std::string* path = details.FindString("path"); + bool http_only = details.FindBool("httpOnly").value_or(false); + const std::string* same_site_string = details.FindString("sameSite"); net::CookieSameSite same_site; std::string error = StringToCookieSameSite(same_site_string, &same_site); if (!error.empty()) { promise.RejectWithErrorMessage(error); return handle; } - bool secure = details.FindBoolKey("secure").value_or( + bool secure = details.FindBool("secure").value_or( same_site == net::CookieSameSite::NO_RESTRICTION); bool same_party = - details.FindBoolKey("sameParty") + details.FindBool("sameParty") .value_or(secure && same_site != net::CookieSameSite::STRICT_MODE); GURL url(url_string ? *url_string : ""); @@ -317,10 +317,9 @@ v8::Local Cookies::Set(v8::Isolate* isolate, auto canonical_cookie = net::CanonicalCookie::CreateSanitizedCookie( url, name ? *name : "", value ? *value : "", domain ? *domain : "", - path ? *path : "", - ParseTimeProperty(details.FindDoubleKey("creationDate")), - ParseTimeProperty(details.FindDoubleKey("expirationDate")), - ParseTimeProperty(details.FindDoubleKey("lastAccessDate")), secure, + path ? *path : "", ParseTimeProperty(details.FindDouble("creationDate")), + ParseTimeProperty(details.FindDouble("expirationDate")), + ParseTimeProperty(details.FindDouble("lastAccessDate")), secure, http_only, same_site, net::COOKIE_PRIORITY_DEFAULT, same_party, absl::nullopt); if (!canonical_cookie || !canonical_cookie->IsCanonical()) { diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index fbfa335ce9f8a..3b98c033afe6d 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -8,6 +8,7 @@ #include #include "base/callback_list.h" +#include "base/values.h" #include "gin/handle.h" #include "net/cookies/canonical_cookie.h" #include "net/cookies/cookie_change_dispatcher.h" @@ -15,10 +16,6 @@ #include "shell/common/gin_helper/promise.h" #include "shell/common/gin_helper/trackable_object.h" -namespace base { -class DictionaryValue; -} - namespace gin_helper { class Dictionary; } @@ -51,8 +48,7 @@ class Cookies : public gin::Wrappable, v8::Local Get(v8::Isolate*, const gin_helper::Dictionary& filter); - v8::Local Set(v8::Isolate*, - const base::DictionaryValue& details); + v8::Local Set(v8::Isolate*, base::Value::Dict details); v8::Local Remove(v8::Isolate*, const GURL& url, const std::string& name); diff --git a/shell/browser/api/electron_api_debugger.cc b/shell/browser/api/electron_api_debugger.cc index fcd44205d75e1..e24c0dca3d658 100644 --- a/shell/browser/api/electron_api_debugger.cc +++ b/shell/browser/api/electron_api_debugger.cc @@ -45,44 +45,35 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, base::StringPiece message_str(reinterpret_cast(message.data()), message.size()); - std::unique_ptr parsed_message = - base::JSONReader::ReadDeprecated(message_str, - base::JSON_REPLACE_INVALID_CHARACTERS); + absl::optional parsed_message = base::JSONReader::Read( + message_str, base::JSON_REPLACE_INVALID_CHARACTERS); if (!parsed_message || !parsed_message->is_dict()) return; - auto* dict = static_cast(parsed_message.get()); - int id; - if (!dict->GetInteger("id", &id)) { - std::string method; - if (!dict->GetString("method", &method)) + base::Value::Dict& dict = parsed_message->GetDict(); + absl::optional id = dict.FindInt("id"); + if (!id) { + std::string* method = dict.FindString("method"); + if (!method) return; - std::string session_id; - dict->GetString("sessionId", &session_id); - base::DictionaryValue* params_value = nullptr; - base::DictionaryValue params; - if (dict->GetDictionary("params", ¶ms_value)) - params.Swap(params_value); - Emit("message", method, params, session_id); + std::string* session_id = dict.FindString("sessionId"); + base::Value::Dict* params = dict.FindDict("params"); + Emit("message", *method, params ? std::move(*params) : base::Value::Dict(), + session_id ? *session_id : ""); } else { - auto it = pending_requests_.find(id); + auto it = pending_requests_.find(*id); if (it == pending_requests_.end()) return; - gin_helper::Promise promise = std::move(it->second); + gin_helper::Promise promise = std::move(it->second); pending_requests_.erase(it); - base::DictionaryValue* error = nullptr; - if (dict->GetDictionary("error", &error)) { - std::string message; - error->GetString("message", &message); - promise.RejectWithErrorMessage(message); + base::Value::Dict* error = dict.FindDict("error"); + if (error) { + std::string* message = error->FindString("message"); + promise.RejectWithErrorMessage(message ? *message : ""); } else { - base::DictionaryValue* result_body = nullptr; - base::DictionaryValue result; - if (dict->GetDictionary("result", &result_body)) { - result.Swap(result_body); - } - promise.Resolve(result); + base::Value::Dict* result = dict.FindDict("result"); + promise.Resolve(result ? std::move(*result) : base::Value::Dict()); } } } @@ -133,7 +124,7 @@ void Debugger::Detach() { v8::Local Debugger::SendCommand(gin::Arguments* args) { v8::Isolate* isolate = args->isolate(); - gin_helper::Promise promise(isolate); + gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); if (!agent_host_) { @@ -147,7 +138,7 @@ v8::Local Debugger::SendCommand(gin::Arguments* args) { return handle; } - base::DictionaryValue command_params; + base::Value::Dict command_params; args->GetNext(&command_params); std::string session_id; @@ -156,22 +147,21 @@ v8::Local Debugger::SendCommand(gin::Arguments* args) { return handle; } - base::DictionaryValue request; + base::Value::Dict request; int request_id = ++previous_request_id_; pending_requests_.emplace(request_id, std::move(promise)); - request.SetInteger("id", request_id); - request.SetString("method", method); - if (!command_params.DictEmpty()) { - request.Set("params", - base::Value::ToUniquePtrValue(command_params.Clone())); + request.Set("id", request_id); + request.Set("method", method); + if (!command_params.empty()) { + request.Set("params", base::Value(std::move(command_params))); } if (!session_id.empty()) { - request.SetString("sessionId", session_id); + request.Set("sessionId", session_id); } std::string json_args; - base::JSONWriter::Write(request, &json_args); + base::JSONWriter::Write(base::Value(std::move(request)), &json_args); agent_host_->DispatchProtocolMessage( this, base::as_bytes(base::make_span(json_args))); diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index dc4f3b7eec427..e9388df8b25a2 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -57,7 +57,7 @@ class Debugger : public gin::Wrappable, private: using PendingRequestMap = - std::map>; + std::map>; void Attach(gin::Arguments* args); bool IsAttached(); diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 3d2a13be44d68..c02eddd57fe3c 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -1160,7 +1160,7 @@ gin::Handle Session::CreateFrom( // static gin::Handle Session::FromPartition(v8::Isolate* isolate, const std::string& partition, - base::DictionaryValue options) { + base::Value::Dict options) { ElectronBrowserContext* browser_context; if (partition.empty()) { browser_context = @@ -1265,7 +1265,7 @@ v8::Local FromPartition(const std::string& partition, args->ThrowTypeError("Session can only be received when app is ready"); return v8::Null(args->isolate()); } - base::DictionaryValue options; + base::Value::Dict options; args->GetNext(&options); return Session::FromPartition(args->isolate(), partition, std::move(options)) .ToV8(); diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index e9b69380dfaf9..c5f21920dcc6e 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -75,10 +75,9 @@ class Session : public gin::Wrappable, static Session* FromBrowserContext(content::BrowserContext* context); // Gets the Session of |partition|. - static gin::Handle FromPartition( - v8::Isolate* isolate, - const std::string& partition, - base::DictionaryValue options = base::DictionaryValue()); + static gin::Handle FromPartition(v8::Isolate* isolate, + const std::string& partition, + base::Value::Dict options = {}); ElectronBrowserContext* browser_context() const { return browser_context_; } diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index b3ef33f5ff44a..b311e97fc6831 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -72,18 +72,18 @@ class SystemPreferences void(const std::string&, base::Value, const std::string&)>; void PostNotification(const std::string& name, - base::DictionaryValue user_info, + base::Value::Dict user_info, gin::Arguments* args); int SubscribeNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeNotification(int id); void PostLocalNotification(const std::string& name, - base::DictionaryValue user_info); + base::Value::Dict user_info); int SubscribeLocalNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeLocalNotification(int request_id); void PostWorkspaceNotification(const std::string& name, - base::DictionaryValue user_info); + base::Value::Dict user_info); int SubscribeWorkspaceNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeWorkspaceNotification(int request_id); diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index d8ef89fa4d98e..bbd37e3c38e63 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -138,7 +138,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { } // namespace void SystemPreferences::PostNotification(const std::string& name, - base::DictionaryValue user_info, + base::Value::Dict user_info, gin::Arguments* args) { bool immediate = false; args->GetNext(&immediate); @@ -148,7 +148,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { [center postNotificationName:base::SysUTF8ToNSString(name) object:nil - userInfo:DictionaryValueToNSDictionary(user_info.GetDict()) + userInfo:DictionaryValueToNSDictionary(std::move(user_info)) deliverImmediately:immediate]; } @@ -166,12 +166,12 @@ AVMediaType ParseMediaType(const std::string& media_type) { } void SystemPreferences::PostLocalNotification(const std::string& name, - base::DictionaryValue user_info) { + base::Value::Dict user_info) { NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; [center postNotificationName:base::SysUTF8ToNSString(name) object:nil - userInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; + userInfo:DictionaryValueToNSDictionary(std::move(user_info))]; } int SystemPreferences::SubscribeLocalNotification( @@ -186,15 +186,14 @@ AVMediaType ParseMediaType(const std::string& media_type) { NotificationCenterKind::kNSNotificationCenter); } -void SystemPreferences::PostWorkspaceNotification( - const std::string& name, - base::DictionaryValue user_info) { +void SystemPreferences::PostWorkspaceNotification(const std::string& name, + base::Value::Dict user_info) { NSNotificationCenter* center = [[NSWorkspace sharedWorkspace] notificationCenter]; [center postNotificationName:base::SysUTF8ToNSString(name) object:nil - userInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; + userInfo:DictionaryValueToNSDictionary(std::move(user_info))]; } int SystemPreferences::SubscribeWorkspaceNotification( @@ -246,7 +245,7 @@ AVMediaType ParseMediaType(const std::string& media_type) { } else { copied_callback.Run( base::SysNSStringToUTF8(notification.name), - base::DictionaryValue(), object); + base::Value(base::Value::Dict()), object); } }]; return request_id; @@ -295,24 +294,24 @@ AVMediaType ParseMediaType(const std::string& media_type) { } void SystemPreferences::RegisterDefaults(gin::Arguments* args) { - base::DictionaryValue value; + base::Value::Dict value; if (!args->GetNext(&value)) { args->ThrowError(); - } else { - @try { - NSDictionary* dict = DictionaryValueToNSDictionary(value.GetDict()); - for (id key in dict) { - id value = [dict objectForKey:key]; - if ([value isKindOfClass:[NSNull class]] || value == nil) { - args->ThrowError(); - return; - } + return; + } + @try { + NSDictionary* dict = DictionaryValueToNSDictionary(std::move(value)); + for (id key in dict) { + id value = [dict objectForKey:key]; + if ([value isKindOfClass:[NSNull class]] || value == nil) { + args->ThrowError(); + return; } - [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; - } @catch (NSException* exception) { - args->ThrowError(); } + [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; + } @catch (NSException* exception) { + args->ThrowError(); } } diff --git a/shell/browser/browser.h b/shell/browser/browser.h index aaae1b774f3fd..7fc47ef826dad 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -165,7 +165,7 @@ class Browser : public WindowListObserver { // Creates an activity and sets it as the one currently in use. void SetUserActivity(const std::string& type, - base::DictionaryValue user_info, + base::Value::Dict user_info, gin::Arguments* args); // Returns the type name of the current user activity. @@ -180,7 +180,7 @@ class Browser : public WindowListObserver { // Updates the current user activity void UpdateCurrentActivity(const std::string& type, - base::DictionaryValue user_info); + base::Value::Dict user_info); // Indicates that an user activity is about to be resumed. bool WillContinueUserActivity(const std::string& type); @@ -231,7 +231,7 @@ class Browser : public WindowListObserver { #endif // BUILDFLAG(IS_MAC) void ShowAboutPanel(); - void SetAboutPanelOptions(base::DictionaryValue options); + void SetAboutPanelOptions(base::Value::Dict options); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) void ShowEmojiPanel(); diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index 8b38c9ca67bf7..d7b7b96dfac6e 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -224,8 +224,8 @@ void Browser::ShowAboutPanel() { gtk_widget_destroy(dialogWidget); } -void Browser::SetAboutPanelOptions(base::DictionaryValue options) { - about_panel_options_ = std::move(options); +void Browser::SetAboutPanelOptions(base::Value::Dict options) { + about_panel_options_ = base::Value(std::move(options)); } } // namespace electron diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index f155160f55fbe..ed35f421cea73 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -235,14 +235,14 @@ } void Browser::SetUserActivity(const std::string& type, - base::DictionaryValue user_info, + base::Value::Dict user_info, gin::Arguments* args) { std::string url_string; args->GetNext(&url_string); [[AtomApplication sharedApplication] setCurrentActivity:base::SysUTF8ToNSString(type) - withUserInfo:DictionaryValueToNSDictionary(user_info.GetDict()) + withUserInfo:DictionaryValueToNSDictionary(std::move(user_info)) withWebpageURL:net::NSURLWithGURL(GURL(url_string))]; } @@ -261,10 +261,11 @@ } void Browser::UpdateCurrentActivity(const std::string& type, - base::DictionaryValue user_info) { + base::Value::Dict user_info) { [[AtomApplication sharedApplication] updateCurrentActivity:base::SysUTF8ToNSString(type) - withUserInfo:DictionaryValueToNSDictionary(user_info.GetDict())]; + withUserInfo:DictionaryValueToNSDictionary( + std::move(user_info))]; } bool Browser::WillContinueUserActivity(const std::string& type) { @@ -511,11 +512,11 @@ void RemoveFromLoginItems() { orderFrontStandardAboutPanelWithOptions:options]; } -void Browser::SetAboutPanelOptions(base::DictionaryValue options) { +void Browser::SetAboutPanelOptions(base::Value::Dict options) { about_panel_options_.DictClear(); - for (const auto pair : options.DictItems()) { - std::string key = std::string(pair.first); + for (const auto pair : options) { + std::string key = pair.first; if (!key.empty() && pair.second.is_string()) { key[0] = base::ToUpperASCII(key[0]); auto val = std::make_unique(pair.second.Clone()); diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index ced835e59c1fc..43364d65080ef 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -851,8 +851,8 @@ void Browser::ShowAboutPanel() { electron::ShowMessageBoxSync(settings); } -void Browser::SetAboutPanelOptions(base::DictionaryValue options) { - about_panel_options_ = std::move(options); +void Browser::SetAboutPanelOptions(base::Value::Dict options) { + about_panel_options_ = base::Value(std::move(options)); } } // namespace electron diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index e2408f01e91d9..ff4ed57d35964 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -103,7 +103,7 @@ ElectronBrowserContext::browser_context_map() { ElectronBrowserContext::ElectronBrowserContext(const std::string& partition, bool in_memory, - base::DictionaryValue options) + base::Value::Dict options) : storage_policy_(base::MakeRefCounted()), protocol_registry_(base::WrapUnique(new ProtocolRegistry)), in_memory_(in_memory), @@ -111,7 +111,7 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition, // Read options. base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); use_cache_ = !command_line->HasSwitch(switches::kDisableHttpCache); - if (auto use_cache_opt = options.FindBoolKey("cache")) { + if (auto use_cache_opt = options.FindBool("cache")) { use_cache_ = use_cache_opt.value(); } @@ -530,7 +530,7 @@ bool ElectronBrowserContext::CheckDevicePermission( ElectronBrowserContext* ElectronBrowserContext::From( const std::string& partition, bool in_memory, - base::DictionaryValue options) { + base::Value::Dict options) { PartitionKey key(partition, in_memory); ElectronBrowserContext* browser_context = browser_context_map()[key].get(); if (browser_context) { diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index 844df7f65e65b..baaa2ee4ee3a3 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -44,7 +44,6 @@ using DevicePermissionMap = std::map>>>; -class ElectronBrowserContext; class ElectronDownloadManagerDelegate; class ElectronPermissionManager; class CookieChangeNotifier; @@ -82,10 +81,9 @@ class ElectronBrowserContext : public content::BrowserContext { // Get or create the BrowserContext according to its |partition| and // |in_memory|. The |options| will be passed to constructor when there is no // existing BrowserContext. - static ElectronBrowserContext* From( - const std::string& partition, - bool in_memory, - base::DictionaryValue options = base::DictionaryValue()); + static ElectronBrowserContext* From(const std::string& partition, + bool in_memory, + base::Value::Dict options = {}); static BrowserContextMap& browser_context_map(); @@ -177,7 +175,7 @@ class ElectronBrowserContext : public content::BrowserContext { private: ElectronBrowserContext(const std::string& partition, bool in_memory, - base::DictionaryValue options); + base::Value::Dict options); // Initialize pref registry. void InitPrefs(); diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 414cb2ec4e01a..897939991150a 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -658,9 +658,8 @@ void NativeWindow::NotifyWindowExecuteAppCommand(const std::string& command) { observer.OnExecuteAppCommand(command); } -void NativeWindow::NotifyTouchBarItemInteraction( - const std::string& item_id, - const base::DictionaryValue& details) { +void NativeWindow::NotifyTouchBarItemInteraction(const std::string& item_id, + base::Value::Dict details) { for (NativeWindowObserver& observer : observers_) observer.OnTouchBarItemResult(item_id, details); } diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 3170c1911c074..13de702f18863 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -304,7 +304,7 @@ class NativeWindow : public base::SupportsUserData, void NotifyWindowAlwaysOnTopChanged(); void NotifyWindowExecuteAppCommand(const std::string& command); void NotifyTouchBarItemInteraction(const std::string& item_id, - const base::DictionaryValue& details); + base::Value::Dict details); void NotifyNewWindowForTab(); void NotifyWindowSystemContextMenu(int x, int y, bool* prevent_default); void NotifyLayoutWindowControlsOverlay(); diff --git a/shell/browser/native_window_observer.h b/shell/browser/native_window_observer.h index 64f06179ffede..6cbc941450642 100644 --- a/shell/browser/native_window_observer.h +++ b/shell/browser/native_window_observer.h @@ -93,7 +93,7 @@ class NativeWindowObserver : public base::CheckedObserver { virtual void OnWindowLeaveHtmlFullScreen() {} virtual void OnWindowAlwaysOnTopChanged() {} virtual void OnTouchBarItemResult(const std::string& item_id, - const base::DictionaryValue& details) {} + const base::Value::Dict& details) {} virtual void OnNewWindowForTab() {} virtual void OnSystemContextMenu(int x, int y, bool* prevent_default) {} diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index 02a93aae14bcb..b7418c82531cb 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -114,9 +114,9 @@ network::mojom::URLResponseHeadPtr ToResponseHead( bool has_mime_type = dict.Get("mimeType", &head->mime_type); bool has_content_type = false; - base::DictionaryValue headers; + base::Value::Dict headers; if (dict.Get("headers", &headers)) { - for (const auto iter : headers.DictItems()) { + for (const auto iter : headers) { if (iter.second.is_string()) { // key, value head->headers->AddHeader(iter.first, iter.second.GetString()); @@ -513,7 +513,7 @@ void ElectronURLLoaderFactory::StartLoadingHttp( if (!dict.Get("method", &request->method)) request->method = original_request.method; - base::DictionaryValue upload_data; + base::Value::Dict upload_data; if (request->method != net::HttpRequestHeaders::kGetMethod && request->method != net::HttpRequestHeaders::kHeadMethod) dict.Get("uploadData", &upload_data); diff --git a/shell/browser/net/url_pipe_loader.cc b/shell/browser/net/url_pipe_loader.cc index 63895e6e3d03d..1729ded04a423 100644 --- a/shell/browser/net/url_pipe_loader.cc +++ b/shell/browser/net/url_pipe_loader.cc @@ -19,7 +19,7 @@ URLPipeLoader::URLPipeLoader( mojo::PendingReceiver loader, mojo::PendingRemote client, const net::NetworkTrafficAnnotationTag& annotation, - base::DictionaryValue upload_data) + base::Value::Dict upload_data) : url_loader_(this, std::move(loader)), client_(std::move(client)) { url_loader_.set_disconnect_handler(base::BindOnce( &URLPipeLoader::NotifyComplete, base::Unretained(this), net::ERR_FAILED)); @@ -37,17 +37,17 @@ void URLPipeLoader::Start( scoped_refptr factory, std::unique_ptr request, const net::NetworkTrafficAnnotationTag& annotation, - base::DictionaryValue upload_data) { + base::Value::Dict upload_data) { loader_ = network::SimpleURLLoader::Create(std::move(request), annotation); loader_->SetOnResponseStartedCallback(base::BindOnce( &URLPipeLoader::OnResponseStarted, weak_factory_.GetWeakPtr())); // TODO(zcbenz): The old protocol API only supports string as upload data, // we should seek to support more types in future. - std::string content_type, data; - if (upload_data.GetString("contentType", &content_type) && - upload_data.GetString("data", &data)) - loader_->AttachStringForUpload(data, content_type); + std::string* content_type = upload_data.FindString("contentType"); + std::string* data = upload_data.FindString("data"); + if (content_type && data) + loader_->AttachStringForUpload(*data, *content_type); loader_->DownloadAsStream(factory.get(), this); } diff --git a/shell/browser/net/url_pipe_loader.h b/shell/browser/net/url_pipe_loader.h index 09baa5f142619..e55a771ea1652 100644 --- a/shell/browser/net/url_pipe_loader.h +++ b/shell/browser/net/url_pipe_loader.h @@ -39,7 +39,7 @@ class URLPipeLoader : public network::mojom::URLLoader, mojo::PendingReceiver loader, mojo::PendingRemote client, const net::NetworkTrafficAnnotationTag& annotation, - base::DictionaryValue upload_data); + base::Value::Dict upload_data); // disable copy URLPipeLoader(const URLPipeLoader&) = delete; @@ -51,7 +51,7 @@ class URLPipeLoader : public network::mojom::URLLoader, void Start(scoped_refptr factory, std::unique_ptr request, const net::NetworkTrafficAnnotationTag& annotation, - base::DictionaryValue upload_data); + base::Value::Dict upload_data); void NotifyComplete(int result); void OnResponseStarted(const GURL& final_url, const network::mojom::URLResponseHead& response_head); diff --git a/shell/browser/ui/cocoa/electron_touch_bar.mm b/shell/browser/ui/cocoa/electron_touch_bar.mm index 3272ebc652ed1..ae866e8629bbb 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.mm +++ b/shell/browser/ui/cocoa/electron_touch_bar.mm @@ -241,8 +241,7 @@ - (void)refreshTouchBarItem:(NSTouchBar*)touchBar - (void)buttonAction:(id)sender { NSString* item_id = [NSString stringWithFormat:@"%ld", ((NSButton*)sender).tag]; - window_->NotifyTouchBarItemInteraction([item_id UTF8String], - base::DictionaryValue()); + window_->NotifyTouchBarItemInteraction([item_id UTF8String], {}); } - (void)colorPickerAction:(id)sender { @@ -252,19 +251,20 @@ - (void)colorPickerAction:(id)sender { NSColor* color = ((NSColorPickerTouchBarItem*)sender).color; std::string hex_color = electron::ToRGBHex(skia::NSDeviceColorToSkColor(color)); - base::DictionaryValue details; - details.SetString("color", hex_color); - window_->NotifyTouchBarItemInteraction([item_id UTF8String], details); + base::Value::Dict details; + details.Set("color", hex_color); + window_->NotifyTouchBarItemInteraction([item_id UTF8String], + std::move(details)); } - (void)sliderAction:(id)sender { NSString* identifier = ((NSSliderTouchBarItem*)sender).identifier; NSString* item_id = [self idFromIdentifier:identifier withPrefix:SliderIdentifier]; - base::DictionaryValue details; - details.SetInteger("value", - [((NSSliderTouchBarItem*)sender).slider intValue]); - window_->NotifyTouchBarItemInteraction([item_id UTF8String], details); + base::Value::Dict details; + details.Set("value", [((NSSliderTouchBarItem*)sender).slider intValue]); + window_->NotifyTouchBarItemInteraction([item_id UTF8String], + std::move(details)); } - (NSString*)idFromIdentifier:(NSString*)identifier @@ -275,32 +275,33 @@ - (NSString*)idFromIdentifier:(NSString*)identifier - (void)segmentedControlAction:(id)sender { NSString* item_id = [NSString stringWithFormat:@"%ld", ((NSSegmentedControl*)sender).tag]; - base::DictionaryValue details; - details.SetInteger("selectedIndex", - ((NSSegmentedControl*)sender).selectedSegment); - details.SetBoolean( + base::Value::Dict details; + details.Set("selectedIndex", + static_cast(((NSSegmentedControl*)sender).selectedSegment)); + details.Set( "isSelected", [((NSSegmentedControl*)sender) isSelectedForSegment:((NSSegmentedControl*)sender).selectedSegment]); - window_->NotifyTouchBarItemInteraction([item_id UTF8String], details); + window_->NotifyTouchBarItemInteraction([item_id UTF8String], + std::move(details)); } - (void)scrubber:(NSScrubber*)scrubber didSelectItemAtIndex:(NSInteger)selectedIndex { - base::DictionaryValue details; - details.SetInteger("selectedIndex", selectedIndex); - details.SetString("type", "select"); + base::Value::Dict details; + details.Set("selectedIndex", static_cast(selectedIndex)); + details.Set("type", "select"); window_->NotifyTouchBarItemInteraction([scrubber.identifier UTF8String], - details); + std::move(details)); } - (void)scrubber:(NSScrubber*)scrubber didHighlightItemAtIndex:(NSInteger)highlightedIndex { - base::DictionaryValue details; - details.SetInteger("highlightedIndex", highlightedIndex); - details.SetString("type", "highlight"); + base::Value::Dict details; + details.Set("highlightedIndex", static_cast(highlightedIndex)); + details.Set("type", "highlight"); window_->NotifyTouchBarItemInteraction([scrubber.identifier UTF8String], - details); + std::move(details)); } - (NSTouchBarItemIdentifier)identifierFromID:(const std::string&)item_id diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 060c7022fc3cd..dfb6b8cf1d883 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -329,24 +329,24 @@ float NativeImage::GetAspectRatio(const absl::optional scale_factor) { } gin::Handle NativeImage::Resize(gin::Arguments* args, - base::DictionaryValue options) { + base::Value::Dict options) { float scale_factor = GetScaleFactorFromOptions(args); gfx::Size size = GetSize(scale_factor); - int width = size.width(); - int height = size.height(); - bool width_set = options.GetInteger("width", &width); - bool height_set = options.GetInteger("height", &height); + absl::optional new_width = options.FindInt("width"); + absl::optional new_height = options.FindInt("height"); + int width = new_width.value_or(size.width()); + int height = new_height.value_or(size.height()); size.SetSize(width, height); if (width <= 0 && height <= 0) { return CreateEmpty(args->isolate()); - } else if (width_set && !height_set) { + } else if (new_width && !new_height) { // Scale height to preserve original aspect ratio size.set_height(width); size = gfx::ScaleToRoundedSize(size, 1.f, 1.f / GetAspectRatio(scale_factor)); - } else if (height_set && !width_set) { + } else if (new_height && !new_width) { // Scale width to preserve original aspect ratio size.set_width(height); size = gfx::ScaleToRoundedSize(size, GetAspectRatio(scale_factor), 1.f); @@ -354,11 +354,10 @@ gin::Handle NativeImage::Resize(gin::Arguments* args, skia::ImageOperations::ResizeMethod method = skia::ImageOperations::ResizeMethod::RESIZE_BEST; - std::string quality; - options.GetString("quality", &quality); - if (quality == "good") + std::string* quality = options.FindString("quality"); + if (quality && *quality == "good") method = skia::ImageOperations::ResizeMethod::RESIZE_GOOD; - else if (quality == "better") + else if (quality && *quality == "better") method = skia::ImageOperations::ResizeMethod::RESIZE_BETTER; gfx::ImageSkia resized = gfx::ImageSkiaOperations::CreateResizedImage( diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index 16c4f8ec0fbd7..3330765ff5d10 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -112,7 +112,7 @@ class NativeImage : public gin::Wrappable { v8::Local GetBitmap(gin::Arguments* args); v8::Local GetNativeHandle(gin_helper::ErrorThrower thrower); gin::Handle Resize(gin::Arguments* args, - base::DictionaryValue options); + base::Value::Dict options); gin::Handle Crop(v8::Isolate* isolate, const gfx::Rect& rect); std::string ToDataURL(gin::Arguments* args); bool IsEmpty(); diff --git a/shell/common/gin_converters/extension_converter.cc b/shell/common/gin_converters/extension_converter.cc index a81d6a81dc5b1..49e99e93905e4 100644 --- a/shell/common/gin_converters/extension_converter.cc +++ b/shell/common/gin_converters/extension_converter.cc @@ -22,7 +22,8 @@ v8::Local Converter::ToV8( dict.Set("path", extension->path()); dict.Set("url", extension->url()); dict.Set("version", extension->VersionString()); - dict.Set("manifest", *(extension->manifest()->value())); + dict.Set("manifest", + *static_cast(extension->manifest()->value())); return gin::ConvertToV8(isolate, dict); } diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 8b467d5509c23..687d7610a8be9 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -234,13 +234,13 @@ v8::Local Converter::ToV8( bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, net::HttpRequestHeaders* out) { - base::DictionaryValue dict; + base::Value::Dict dict; if (!ConvertFromV8(isolate, val, &dict)) return false; - for (base::DictionaryValue::Iterator it(dict); !it.IsAtEnd(); it.Advance()) { - if (it.value().is_string()) { - std::string value = it.value().GetString(); - out->SetHeader(it.key(), value); + for (const auto it : dict) { + if (it.second.is_string()) { + std::string value = it.second.GetString(); + out->SetHeader(it.first, value); } } return true; diff --git a/shell/common/gin_converters/value_converter.cc b/shell/common/gin_converters/value_converter.cc index db89b6a63edf4..414d535db5ebd 100644 --- a/shell/common/gin_converters/value_converter.cc +++ b/shell/common/gin_converters/value_converter.cc @@ -7,38 +7,38 @@ #include #include -#include "base/values.h" -#include "shell/common/v8_value_converter.h" +#include "content/public/renderer/v8_value_converter.h" namespace gin { -bool Converter::FromV8(v8::Isolate* isolate, - v8::Local val, - base::DictionaryValue* out) { - electron::V8ValueConverter converter; - std::unique_ptr value( - converter.FromV8Value(val, isolate->GetCurrentContext())); +bool Converter::FromV8(v8::Isolate* isolate, + v8::Local val, + base::Value::Dict* out) { + std::unique_ptr value = + content::V8ValueConverter::Create()->FromV8Value( + val, isolate->GetCurrentContext()); if (value && value->is_dict()) { - out->Swap(static_cast(value.get())); + *out = std::move(value->GetDict()); return true; } else { return false; } } -v8::Local Converter::ToV8( +v8::Local Converter::ToV8( v8::Isolate* isolate, - const base::DictionaryValue& val) { - electron::V8ValueConverter converter; - return converter.ToV8Value(&val, isolate->GetCurrentContext()); + const base::Value::Dict& val) { + base::Value value(val.Clone()); + return content::V8ValueConverter::Create()->ToV8Value( + &value, isolate->GetCurrentContext()); } bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, base::Value* out) { - electron::V8ValueConverter converter; - std::unique_ptr value( - converter.FromV8Value(val, isolate->GetCurrentContext())); + std::unique_ptr value = + content::V8ValueConverter::Create()->FromV8Value( + val, isolate->GetCurrentContext()); if (value) { *out = std::move(*value); return true; @@ -49,29 +49,30 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8(v8::Isolate* isolate, const base::Value& val) { - electron::V8ValueConverter converter; - return converter.ToV8Value(&val, isolate->GetCurrentContext()); + return content::V8ValueConverter::Create()->ToV8Value( + &val, isolate->GetCurrentContext()); } -bool Converter::FromV8(v8::Isolate* isolate, - v8::Local val, - base::ListValue* out) { - electron::V8ValueConverter converter; - std::unique_ptr value( - converter.FromV8Value(val, isolate->GetCurrentContext())); +bool Converter::FromV8(v8::Isolate* isolate, + v8::Local val, + base::Value::List* out) { + std::unique_ptr value = + content::V8ValueConverter::Create()->FromV8Value( + val, isolate->GetCurrentContext()); if (value && value->is_list()) { - out->Swap(static_cast(value.get())); + *out = std::move(value->GetList()); return true; } else { return false; } } -v8::Local Converter::ToV8( +v8::Local Converter::ToV8( v8::Isolate* isolate, - const base::ListValue& val) { - electron::V8ValueConverter converter; - return converter.ToV8Value(&val, isolate->GetCurrentContext()); + const base::Value::List& val) { + base::Value value(val.Clone()); + return content::V8ValueConverter::Create()->ToV8Value( + &value, isolate->GetCurrentContext()); } } // namespace gin diff --git a/shell/common/gin_converters/value_converter.h b/shell/common/gin_converters/value_converter.h index 16a79af43b9e0..a5c7996883d6b 100644 --- a/shell/common/gin_converters/value_converter.h +++ b/shell/common/gin_converters/value_converter.h @@ -5,23 +5,18 @@ #ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ #define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ +#include "base/values.h" #include "gin/converter.h" -namespace base { -class DictionaryValue; -class ListValue; -class Value; -} // namespace base - namespace gin { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - base::DictionaryValue* out); + base::Value::Dict* out); static v8::Local ToV8(v8::Isolate* isolate, - const base::DictionaryValue& val); + const base::Value::Dict& val); }; template <> @@ -34,12 +29,12 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - base::ListValue* out); + base::Value::List* out); static v8::Local ToV8(v8::Isolate* isolate, - const base::ListValue& val); + const base::Value::List& val); }; } // namespace gin diff --git a/shell/common/v8_value_converter.cc b/shell/common/v8_value_converter.cc deleted file mode 100644 index 971b16b07e330..0000000000000 --- a/shell/common/v8_value_converter.cc +++ /dev/null @@ -1,524 +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. - -#include "shell/common/v8_value_converter.h" - -#include -#include -#include -#include -#include -#include - -#include "base/logging.h" -#include "base/values.h" -#include "shell/common/gin_helper/dictionary.h" -#include "shell/common/node_bindings.h" -#include "shell/common/node_includes.h" - -namespace electron { - -namespace { - -const int kMaxRecursionDepth = 100; - -} // namespace - -// The state of a call to FromV8Value. -class V8ValueConverter::FromV8ValueState { - public: - // Level scope which updates the current depth of some FromV8ValueState. - class Level { - public: - explicit Level(FromV8ValueState* state) : state_(state) { - state_->max_recursion_depth_--; - } - ~Level() { state_->max_recursion_depth_++; } - - private: - FromV8ValueState* state_; - }; - - FromV8ValueState() : max_recursion_depth_(kMaxRecursionDepth) {} - - // If |handle| is not in |unique_map_|, then add it to |unique_map_| and - // return true. - // - // Otherwise do nothing and return false. Here "A is unique" means that no - // other handle B in the map points to the same object as A. Note that A can - // be unique even if there already is another handle with the same identity - // hash (key) in the map, because two objects can have the same hash. - bool AddToUniquenessCheck(v8::Local handle) { - int hash; - auto iter = GetIteratorInMap(handle, &hash); - if (iter != unique_map_.end()) - return false; - - unique_map_.insert(std::make_pair(hash, handle)); - return true; - } - - bool RemoveFromUniquenessCheck(v8::Local handle) { - int unused_hash; - auto iter = GetIteratorInMap(handle, &unused_hash); - if (iter == unique_map_.end()) - return false; - unique_map_.erase(iter); - return true; - } - - bool HasReachedMaxRecursionDepth() { return max_recursion_depth_ < 0; } - - private: - using HashToHandleMap = std::multimap>; - using Iterator = HashToHandleMap::const_iterator; - - Iterator GetIteratorInMap(v8::Local handle, int* hash) { - *hash = handle->GetIdentityHash(); - // We only compare using == with handles to objects with the same identity - // hash. Different hash obviously means different objects, but two objects - // in a couple of thousands could have the same identity hash. - std::pair range = unique_map_.equal_range(*hash); - for (auto it = range.first; it != range.second; ++it) { - // Operator == for handles actually compares the underlying objects. - if (it->second == handle) - return it; - } - // Not found. - return unique_map_.end(); - } - - HashToHandleMap unique_map_; - - int max_recursion_depth_; -}; - -// A class to ensure that objects/arrays that are being converted by -// this V8ValueConverterImpl do not have cycles. -// -// An example of cycle: var v = {}; v = {key: v}; -// Not an example of cycle: var v = {}; a = [v, v]; or w = {a: v, b: v}; -class V8ValueConverter::ScopedUniquenessGuard { - public: - ScopedUniquenessGuard(V8ValueConverter::FromV8ValueState* state, - v8::Local value) - : state_(state), - value_(value), - is_valid_(state_->AddToUniquenessCheck(value_)) {} - ~ScopedUniquenessGuard() { - if (is_valid_) { - bool removed = state_->RemoveFromUniquenessCheck(value_); - DCHECK(removed); - } - } - - // disable copy - ScopedUniquenessGuard(const ScopedUniquenessGuard&) = delete; - ScopedUniquenessGuard& operator=(const ScopedUniquenessGuard&) = delete; - - bool is_valid() const { return is_valid_; } - - private: - typedef std::multimap> HashToHandleMap; - V8ValueConverter::FromV8ValueState* state_; - v8::Local value_; - bool is_valid_; -}; - -V8ValueConverter::V8ValueConverter() = default; - -void V8ValueConverter::SetRegExpAllowed(bool val) { - reg_exp_allowed_ = val; -} - -void V8ValueConverter::SetFunctionAllowed(bool val) { - function_allowed_ = val; -} - -void V8ValueConverter::SetStripNullFromObjects(bool val) { - strip_null_from_objects_ = val; -} - -v8::Local V8ValueConverter::ToV8Value( - const base::Value* value, - v8::Local context) const { - v8::Context::Scope context_scope(context); - v8::EscapableHandleScope handle_scope(context->GetIsolate()); - return handle_scope.Escape(ToV8ValueImpl(context->GetIsolate(), value)); -} - -std::unique_ptr V8ValueConverter::FromV8Value( - v8::Local val, - v8::Local context) const { - v8::Context::Scope context_scope(context); - v8::HandleScope handle_scope(context->GetIsolate()); - FromV8ValueState state; - return FromV8ValueImpl(&state, val, context->GetIsolate()); -} - -v8::Local V8ValueConverter::ToV8ValueImpl( - v8::Isolate* isolate, - const base::Value* value) const { - switch (value->type()) { - case base::Value::Type::NONE: - return v8::Null(isolate); - - case base::Value::Type::BOOLEAN: { - bool val = value->GetBool(); - return v8::Boolean::New(isolate, val); - } - - case base::Value::Type::INTEGER: { - int val = value->GetInt(); - return v8::Integer::New(isolate, val); - } - - case base::Value::Type::DOUBLE: { - double val = value->GetDouble(); - return v8::Number::New(isolate, val); - } - - case base::Value::Type::STRING: { - std::string val = value->GetString(); - return v8::String::NewFromUtf8(isolate, val.c_str(), - v8::NewStringType::kNormal, val.length()) - .ToLocalChecked(); - } - - case base::Value::Type::LIST: - return ToV8Array(isolate, static_cast(value)); - - case base::Value::Type::DICTIONARY: - return ToV8Object(isolate, - static_cast(value)); - - case base::Value::Type::BINARY: - return ToArrayBuffer(isolate, static_cast(value)); - - default: - LOG(ERROR) << "Unexpected value type: " << value->type(); - return v8::Null(isolate); - } -} - -v8::Local V8ValueConverter::ToV8Array( - v8::Isolate* isolate, - const base::ListValue* val) const { - v8::Local result( - v8::Array::New(isolate, val->GetListDeprecated().size())); - auto context = isolate->GetCurrentContext(); - - for (size_t i = 0; i < val->GetListDeprecated().size(); ++i) { - const base::Value& child = val->GetListDeprecated()[i]; - - v8::Local child_v8 = ToV8ValueImpl(isolate, &child); - - v8::TryCatch try_catch(isolate); - result->Set(context, static_cast(i), child_v8).Check(); - if (try_catch.HasCaught()) - LOG(ERROR) << "Setter for index " << i << " threw an exception."; - } - - return result; -} - -v8::Local V8ValueConverter::ToV8Object( - v8::Isolate* isolate, - const base::DictionaryValue* val) const { - gin_helper::Dictionary result = gin::Dictionary::CreateEmpty(isolate); - result.SetHidden("simple", true); - - for (base::DictionaryValue::Iterator iter(*val); !iter.IsAtEnd(); - iter.Advance()) { - const std::string& key = iter.key(); - v8::Local child_v8 = ToV8ValueImpl(isolate, &iter.value()); - - v8::TryCatch try_catch(isolate); - result.Set(key, child_v8); - if (try_catch.HasCaught()) { - LOG(ERROR) << "Setter for property " << key.c_str() << " threw an " - << "exception."; - } - } - - return result.GetHandle(); -} - -v8::Local V8ValueConverter::ToArrayBuffer( - v8::Isolate* isolate, - const base::Value* value) const { - const auto* data = reinterpret_cast(value->GetBlob().data()); - size_t length = value->GetBlob().size(); - - if (NodeBindings::IsInitialized()) { - return node::Buffer::Copy(isolate, data, length).ToLocalChecked(); - } - - if (length > node::Buffer::kMaxLength) { - return v8::Local(); - } - auto context = isolate->GetCurrentContext(); - auto array_buffer = v8::ArrayBuffer::New(isolate, length); - std::shared_ptr backing_store = - array_buffer->GetBackingStore(); - memcpy(backing_store->Data(), data, length); - // From this point, if something goes wrong(can't find Buffer class for - // example) we'll simply return a Uint8Array based on the created ArrayBuffer. - // This can happen if no preload script was specified to the renderer. - gin_helper::Dictionary global(isolate, context->Global()); - v8::Local buffer_value; - - // Get the Buffer class stored as a hidden value in the global object. We'll - // use it return a browserified Buffer. - if (!global.GetHidden("Buffer", &buffer_value) || - !buffer_value->IsFunction()) { - return v8::Uint8Array::New(array_buffer, 0, length); - } - - gin::Dictionary buffer_class( - isolate, - buffer_value->ToObject(isolate->GetCurrentContext()).ToLocalChecked()); - v8::Local from_value; - if (!buffer_class.Get("from", &from_value) || !from_value->IsFunction()) { - return v8::Uint8Array::New(array_buffer, 0, length); - } - - v8::Local args[] = {array_buffer}; - auto func = from_value.As(); - auto result = func->Call(context, v8::Null(isolate), std::size(args), args); - if (!result.IsEmpty()) { - return result.ToLocalChecked(); - } - - return v8::Uint8Array::New(array_buffer, 0, length); -} - -std::unique_ptr V8ValueConverter::FromV8ValueImpl( - FromV8ValueState* state, - v8::Local val, - v8::Isolate* isolate) const { - FromV8ValueState::Level state_level(state); - if (state->HasReachedMaxRecursionDepth()) - return nullptr; - - if (val->IsExternal()) - return std::make_unique(); - - if (val->IsNull()) - return std::make_unique(); - - auto context = isolate->GetCurrentContext(); - - if (val->IsBoolean()) - return std::make_unique(val->ToBoolean(isolate)->Value()); - - if (val->IsInt32()) - return std::make_unique(val.As()->Value()); - - if (val->IsNumber()) { - double val_as_double = val.As()->Value(); - if (!std::isfinite(val_as_double)) - return nullptr; - return std::make_unique(val_as_double); - } - - if (val->IsString()) { - v8::String::Utf8Value utf8(isolate, val); - return std::make_unique(std::string(*utf8, utf8.length())); - } - - if (val->IsUndefined()) - // JSON.stringify ignores undefined. - return nullptr; - - if (val->IsDate()) { - v8::Date* date = v8::Date::Cast(*val); - v8::Local toISOString = - date->Get(context, v8::String::NewFromUtf8(isolate, "toISOString", - v8::NewStringType::kNormal) - .ToLocalChecked()) - .ToLocalChecked(); - if (toISOString->IsFunction()) { - v8::MaybeLocal result = - toISOString.As()->Call(context, val, 0, nullptr); - if (!result.IsEmpty()) { - v8::String::Utf8Value utf8(isolate, result.ToLocalChecked()); - return std::make_unique(std::string(*utf8, utf8.length())); - } - } - } - - if (val->IsRegExp()) { - if (!reg_exp_allowed_) - // JSON.stringify converts to an object. - return FromV8Object(val.As(), state, isolate); - return std::make_unique(*v8::String::Utf8Value(isolate, val)); - } - - // v8::Value doesn't have a ToArray() method for some reason. - if (val->IsArray()) - return FromV8Array(val.As(), state, isolate); - - if (val->IsFunction()) { - if (!function_allowed_) - // JSON.stringify refuses to convert function(){}. - return nullptr; - return FromV8Object(val.As(), state, isolate); - } - - if (node::Buffer::HasInstance(val)) { - return FromNodeBuffer(val, state, isolate); - } - - if (val->IsObject()) { - return FromV8Object(val.As(), state, isolate); - } - - LOG(ERROR) << "Unexpected v8 value type encountered."; - return nullptr; -} - -std::unique_ptr V8ValueConverter::FromV8Array( - v8::Local val, - FromV8ValueState* state, - v8::Isolate* isolate) const { - ScopedUniquenessGuard uniqueness_guard(state, val); - if (!uniqueness_guard.is_valid()) - return std::make_unique(); - - std::unique_ptr scope; - // If val was created in a different context than our current one, change to - // that context, but change back after val is converted. - if (!val->GetCreationContextChecked().IsEmpty() && - val->GetCreationContextChecked() != isolate->GetCurrentContext()) - scope = - std::make_unique(val->GetCreationContextChecked()); - - std::unique_ptr result(new base::ListValue()); - - // Only fields with integer keys are carried over to the ListValue. - for (uint32_t i = 0; i < val->Length(); ++i) { - v8::TryCatch try_catch(isolate); - v8::Local child_v8; - v8::MaybeLocal maybe_child = - val->Get(isolate->GetCurrentContext(), i); - if (try_catch.HasCaught() || !maybe_child.ToLocal(&child_v8)) { - LOG(ERROR) << "Getter for index " << i << " threw an exception."; - child_v8 = v8::Null(isolate); - } - - if (!val->HasRealIndexedProperty(isolate->GetCurrentContext(), i) - .FromMaybe(false)) { - result->Append(base::Value()); - continue; - } - - std::unique_ptr child = - FromV8ValueImpl(state, child_v8, isolate); - if (child) { - result->Append(base::Value::FromUniquePtrValue(std::move(child))); - } else { - // JSON.stringify puts null in places where values don't serialize, for - // example undefined and functions. Emulate that behavior. - result->Append(base::Value()); - } - } - return std::move(result); -} - -std::unique_ptr V8ValueConverter::FromNodeBuffer( - v8::Local value, - FromV8ValueState* state, - v8::Isolate* isolate) const { - std::vector buffer( - node::Buffer::Data(value), - node::Buffer::Data(value) + node::Buffer::Length(value)); - return std::make_unique(std::move(buffer)); -} - -std::unique_ptr V8ValueConverter::FromV8Object( - v8::Local val, - FromV8ValueState* state, - v8::Isolate* isolate) const { - ScopedUniquenessGuard uniqueness_guard(state, val); - if (!uniqueness_guard.is_valid()) - return std::make_unique(); - - std::unique_ptr scope; - // If val was created in a different context than our current one, change to - // that context, but change back after val is converted. - if (!val->GetCreationContextChecked().IsEmpty() && - val->GetCreationContextChecked() != isolate->GetCurrentContext()) - scope = - std::make_unique(val->GetCreationContextChecked()); - - auto result = std::make_unique(); - v8::Local property_names; - if (!val->GetOwnPropertyNames(isolate->GetCurrentContext()) - .ToLocal(&property_names)) { - return std::move(result); - } - - for (uint32_t i = 0; i < property_names->Length(); ++i) { - v8::Local key = - property_names->Get(isolate->GetCurrentContext(), i).ToLocalChecked(); - - // Extend this test to cover more types as necessary and if sensible. - if (!key->IsString() && !key->IsNumber()) { - NOTREACHED() << "Key \"" << *v8::String::Utf8Value(isolate, key) - << "\" " - "is neither a string nor a number"; - continue; - } - - v8::String::Utf8Value name_utf8(isolate, key); - - v8::TryCatch try_catch(isolate); - v8::Local child_v8; - v8::MaybeLocal maybe_child = - val->Get(isolate->GetCurrentContext(), key); - if (try_catch.HasCaught() || !maybe_child.ToLocal(&child_v8)) { - LOG(ERROR) << "Getter for property " << *name_utf8 - << " threw an exception."; - child_v8 = v8::Null(isolate); - } - - std::unique_ptr child = - FromV8ValueImpl(state, child_v8, isolate); - if (!child) - // JSON.stringify skips properties whose values don't serialize, for - // example undefined and functions. Emulate that behavior. - continue; - - // Strip null if asked (and since undefined is turned into null, undefined - // too). The use case for supporting this is JSON-schema support, - // specifically for extensions, where "optional" JSON properties may be - // represented as null, yet due to buggy legacy code elsewhere isn't - // treated as such (potentially causing crashes). For example, the - // "tabs.create" function takes an object as its first argument with an - // optional "windowId" property. - // - // Given just - // - // tabs.create({}) - // - // this will work as expected on code that only checks for the existence of - // a "windowId" property (such as that legacy code). However given - // - // tabs.create({windowId: null}) - // - // there *is* a "windowId" property, but since it should be an int, code - // on the browser which doesn't additionally check for null will fail. - // We can avoid all bugs related to this by stripping null. - if (strip_null_from_objects_ && child->is_none()) - continue; - - result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()), - std::move(child)); - } - - return std::move(result); -} - -} // namespace electron diff --git a/shell/common/v8_value_converter.h b/shell/common/v8_value_converter.h deleted file mode 100644 index 5a1c5e21b90c0..0000000000000 --- a/shell/common/v8_value_converter.h +++ /dev/null @@ -1,78 +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_COMMON_V8_VALUE_CONVERTER_H_ -#define ELECTRON_SHELL_COMMON_V8_VALUE_CONVERTER_H_ - -#include - -#include "base/compiler_specific.h" -#include "v8/include/v8.h" - -namespace base { -class DictionaryValue; -class ListValue; -class Value; -} // namespace base - -namespace electron { - -class V8ValueConverter { - public: - V8ValueConverter(); - - // disable copy - V8ValueConverter(const V8ValueConverter&) = delete; - V8ValueConverter& operator=(const V8ValueConverter&) = delete; - - void SetRegExpAllowed(bool val); - void SetFunctionAllowed(bool val); - void SetStripNullFromObjects(bool val); - v8::Local ToV8Value(const base::Value* value, - v8::Local context) const; - std::unique_ptr FromV8Value( - v8::Local value, - v8::Local context) const; - - private: - class FromV8ValueState; - class ScopedUniquenessGuard; - - v8::Local ToV8ValueImpl(v8::Isolate* isolate, - const base::Value* value) const; - v8::Local ToV8Array(v8::Isolate* isolate, - const base::ListValue* list) const; - v8::Local ToV8Object( - v8::Isolate* isolate, - const base::DictionaryValue* dictionary) const; - v8::Local ToArrayBuffer(v8::Isolate* isolate, - const base::Value* value) const; - - std::unique_ptr FromV8ValueImpl(FromV8ValueState* state, - v8::Local value, - v8::Isolate* isolate) const; - std::unique_ptr FromV8Array(v8::Local array, - FromV8ValueState* state, - v8::Isolate* isolate) const; - std::unique_ptr FromNodeBuffer(v8::Local value, - FromV8ValueState* state, - v8::Isolate* isolate) const; - std::unique_ptr FromV8Object(v8::Local object, - FromV8ValueState* state, - v8::Isolate* isolate) const; - - // If true, we will convert RegExp JavaScript objects to string. - bool reg_exp_allowed_ = false; - - // If true, we will convert Function JavaScript objects to dictionaries. - bool function_allowed_ = false; - - // If true, undefined and null values are ignored when converting v8 objects - // into Values. - bool strip_null_from_objects_ = false; -}; - -} // namespace electron - -#endif // ELECTRON_SHELL_COMMON_V8_VALUE_CONVERTER_H_ diff --git a/spec-main/api-system-preferences-spec.ts b/spec-main/api-system-preferences-spec.ts index 38a16045ddb13..d050e40d816a0 100644 --- a/spec-main/api-system-preferences-spec.ts +++ b/spec-main/api-system-preferences-spec.ts @@ -46,7 +46,6 @@ describe('systemPreferences module', () => { const badDefaults = [ 1, null, - new Date(), { one: null } ]; From e5db178ab6ced4bd2fb315457dc1e3cabf9d379f Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 5 Jul 2022 08:28:22 -0700 Subject: [PATCH 558/811] feat: enable v8 sandboxed pointers (#34724) * feat: enable v8 sandboxed pointers * update breaking-changes.md * update zero-fill patch benchmarks showed the function call was slower --- build/args/all.gn | 4 - docs/breaking-changes.md | 7 + .../node/support_v8_sandboxed_pointers.patch | 170 ++++-------------- patches/v8/.patches | 1 - .../force_disable_v8_sandboxed_pointers.patch | 24 --- 5 files changed, 41 insertions(+), 165 deletions(-) delete mode 100644 patches/v8/force_disable_v8_sandboxed_pointers.patch diff --git a/build/args/all.gn b/build/args/all.gn index 9a3fee65b82d2..f1de439d833fc 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -45,7 +45,3 @@ enable_cet_shadow_stack = false # V8 in the browser process. # Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281 is_cfi = false - -# TODO(nornagon): this is disabled until node.js's internals can be made -# compatible with sandboxed pointers. -v8_enable_sandboxed_pointers = false diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index ad74ddcb1c200..c6c511b32bb18 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -14,6 +14,13 @@ This document uses the following convention to categorize breaking changes: ## Planned Breaking API Changes (20.0) +### Behavior Changed: V8 Memory Cage enabled + +The V8 memory cage has been enabled, which has implications for native modules +which wrap non-V8 memory with `ArrayBuffer` or `Buffer`. See the [blog post +about the V8 memory cage](https://www.electronjs.org/blog/v8-memory-cage) for +more details. + ### API Changed: `webContents.printToPDF()` `webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to diff --git a/patches/node/support_v8_sandboxed_pointers.patch b/patches/node/support_v8_sandboxed_pointers.patch index 08a61216abb4a..76c60ed36b339 100644 --- a/patches/node/support_v8_sandboxed_pointers.patch +++ b/patches/node/support_v8_sandboxed_pointers.patch @@ -6,84 +6,27 @@ Subject: support V8 sandboxed pointers This refactors several allocators to allocate within the V8 memory cage, allowing them to be compatible with the V8_SANDBOXED_POINTERS feature. -diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index 4c459b58b5a048d9d8a4f15f4011e7cce68089f4..6fb4c8d4567aee5b313ad621ea42699a196f18c7 100644 ---- a/lib/internal/bootstrap/pre_execution.js -+++ b/lib/internal/bootstrap/pre_execution.js -@@ -14,7 +14,6 @@ const { - getOptionValue, - getEmbedderOptions, - } = require('internal/options'); --const { reconnectZeroFillToggle } = require('internal/buffer'); - const { - defineOperation, - emitExperimentalWarning, -@@ -26,10 +25,6 @@ const { ERR_MANIFEST_ASSERT_INTEGRITY } = require('internal/errors').codes; - const assert = require('internal/assert'); - - function prepareMainThreadExecution(expandArgv1 = false) { -- // TODO(joyeecheung): this is also necessary for workers when they deserialize -- // this toggle from the snapshot. -- reconnectZeroFillToggle(); -- - // Patch the process object with legacy properties and normalizations - patchProcessObject(expandArgv1); - setupTraceCategoryState(); -diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js -index bd38cf48a7fc6e8d61d8f11fa15c34aee182cbe3..1aa071cdc071dcdaf5c3b4bed0d3d76e5871731d 100644 ---- a/lib/internal/buffer.js -+++ b/lib/internal/buffer.js -@@ -30,7 +30,7 @@ const { - hexWrite, - ucs2Write, - utf8Write, -- getZeroFillToggle -+ setZeroFillToggle - } = internalBinding('buffer'); - const { - untransferable_object_private_symbol, -@@ -1055,24 +1055,15 @@ function markAsUntransferable(obj) { - // in C++. - // |zeroFill| can be undefined when running inside an isolate where we - // do not own the ArrayBuffer allocator. Zero fill is always on in that case. --let zeroFill = getZeroFillToggle(); - function createUnsafeBuffer(size) { -- zeroFill[0] = 0; -+ setZeroFillToggle(false); - try { - return new FastBuffer(size); - } finally { -- zeroFill[0] = 1; -+ setZeroFillToggle(true) - } - } - --// The connection between the JS land zero fill toggle and the --// C++ one in the NodeArrayBufferAllocator gets lost if the toggle --// is deserialized from the snapshot, because V8 owns the underlying --// memory of this toggle. This resets the connection. --function reconnectZeroFillToggle() { -- zeroFill = getZeroFillToggle(); --} -- - module.exports = { - FastBuffer, - addBufferPrototypeMethods, -@@ -1080,5 +1071,4 @@ module.exports = { - createUnsafeBuffer, - readUInt16BE, - readUInt32BE, -- reconnectZeroFillToggle - }; diff --git a/src/api/environment.cc b/src/api/environment.cc -index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e32cf0107f 100644 +index 2abf5994405e8da2a04d1b23b75ccd3658398474..b06e8529bb8ca2fa6d7f0735531bbbf39da6af12 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc -@@ -83,16 +83,16 @@ MaybeLocal PrepareStackTraceCallback(Local context, +@@ -80,19 +80,27 @@ MaybeLocal PrepareStackTraceCallback(Local context, + return result; + } + ++NodeArrayBufferAllocator::NodeArrayBufferAllocator() { ++ zero_fill_field_ = static_cast(allocator_->Allocate(sizeof(*zero_fill_field_))); ++} ++ ++NodeArrayBufferAllocator::~NodeArrayBufferAllocator() { ++ allocator_->Free(zero_fill_field_, sizeof(*zero_fill_field_)); ++} ++ void* NodeArrayBufferAllocator::Allocate(size_t size) { void* ret; - if (zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers) +- if (zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers) - ret = UncheckedCalloc(size); ++ if (*zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers) + ret = allocator_->Allocate(size); else - ret = UncheckedMalloc(size); @@ -99,7 +42,7 @@ index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e3 if (LIKELY(ret != nullptr)) total_mem_usage_.fetch_add(size, std::memory_order_relaxed); return ret; -@@ -100,7 +100,7 @@ void* NodeArrayBufferAllocator::AllocateUninitialized(size_t size) { +@@ -100,7 +108,7 @@ void* NodeArrayBufferAllocator::AllocateUninitialized(size_t size) { void* NodeArrayBufferAllocator::Reallocate( void* data, size_t old_size, size_t size) { @@ -108,7 +51,7 @@ index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e3 if (LIKELY(ret != nullptr) || UNLIKELY(size == 0)) total_mem_usage_.fetch_add(size - old_size, std::memory_order_relaxed); return ret; -@@ -108,7 +108,7 @@ void* NodeArrayBufferAllocator::Reallocate( +@@ -108,7 +116,7 @@ void* NodeArrayBufferAllocator::Reallocate( void NodeArrayBufferAllocator::Free(void* data, size_t size) { total_mem_usage_.fetch_sub(size, std::memory_order_relaxed); @@ -209,65 +152,6 @@ index c431159e6f77f8c86844bcadb86012b056d03372..9f57ac58d826cb0aae422ddca54e2136 v8::Local ToArrayBuffer(Environment* env); -diff --git a/src/node_buffer.cc b/src/node_buffer.cc -index 215bd8003aabe17e43ac780c723cfe971b437eae..eb00eb6f592e20f3c17a529f30b09673774eb1c1 100644 ---- a/src/node_buffer.cc -+++ b/src/node_buffer.cc -@@ -1175,33 +1175,14 @@ void SetBufferPrototype(const FunctionCallbackInfo& args) { - env->set_buffer_prototype_object(proto); - } - --void GetZeroFillToggle(const FunctionCallbackInfo& args) { -+void SetZeroFillToggle(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - NodeArrayBufferAllocator* allocator = env->isolate_data()->node_allocator(); - Local ab; -- // It can be a nullptr when running inside an isolate where we -- // do not own the ArrayBuffer allocator. -- if (allocator == nullptr) { -- // Create a dummy Uint32Array - the JS land can only toggle the C++ land -- // setting when the allocator uses our toggle. With this the toggle in JS -- // land results in no-ops. -- ab = ArrayBuffer::New(env->isolate(), sizeof(uint32_t)); -- } else { -+ if (allocator != nullptr) { - uint32_t* zero_fill_field = allocator->zero_fill_field(); -- std::unique_ptr backing = -- ArrayBuffer::NewBackingStore(zero_fill_field, -- sizeof(*zero_fill_field), -- [](void*, size_t, void*) {}, -- nullptr); -- ab = ArrayBuffer::New(env->isolate(), std::move(backing)); -+ *zero_fill_field = args[0]->BooleanValue(env->isolate()); - } -- -- ab->SetPrivate( -- env->context(), -- env->untransferable_object_private_symbol(), -- True(env->isolate())).Check(); -- -- args.GetReturnValue().Set(Uint32Array::New(ab, 0, 1)); - } - - void DetachArrayBuffer(const FunctionCallbackInfo& args) { -@@ -1310,7 +1291,7 @@ void Initialize(Local target, - env->SetMethod(target, "ucs2Write", StringWrite); - env->SetMethod(target, "utf8Write", StringWrite); - -- env->SetMethod(target, "getZeroFillToggle", GetZeroFillToggle); -+ env->SetMethod(target, "setZeroFillToggle", SetZeroFillToggle); - } - - } // anonymous namespace -@@ -1350,7 +1331,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { - registry->Register(StringWrite); - registry->Register(StringWrite); - registry->Register(StringWrite); -- registry->Register(GetZeroFillToggle); -+ registry->Register(SetZeroFillToggle); - - registry->Register(DetachArrayBuffer); - registry->Register(CopyArrayBuffer); diff --git a/src/node_i18n.cc b/src/node_i18n.cc index c537a247f55ff070da1988fc8b7309b5692b5c18..59bfb597849cd5a94800d6c83b238ef77245243e 100644 --- a/src/node_i18n.cc @@ -282,12 +166,26 @@ index c537a247f55ff070da1988fc8b7309b5692b5c18..59bfb597849cd5a94800d6c83b238ef7 return ret; diff --git a/src/node_internals.h b/src/node_internals.h -index d37be23cd63e82d4040777bd0e17ed449ec0b15b..0b66996f11c66800a7e21ee84fa101450b856227 100644 +index d37be23cd63e82d4040777bd0e17ed449ec0b15b..eb84760593ff5fb5aa6a8104e8714099f24a67a0 100644 --- a/src/node_internals.h +++ b/src/node_internals.h -@@ -118,6 +118,8 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator { +@@ -97,7 +97,9 @@ bool InitializePrimordials(v8::Local context); + + class NodeArrayBufferAllocator : public ArrayBufferAllocator { + public: +- inline uint32_t* zero_fill_field() { return &zero_fill_field_; } ++ NodeArrayBufferAllocator(); ++ ~NodeArrayBufferAllocator() override; ++ inline uint32_t* zero_fill_field() { return zero_fill_field_; } + + void* Allocate(size_t size) override; // Defined in src/node.cc + void* AllocateUninitialized(size_t size) override; +@@ -116,8 +118,10 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator { + } + private: - uint32_t zero_fill_field_ = 1; // Boolean but exposed as uint32 to JS land. +- uint32_t zero_fill_field_ = 1; // Boolean but exposed as uint32 to JS land. ++ uint32_t* zero_fill_field_ = nullptr; // Boolean but exposed as uint32 to JS land. std::atomic total_mem_usage_ {0}; + + std::unique_ptr allocator_{v8::ArrayBuffer::Allocator::NewDefaultAllocator()}; diff --git a/patches/v8/.patches b/patches/v8/.patches index 9df51315c6cfe..0e16c5eabc6fe 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -10,4 +10,3 @@ revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch chore_disable_is_execution_terminating_dcheck.patch build_remove_legacy_oom_error_callback.patch -force_disable_v8_sandboxed_pointers.patch diff --git a/patches/v8/force_disable_v8_sandboxed_pointers.patch b/patches/v8/force_disable_v8_sandboxed_pointers.patch deleted file mode 100644 index ed88bbb205cb7..0000000000000 --- a/patches/v8/force_disable_v8_sandboxed_pointers.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Rose -Date: Thu, 23 Jun 2022 16:49:28 -0700 -Subject: force disable v8 sandboxed pointers - -temporarily, until we can fix node to be compatible - -diff --git a/BUILD.gn b/BUILD.gn -index 71ee04624868f23a2e204b5ff1e973b45e2f1202..6aa33fdd3c767eb0045db918d2535fe35c98ca4b 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -506,9 +506,9 @@ if (v8_enable_sandbox == "") { - } - - # Enable sandboxed pointers when the sandbox is enabled. --if (v8_enable_sandbox) { -- v8_enable_sandboxed_pointers = true --} -+#if (v8_enable_sandbox) { -+# v8_enable_sandboxed_pointers = true -+#} - - # Enable all available sandbox features if sandbox future is enabled. - if (v8_enable_sandbox_future) { From 98cd16d336f512406eee3565be1cead86514db7b Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 5 Jul 2022 08:49:56 -0700 Subject: [PATCH 559/811] chore: fix typos (#34731) --- docs/api/environment-variables.md | 3 +-- docs/tutorial/process-model.md | 2 +- lib/browser/api/auto-updater/squirrel-update-win.ts | 2 +- lib/browser/api/menu.ts | 2 +- script/lint.js | 2 +- shell/browser/api/electron_api_web_contents.cc | 2 +- shell/browser/native_window.cc | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/api/environment-variables.md b/docs/api/environment-variables.md index 09b12e3124fb6..ba3d5cf99e6de 100644 --- a/docs/api/environment-variables.md +++ b/docs/api/environment-variables.md @@ -139,8 +139,7 @@ green and non-draggable regions will be colored red to aid debugging. ### `ELECTRON_DEBUG_NOTIFICATIONS` -Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common a -tions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to. +Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common actions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to. Sample output: diff --git a/docs/tutorial/process-model.md b/docs/tutorial/process-model.md index 2cb37099b513b..ea2ce8c5b271b 100644 --- a/docs/tutorial/process-model.md +++ b/docs/tutorial/process-model.md @@ -83,7 +83,7 @@ terminated as well. The main process also controls your application's lifecycle through Electron's [`app`][app] module. This module provides a large set of events and methods -that you can use to add custom application behaviour (for instance, programatically +that you can use to add custom application behaviour (for instance, programmatically quitting your application, modifying the application dock, or showing an About panel). As a practical example, the app shown in the [quick start guide][quick-start-lifecycle] diff --git a/lib/browser/api/auto-updater/squirrel-update-win.ts b/lib/browser/api/auto-updater/squirrel-update-win.ts index 82d867f4f8fc6..5d8a998b4e1c5 100644 --- a/lib/browser/api/auto-updater/squirrel-update-win.ts +++ b/lib/browser/api/auto-updater/squirrel-update-win.ts @@ -20,7 +20,7 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct try { // Ensure we don't spawn multiple squirrel processes - // Process spawned, same args: Attach events to alread running process + // Process spawned, same args: Attach events to already running process // Process spawned, different args: Return with error // No process spawned: Spawn new process if (spawnedProcess && !isSameArgs(args)) { diff --git a/lib/browser/api/menu.ts b/lib/browser/api/menu.ts index cdd3b73452f33..1499ce7e42d7f 100644 --- a/lib/browser/api/menu.ts +++ b/lib/browser/api/menu.ts @@ -142,7 +142,7 @@ Menu.prototype.insert = function (pos, item) { if (item.icon) this.setIcon(pos, item.icon); if (item.role) this.setRole(pos, item.role); - // Make menu accessable to items. + // Make menu accessible to items. item.overrideReadOnlyProperty('menu', this); // Remember the items. diff --git a/script/lint.js b/script/lint.js index 8ee4f9b756133..fa5e3f7ba7808 100755 --- a/script/lint.js +++ b/script/lint.js @@ -30,7 +30,7 @@ function spawnAndCheckExitCode (cmd, args, opts) { opts = { stdio: 'inherit', ...opts }; const { error, status, signal } = childProcess.spawnSync(cmd, args, opts); if (error) { - // the subsprocess failed or timed out + // the subprocess failed or timed out console.error(error); process.exit(1); } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 5be62a176ef88..5bfe25f490411 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2170,7 +2170,7 @@ void WebContents::LoadURL(const GURL& url, params.transition_type = ui::PageTransitionFromInt( ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; - // Discord non-committed entries to ensure that we don't re-use a pending + // Discard non-committed entries to ensure that we don't re-use a pending // entry web_contents()->GetController().DiscardNonCommittedEntries(); web_contents()->GetController().LoadURLWithParams(params); diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 897939991150a..67439e818700e 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -176,7 +176,7 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) { // By default the window has a default maximum size that prevents it // from being resized larger than the screen, so we should only set this - // if th user has passed in values. + // if the user has passed in values. if (have_max_height || have_max_width || !max_size.IsEmpty()) size_constraints.set_maximum_size(gfx::Size(max_width, max_height)); From c4182752282db0b3c33750445802e2d65dad36db Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 5 Jul 2022 08:55:15 -0700 Subject: [PATCH 560/811] chore: update Discord invite links (#34730) --- README.md | 2 +- docs/tutorial/examples.md | 4 ++-- docs/tutorial/introduction.md | 2 +- docs/tutorial/tutorial-4-adding-features.md | 2 +- docs/tutorial/tutorial-6-publishing-updating.md | 2 +- lib/browser/default-menu.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fcf0ab6216411..7bcb3e9253137 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/APGC3k5yaH) +[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.gg/electronjs) :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/examples.md b/docs/tutorial/examples.md index a2bea3c12f300..b88bbc028b221 100644 --- a/docs/tutorial/examples.md +++ b/docs/tutorial/examples.md @@ -50,7 +50,7 @@ guide!). You can find the full list of "How to?" in the sidebar. If there is something that you would like to do that is not documented, please join -our [Discord server][] and let us know! +our [Discord server][discord] and let us know! -[discord server]: https://discord.com/invite/electron +[discord]: https://discord.gg/electronjs [fiddle]: https://www.electronjs.org/fiddle diff --git a/docs/tutorial/introduction.md b/docs/tutorial/introduction.md index 8091434c01b0f..71ce1a67ec448 100644 --- a/docs/tutorial/introduction.md +++ b/docs/tutorial/introduction.md @@ -68,7 +68,7 @@ Are you getting stuck anywhere? Here are a few links to places to look: [api documentation]: ../api/app.md [chromium]: https://www.chromium.org/ -[discord]: https://discord.com/invite/APGC3k5yaH +[discord]: https://discord.gg/electronjs [examples]: examples.md [fiddle]: https://electronjs.org/fiddle [issue-tracker]: https://github.com/electron/electron/issues diff --git a/docs/tutorial/tutorial-4-adding-features.md b/docs/tutorial/tutorial-4-adding-features.md index b7c776c1dbd67..38be5b5f4ca0d 100644 --- a/docs/tutorial/tutorial-4-adding-features.md +++ b/docs/tutorial/tutorial-4-adding-features.md @@ -62,7 +62,7 @@ into end users' hands. -[discord]: https://discord.com/invite/APGC3k5yaH +[discord]: https://discord.gg/electronjs [github]: https://github.com/electron/electronjs.org-new/issues/new [how to]: ./examples.md [node-platform]: https://nodejs.org/api/process.html#process_process_platform diff --git a/docs/tutorial/tutorial-6-publishing-updating.md b/docs/tutorial/tutorial-6-publishing-updating.md index 65b89766d88f2..57df92d6f18f8 100644 --- a/docs/tutorial/tutorial-6-publishing-updating.md +++ b/docs/tutorial/tutorial-6-publishing-updating.md @@ -226,7 +226,7 @@ rest of our docs and happy developing! If you have questions, please stop by our [autoupdater]: ../api/auto-updater.md [code-signed]: ./code-signing.md -[discord server]: https://discord.com/invite/APGC3k5yaH +[discord server]: https://discord.gg/electronjs [electron fiddle]: https://electronjs.org/fiddle [fiddle-build]: https://github.com/electron/fiddle/blob/master/.github/workflows/build.yaml [fiddle-forge-config]: https://github.com/electron/fiddle/blob/master/forge.config.js diff --git a/lib/browser/default-menu.ts b/lib/browser/default-menu.ts index b91a7caea4d92..b37e3425b3364 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.com/invite/APGC3k5yaH'); + await shell.openExternal('https://discord.gg/electronjs'); } }, { From 403bd39d05ff6528d5c827cbb263b5ee02eb41ab Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 5 Jul 2022 09:35:38 -0700 Subject: [PATCH 561/811] chore: modernize base::Value useage in asar/archive (#34796) --- shell/common/asar/archive.cc | 144 +++++++++++++++++------------------ shell/common/asar/archive.h | 7 +- 2 files changed, 70 insertions(+), 81 deletions(-) diff --git a/shell/common/asar/archive.cc b/shell/common/asar/archive.cc index 58b89d537549d..450eff88926e0 100644 --- a/shell/common/asar/archive.cc +++ b/shell/common/asar/archive.cc @@ -35,83 +35,75 @@ const char kSeparators[] = "\\/"; const char kSeparators[] = "/"; #endif -bool GetNodeFromPath(std::string path, - const base::DictionaryValue* root, - const base::DictionaryValue** out); +const base::Value::Dict* GetNodeFromPath(std::string path, + const base::Value::Dict& root); // Gets the "files" from "dir". -bool GetFilesNode(const base::DictionaryValue* root, - const base::DictionaryValue* dir, - const base::DictionaryValue** out) { +const base::Value::Dict* GetFilesNode(const base::Value::Dict& root, + const base::Value::Dict& dir) { // Test for symbol linked directory. - const std::string* link = dir->FindStringKey("link"); + const std::string* link = dir.FindString("link"); if (link != nullptr) { - const base::DictionaryValue* linked_node = nullptr; - if (!GetNodeFromPath(*link, root, &linked_node)) - return false; - dir = linked_node; + const base::Value::Dict* linked_node = GetNodeFromPath(*link, root); + if (!linked_node) + return nullptr; + return linked_node->FindDict("files"); } - return dir->GetDictionaryWithoutPathExpansion("files", out); + return dir.FindDict("files"); } // Gets sub-file "name" from "dir". -bool GetChildNode(const base::DictionaryValue* root, - const std::string& name, - const base::DictionaryValue* dir, - const base::DictionaryValue** out) { - if (name.empty()) { - *out = root; - return true; - } - - const base::DictionaryValue* files = nullptr; - return GetFilesNode(root, dir, &files) && - files->GetDictionaryWithoutPathExpansion(name, out); +const base::Value::Dict* GetChildNode(const base::Value::Dict& root, + const std::string& name, + const base::Value::Dict& dir) { + if (name.empty()) + return &root; + + const base::Value::Dict* files = GetFilesNode(root, dir); + return files ? files->FindDict(name) : nullptr; } // Gets the node of "path" from "root". -bool GetNodeFromPath(std::string path, - const base::DictionaryValue* root, - const base::DictionaryValue** out) { - if (path.empty()) { - *out = root; - return true; - } +const base::Value::Dict* GetNodeFromPath(std::string path, + const base::Value::Dict& root) { + if (path.empty()) + return &root; - const base::DictionaryValue* dir = root; + const base::Value::Dict* dir = &root; for (size_t delimiter_position = path.find_first_of(kSeparators); delimiter_position != std::string::npos; delimiter_position = path.find_first_of(kSeparators)) { - const base::DictionaryValue* child = nullptr; - if (!GetChildNode(root, path.substr(0, delimiter_position), dir, &child)) - return false; + const base::Value::Dict* child = + GetChildNode(root, path.substr(0, delimiter_position), *dir); + if (!child) + return nullptr; dir = child; path.erase(0, delimiter_position + 1); } - return GetChildNode(root, path, dir, out); + return GetChildNode(root, path, *dir); } bool FillFileInfoWithNode(Archive::FileInfo* info, uint32_t header_size, bool load_integrity, - const base::DictionaryValue* node) { - if (auto size = node->FindIntKey("size")) { - info->size = static_cast(size.value()); + const base::Value::Dict* node) { + if (absl::optional size = node->FindInt("size")) { + info->size = static_cast(*size); } else { return false; } - if (auto unpacked = node->FindBoolKey("unpacked")) { - info->unpacked = unpacked.value(); + if (absl::optional unpacked = node->FindBool("unpacked")) { + info->unpacked = *unpacked; if (info->unpacked) { return true; } } - auto* offset = node->FindStringKey("offset"); + const std::string* offset = node->FindString("offset"); if (offset && base::StringToUint64(base::StringPiece(*offset), &info->offset)) { info->offset += header_size; @@ -119,26 +111,26 @@ bool FillFileInfoWithNode(Archive::FileInfo* info, return false; } - if (auto executable = node->FindBoolKey("executable")) { - info->executable = executable.value(); + if (absl::optional executable = node->FindBool("executable")) { + info->executable = *executable; } #if BUILDFLAG(IS_MAC) if (load_integrity && electron::fuses::IsEmbeddedAsarIntegrityValidationEnabled()) { - if (auto* integrity = node->FindDictKey("integrity")) { - auto* algorithm = integrity->FindStringKey("algorithm"); - auto* hash = integrity->FindStringKey("hash"); - auto block_size = integrity->FindIntKey("blockSize"); - auto* blocks = integrity->FindListKey("blocks"); + if (const base::Value::Dict* integrity = node->FindDict("integrity")) { + const std::string* algorithm = integrity->FindString("algorithm"); + const std::string* hash = integrity->FindString("hash"); + absl::optional block_size = integrity->FindInt("blockSize"); + const base::Value::List* blocks = integrity->FindList("blocks"); if (algorithm && hash && block_size && block_size > 0 && blocks) { IntegrityPayload integrity_payload; integrity_payload.hash = *hash; integrity_payload.block_size = static_cast(block_size.value()); - for (auto& value : blocks->GetListDeprecated()) { - if (auto* block = value.GetIfString()) { + for (auto& value : *blocks) { + if (const std::string* block = value.GetIfString()) { integrity_payload.blocks.push_back(*block); } else { LOG(FATAL) @@ -279,8 +271,7 @@ bool Archive::Init() { } header_size_ = 8 + size; - header_ = base::DictionaryValue::From( - base::Value::ToUniquePtrValue(std::move(*value))); + header_ = std::move(value->GetDict()); return true; } @@ -298,13 +289,14 @@ bool Archive::GetFileInfo(const base::FilePath& path, FileInfo* info) const { if (!header_) return false; - const base::DictionaryValue* node; - if (!GetNodeFromPath(path.AsUTF8Unsafe(), header_.get(), &node)) + const base::Value::Dict* node = + GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + if (!node) return false; - std::string link; - if (node->GetString("link", &link)) - return GetFileInfo(base::FilePath::FromUTF8Unsafe(link), info); + const std::string* link = node->FindString("link"); + if (link) + return GetFileInfo(base::FilePath::FromUTF8Unsafe(*link), info); return FillFileInfoWithNode(info, header_size_, header_validated_, node); } @@ -313,17 +305,18 @@ bool Archive::Stat(const base::FilePath& path, Stats* stats) const { if (!header_) return false; - const base::DictionaryValue* node; - if (!GetNodeFromPath(path.AsUTF8Unsafe(), header_.get(), &node)) + const base::Value::Dict* node = + GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + if (!node) return false; - if (node->FindKey("link")) { + if (node->Find("link")) { stats->is_file = false; stats->is_link = true; return true; } - if (node->FindKey("files")) { + if (node->Find("files")) { stats->is_file = false; stats->is_directory = true; return true; @@ -337,19 +330,17 @@ bool Archive::Readdir(const base::FilePath& path, if (!header_) return false; - const base::DictionaryValue* node; - if (!GetNodeFromPath(path.AsUTF8Unsafe(), header_.get(), &node)) + const base::Value::Dict* node = + GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + if (!node) return false; - const base::DictionaryValue* files_node; - if (!GetFilesNode(header_.get(), node, &files_node)) + const base::Value::Dict* files_node = GetFilesNode(*header_, *node); + if (!files_node) return false; - base::DictionaryValue::Iterator iter(*files_node); - while (!iter.IsAtEnd()) { - files->push_back(base::FilePath::FromUTF8Unsafe(iter.key())); - iter.Advance(); - } + for (const auto iter : *files_node) + files->push_back(base::FilePath::FromUTF8Unsafe(iter.first)); return true; } @@ -358,13 +349,14 @@ bool Archive::Realpath(const base::FilePath& path, if (!header_) return false; - const base::DictionaryValue* node; - if (!GetNodeFromPath(path.AsUTF8Unsafe(), header_.get(), &node)) + const base::Value::Dict* node = + GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + if (!node) return false; - std::string link; - if (node->GetString("link", &link)) { - *realpath = base::FilePath::FromUTF8Unsafe(link); + const std::string* link = node->FindString("link"); + if (link) { + *realpath = base::FilePath::FromUTF8Unsafe(*link); return true; } diff --git a/shell/common/asar/archive.h b/shell/common/asar/archive.h index 51e75ec75b346..d420f3fa4a0fd 100644 --- a/shell/common/asar/archive.h +++ b/shell/common/asar/archive.h @@ -13,12 +13,9 @@ #include "base/files/file.h" #include "base/files/file_path.h" #include "base/synchronization/lock.h" +#include "base/values.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace base { -class DictionaryValue; -} - namespace asar { class ScopedTemporaryFile; @@ -104,7 +101,7 @@ class Archive { base::File file_; int fd_ = -1; uint32_t header_size_ = 0; - std::unique_ptr header_; + absl::optional header_; // Cached external temporary files. base::Lock external_files_lock_; From f7428baace8c4fa48ffa99196a925008284142b5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 6 Jul 2022 06:02:02 -0700 Subject: [PATCH 562/811] Bump v21.0.0-nightly.20220706 --- 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 118f51b1b228f..7be9f1c790285 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220705 \ No newline at end of file +21.0.0-nightly.20220706 \ No newline at end of file diff --git a/package.json b/package.json index a8bc1ba4b573b..f78cd8d2afc0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220705", + "version": "21.0.0-nightly.20220706", "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 125586262883f..d870a824f5090 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 21,0,0,20220705 - PRODUCTVERSION 21,0,0,20220705 + FILEVERSION 21,0,0,20220706 + PRODUCTVERSION 21,0,0,20220706 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 47d8d4cc5c0b945d52cc7c4b21c6cfe749b3df57 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 7 Jul 2022 06:01:40 -0700 Subject: [PATCH 563/811] Bump v21.0.0-nightly.20220707 --- 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 7be9f1c790285..848dc021c4480 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220706 \ No newline at end of file +21.0.0-nightly.20220707 \ No newline at end of file diff --git a/package.json b/package.json index f78cd8d2afc0e..fe36e186c8ce5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220706", + "version": "21.0.0-nightly.20220707", "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 d870a824f5090..b360d973b5394 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 21,0,0,20220706 - PRODUCTVERSION 21,0,0,20220706 + FILEVERSION 21,0,0,20220707 + PRODUCTVERSION 21,0,0,20220707 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7ec88584b50f74b3d596448976781e91ea052e47 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 7 Jul 2022 17:17:20 +0200 Subject: [PATCH 564/811] fix: WCO pressed background state updates (#34771) --- shell/browser/native_window_views_win.cc | 11 ++++++++++- shell/browser/ui/views/win_caption_button_container.h | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 52aedf38d62e2..9c0b54393958b 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -11,6 +11,7 @@ #include "shell/browser/browser.h" #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/root_view.h" +#include "shell/browser/ui/views/win_frame_view.h" #include "shell/common/electron_constants.h" #include "ui/display/display.h" #include "ui/display/win/screen_win.h" @@ -421,7 +422,7 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) { } break; } - case SIZE_RESTORED: + case SIZE_RESTORED: { switch (last_window_state_) { case ui::SHOW_STATE_MAXIMIZED: last_window_state_ = ui::SHOW_STATE_NORMAL; @@ -439,7 +440,15 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) { default: break; } + // If a given window was minimized/maximized and has since been + // restored, ensure the WCO buttons are set to normal state. + auto* ncv = widget()->non_client_view(); + if (IsWindowControlsOverlayEnabled() && ncv) { + auto* frame_view = static_cast(ncv->frame_view()); + frame_view->caption_button_container()->ResetWindowControls(); + } break; + } } } diff --git a/shell/browser/ui/views/win_caption_button_container.h b/shell/browser/ui/views/win_caption_button_container.h index d9a8fa7ca6f54..90c5973491c8e 100644 --- a/shell/browser/ui/views/win_caption_button_container.h +++ b/shell/browser/ui/views/win_caption_button_container.h @@ -46,6 +46,9 @@ class WinCaptionButtonContainer : public views::View, // time, and both are disabled in tablet UI mode. void UpdateButtons(); + // Reset window button states to STATE_NORMAL. + void ResetWindowControls(); + private: // views::View: void AddedToWidget() override; @@ -55,8 +58,6 @@ class WinCaptionButtonContainer : public views::View, void OnWidgetBoundsChanged(views::Widget* widget, const gfx::Rect& new_bounds) override; - void ResetWindowControls(); - WinFrameView* const frame_view_; WinCaptionButton* const minimize_button_; WinCaptionButton* const maximize_button_; From e83c3ec74442f0533e2d66c53fa84a075ebc20ae Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 7 Jul 2022 15:14:53 -0400 Subject: [PATCH 565/811] test: add first-party-set chromium tests (#34827) test: add first-part-set chromium feature tests --- spec-main/chromium-spec.ts | 31 +++++++++++++++++++ .../api/first-party-sets/base/main.js | 20 ++++++++++++ .../api/first-party-sets/base/package.json | 4 +++ .../api/first-party-sets/command-line/main.js | 12 +++++++ .../command-line/package.json | 4 +++ 5 files changed, 71 insertions(+) create mode 100644 spec/fixtures/api/first-party-sets/base/main.js create mode 100644 spec/fixtures/api/first-party-sets/base/package.json create mode 100644 spec/fixtures/api/first-party-sets/command-line/main.js create mode 100644 spec/fixtures/api/first-party-sets/command-line/package.json diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 06fa2e5154158..26d0afbca2bb9 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -495,6 +495,37 @@ describe('chromium features', () => { }); }); + describe('first party sets', () => { + const fps = [ + 'https://fps-member1.glitch.me', + 'https://fps-member2.glitch.me', + 'https://fps-member3.glitch.me' + ]; + + it('loads first party sets', async () => { + const appPath = path.join(fixturesPath, 'api', 'first-party-sets', 'base'); + const fpsProcess = ChildProcess.spawn(process.execPath, [appPath]); + + let output = ''; + fpsProcess.stdout.on('data', data => { output += data; }); + await emittedOnce(fpsProcess, 'exit'); + + expect(output).to.include(fps.join(',')); + }); + + it('loads sets from the command line', async () => { + const appPath = path.join(fixturesPath, 'api', 'first-party-sets', 'command-line'); + const args = [appPath, `--use-first-party-set=${fps}`]; + const fpsProcess = ChildProcess.spawn(process.execPath, args); + + let output = ''; + fpsProcess.stdout.on('data', data => { output += data; }); + await emittedOnce(fpsProcess, 'exit'); + + expect(output).to.include(fps.join(',')); + }); + }); + describe('loading jquery', () => { it('does not crash', (done) => { const w = new BrowserWindow({ show: false }); diff --git a/spec/fixtures/api/first-party-sets/base/main.js b/spec/fixtures/api/first-party-sets/base/main.js new file mode 100644 index 0000000000000..68865b517607a --- /dev/null +++ b/spec/fixtures/api/first-party-sets/base/main.js @@ -0,0 +1,20 @@ +const { app } = require('electron'); + +const sets = [ + 'https://fps-member1.glitch.me', + 'https://fps-member2.glitch.me', + 'https://fps-member3.glitch.me' +]; + +app.commandLine.appendSwitch('use-first-party-set', sets.join(',')); + +app.whenReady().then(function () { + const hasSwitch = app.commandLine.hasSwitch('use-first-party-set'); + const value = app.commandLine.getSwitchValue('use-first-party-set'); + if (hasSwitch) { + process.stdout.write(JSON.stringify(value)); + process.stdout.end(); + } + + app.quit(); +}); diff --git a/spec/fixtures/api/first-party-sets/base/package.json b/spec/fixtures/api/first-party-sets/base/package.json new file mode 100644 index 0000000000000..1766d06684600 --- /dev/null +++ b/spec/fixtures/api/first-party-sets/base/package.json @@ -0,0 +1,4 @@ +{ + "name": "electron-test-first-party-sets-base", + "main": "main.js" +} diff --git a/spec/fixtures/api/first-party-sets/command-line/main.js b/spec/fixtures/api/first-party-sets/command-line/main.js new file mode 100644 index 0000000000000..8e2782f31dc0e --- /dev/null +++ b/spec/fixtures/api/first-party-sets/command-line/main.js @@ -0,0 +1,12 @@ +const { app } = require('electron'); + +app.whenReady().then(function () { + const hasSwitch = app.commandLine.hasSwitch('use-first-party-set'); + const value = app.commandLine.getSwitchValue('use-first-party-set'); + if (hasSwitch) { + process.stdout.write(JSON.stringify(value)); + process.stdout.end(); + } + + app.quit(); +}); diff --git a/spec/fixtures/api/first-party-sets/command-line/package.json b/spec/fixtures/api/first-party-sets/command-line/package.json new file mode 100644 index 0000000000000..c4b5839bdcc60 --- /dev/null +++ b/spec/fixtures/api/first-party-sets/command-line/package.json @@ -0,0 +1,4 @@ +{ + "name": "electron-test-first-party-sets-command-line", + "main": "main.js" +} From 1941c88442b61f3e83125f197becc83cf6975a9c Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 8 Jul 2022 08:33:42 +0200 Subject: [PATCH 566/811] fix: `setRepresentedFilename` with non-default `titlebarStyle` (#34834) fix: setRepresentedFilename with non-default titlebarStyle --- shell/browser/native_window_mac.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 3e5ee77010281..721ed09c47e92 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1150,6 +1150,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { void NativeWindowMac::SetRepresentedFilename(const std::string& filename) { [window_ setRepresentedFilename:base::SysUTF8ToNSString(filename)]; + if (buttons_proxy_) + [buttons_proxy_ redraw]; } std::string NativeWindowMac::GetRepresentedFilename() { From eba9d3fc79ce636bacffa6ebf5ed69e674b0a2e9 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 8 Jul 2022 01:06:06 -0700 Subject: [PATCH 567/811] fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules (#34844) * fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules * build: rely on config.gypi to enable pointer compression --- patches/node/.patches | 1 + ...pression_sandbox_is_enabled_on_64bit.patch | 49 +++++++++++++++++++ script/generate-config-gypi.py | 6 +-- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch diff --git a/patches/node/.patches b/patches/node/.patches index 2066849e25cbb..a175fc7472712 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -45,3 +45,4 @@ fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch json_parse_errors_made_user-friendly.patch build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch support_v8_sandboxed_pointers.patch +build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch diff --git a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch new file mode 100644 index 0000000000000..2b9a5edf16daa --- /dev/null +++ b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Thu, 7 Jul 2022 14:42:49 -0700 +Subject: build: ensure v8 pointer compression + sandbox is enabled on 64bit + +Aligns common.gypi with the current build flag state of //v8. + +Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`. + +diff --git a/common.gypi b/common.gypi +index 559b7f7c220cb98946285bb15d0d63e203bbcea4..b0cba989da8d9b5bd7e1050510bb09646622f88c 100644 +--- a/common.gypi ++++ b/common.gypi +@@ -66,6 +66,8 @@ + 'v8_enable_pointer_compression%': 0, + 'v8_enable_31bit_smis_on_64bit_arch%': 0, + ++ 'v8_enable_sandbox%': 0, ++ + # Disable V8 untrusted code mitigations. + # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations + 'v8_untrusted_code_mitigations': 0, +@@ -135,6 +137,9 @@ + 'v8_enable_pointer_compression': 0, + 'v8_enable_31bit_smis_on_64bit_arch': 0, + }], ++ ['target_arch in "arm64 x64"', { ++ 'v8_enable_sandbox': 1, ++ }], + ['target_arch in "ppc64 s390x"', { + 'v8_enable_backtrace': 1, + }], +@@ -395,9 +400,15 @@ + ['v8_enable_pointer_compression == 1', { + 'defines': [ + 'V8_COMPRESS_POINTERS', +- 'V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE', ++ 'V8_COMPRESS_POINTERS_IN_SHARED_CAGE', + ], + }], ++ ['v8_enable_sandbox == 1', { ++ 'defines': [ ++ 'V8_ENABLE_SANDBOX', ++ 'V8_SANDBOXED_POINTERS' ++ ] ++ }], + ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { + 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], + }], diff --git a/script/generate-config-gypi.py b/script/generate-config-gypi.py index b7885da41c87b..7a3ea6808b42a 100755 --- a/script/generate-config-gypi.py +++ b/script/generate-config-gypi.py @@ -14,9 +14,9 @@ def run_node_configure(target_cpu): configure = os.path.join(NODE_DIR, 'configure.py') args = ['--dest-cpu', target_cpu] - # Enabled in Chromium's V8. - if target_cpu in ('arm64', 'x64'): - args += ['--experimental-enable-pointer-compression'] + # Enabled in Chromium's V8, will be disabled on 32bit via + # common.gypi rules + args += ['--experimental-enable-pointer-compression'] # Work around "No acceptable ASM compiler found" error on some System, # it breaks nothing since Electron does not use OpenSSL. From 78848f8bfea4be6cc8d81fa4475655a2b3579d02 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 06:01:44 -0700 Subject: [PATCH 568/811] Bump v21.0.0-nightly.20220708 --- 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 848dc021c4480..fa6fed8debc07 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220707 \ No newline at end of file +21.0.0-nightly.20220708 \ No newline at end of file diff --git a/package.json b/package.json index fe36e186c8ce5..7ff359479eb9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220707", + "version": "21.0.0-nightly.20220708", "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 b360d973b5394..e88fb9cec304f 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 21,0,0,20220707 - PRODUCTVERSION 21,0,0,20220707 + FILEVERSION 21,0,0,20220708 + PRODUCTVERSION 21,0,0,20220708 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 459404f53690fed4e9785dffebcb625e2d04d428 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 11 Jul 2022 01:04:32 -0700 Subject: [PATCH 569/811] build: run CI tests on Xcode 13.3.0 (#34850) * build: test disabling security * build: install python2 during tests * build: do not install python2 on arm64 runners * attempt 2 * build: only allow 13.3.0 xcode --- .circleci/config/base.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index d74742fc20a59..b1545fc175f1d 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -53,14 +53,8 @@ executors: description: "macOS executor size" type: enum enum: ["macos.x86.medium.gen2", "large"] - xcode: - description: "xcode version" - default: 13.3.0 - type: enum - enum: ["12.4.0", "13.3.0"] - macos: - xcode: << parameters.xcode >> + xcode: 13.3.0 resource_class: << parameters.size >> # Electron Runners @@ -125,6 +119,9 @@ env-apple-silicon: &env-apple-silicon USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1 npm_config_arch: arm64 +env-runner: &env-runner + IS_ELECTRON_RUNNER: 1 + 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 @@ -511,6 +508,7 @@ step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac name: Import and trust self-signed codesigning cert on MacOS command: | if [ "$TARGET_ARCH" != "arm64" ] && [ "`uname`" == "Darwin" ]; then + sudo security authorizationdb write com.apple.trust-settings.admin allow cd src/electron ./script/codesign/generate-identity.sh fi @@ -1032,6 +1030,7 @@ steps-tests: &steps-tests - *step-setup-linux-for-headless-testing - *step-restore-brew-cache - *step-fix-known-hosts-linux + - install-python2-mac - *step-install-signing-cert-on-mac - run: @@ -1130,7 +1129,7 @@ commands: - run: name: Install python2 on macos command: | - if [ "`uname`" == "Darwin" ]; then + if [ "`uname`" == "Darwin" ] && [ "$IS_ELECTRON_RUNNER" != "1" ]; then if [ ! -f "python-downloads/python-2.7.18-macosx10.9.pkg" ]; then mkdir python-downloads echo 'Downloading Python 2.7.18' @@ -2044,7 +2043,6 @@ jobs: osx-testing-x64-tests: executor: name: macos - xcode: 12.4.0 size: macos.x86.medium.gen2 environment: <<: *env-mac-large @@ -2058,12 +2056,12 @@ jobs: <<: *env-mac-large <<: *env-stack-dumping <<: *env-apple-silicon + <<: *env-runner <<: *steps-tests mas-testing-x64-tests: executor: name: macos - xcode: 12.4.0 size: macos.x86.medium.gen2 environment: <<: *env-mac-large @@ -2077,6 +2075,7 @@ jobs: <<: *env-mac-large <<: *env-stack-dumping <<: *env-apple-silicon + <<: *env-runner <<: *steps-tests # List all workflows From 2eb0e5dcab7e339bb2bff763d21c27181cc99d9a Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 11 Jul 2022 11:45:01 +0200 Subject: [PATCH 570/811] fix: safer check for WCO button updates (#34833) --- shell/browser/native_window_views.cc | 6 ++--- spec-main/api-browser-window-spec.ts | 35 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index f33a3705cf031..ee690a03b8268 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -876,7 +876,7 @@ bool NativeWindowViews::IsMovable() { void NativeWindowViews::SetMinimizable(bool minimizable) { #if BUILDFLAG(IS_WIN) FlipWindowStyle(GetAcceleratedWidget(), minimizable, WS_MINIMIZEBOX); - if (titlebar_overlay_enabled()) { + if (IsWindowControlsOverlayEnabled()) { auto* frame_view = static_cast(widget()->non_client_view()->frame_view()); frame_view->caption_button_container()->UpdateButtons(); @@ -896,7 +896,7 @@ bool NativeWindowViews::IsMinimizable() { void NativeWindowViews::SetMaximizable(bool maximizable) { #if BUILDFLAG(IS_WIN) FlipWindowStyle(GetAcceleratedWidget(), maximizable, WS_MAXIMIZEBOX); - if (titlebar_overlay_enabled()) { + if (IsWindowControlsOverlayEnabled()) { auto* frame_view = static_cast(widget()->non_client_view()->frame_view()); frame_view->caption_button_container()->UpdateButtons(); @@ -936,7 +936,7 @@ void NativeWindowViews::SetClosable(bool closable) { } else { EnableMenuItem(menu, SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); } - if (titlebar_overlay_enabled()) { + if (IsWindowControlsOverlayEnabled()) { auto* frame_view = static_cast(widget()->non_client_view()->frame_view()); frame_view->caption_button_container()->UpdateButtons(); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index aac15ffe468cd..0c003416aa2ee 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2427,6 +2427,41 @@ describe('BrowserWindow module', () => { ifit(process.platform === 'darwin')('sets Window Control Overlay with hidden inset title bar', async () => { await testWindowsOverlay('hiddenInset'); }); + + ifdescribe(process.platform === 'win32')('when an invalid titleBarStyle is initially set', () => { + let w: BrowserWindow; + + beforeEach(() => { + w = new BrowserWindow({ + show: false, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + }, + titleBarOverlay: { + color: '#0000f0', + symbolColor: '#ffffff' + }, + titleBarStyle: 'hiddenInset' + }); + }); + + afterEach(async () => { + await closeAllWindows(); + }); + + it('does not crash changing minimizability ', () => { + expect(() => { + w.setMinimizable(false); + }).to.not.throw(); + }); + + it('does not crash changing maximizability', () => { + expect(() => { + w.setMaximizable(false); + }).to.not.throw(); + }); + }); }); ifdescribe(['win32', 'darwin'].includes(process.platform))('"titleBarOverlay" option', () => { From fa8e4a761071cc0b63b1d18747ae76c96ee88c4c Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 11 Jul 2022 03:25:17 -0700 Subject: [PATCH 571/811] build: use third_party DEPOT_TOOLS when running lint scripts (#34846) Some folks (especially build_tools users) do not have a version of depot_tools on their path --- script/lint.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/lint.js b/script/lint.js index fa5e3f7ba7808..dba460730776e 100755 --- a/script/lint.js +++ b/script/lint.js @@ -15,6 +15,11 @@ 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'); +// Augment the PATH for this script so that we can find executables +// in the depot_tools folder even if folks do not have an instance of +// DEPOT_TOOLS in their path already +process.env.PATH = `${process.env.PATH}${path.delimiter}${DEPOT_TOOLS}`; + const IGNORELIST = new Set([ ['shell', 'browser', 'resources', 'win', 'resource.h'], ['shell', 'common', 'node_includes.h'], From 2b862c18ba0a6afc6962cb9a063cea2a529d7837 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 11 Jul 2022 03:25:39 -0700 Subject: [PATCH 572/811] chore: improve run-clang-tidy.ts behavior when filenames < jobs (#34736) --- script/run-clang-tidy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/run-clang-tidy.ts b/script/run-clang-tidy.ts index 86dba04f2e849..ba44b849c552c 100644 --- a/script/run-clang-tidy.ts +++ b/script/run-clang-tidy.ts @@ -173,7 +173,7 @@ async function runClangTidy ( const worker = async () => { let filenames = chunkedFilenames.shift(); - while (filenames) { + while (filenames?.length) { results.push( await spawnAsync(cmd, [...args, ...filenames], {}).then((result) => { console.log(result.stdout); From 8f3fb8db09ac049894c8ab099979810899f9435b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Jul 2022 06:01:12 -0700 Subject: [PATCH 573/811] Bump v21.0.0-nightly.20220711 --- 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 fa6fed8debc07..c8b04309ea458 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220708 \ No newline at end of file +21.0.0-nightly.20220711 \ No newline at end of file diff --git a/package.json b/package.json index 7ff359479eb9d..8a8b7a1ad0ab0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220708", + "version": "21.0.0-nightly.20220711", "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 e88fb9cec304f..0169410608a3b 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 21,0,0,20220708 - PRODUCTVERSION 21,0,0,20220708 + FILEVERSION 21,0,0,20220711 + PRODUCTVERSION 21,0,0,20220711 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f63bba8ce24917f1c78a8804496fe0f5b461b0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20H=C4=83loiu?= Date: Mon, 11 Jul 2022 21:26:18 +0300 Subject: [PATCH 574/811] fix: set Wayland application ID (#34855) * refactor: extract XDG app ID logic into a method * fix: set application ID on Wayland --- shell/browser/native_window_views.cc | 3 +++ .../notifications/linux/libnotify_notification.cc | 10 ++-------- shell/common/platform_util.h | 4 ++++ shell/common/platform_util_linux.cc | 15 +++++++++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index ee690a03b8268..cb25379b7765a 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -51,6 +51,7 @@ #include "shell/browser/ui/views/client_frame_view_linux.h" #include "shell/browser/ui/views/frameless_view.h" #include "shell/browser/ui/views/native_frame_view.h" +#include "shell/common/platform_util.h" #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #include "ui/views/window/native_frame_view.h" @@ -271,6 +272,8 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, // Set WM_CLASS. params.wm_class_name = base::ToLowerASCII(name); params.wm_class_class = name; + // Set Wayland application ID. + params.wayland_app_id = platform_util::GetXdgAppId(); auto* native_widget = new views::DesktopNativeWidgetAura(widget()); params.native_widget = native_widget; diff --git a/shell/browser/notifications/linux/libnotify_notification.cc b/shell/browser/notifications/linux/libnotify_notification.cc index 07d7135788de1..3f7a2fa24f887 100644 --- a/shell/browser/notifications/linux/libnotify_notification.cc +++ b/shell/browser/notifications/linux/libnotify_notification.cc @@ -9,7 +9,6 @@ #include "base/files/file_enumerator.h" #include "base/logging.h" -#include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "shell/browser/notifications/notification_delegate.h" #include "shell/browser/ui/gtk_util.h" @@ -138,13 +137,8 @@ void LibnotifyNotification::Show(const NotificationOptions& options) { // Send the desktop name to identify the application // The desktop-entry is the part before the .desktop - std::string desktop_id; - if (platform_util::GetDesktopName(&desktop_id)) { - const std::string suffix{".desktop"}; - if (base::EndsWith(desktop_id, suffix, - base::CompareCase::INSENSITIVE_ASCII)) { - desktop_id.resize(desktop_id.size() - suffix.size()); - } + std::string desktop_id = platform_util::GetXdgAppId(); + if (!desktop_id.empty()) { libnotify_loader_.notify_notification_set_hint_string( notification_, "desktop-entry", desktop_id.c_str()); } diff --git a/shell/common/platform_util.h b/shell/common/platform_util.h index ba8f9652dba29..085c7e3a7d926 100644 --- a/shell/common/platform_util.h +++ b/shell/common/platform_util.h @@ -56,6 +56,10 @@ bool SetLoginItemEnabled(bool enabled); // Returns a success flag. // Unlike libgtkui, does *not* use "chromium-browser.desktop" as a fallback. bool GetDesktopName(std::string* setme); + +// The XDG application ID must match the name of the desktop entry file without +// the .desktop extension. +std::string GetXdgAppId(); #endif } // namespace platform_util diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index ef8d8f8f0de01..2018c6d8864bf 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -20,6 +20,7 @@ #include "base/posix/eintr_wrapper.h" #include "base/process/kill.h" #include "base/process/launch.h" +#include "base/strings/string_util.h" #include "base/threading/thread_restrictions.h" #include "components/dbus/thread_linux/dbus_thread_linux.h" #include "content/public/browser/browser_thread.h" @@ -403,4 +404,18 @@ bool GetDesktopName(std::string* setme) { return base::Environment::Create()->GetVar("CHROME_DESKTOP", setme); } +std::string GetXdgAppId() { + std::string desktop_file_name; + if (GetDesktopName(&desktop_file_name)) { + const std::string kDesktopExtension{".desktop"}; + if (base::EndsWith(desktop_file_name, kDesktopExtension, + base::CompareCase::INSENSITIVE_ASCII)) { + desktop_file_name.resize(desktop_file_name.size() - + kDesktopExtension.size()); + } + } + + return desktop_file_name; +} + } // namespace platform_util From 4190ec248260c3e7673889f2ed77625f47812a4e Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Mon, 11 Jul 2022 16:28:09 -0700 Subject: [PATCH 575/811] feat: sandbox preloads by default (#32869) --- shell/browser/web_contents_preferences.cc | 4 +--- spec-main/fixtures/apps/libuv-hang/main.js | 3 ++- spec/webview-spec.js | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index d15e99c36d6d6..300bf05b8a1bf 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -316,9 +316,7 @@ bool WebContentsPreferences::IsSandboxed() const { if (sandbox_) return *sandbox_; bool sandbox_disabled_by_default = - node_integration_ || node_integration_in_worker_ || preload_path_ || - !SessionPreferences::GetValidPreloads(web_contents_->GetBrowserContext()) - .empty(); + node_integration_ || node_integration_in_worker_; return !sandbox_disabled_by_default; } diff --git a/spec-main/fixtures/apps/libuv-hang/main.js b/spec-main/fixtures/apps/libuv-hang/main.js index 4ca4ef15d9024..3c9b9d0b6f26a 100644 --- a/spec-main/fixtures/apps/libuv-hang/main.js +++ b/spec-main/fixtures/apps/libuv-hang/main.js @@ -5,7 +5,8 @@ async function createWindow () { const mainWindow = new BrowserWindow({ show: false, webPreferences: { - preload: path.join(__dirname, 'preload.js') + preload: path.join(__dirname, 'preload.js'), + sandbox: false } }); diff --git a/spec/webview-spec.js b/spec/webview-spec.js index ff0f9c7964d68..9f53a7603e49b 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -243,6 +243,7 @@ describe(' tag', function () { it('preload script can require modules that still use "process" and "Buffer" when nodeintegration is off', async () => { const message = await startLoadingWebViewAndWaitForMessage(webview, { preload: `${fixtures}/module/preload-node-off-wrapper.js`, + webpreferences: 'sandbox=no', src: `file://${fixtures}/api/blank.html` }); @@ -288,6 +289,7 @@ describe(' tag', function () { it('works without script tag in page', async () => { const message = await startLoadingWebViewAndWaitForMessage(webview, { preload: `${fixtures}/module/preload.js`, + webpreferences: 'sandbox=no', src: `file://${fixtures}pages/base-page.html` }); @@ -303,6 +305,7 @@ describe(' tag', function () { it('resolves relative URLs', async () => { const message = await startLoadingWebViewAndWaitForMessage(webview, { preload: '../fixtures/module/preload.js', + webpreferences: 'sandbox=no', src: `file://${fixtures}/pages/e.html` }); @@ -390,6 +393,7 @@ describe(' tag', function () { const message = await startLoadingWebViewAndWaitForMessage(webview, { disablewebsecurity: '', preload: `${fixtures}/module/preload.js`, + webpreferences: 'sandbox=no', src: `file://${fixtures}/pages/e.html` }); From 95019f0454ba5b3c61bdabec48d1756a1f16ecae Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 12 Jul 2022 09:13:40 +0200 Subject: [PATCH 576/811] fix: update Windows caption buttons to match Win11 style (#34790) --- filenames.gni | 2 + shell/browser/ui/views/win_caption_button.cc | 62 +++----- shell/browser/ui/views/win_caption_button.h | 7 + shell/browser/ui/views/win_icon_painter.cc | 143 +++++++++++++++++++ shell/browser/ui/views/win_icon_painter.h | 64 +++++++++ 5 files changed, 236 insertions(+), 42 deletions(-) create mode 100644 shell/browser/ui/views/win_icon_painter.cc create mode 100644 shell/browser/ui/views/win_icon_painter.h diff --git a/filenames.gni b/filenames.gni index 912d11ac9a07a..9cdb0637abb60 100644 --- a/filenames.gni +++ b/filenames.gni @@ -85,6 +85,8 @@ filenames = { "shell/browser/ui/message_box_win.cc", "shell/browser/ui/tray_icon_win.cc", "shell/browser/ui/views/electron_views_delegate_win.cc", + "shell/browser/ui/views/win_icon_painter.cc", + "shell/browser/ui/views/win_icon_painter.h", "shell/browser/ui/views/win_frame_view.cc", "shell/browser/ui/views/win_frame_view.h", "shell/browser/ui/views/win_caption_button.cc", diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index 46280ee4b1583..9903fecd3146d 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -10,6 +10,7 @@ #include "base/i18n/rtl.h" #include "base/numerics/safe_conversions.h" +#include "base/win/windows_version.h" #include "chrome/grit/theme_resources.h" #include "shell/browser/ui/views/win_frame_view.h" #include "shell/common/color_util.h" @@ -28,6 +29,7 @@ WinCaptionButton::WinCaptionButton(PressedCallback callback, const std::u16string& accessible_name) : views::Button(std::move(callback)), frame_view_(frame_view), + icon_painter_(CreateIconPainter()), button_type_(button_type) { SetAnimateOnStateChange(true); // Not focusable by default, only for accessibility. @@ -35,6 +37,15 @@ WinCaptionButton::WinCaptionButton(PressedCallback callback, SetAccessibleName(accessible_name); } +WinCaptionButton::~WinCaptionButton() = default; + +std::unique_ptr WinCaptionButton::CreateIconPainter() { + if (base::win::GetVersion() >= base::win::Version::WIN11) { + return std::make_unique(); + } + return std::make_unique(); +} + gfx::Size WinCaptionButton::CalculatePreferredSize() const { // TODO(bsep): The sizes in this function are for 1x device scale and don't // match Windows button sizes at hidpi. @@ -50,9 +61,10 @@ void WinCaptionButton::OnPaintBackground(gfx::Canvas* canvas) { const SkAlpha theme_alpha = SkColorGetA(bg_color); gfx::Rect bounds = GetContentsBounds(); - bounds.Inset(gfx::Insets::TLBR(0, 0, 0, 0)); + bounds.Inset(gfx::Insets::TLBR(0, GetBetweenButtonSpacing(), 0, 0)); - canvas->FillRect(bounds, SkColorSetA(bg_color, theme_alpha)); + if (theme_alpha > 0) + canvas->FillRect(bounds, SkColorSetA(bg_color, theme_alpha)); SkColor base_color; SkAlpha hovered_alpha, pressed_alpha; @@ -136,21 +148,6 @@ int WinCaptionButton::GetButtonDisplayOrderIndex() const { return button_display_order; } -namespace { - -// Canvas::DrawRect's stroke can bleed out of |rect|'s bounds, so this draws a -// rectangle inset such that the result is constrained to |rect|'s size. -void DrawRect(gfx::Canvas* canvas, - const gfx::Rect& rect, - const cc::PaintFlags& flags) { - gfx::RectF rect_f(rect); - float stroke_half_width = flags.getStrokeWidth() / 2; - rect_f.Inset(gfx::InsetsF::VH(stroke_half_width, stroke_half_width)); - canvas->DrawRect(rect_f, flags); -} - -} // namespace - void WinCaptionButton::PaintSymbol(gfx::Canvas* canvas) { SkColor symbol_color = frame_view_->window()->overlay_symbol_color(); @@ -183,32 +180,21 @@ void WinCaptionButton::PaintSymbol(gfx::Canvas* canvas) { switch (button_type_) { case VIEW_ID_MINIMIZE_BUTTON: { - const int y = symbol_rect.CenterPoint().y(); - const gfx::Point p1 = gfx::Point(symbol_rect.x(), y); - const gfx::Point p2 = gfx::Point(symbol_rect.right(), y); - canvas->DrawLine(p1, p2, flags); + icon_painter_->PaintMinimizeIcon(canvas, symbol_rect, flags); return; } - case VIEW_ID_MAXIMIZE_BUTTON: - DrawRect(canvas, symbol_rect, flags); + case VIEW_ID_MAXIMIZE_BUTTON: { + icon_painter_->PaintMaximizeIcon(canvas, symbol_rect, flags); return; + } case VIEW_ID_RESTORE_BUTTON: { - // Bottom left ("in front") square. - const int separation = std::floor(2 * scale); - symbol_rect.Inset(gfx::Insets::TLBR(0, separation, separation, 0)); - DrawRect(canvas, symbol_rect, flags); - - // Top right ("behind") square. - canvas->ClipRect(symbol_rect, SkClipOp::kDifference); - symbol_rect.Offset(separation, -separation); - DrawRect(canvas, symbol_rect, flags); + icon_painter_->PaintRestoreIcon(canvas, symbol_rect, flags); return; } case VIEW_ID_CLOSE_BUTTON: { - flags.setAntiAlias(true); // The close button's X is surrounded by a "halo" of transparent pixels. // When the X is white, the transparent pixels need to be a bit brighter // to be visible. @@ -216,15 +202,7 @@ void WinCaptionButton::PaintSymbol(gfx::Canvas* canvas) { stroke_width * (symbol_color == SK_ColorWHITE ? 0.1f : 0.05f); flags.setStrokeWidth(stroke_width + stroke_halo); - // TODO(bsep): This sometimes draws misaligned at fractional device scales - // because the button's origin isn't necessarily aligned to pixels. - canvas->ClipRect(symbol_rect); - SkPath path; - path.moveTo(symbol_rect.x(), symbol_rect.y()); - path.lineTo(symbol_rect.right(), symbol_rect.bottom()); - path.moveTo(symbol_rect.right(), symbol_rect.y()); - path.lineTo(symbol_rect.x(), symbol_rect.bottom()); - canvas->DrawPath(path, flags); + icon_painter_->PaintCloseIcon(canvas, symbol_rect, flags); return; } diff --git a/shell/browser/ui/views/win_caption_button.h b/shell/browser/ui/views/win_caption_button.h index fafa3e414bcff..801474b5e3f4b 100644 --- a/shell/browser/ui/views/win_caption_button.h +++ b/shell/browser/ui/views/win_caption_button.h @@ -7,8 +7,11 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ #define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ +#include + #include "chrome/browser/ui/frame/window_frame_util.h" #include "chrome/browser/ui/view_ids.h" +#include "shell/browser/ui/views/win_icon_painter.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/gfx/canvas.h" #include "ui/views/controls/button/button.h" @@ -23,6 +26,8 @@ class WinCaptionButton : public views::Button { WinFrameView* frame_view, ViewID button_type, const std::u16string& accessible_name); + ~WinCaptionButton() override; + WinCaptionButton(const WinCaptionButton&) = delete; WinCaptionButton& operator=(const WinCaptionButton&) = delete; @@ -35,6 +40,7 @@ class WinCaptionButton : public views::Button { void SetSize(gfx::Size size); private: + std::unique_ptr CreateIconPainter(); // Returns the amount we should visually reserve on the left (right in RTL) // for spacing between buttons. We do this instead of repositioning the // buttons to avoid the sliver of deadspace that would result. @@ -53,6 +59,7 @@ class WinCaptionButton : public views::Button { void PaintSymbol(gfx::Canvas* canvas); WinFrameView* frame_view_; + std::unique_ptr icon_painter_; ViewID button_type_; int base_width_ = WindowFrameUtil::kWindows10GlassCaptionButtonWidth; diff --git a/shell/browser/ui/views/win_icon_painter.cc b/shell/browser/ui/views/win_icon_painter.cc new file mode 100644 index 0000000000000..d61a7970c6705 --- /dev/null +++ b/shell/browser/ui/views/win_icon_painter.cc @@ -0,0 +1,143 @@ +// Copyright (c) 2022 Microsoft, Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "shell/browser/ui/views/win_icon_painter.h" + +#include "base/numerics/safe_conversions.h" +#include "ui/gfx/color_utils.h" +#include "ui/gfx/geometry/rect_conversions.h" +#include "ui/gfx/geometry/skia_conversions.h" +#include "ui/gfx/scoped_canvas.h" + +namespace { + +// Canvas::DrawRect's stroke can bleed out of |rect|'s bounds, so this draws a +// rectangle inset such that the result is constrained to |rect|'s size. +void DrawRect(gfx::Canvas* canvas, + const gfx::Rect& rect, + const cc::PaintFlags& flags) { + gfx::RectF rect_f(rect); + float stroke_half_width = flags.getStrokeWidth() / 2; + rect_f.Inset(stroke_half_width); + canvas->DrawRect(rect_f, flags); +} + +void DrawRoundRect(gfx::Canvas* canvas, + const gfx::Rect& rect, + int radius, + const cc::PaintFlags& flags) { + gfx::RectF rect_f(rect); + float stroke_half_width = flags.getStrokeWidth() / 2; + rect_f.Inset(stroke_half_width); + canvas->DrawRoundRect(rect_f, radius, flags); +} + +// Draws a path containing the top and right edges of a rounded rectangle. +void DrawRoundRectEdges(gfx::Canvas* canvas, + const gfx::Rect& rect, + float radius, + const cc::PaintFlags& flags) { + gfx::RectF symbol_rect_f(rect); + float stroke_half_width = flags.getStrokeWidth() / 2; + symbol_rect_f.Inset(stroke_half_width); + SkPath path; + path.moveTo(symbol_rect_f.x(), symbol_rect_f.y()); + path.arcTo(symbol_rect_f.right(), symbol_rect_f.y(), symbol_rect_f.right(), + symbol_rect_f.y() + radius, radius); + path.lineTo(symbol_rect_f.right(), symbol_rect_f.bottom()); + canvas->DrawPath(path, flags); +} + +} // namespace + +namespace electron { + +WinIconPainter::WinIconPainter() = default; +WinIconPainter::~WinIconPainter() = default; + +void WinIconPainter::PaintMinimizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + const int y = symbol_rect.CenterPoint().y(); + const gfx::Point p1 = gfx::Point(symbol_rect.x(), y); + const gfx::Point p2 = gfx::Point(symbol_rect.right(), y); + canvas->DrawLine(p1, p2, flags); +} + +void WinIconPainter::PaintMaximizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + DrawRect(canvas, symbol_rect, flags); +} + +void WinIconPainter::PaintRestoreIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + const int separation = std::floor(2 * canvas->image_scale()); + gfx::Rect icon_rect = symbol_rect; + icon_rect.Inset(gfx::Insets::TLBR(separation, 0, 0, separation)); + + // Bottom left ("in front") square. + DrawRect(canvas, icon_rect, flags); + + // Top right ("behind") square. + canvas->ClipRect(icon_rect, SkClipOp::kDifference); + icon_rect.Offset(separation, -separation); + DrawRect(canvas, icon_rect, flags); +} + +void WinIconPainter::PaintCloseIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + // TODO(bsep): This sometimes draws misaligned at fractional device scales + // because the button's origin isn't necessarily aligned to pixels. + cc::PaintFlags paint_flags = flags; + paint_flags.setAntiAlias(true); + + canvas->ClipRect(symbol_rect); + SkPath path; + path.moveTo(symbol_rect.x(), symbol_rect.y()); + path.lineTo(symbol_rect.right(), symbol_rect.bottom()); + path.moveTo(symbol_rect.right(), symbol_rect.y()); + path.lineTo(symbol_rect.x(), symbol_rect.bottom()); + canvas->DrawPath(path, flags); +} + +Win11IconPainter::Win11IconPainter() = default; +Win11IconPainter::~Win11IconPainter() = default; + +void Win11IconPainter::PaintMaximizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + cc::PaintFlags paint_flags = flags; + paint_flags.setAntiAlias(true); + + const float corner_radius = 2 * canvas->image_scale(); + DrawRoundRect(canvas, symbol_rect, corner_radius, flags); +} + +void Win11IconPainter::PaintRestoreIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) { + const int separation = std::floor(2 * canvas->image_scale()); + gfx::Rect icon_rect = symbol_rect; + icon_rect.Inset(gfx::Insets::TLBR(separation, 0, 0, separation)); + + cc::PaintFlags paint_flags = flags; + paint_flags.setAntiAlias(true); + + // Bottom left ("in front") rounded square. + const float bottom_rect_radius = 1 * canvas->image_scale(); + DrawRoundRect(canvas, icon_rect, bottom_rect_radius, flags); + + // Top right ("behind") top+right edges of rounded square (2.5x). + icon_rect.Offset(separation, -separation); + // Apply inset to left+bottom edges since we don't draw arcs for those edges + constexpr int top_rect_inset = 1; + icon_rect.Inset(gfx::Insets::TLBR(0, top_rect_inset, top_rect_inset, 0)); + + const float top_rect_radius = 2.5f * canvas->image_scale(); + DrawRoundRectEdges(canvas, icon_rect, top_rect_radius, flags); +} +} // namespace electron diff --git a/shell/browser/ui/views/win_icon_painter.h b/shell/browser/ui/views/win_icon_painter.h new file mode 100644 index 0000000000000..d3c85be296a0b --- /dev/null +++ b/shell/browser/ui/views/win_icon_painter.h @@ -0,0 +1,64 @@ +// Copyright (c) 2022 Microsoft, Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_ICON_PAINTER_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_ICON_PAINTER_H_ + +#include "base/memory/raw_ptr.h" +#include "ui/gfx/canvas.h" + +namespace electron { + +class WinIconPainter { + public: + WinIconPainter(); + virtual ~WinIconPainter(); + + WinIconPainter(const WinIconPainter&) = delete; + WinIconPainter& operator=(const WinIconPainter&) = delete; + + public: + // Paints the minimize icon for the button + virtual void PaintMinimizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags); + + // Paints the maximize icon for the button + virtual void PaintMaximizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags); + + // Paints the restore icon for the button + virtual void PaintRestoreIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags); + + // Paints the close icon for the button + virtual void PaintCloseIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags); +}; + +class Win11IconPainter : public WinIconPainter { + public: + Win11IconPainter(); + ~Win11IconPainter() override; + + Win11IconPainter(const Win11IconPainter&) = delete; + Win11IconPainter& operator=(const Win11IconPainter&) = delete; + + public: + // Paints the maximize icon for the button + void PaintMaximizeIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) override; + + // Paints the restore icon for the button + void PaintRestoreIcon(gfx::Canvas* canvas, + const gfx::Rect& symbol_rect, + const cc::PaintFlags& flags) override; +}; +} // namespace electron + +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_ICON_PAINTER_H_ From 511ff8bc8daf4f976654744d6018f3aa45c40f1f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 12 Jul 2022 00:48:51 -0700 Subject: [PATCH 577/811] fix: ensure that requestMediaKeySystemAccess resolves (#34886) When widevine was disabled at the build level we never dealt with the callback passed into GetSupportedKeySystems. This was ok until requests became marked pending in https://chromium-review.googlesource.com/c/chromium/src/+/3430502 until the callback was called. This resulted in a promise never resolving / rejecting and certain media websites (E.g. spotify) hanging on load waiting for a signal that would never arrive. --- shell/app/electron_content_client.cc | 13 +++++++------ shell/renderer/renderer_client_base.cc | 7 +++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/shell/app/electron_content_client.cc b/shell/app/electron_content_client.cc index b755232a2b53b..a63aebdddad5e 100644 --- a/shell/app/electron_content_client.cc +++ b/shell/app/electron_content_client.cc @@ -22,17 +22,18 @@ #include "ppapi/buildflags/buildflags.h" #include "shell/common/electron_paths.h" #include "shell/common/options_switches.h" +#include "third_party/widevine/cdm/buildflags.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "url/url_constants.h" // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // NOLINT(build/include_directory) -#if defined(WIDEVINE_CDM_AVAILABLE) +#if BUILDFLAG(ENABLE_WIDEVINE) #include "base/native_library.h" #include "content/public/common/cdm_info.h" #include "media/base/video_codecs.h" -#endif // defined(WIDEVINE_CDM_AVAILABLE) +#endif // BUILDFLAG(ENABLE_WIDEVINE) #if BUILDFLAG(ENABLE_PDF_VIEWER) #include "chrome/common/pdf_util.h" @@ -58,7 +59,7 @@ enum class WidevineCdmFileCheck { kNotFound, }; -#if defined(WIDEVINE_CDM_AVAILABLE) +#if BUILDFLAG(ENABLE_WIDEVINE) bool IsWidevineAvailable( base::FilePath* cdm_path, std::vector* codecs_supported, @@ -102,7 +103,7 @@ bool IsWidevineAvailable( return false; } -#endif // defined(WIDEVINE_CDM_AVAILABLE) +#endif // BUILDFLAG(ENABLE_WIDEVINE) #if BUILDFLAG(ENABLE_PLUGINS) void ComputeBuiltInPlugins(std::vector* plugins) { @@ -227,7 +228,7 @@ void ElectronContentClient::AddContentDecryptionModules( std::vector* cdms, std::vector* cdm_host_file_paths) { if (cdms) { -#if defined(WIDEVINE_CDM_AVAILABLE) +#if BUILDFLAG(ENABLE_WIDEVINE) base::FilePath cdm_path; std::vector video_codecs_supported; base::flat_set session_types_supported; @@ -252,7 +253,7 @@ void ElectronContentClient::AddContentDecryptionModules( kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path, kWidevineCdmFileSystemId, capability, kWidevineKeySystem, false)); } -#endif // defined(WIDEVINE_CDM_AVAILABLE) +#endif // BUILDFLAG(ENABLE_WIDEVINE) } } diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index c1e177049230d..a7ce97370f066 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -47,6 +47,7 @@ #include "third_party/blink/public/web/web_view.h" #include "third_party/blink/renderer/platform/media/multi_buffer_data_source.h" // nogncheck #include "third_party/blink/renderer/platform/weborigin/scheme_registry.h" // nogncheck +#include "third_party/widevine/cdm/buildflags.h" #if BUILDFLAG(IS_MAC) #include "base/strings/sys_string_conversions.h" @@ -56,7 +57,7 @@ #include #endif -#if defined(WIDEVINE_CDM_AVAILABLE) +#if BUILDFLAG(ENABLE_WIDEVINE) #include "chrome/renderer/media/chrome_key_systems.h" // nogncheck #endif @@ -377,8 +378,10 @@ bool RendererClientBase::OverrideCreatePlugin( void RendererClientBase::GetSupportedKeySystems( media::GetSupportedKeySystemsCB cb) { -#if defined(WIDEVINE_CDM_AVAILABLE) +#if BUILDFLAG(ENABLE_WIDEVINE) GetChromeKeySystems(std::move(cb)); +#else + std::move(cb).Run({}); #endif } From 5314ae53427ad69dd9ad43dfd26a09b9edc799c7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 12 Jul 2022 06:01:28 -0700 Subject: [PATCH 578/811] Bump v21.0.0-nightly.20220712 --- 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 c8b04309ea458..5a0433e61cd15 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220711 \ No newline at end of file +21.0.0-nightly.20220712 \ No newline at end of file diff --git a/package.json b/package.json index 8a8b7a1ad0ab0..30df1779f0a08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220711", + "version": "21.0.0-nightly.20220712", "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 0169410608a3b..7f600c4c6c522 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 21,0,0,20220711 - PRODUCTVERSION 21,0,0,20220711 + FILEVERSION 21,0,0,20220712 + PRODUCTVERSION 21,0,0,20220712 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From afd08c9450f5ad9b067b5f6dbf9b9243307d00b2 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Tue, 12 Jul 2022 08:38:49 -0700 Subject: [PATCH 579/811] feat: Enable APNS registration + notification delivery in macOS apps (#33574) --- docs/api/push-notifications.md | 48 ++++++++++++ filenames.auto.gni | 2 + filenames.gni | 3 + lib/browser/api/module-list.ts | 1 + lib/browser/api/push-notifications.ts | 3 + .../api/electron_api_push_notifications.cc | 77 +++++++++++++++++++ .../api/electron_api_push_notifications.h | 64 +++++++++++++++ .../electron_api_push_notifications_mac.mm | 62 +++++++++++++++ .../mac/electron_application_delegate.mm | 40 ++++++++++ shell/common/node_bindings.cc | 1 + typings/internal-ambient.d.ts | 1 + 11 files changed, 302 insertions(+) create mode 100644 docs/api/push-notifications.md create mode 100644 lib/browser/api/push-notifications.ts create mode 100644 shell/browser/api/electron_api_push_notifications.cc create mode 100644 shell/browser/api/electron_api_push_notifications.h create mode 100644 shell/browser/api/electron_api_push_notifications_mac.mm diff --git a/docs/api/push-notifications.md b/docs/api/push-notifications.md new file mode 100644 index 0000000000000..cad396bc03d56 --- /dev/null +++ b/docs/api/push-notifications.md @@ -0,0 +1,48 @@ +# pushNotifications + +Process: [Main](../glossary.md#main-process) + +> Register for and receive notifications from remote push notification services + +For example, when registering for push notifications via Apple push notification services (APNS): + +```javascript +const { pushNotifications, Notification } = require('electron') + +pushNotifications.registerForAPNSNotifications().then((token) => { + // forward token to your remote notification server +}) + +pushNotifications.on('received-apns-notification', (event, userInfo) => { + // generate a new Notification object with the relevant userInfo fields +}) +``` + +## Events + +The `pushNotification` module emits the following events: + +#### Event: 'received-apns-notification' _macOS_ + +Returns: + +* `userInfo` Record + +Emitted when the app receives a remote notification while running. +See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc + +## Methods + +The `pushNotification` module has the following methods: + +### `pushNotifications.registerForAPNSNotifications()` _macOS_ + +Returns `Promise` + +Registers the app with Apple Push Notification service (APNS) to receive [Badge, Sound, and Alert](https://developer.apple.com/documentation/appkit/sremotenotificationtype?language=objc) notifications. If registration is successful, the promise will be resolved with the APNS device token. Otherwise, the promise will be rejected with an error message. +See: https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc + +### `pushNotifications.unregisterForAPNSNotifications()` _macOS_ + +Unregisters the app from notifications received from APNS. +See: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc diff --git a/filenames.auto.gni b/filenames.auto.gni index 82a36d7a46360..2b865962a3885 100644 --- a/filenames.auto.gni +++ b/filenames.auto.gni @@ -40,6 +40,7 @@ auto_filenames = { "docs/api/power-save-blocker.md", "docs/api/process.md", "docs/api/protocol.md", + "docs/api/push-notifications.md", "docs/api/safe-storage.md", "docs/api/screen.md", "docs/api/service-workers.md", @@ -212,6 +213,7 @@ auto_filenames = { "lib/browser/api/power-monitor.ts", "lib/browser/api/power-save-blocker.ts", "lib/browser/api/protocol.ts", + "lib/browser/api/push-notifications.ts", "lib/browser/api/safe-storage.ts", "lib/browser/api/screen.ts", "lib/browser/api/session.ts", diff --git a/filenames.gni b/filenames.gni index 9cdb0637abb60..5b9d3cc721dbb 100644 --- a/filenames.gni +++ b/filenames.gni @@ -128,6 +128,7 @@ filenames = { "shell/browser/api/electron_api_menu_mac.mm", "shell/browser/api/electron_api_native_theme_mac.mm", "shell/browser/api/electron_api_power_monitor_mac.mm", + "shell/browser/api/electron_api_push_notifications_mac.mm", "shell/browser/api/electron_api_system_preferences_mac.mm", "shell/browser/api/electron_api_web_contents_mac.mm", "shell/browser/auto_updater_mac.mm", @@ -295,6 +296,8 @@ filenames = { "shell/browser/api/electron_api_printing.cc", "shell/browser/api/electron_api_protocol.cc", "shell/browser/api/electron_api_protocol.h", + "shell/browser/api/electron_api_push_notifications.cc", + "shell/browser/api/electron_api_push_notifications.h", "shell/browser/api/electron_api_safe_storage.cc", "shell/browser/api/electron_api_safe_storage.h", "shell/browser/api/electron_api_screen.cc", diff --git a/lib/browser/api/module-list.ts b/lib/browser/api/module-list.ts index b9e3340cd2955..be516aec2885a 100644 --- a/lib/browser/api/module-list.ts +++ b/lib/browser/api/module-list.ts @@ -22,6 +22,7 @@ export const browserModuleList: ElectronInternal.ModuleEntry[] = [ { name: 'Notification', loader: () => require('./notification') }, { name: 'powerMonitor', loader: () => require('./power-monitor') }, { name: 'powerSaveBlocker', loader: () => require('./power-save-blocker') }, + { name: 'pushNotifications', loader: () => require('./push-notifications') }, { name: 'protocol', loader: () => require('./protocol') }, { name: 'safeStorage', loader: () => require('./safe-storage') }, { name: 'screen', loader: () => require('./screen') }, diff --git a/lib/browser/api/push-notifications.ts b/lib/browser/api/push-notifications.ts new file mode 100644 index 0000000000000..346ae93c6b0da --- /dev/null +++ b/lib/browser/api/push-notifications.ts @@ -0,0 +1,3 @@ +const { pushNotifications } = process._linkedBinding('electron_browser_push_notifications'); + +export default pushNotifications; diff --git a/shell/browser/api/electron_api_push_notifications.cc b/shell/browser/api/electron_api_push_notifications.cc new file mode 100644 index 0000000000000..bb0cb13d0f1d7 --- /dev/null +++ b/shell/browser/api/electron_api_push_notifications.cc @@ -0,0 +1,77 @@ +// Copyright (c) 2022 Asana, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "shell/browser/api/electron_api_push_notifications.h" + +#include + +#include "shell/common/gin_converters/value_converter.h" +#include "shell/common/gin_helper/dictionary.h" +#include "shell/common/node_includes.h" + +namespace electron { + +namespace api { + +PushNotifications* g_push_notifications = nullptr; + +gin::WrapperInfo PushNotifications::kWrapperInfo = {gin::kEmbedderNativeGin}; + +PushNotifications::PushNotifications() = default; + +PushNotifications::~PushNotifications() { + g_push_notifications = nullptr; +} + +// static +PushNotifications* PushNotifications::Get() { + if (!g_push_notifications) + g_push_notifications = new PushNotifications(); + return g_push_notifications; +} + +// static +gin::Handle PushNotifications::Create(v8::Isolate* isolate) { + return gin::CreateHandle(isolate, PushNotifications::Get()); +} + +// static +gin::ObjectTemplateBuilder PushNotifications::GetObjectTemplateBuilder( + v8::Isolate* isolate) { + auto builder = gin_helper::EventEmitterMixin< + PushNotifications>::GetObjectTemplateBuilder(isolate); +#if BUILDFLAG(IS_MAC) + builder + .SetMethod("registerForAPNSNotifications", + &PushNotifications::RegisterForAPNSNotifications) + .SetMethod("unregisterForAPNSNotifications", + &PushNotifications::UnregisterForAPNSNotifications); +#endif + return builder; +} + +const char* PushNotifications::GetTypeName() { + return "PushNotifications"; +} + +} // namespace api + +} // namespace electron + +namespace { + +void Initialize(v8::Local exports, + v8::Local unused, + v8::Local context, + void* priv) { + v8::Isolate* isolate = context->GetIsolate(); + gin::Dictionary dict(isolate, exports); + dict.Set("pushNotifications", + electron::api::PushNotifications::Create(isolate)); +} + +} // namespace + +NODE_LINKED_MODULE_CONTEXT_AWARE(electron_browser_push_notifications, + Initialize) diff --git a/shell/browser/api/electron_api_push_notifications.h b/shell/browser/api/electron_api_push_notifications.h new file mode 100644 index 0000000000000..f818afdd109d4 --- /dev/null +++ b/shell/browser/api/electron_api_push_notifications.h @@ -0,0 +1,64 @@ +// 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 ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PUSH_NOTIFICATIONS_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PUSH_NOTIFICATIONS_H_ + +#include + +#include +#include "gin/handle.h" +#include "gin/wrappable.h" +#include "shell/browser/browser_observer.h" +#include "shell/browser/electron_browser_client.h" +#include "shell/browser/event_emitter_mixin.h" +#include "shell/common/gin_helper/promise.h" + +namespace electron { + +namespace api { + +class PushNotifications + : public ElectronBrowserClient::Delegate, + public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public BrowserObserver { + public: + static PushNotifications* Get(); + static gin::Handle Create(v8::Isolate* isolate); + + // gin::Wrappable + static gin::WrapperInfo kWrapperInfo; + gin::ObjectTemplateBuilder GetObjectTemplateBuilder( + v8::Isolate* isolate) override; + const char* GetTypeName() override; + + // disable copy + PushNotifications(const PushNotifications&) = delete; + PushNotifications& operator=(const PushNotifications&) = delete; + +#if BUILDFLAG(IS_MAC) + void OnDidReceiveAPNSNotification(const base::DictionaryValue& user_info); + void ResolveAPNSPromiseSetWithToken(const std::string& token_string); + void RejectAPNSPromiseSetWithError(const std::string& error_message); +#endif + + private: + PushNotifications(); + ~PushNotifications() override; + // This set maintains all the promises that should be fulfilled + // once macOS registers, or fails to register, for APNS + std::vector> apns_promise_set_; + +#if BUILDFLAG(IS_MAC) + v8::Local RegisterForAPNSNotifications(v8::Isolate* isolate); + void UnregisterForAPNSNotifications(); +#endif +}; + +} // namespace api + +} // namespace electron + +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PUSH_NOTIFICATIONS_H_ diff --git a/shell/browser/api/electron_api_push_notifications_mac.mm b/shell/browser/api/electron_api_push_notifications_mac.mm new file mode 100644 index 0000000000000..c52511625a704 --- /dev/null +++ b/shell/browser/api/electron_api_push_notifications_mac.mm @@ -0,0 +1,62 @@ +// Copyright (c) 2022 Asana, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "shell/browser/api/electron_api_push_notifications.h" + +#include + +#include +#include +#import "shell/browser/mac/electron_application.h" +#include "shell/common/gin_converters/value_converter.h" +#include "shell/common/gin_helper/promise.h" + +namespace electron { + +namespace api { + +v8::Local PushNotifications::RegisterForAPNSNotifications( + v8::Isolate* isolate) { + gin_helper::Promise promise(isolate); + v8::Local handle = promise.GetHandle(); + + [[AtomApplication sharedApplication] + registerForRemoteNotificationTypes:NSRemoteNotificationTypeBadge | + NSRemoteNotificationTypeAlert | + NSRemoteNotificationTypeSound]; + + PushNotifications::apns_promise_set_.emplace_back(std::move(promise)); + return handle; +} + +void PushNotifications::ResolveAPNSPromiseSetWithToken( + const std::string& token_string) { + std::vector> promises = + std::move(PushNotifications::apns_promise_set_); + for (auto& promise : promises) { + promise.Resolve(token_string); + } +} + +void PushNotifications::RejectAPNSPromiseSetWithError( + const std::string& error_message) { + std::vector> promises = + std::move(PushNotifications::apns_promise_set_); + for (auto& promise : promises) { + promise.RejectWithErrorMessage(error_message); + } +} + +void PushNotifications::UnregisterForAPNSNotifications() { + [[AtomApplication sharedApplication] unregisterForRemoteNotifications]; +} + +void PushNotifications::OnDidReceiveAPNSNotification( + const base::DictionaryValue& user_info) { + Emit("received-apns-notification", user_info); +} + +} // namespace api + +} // namespace electron diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index d065eb75e4213..013f51137e4bf 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -13,6 +13,7 @@ #include "base/mac/scoped_objc_class_swizzler.h" #include "base/strings/sys_string_conversions.h" #include "base/values.h" +#include "shell/browser/api/electron_api_push_notifications.h" #include "shell/browser/browser.h" #include "shell/browser/mac/dict_util.h" #import "shell/browser/mac/electron_application.h" @@ -157,4 +158,43 @@ - (IBAction)newWindowForTab:(id)sender { electron::Browser::Get()->NewWindowForTab(); } +- (void)application:(NSApplication*)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { + // https://stackoverflow.com/a/16411517 + const char* token_data = static_cast([deviceToken bytes]); + NSMutableString* token_string = [NSMutableString string]; + for (NSUInteger i = 0; i < [deviceToken length]; i++) { + [token_string appendFormat:@"%02.2hhX", token_data[i]]; + } + // Resolve outstanding APNS promises created during registration attempts + electron::api::PushNotifications* push_notifications = + electron::api::PushNotifications::Get(); + if (push_notifications) { + push_notifications->ResolveAPNSPromiseSetWithToken( + base::SysNSStringToUTF8(token_string)); + } +} + +- (void)application:(NSApplication*)application + didFailToRegisterForRemoteNotificationsWithError:(NSError*)error { + std::string error_message(base::SysNSStringToUTF8( + [NSString stringWithFormat:@"%ld %@ %@", [error code], [error domain], + [error userInfo]])); + electron::api::PushNotifications* push_notifications = + electron::api::PushNotifications::Get(); + if (push_notifications) { + push_notifications->RejectAPNSPromiseSetWithError(error_message); + } +} + +- (void)application:(NSApplication*)application + didReceiveRemoteNotification:(NSDictionary*)userInfo { + electron::api::PushNotifications* push_notifications = + electron::api::PushNotifications::Get(); + if (push_notifications) { + electron::api::PushNotifications::Get()->OnDidReceiveAPNSNotification( + electron::NSDictionaryToDictionaryValue(userInfo)); + } +} + @end diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index b0c6558e20556..71a2f54eb5c65 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -62,6 +62,7 @@ V(electron_browser_power_save_blocker) \ V(electron_browser_protocol) \ V(electron_browser_printing) \ + V(electron_browser_push_notifications) \ V(electron_browser_safe_storage) \ V(electron_browser_session) \ V(electron_browser_screen) \ diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 207c4162789ab..950d848f50cb2 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -225,6 +225,7 @@ declare namespace NodeJS { } _linkedBinding(name: 'electron_browser_power_monitor'): PowerMonitorBinding; _linkedBinding(name: 'electron_browser_power_save_blocker'): { powerSaveBlocker: Electron.PowerSaveBlocker }; + _linkedBinding(name: 'electron_browser_push_notifications'): { pushNotifications: Electron.PushNotifications }; _linkedBinding(name: 'electron_browser_safe_storage'): { safeStorage: Electron.SafeStorage }; _linkedBinding(name: 'electron_browser_session'): typeof Electron.Session; _linkedBinding(name: 'electron_browser_screen'): { createScreen(): Electron.Screen }; From 62aeb74d7c8ec49b7c47915d4befee8dba3e8c14 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Jul 2022 12:22:17 +0200 Subject: [PATCH 580/811] fix: `base::DictionaryValue` usage in APNS notifs (#34897) --- shell/browser/api/electron_api_push_notifications.h | 2 +- shell/browser/api/electron_api_push_notifications_mac.mm | 2 +- shell/browser/mac/electron_application_delegate.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/electron_api_push_notifications.h b/shell/browser/api/electron_api_push_notifications.h index f818afdd109d4..f0f46b5e574ee 100644 --- a/shell/browser/api/electron_api_push_notifications.h +++ b/shell/browser/api/electron_api_push_notifications.h @@ -39,7 +39,7 @@ class PushNotifications PushNotifications& operator=(const PushNotifications&) = delete; #if BUILDFLAG(IS_MAC) - void OnDidReceiveAPNSNotification(const base::DictionaryValue& user_info); + void OnDidReceiveAPNSNotification(const base::Value::Dict& user_info); void ResolveAPNSPromiseSetWithToken(const std::string& token_string); void RejectAPNSPromiseSetWithError(const std::string& error_message); #endif diff --git a/shell/browser/api/electron_api_push_notifications_mac.mm b/shell/browser/api/electron_api_push_notifications_mac.mm index c52511625a704..6838293937a8f 100644 --- a/shell/browser/api/electron_api_push_notifications_mac.mm +++ b/shell/browser/api/electron_api_push_notifications_mac.mm @@ -53,7 +53,7 @@ } void PushNotifications::OnDidReceiveAPNSNotification( - const base::DictionaryValue& user_info) { + const base::Value::Dict& user_info) { Emit("received-apns-notification", user_info); } diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 013f51137e4bf..7dc351f4cc654 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -193,7 +193,7 @@ - (void)application:(NSApplication*)application electron::api::PushNotifications::Get(); if (push_notifications) { electron::api::PushNotifications::Get()->OnDidReceiveAPNSNotification( - electron::NSDictionaryToDictionaryValue(userInfo)); + electron::NSDictionaryToValue(userInfo)); } } From 07d168343ade5e0b665a6a812c269a0785a45249 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Jul 2022 12:23:24 +0200 Subject: [PATCH 581/811] fix: enable `deviceName` validation on Linux (#34872) --- .../browser/api/electron_api_web_contents.cc | 58 +++++++++---------- shell/browser/api/electron_api_web_contents.h | 11 ++-- spec-main/api-web-contents-spec.ts | 10 ++-- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 5bfe25f490411..ce94fda7c1a9a 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -419,21 +419,34 @@ bool IsDeviceNameValid(const std::u16string& device_name) { bool printer_exists = new_printer != nullptr; PMRelease(new_printer); return printer_exists; -#elif BUILDFLAG(IS_WIN) - printing::ScopedPrinterHandle printer; - return printer.OpenPrinterWithName(base::as_wcstr(device_name)); #else - return true; + scoped_refptr print_backend = + printing::PrintBackend::CreateInstance( + g_browser_process->GetApplicationLocale()); + return print_backend->IsValidPrinter(base::UTF16ToUTF8(device_name)); #endif } -std::pair GetDefaultPrinterAsync() { +// This function returns a validated device name. +// If the user passed one to webContents.print(), we check that it's valid and +// return it or fail if the network doesn't recognize it. If the user didn't +// pass a device name, we first try to return the system default printer. If one +// isn't set, then pull all the printers and use the first one or fail if none +// exist. +std::pair GetDeviceNameToUse( + const std::u16string& device_name) { #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::ThreadRestrictions::ScopedAllowIO allow_io; #endif + if (!device_name.empty()) { + if (!IsDeviceNameValid(device_name)) + return std::make_pair("Invalid deviceName provided", std::u16string()); + return std::make_pair(std::string(), device_name); + } + scoped_refptr print_backend = printing::PrintBackend::CreateInstance( g_browser_process->GetApplicationLocale()); @@ -446,14 +459,16 @@ std::pair GetDefaultPrinterAsync() { if (code != printing::mojom::ResultCode::kSuccess) LOG(ERROR) << "Failed to get default printer name"; - // Check for existing printers and pick the first one should it exist. if (printer_name.empty()) { printing::PrinterList printers; if (print_backend->EnumeratePrinters(printers) != printing::mojom::ResultCode::kSuccess) return std::make_pair("Failed to enumerate printers", std::u16string()); - if (!printers.empty()) - printer_name = printers.front().printer_name; + if (printers.empty()) + return std::make_pair("No printers available on the network", + std::u16string()); + + printer_name = printers.front().printer_name; } return std::make_pair(std::string(), base::UTF8ToUTF16(printer_name)); @@ -2579,12 +2594,11 @@ bool WebContents::IsCurrentlyAudible() { } #if BUILDFLAG(ENABLE_PRINTING) -void WebContents::OnGetDefaultPrinter( +void WebContents::OnGetDeviceNameToUse( base::Value::Dict print_settings, printing::CompletionCallback print_callback, - std::u16string device_name, bool silent, - // + // std::pair info) { // The content::WebContents might be already deleted at this point, and the // PrintViewManagerElectron class does not do null check. @@ -2601,16 +2615,7 @@ void WebContents::OnGetDefaultPrinter( } // If the user has passed a deviceName use it, otherwise use default printer. - std::u16string printer_name = device_name.empty() ? info.second : device_name; - - // If there are no valid printers available on the network, we bail. - if (printer_name.empty() || !IsDeviceNameValid(printer_name)) { - if (print_callback) - std::move(print_callback).Run(false, "no valid printers available"); - return; - } - - print_settings.Set(printing::kSettingDeviceName, printer_name); + print_settings.Set(printing::kSettingDeviceName, info.second); auto* print_view_manager = PrintViewManagerElectron::FromWebContents(web_contents()); @@ -2700,11 +2705,6 @@ void WebContents::Print(gin::Arguments* args) { // Printer device name as opened by the OS. std::u16string device_name; options.Get("deviceName", &device_name); - if (!device_name.empty() && !IsDeviceNameValid(device_name)) { - gin_helper::ErrorThrower(args->isolate()) - .ThrowError("webContents.print(): Invalid deviceName provided."); - return; - } int scale_factor = 100; options.Get("scaleFactor", &scale_factor); @@ -2794,10 +2794,10 @@ void WebContents::Print(gin::Arguments* args) { } print_task_runner_->PostTaskAndReplyWithResult( - FROM_HERE, base::BindOnce(&GetDefaultPrinterAsync), - base::BindOnce(&WebContents::OnGetDefaultPrinter, + FROM_HERE, base::BindOnce(&GetDeviceNameToUse, device_name), + base::BindOnce(&WebContents::OnGetDeviceNameToUse, weak_factory_.GetWeakPtr(), std::move(settings), - std::move(callback), device_name, silent)); + std::move(callback), silent)); } // Partially duplicated and modified from diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 1090adca3da25..7ccc525f56096 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -216,12 +216,11 @@ class WebContents : public ExclusiveAccessContext, void HandleNewRenderFrame(content::RenderFrameHost* render_frame_host); #if BUILDFLAG(ENABLE_PRINTING) - void OnGetDefaultPrinter(base::Value::Dict print_settings, - printing::CompletionCallback print_callback, - std::u16string device_name, - bool silent, - // - std::pair info); + void OnGetDeviceNameToUse(base::Value::Dict print_settings, + printing::CompletionCallback print_callback, + bool silent, + // + std::pair info); void Print(gin::Arguments* args); // Print current page as PDF. v8::Local PrintToPDF(const base::Value& settings); diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 55626f4189ed2..0152f9d158ed9 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -179,10 +179,12 @@ describe('webContents module', () => { }).to.throw('webContents.print(): Invalid optional callback provided.'); }); - ifit(process.platform !== 'linux')('throws when an invalid deviceName is passed', () => { - expect(() => { - w.webContents.print({ deviceName: 'i-am-a-nonexistent-printer' }, () => {}); - }).to.throw('webContents.print(): Invalid deviceName provided.'); + it('fails when an invalid deviceName is passed', (done) => { + w.webContents.print({ deviceName: 'i-am-a-nonexistent-printer' }, (success, reason) => { + expect(success).to.equal(false); + expect(reason).to.match(/Invalid deviceName provided/); + done(); + }); }); it('throws when an invalid pageSize is passed', () => { From 46e5c537c87d8f81e468448629c36995329f824b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 06:01:20 -0700 Subject: [PATCH 582/811] Bump v21.0.0-nightly.20220713 --- 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 5a0433e61cd15..dbd21d769462d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220712 \ No newline at end of file +21.0.0-nightly.20220713 \ No newline at end of file diff --git a/package.json b/package.json index 30df1779f0a08..c725b6a1cbbd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220712", + "version": "21.0.0-nightly.20220713", "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 7f600c4c6c522..389bdd60adc14 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 21,0,0,20220712 - PRODUCTVERSION 21,0,0,20220712 + FILEVERSION 21,0,0,20220713 + PRODUCTVERSION 21,0,0,20220713 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 440c575aa6c47a2258824945fa5442c5a89cfe0f Mon Sep 17 00:00:00 2001 From: Gellert Hegyi Date: Wed, 13 Jul 2022 20:59:57 +0200 Subject: [PATCH 583/811] fix: alwaysOnTop browser window option for X11 Linux (#34766) fix: alwaysontop browser window option for x11 --- shell/browser/native_window_views.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index cb25379b7765a..8b00fec300e15 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -498,6 +498,13 @@ void NativeWindowViews::Show() { if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); #endif + +#if defined(USE_OZONE_PLATFORM_X11) + // On X11, setting Z order before showing the window doesn't take effect, + // so we have to call it again. + if (IsX11()) + widget()->SetZOrderLevel(widget()->GetZOrderLevel()); +#endif } void NativeWindowViews::ShowInactive() { From d32e6cc2523b371b9a706775492c196582e1b17e Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 17:26:16 -0400 Subject: [PATCH 584/811] chore: bump chromium to 105.0.5173.0 (main) (#34770) * chore: bump chromium in DEPS to 105.0.5147.0 * chore: update chromium/can_create_window.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3642216 fix minor code shear in patch * chore: update chromium/port_autofill_colors_to_the_color_pipeline.patch Xref: chromium/port_autofill_colors_to_the_color_pipeline.patch fix minor code shear in patch * chore: remove chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3727368 Removing upstreamed patch * chore: update patches * chore: update patches * chore: add new enum kOffscreenDocument to switch statement Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3722498 * chore: add stub for new parent virtual method OnNewCropVersion() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3717305 * chore: remove download_schedule arg from DownloadTargetCallback invocation Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3711096 Clean up DownloadLater flags and prefs * chore: add stub for new parent virtual method OnNewCropVersion() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3717305 * chore: use base::List for extensions::Event Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3718366 Remove Event constructor overloads that take vector * refactor: replace ClearStorageDataOptions.origin with .storage_key Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3702946 Refactor ClearData to take StorageKey * chore: bump chromium in DEPS to 105.0.5149.0 * chore: update patches * refactor: migrate InspectableWebContents to base::Value::List Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3726326 Migrate DevToolsEmbedderMessageDispatcher to base::Value::List. * refactor: update electron_api_clipboard_mac Clipboard::ReadFindText() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3721398 Mac: Remove unused FindPasteboard C++ interface * chore: bump chromium in DEPS to 105.0.5151.0 * chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3714995 Move Cart DB proto to //components/commerce * Revert "chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch" This reverts commit f8de4605eb3d35152b186646fefd8e88d1df836b. * chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3714995 Move Cart DB proto to //components/commerce * chore: update patches * chore: update ElectronAccessibilityUIMessageHandler to use base::Value::List Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3733367 Convert /chrome/browser/accessibility away from WebUI::RegisterDeprecatedMessageCallback * chore: bump chromium in DEPS to 105.0.5153.0 * chore: bump chromium in DEPS to 105.0.5155.0 * chore: bump chromium in DEPS to 105.0.5157.0 * chore: bump chromium in DEPS to 105.0.5159.0 * chore: update patches * chore: update CL reference * Replace ContentMainDelegate::InvokedIn with a variant https://chromium-review.googlesource.com/c/chromium/src/+/3705957 * Switch devtools_frontend.mojom to mojom.DictValue. https://chromium-review.googlesource.com/c/chromium/src/+/3726425 * webhid: Bind HID service with service workers https://chromium-review.googlesource.com/c/chromium/src/+/3680562 * chore: fix lint * Don't fire load-complete AX notification on macOS for unfocused windows https://chromium-review.googlesource.com/c/chromium/src/+/3695403 * chore: update patches * chore: bump chromium in DEPS to 105.0.5165.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5167.0 * chore: bump chromium in DEPS to 105.0.5169.0 * chore: bump chromium in DEPS to 105.0.5171.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5173.0 * chore: update patches * 3743346: Stop generating unsupported policies on macOS https://chromium-review.googlesource.com/c/chromium/src/+/3743346 * 3727612: [Bluetooth][Win] Refactor pairing prompt code https://chromium-review.googlesource.com/c/chromium/src/+/3727612 * 3737325: system-extensions: Move IsEnabled() out of SystemExtensionsProvider. https://chromium-review.googlesource.com/c/chromium/src/+/3737325 * 3748635: Remove RenderView from the public API. https://chromium-review.googlesource.com/c/chromium/src/+/3748635 * fixup: 3743346: Stop generating unsupported policies on macOS Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt --- DEPS | 2 +- chromium_src/BUILD.gn | 13 +- patches/chromium/.patches | 1 - ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 12 +- ..._scheduler_throttling_per_renderview.patch | 30 +- patches/chromium/blink_local_frame.patch | 2 +- ..._node_processes_as_browser_processes.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 21 +- ...bcxx_abi_unstable_false_for_electron.patch | 29 +- patches/chromium/can_create_window.patch | 42 +- ...screationoverridden_with_full_params.patch | 16 +- patches/chromium/command-ismediakey.patch | 22 +- ...allow_disabling_compression_on_linux.patch | 2 +- .../crash_allow_setting_more_options.patch | 2 +- patches/chromium/disable-redraw-lock.patch | 4 +- .../disable_color_correct_rendering.patch | 10 +- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 6 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 25 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 2 +- ...locator_for_usage_outside_of_the_gin.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 14 +- .../extend_apply_webpreferences.patch | 4 +- ...d_data_parameter_to_processsingleton.patch | 16 +- .../feat_add_onclose_to_messageport.patch | 4 +- ...dd_set_theme_source_to_allow_apps_to.patch | 8 +- ..._registry_to_multibuffer_data_source.patch | 2 +- ...to_add_observers_on_created_hunspell.patch | 6 +- ...screen_rendering_with_viz_compositor.patch | 20 +- ..._raw_response_headers_from_urlloader.patch | 26 +- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 10 +- ...ntcapturercount_in_web_contents_impl.patch | 6 +- ...out_profile_refs_in_accessibility_ui.patch | 24 +- ..._properly_honor_printing_page_ranges.patch | 4 +- patches/chromium/frame_host_manager.patch | 6 +- ...gpu_notify_when_dxdiag_request_fails.patch | 4 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...tform_electron_can_call_x11_property.patch | 4 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- ...as_avoid_usage_of_private_macos_apis.patch | 8 +- .../mas_disable_remote_accessibility.patch | 66 +- patches/chromium/mas_no_private_api.patch | 8 +- ...emote_certificate_verification_logic.patch | 24 +- .../chromium/notification_provenance.patch | 8 +- ...utofill_colors_to_the_color_pipeline.patch | 16 +- ..._doubleforkandexec_with_forkandspawn.patch | 641 ------------------ patches/chromium/printing.patch | 36 +- patches/chromium/process_singleton.patch | 18 +- ...r_changes_to_the_webcontentsobserver.patch | 8 +- .../render_widget_host_view_base.patch | 10 +- .../render_widget_host_view_mac.patch | 2 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/web_contents.patch | 8 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 12 +- ...feat_add_hook_to_notify_script_ready.patch | 8 +- patches/v8/build_gn.patch | 8 +- ...ild_remove_legacy_oom_error_callback.patch | 12 +- 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_attribute_for_older_msvc_versions.patch | 2 +- ..._terminating_exception_in_microtasks.patch | 8 +- ...workaround_an_undefined_symbol_error.patch | 4 +- shell/app/electron_main_delegate.cc | 3 +- shell/browser/api/electron_api_session.cc | 10 +- .../browser/api/electron_api_web_contents.cc | 1 + shell/browser/api/frame_subscriber.cc | 2 + shell/browser/api/frame_subscriber.h | 1 + .../bluetooth/electron_bluetooth_delegate.cc | 17 +- .../bluetooth/electron_bluetooth_delegate.h | 10 +- shell/browser/electron_browser_client.cc | 1 + shell/browser/electron_browser_client.h | 1 + .../electron_download_manager_delegate.cc | 10 +- .../electron_extensions_browser_client.cc | 13 +- shell/browser/hid/electron_hid_delegate.cc | 18 + shell/browser/hid/electron_hid_delegate.h | 1 + shell/browser/osr/osr_video_consumer.cc | 2 + shell/browser/osr/osr_video_consumer.h | 1 + shell/browser/ui/inspectable_web_contents.cc | 25 +- shell/browser/ui/inspectable_web_contents.h | 2 +- shell/browser/ui/webui/accessibility_ui.cc | 36 +- shell/browser/ui/webui/accessibility_ui.h | 2 +- .../common/api/electron_api_clipboard_mac.mm | 2 +- shell/renderer/api/electron_api_web_frame.cc | 1 - shell/renderer/electron_autofill_agent.cc | 1 - .../electron_render_frame_observer.cc | 1 - shell/renderer/renderer_client_base.cc | 1 - 97 files changed, 475 insertions(+), 1071 deletions(-) delete mode 100644 patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch diff --git a/DEPS b/DEPS index aa7afdb3214cd..263fae42a7b34 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '105.0.5129.0', + '105.0.5173.0', 'node_version': 'v16.15.1', 'nan_version': diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index ffd4dacca88e2..bfd971e576a85 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -388,14 +388,19 @@ source_set("chrome_spellchecker") { "//chrome/browser/spellchecker/spellcheck_factory.h", "//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc", "//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h", - "//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc", - "//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h", - "//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc", - "//chrome/browser/spellchecker/spellcheck_language_policy_handler.h", "//chrome/browser/spellchecker/spellcheck_service.cc", "//chrome/browser/spellchecker/spellcheck_service.h", ] + if (!is_mac) { + sources += [ + "//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc", + "//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h", + "//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc", + "//chrome/browser/spellchecker/spellcheck_language_policy_handler.h", + ] + } + if (has_spellcheck_panel) { sources += [ "//chrome/browser/spellchecker/spell_check_panel_host_impl.cc", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index e0cb53f32a2a8..1d5849b4368a6 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -111,5 +111,4 @@ build_disable_print_content_analysis.patch custom_protocols_plzserviceworker.patch feat_filter_out_non-shareable_windows_in_the_current_application_in.patch fix_allow_guest_webcontents_to_enter_fullscreen.patch -posix_replace_doubleforkandexec_with_forkandspawn.patch disable_freezing_flags_after_init_in_node.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 65e54de741e2d..9cb88ba5ded9f 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index b017e2bf97a4a15cb7af384d9b4e54aa729a997c..fc59b7040bf68e90fbbe516b5321a519a5e77b2a 100644 +index ff57e2a67ccc37be912ba3fca9df4b9e28898c6e..0045b3c1b89728e3950929b49e15bbc67a826c02 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { @@ -24,8 +24,8 @@ index b017e2bf97a4a15cb7af384d9b4e54aa729a997c..fc59b7040bf68e90fbbe516b5321a519 // 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 -@@ -344,7 +348,6 @@ int GpuMain(MainFunctionParams parameters) { - ChildProcess gpu_process(io_thread_priority); +@@ -337,7 +341,6 @@ int GpuMain(MainFunctionParams parameters) { + ChildProcess gpu_process(io_thread_type); DCHECK(base::ThreadPoolInstance::Get()->WasStarted()); - auto* client = GetContentClient()->gpu(); diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 91312aeb13cb3..324d264d1abd3 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index f479e7ce6ceb21e67f72dd29589dfda180e438b0..23dcc6507ed9151f657689904bf90d3b2e8ae3d3 100644 +index eaf9a9483d89cd47bef63ff7f2868c0174a3c3bb..19bd5ef930bc094b315d2562c0f4917e78f63bad 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4397,6 +4397,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index f479e7ce6ceb21e67f72dd29589dfda180e438b0..23dcc6507ed9151f657689904bf90d3b int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index ac30039d95f1f4c73067df58d8af63190b352030..c674c87797fc8ea057f5b94aabbb53b92bded031 100644 +index feca00f2e36d1c02be5e56e787ea8f67eab45df6..9a4c57ddb3aebff2365ea7563803b169c7787c5e 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -609,6 +609,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -605,6 +605,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -123,10 +123,10 @@ index c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f4 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 d1e2d799602ce3b671e7e33afc57923fcc066f00..64dc35a4ba05521dc55b69d2413010ae47b10152 100644 +index 6b4142bf7f85c64af6f845613568679276c7e698..21462bb2196b353c32cf05d0c53635ac77673567 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -352,6 +352,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -359,6 +359,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} 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 6b6c839e9dffa..688159b6c492e 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -48,18 +48,18 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da // 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 99978b33c294ebe37192baccb29f0a34a25aed17..ef6e9ae24979538b8746aca898d1f302827491d8 100644 +index 2f073474d8be6d8051606b0f07272969d3936f28..7f9ec06a10b4cba254737fabdc38dddf86137ad7 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -151,6 +151,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, - static WindowOpenDisposition NavigationPolicyToDisposition( - blink::WebNavigationPolicy policy); +@@ -147,6 +147,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient { + bool was_created_by_renderer, + scoped_refptr task_runner); + void OnSetSchedulerThrottling(bool allowed); + - // --------------------------------------------------------------------------- - // 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. + static WindowOpenDisposition NavigationPolicyToDisposition( + blink::WebNavigationPolicy policy); + diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319b1a5ec28 100644 --- a/third_party/blink/public/mojom/page/page.mojom @@ -73,10 +73,10 @@ index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319 + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de372dd5be 100644 +index 99f0ceb45972df14813b72300e6a59710f13597f..f5e15865bf0bad73d9505698e788c1e954f46c2c 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -364,6 +364,7 @@ class WebView { +@@ -361,6 +361,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -85,10 +85,10 @@ index 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de // 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 deeeab3e6ead93cb3be26f4b40caeeef8bfaafa5..98c257b43cf198481bcaa8f080add28e60e7d9a2 100644 +index 96d329c005ad74f2409c42d2ef8e62b28a18174d..3e28873ed5181756ab62e14ca9c2c4b27b4378f1 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3732,6 +3732,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3723,6 +3723,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index deeeab3e6ead93cb3be26f4b40caeeef8bfaafa5..98c257b43cf198481bcaa8f080add28e void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3743,7 +3750,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3734,7 +3741,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index deeeab3e6ead93cb3be26f4b40caeeef8bfaafa5..98c257b43cf198481bcaa8f080add28e 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 2f8e971ab224b36c6e464eb7524dd3d4c6b76f8c..4a9664d0ce5de431d9638e4145a21091cea78fd1 100644 +index 6a36275fdd7ac12f91a40b60284b73fc93679749..f264c5ee5c2c38d4ccf15877accfdc31c48ec9f9 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -418,6 +418,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -417,6 +417,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index 2f8e971ab224b36c6e464eb7524dd3d4c6b76f8c..4a9664d0ce5de431d9638e4145a21091 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -865,6 +866,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -864,6 +865,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/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 5521df73eb7fd..d70c093f57788 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,7 +49,7 @@ index 80f4314d205f4cbf0d92a331062f8a01a46d6917..2e5c15fc2cf5d0db8d26c1eeb759f6d2 // 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 9d8a9be49ed025439b9323fe4805191db1be6e6b..9c618930625dfd7ca44c2d5c1ca25db4d9f36052 100644 +index 4730c853097462638d3bc41b7c905874ab3dc29a..18615761121f83262da362b10b8022f80809ea07 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { 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 810480a1b56d5..f10afcbb1f251 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 b1f8fd4494e7f5deac078023c2e0240d701e1f13..a372e9bb12f9cec6235fe529d73b6e0009328038 100644 +index 1fa85302da7a64abc42fd9558ddbcaf68b387517..62d15f57e4c5a0a24aa730e8979fb1e9537fecd3 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, 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 b87359449662a..9fee1e07d8327 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 @@ -33,10 +33,10 @@ index 672bc56194e1ad8b03acd639c17b7f7e67a5dba0..59ba25815e511af5ca6aca5467cc91d5 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 46197c5a6423f3278b75549d601421d2b5e139d6..b02779a76a238fd713796597bec8a82897e88f51 100644 +index fdc5d388f80dcae2f1dd8a05d7d24ed5e59250b5..4570ad0308083a62e56a5fa9c91866f9216eed5f 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4544,7 +4544,7 @@ static_library("browser") { +@@ -4582,7 +4582,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 46197c5a6423f3278b75549d601421d2b5e139d6..b02779a76a238fd713796597bec8a828 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 5d7cfeb42574b15ddac55c797000bca490274a6f..8b967ef76faa8190d0064f3fa78a661f451228e1 100644 +index 5584fa001cf9bb0fab31cc6de053a536d18c4492..6541358b2a5d41f94c1e2d5a9d57ce20661f61a7 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5915,7 +5915,6 @@ test("unit_tests") { +@@ -5953,7 +5953,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 5d7cfeb42574b15ddac55c797000bca490274a6f..8b967ef76faa8190d0064f3fa78a661f "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5939,6 +5938,10 @@ test("unit_tests") { +@@ -5977,6 +5976,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,15 +68,16 @@ index 5d7cfeb42574b15ddac55c797000bca490274a6f..8b967ef76faa8190d0064f3fa78a661f ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6826,7 +6829,6 @@ test("unit_tests") { +@@ -6867,7 +6870,7 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", - "//chrome/browser:cart_db_content_proto", - "//chrome/browser:coupon_db_content_proto", - "//chrome/browser/autofill_assistant/password_change/proto:proto", -@@ -6937,6 +6939,10 @@ test("unit_tests") { ++ # "//chrome:packed_resources_integrity_hash", + "//chrome/browser/ash/system_web_apps/test_support", + "//chrome/browser/enterprise/connectors/analysis:features", + "//chrome/browser/media/router:test_support", +@@ -6982,6 +6985,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 056be0692568f..2e6dc709deca9 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,18 +6,23 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn -index 2e5843b9f0a5d39d8dbfea0ae5d2ebb413c0ac7d..f4c901e9980ad068a2903482f712bfa8b1310057 100644 +index 09324583a2f98621fe328ec9f0178736dabe6d2b..d57c2c16ea3475c3ad77e81bdb9700ec2f64976a 100644 --- a/build/config/c++/BUILD.gn +++ b/build/config/c++/BUILD.gn -@@ -9,6 +9,11 @@ assert(use_custom_libcxx, "should only be used if use_custom_libcxx is set") - - libcxx_abi_unstable = true - -+if (is_electron_build) { -+ # This breaks native node modules -+ libcxx_abi_unstable = false -+} +@@ -29,10 +29,12 @@ config("runtime_library") { + # on Windows, the increase is great enough that we go above the 4GB size + # limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set + # _LIBCPP_ABI_NAMESPACE to a shorter value. +- defines += [ +- "_LIBCPP_ABI_NAMESPACE=Cr", +- "_LIBCPP_ABI_VERSION=2", +- ] ++ defines += [ "_LIBCPP_ABI_NAMESPACE=Cr" ] + - # TODO(xiaohuic): https://crbug/917533 Crashes on internal ChromeOS build. - # Do unconditionally once the underlying problem is fixed. - if (is_chromeos_ash && is_chrome_branded) { ++ if (!is_electron_build) { ++ # This breaks native node modules ++ defines += [ "_LIBCPP_ABI_VERSION=2" ] ++ } + + if (!libcxx_is_shared) { + # Don't leak any symbols on a static build. diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index ef7bb00517d6e..d148c0eb9c8c8 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 381bb7d6b1ec2f321dcab9a217aa57e5b2c21925..bdf2fa0461840d6059b4a7d6660a356be5c38ba0 100644 +index 59ad3749cee7f8892884033d7507def1314aec75..187b94d207570a77f058915b9e5b581c777adc5a 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7127,6 +7127,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7221,6 +7221,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 381bb7d6b1ec2f321dcab9a217aa57e5b2c21925..bdf2fa0461840d6059b4a7d6660a356b &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 1470df421f254725be1a55be5756e47988798035..1c69625326df08b85ec77d01b588fc3a8ce58553 100644 +index 2cd68060a6d73b12190692f5973224e4816630bb..c9f744c73f95ad6e63077fbfad2e0c935e6c44c1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3949,6 +3949,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3983,6 +3983,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 1470df421f254725be1a55be5756e47988798035..1c69625326df08b85ec77d01b588fc3a new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -3993,12 +4001,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4027,12 +4035,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,13 +53,13 @@ index 1470df421f254725be1a55be5756e47988798035..1c69625326df08b85ec77d01b588fc3a 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 3aafb44665ed475084355144663a3c7395a009d5..d32b572673e24f14c60b27e8a1fab683b7aa3e8e 100644 +index ac5575971f18588c25438a7285e1c25037c14b1b..af3c7dbb09de31e4079406cb5e18b5ffcc6e867c 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -575,6 +575,10 @@ struct CreateNewWindowParams { +@@ -579,6 +579,10 @@ struct CreateNewWindowParams { - // Governs how downloads are handled if `target_url` results in a download. - blink.mojom.NavigationDownloadPolicy download_policy; + // Additional parameters for creating picture-in-picture windows. + blink.mojom.PictureInPictureWindowOptions? pip_options; + + // Extra fields added by Electron. + string raw_features; @@ -68,10 +68,10 @@ index 3aafb44665ed475084355144663a3c7395a009d5..d32b572673e24f14c60b27e8a1fab683 // 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 9a593698d9e3aebe21cb7e74e0e5603adde30f87..c57b933d2950a69c92d47057b83d96a66416bc1b 100644 +index 3101f5faa5d87f10e0859e8a09c6ebb2678eb478..39682dddf0ec449f0bc34124bf3de6f8c216fdf9 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -604,6 +604,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -605,6 +605,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 9a593698d9e3aebe21cb7e74e0e5603adde30f87..c57b933d2950a69c92d47057b83d96a6 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 58755b9dca27ddd4d75cf08ecdc47c6d9d9da724..2f786efe35ebdff7061118a14247859ed30eeb2a 100644 +index 0d79069d5a54a1a8907e459beb0235b2a78e1fa6..cfe1fc63e293cb2bcafb6c9e6778ee39ef266e89 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -165,6 +165,7 @@ class NetworkService; +@@ -164,6 +164,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -150,10 +150,10 @@ index 348dcde05d71e7d16e4c7bb1d8d9f8718070e669..5a9cc64d6e0d9d01f5dc133c7fcab341 // 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 9b42426f878a741290c89fb6b641b6c44423aa6f..d0c99c26116f6affc801ac59657b89c2ae159a0c 100644 +index 11eaa6b307811b0b327c60ca8ee343331ed18b1b..87f35d4477fef2d6f5ee58455c10e1780a090ef9 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -308,6 +308,10 @@ WebView* RenderViewImpl::CreateView( +@@ -315,6 +315,10 @@ WebView* RenderViewImpl::CreateView( /*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(), creator->IsAdSubframe()); @@ -165,10 +165,10 @@ index 9b42426f878a741290c89fb6b641b6c44423aa6f..d0c99c26116f6affc801ac59657b89c2 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index 2e7c332565ebe33b00ab7fff96a6a8dfc61422a6..0ab061f51d1d0c93f23bfcf5ba051172cea37eb8 100644 +index e757a73ad55c997357bc26015423b69aaa3e895e..089b9e92b0b156fcdcf4b391c24b988a22e312c7 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( +@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -178,10 +178,10 @@ index 2e7c332565ebe33b00ab7fff96a6a8dfc61422a6..0ab061f51d1d0c93f23bfcf5ba051172 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 00e2a8c21d4f0ef00c942498251fa44065da63c0..0fc4b092fa276063e05f990bf920fecd60c6d26c 100644 +index 4805dd035772fcaea60a1a91eb9911d5c0ce93a9..3b752ea509149f04fd6d10f6977bd29791f6a5d6 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 { +@@ -81,6 +81,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -212,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 fd6118fd28df7ea3f86f7fff6ed7ae7b0517777b..a1cb624589a302340d152a1389adac26d5c6d6ee 100644 +index 6633a96d4eafce752b6a1dace29390203d7c4ac0..cb340f174618bd1c38e4216d85eb57f293f3367c 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2101,6 +2101,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2100,6 +2100,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index fa12e080d2e2f..aea8f9f1c17c5 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 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 458af711eda586adbc4efc515da6a21e62879cfc..221ec7acca678060f0f152d4fee32d3378875bc1 100644 +index ce86697e47437832cd0d9692e44a19885f3b7174..62f3371827343fb30d3202f78af70968f169d9f2 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1794,12 +1794,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -127,10 +127,10 @@ index 458af711eda586adbc4efc515da6a21e62879cfc..221ec7acca678060f0f152d4fee32d33 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 87859f4741386c967a0568273a2fd16ad26c4a96..8265417dcf7397b2eb37e997547d1e8cfd977509 100644 +index 64eeec32ac70f32b71cd30f7d1adb1f12fa6fa46..8ebf50854a4fdf2cdc9b7f90844456c12902cb4b 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -839,8 +839,7 @@ class Browser : public TabStripModelObserver, +@@ -843,8 +843,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 686fc99becf068106cc9fb372d2dce1e8d8c5114..eb94d05bf03d04b508123675c31957b8d22ee13a 100644 +index a06d49c3ed7d809ddd3ab43f1cc4e3044a6b14d2..1ebb4970ef9c440c5c2584785397696c7ebc14ce 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3882,8 +3882,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3909,8 +3909,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -316,10 +316,10 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10 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 aef9d1a79fcea0e73541cf8257b498e167c9dfeb..1f0c4209d1c6be31e1abd6bcfcaf181fd2d4858c 100644 +index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf3a137dc3 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 -@@ -402,8 +402,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -403,8 +403,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -344,7 +344,7 @@ index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec48 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 5b804b3ad089154424eda6eb58edbb24baf67794..7f055a37080f40dede16dfa7b7ad6b3c31c5282d 100644 +index b9e21613a8ae3409477d659b0e12181e4db015c3..9d454bd8f8bde3624dd28f8effc0b7fc8a2b4f41 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc @@ -412,8 +412,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 275b2e7299f2c..b52c74a4d8775 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 eb3f3431a3774c3a05afd4c7350f3801e9c8c684..b8970ef9ddb69d6a9fc6d106293e760535b6f4b3 100644 +index a2cec20e0ba434afa5e15bf60327c6a6f9b551f9..f58796ff2050883879225a22ed0b3f0c1aacf824 100644 --- a/chrome/browser/extensions/global_shortcut_listener_ozone.h +++ b/chrome/browser/extensions/global_shortcut_listener_ozone.h -@@ -45,7 +45,8 @@ class GlobalShortcutListenerOzone +@@ -46,7 +46,8 @@ class GlobalShortcutListenerOzone void OnKeyPressed(ui::KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, @@ -117,10 +117,10 @@ index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc } // namespace ui diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm -index 0bed8d1e2e2ed4a8cfc9d51ec3d68ac75bd9ff82..6914758849ca485f0f882d0b4a9ded9b02b197a8 100644 +index 87a53282aa3afa3fe8469272d8b1ee37dcadf845..55c36da933165c8f86dd2ab440733f4b20bee378 100644 --- a/ui/base/accelerators/media_keys_listener_mac.mm +++ b/ui/base/accelerators/media_keys_listener_mac.mm -@@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { +@@ -34,6 +34,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { case NX_KEYTYPE_NEXT: case NX_KEYTYPE_FAST: return VKEY_MEDIA_NEXT_TRACK; @@ -133,7 +133,7 @@ index 0bed8d1e2e2ed4a8cfc9d51ec3d68ac75bd9ff82..6914758849ca485f0f882d0b4a9ded9b } return VKEY_UNKNOWN; } -@@ -192,7 +198,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, +@@ -194,7 +200,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, int key_code = (data1 & 0xFFFF0000) >> 16; if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT && key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST && @@ -226,10 +226,10 @@ index 898e15a25c99ad25221c41594803521565ff4432..664337941023e800c9605f987d0e1d65 } // namespace ui diff --git a/ui/base/x/x11_global_shortcut_listener.h b/ui/base/x/x11_global_shortcut_listener.h -index 9e472d76423a748cbf6257c6656d8fd69853dd93..404a294b9cf3dd6744ece0b5c1e611bbab207e78 100644 +index bfb82e38a9ccc7459ccb427d512df821517a328b..7f1d5876a51fa53e539b2bab8d2f020f26d39ceb 100644 --- a/ui/base/x/x11_global_shortcut_listener.h +++ b/ui/base/x/x11_global_shortcut_listener.h -@@ -40,18 +40,21 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener +@@ -41,18 +41,21 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener virtual void OnKeyPressed(KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, @@ -254,7 +254,7 @@ index 9e472d76423a748cbf6257c6656d8fd69853dd93..404a294b9cf3dd6744ece0b5c1e611bb private: // Due to how system key grabbing works on X11, we have to be a bit greedy and -@@ -60,7 +63,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener +@@ -61,7 +64,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener // and filter the incoming events against that registry before notifying the // observer. This tuple describes the meaningful parts of the event; booleans // 1, 2, and 3 hold states of Alt, Control, and Shift keys, respectively. @@ -333,10 +333,10 @@ index 0f1980abdcaf30e23f580b937ecb2c422bf2a357..112967622cb8a6263c7a88dd8d09f48f } // namespace ui diff --git a/ui/ozone/public/platform_global_shortcut_listener.h b/ui/ozone/public/platform_global_shortcut_listener.h -index a5b539d4e7461c4ca9faa08fef086fc28a4ebd3a..f3aacc605f07807a5b83b496bd8a87933981d4f3 100644 +index 5b6ceb2e23d306e446cad5a6b6e7adf37334410a..d4fbca17a11bd52deaf746e052eeeb12d8a4594e 100644 --- a/ui/ozone/public/platform_global_shortcut_listener.h +++ b/ui/ozone/public/platform_global_shortcut_listener.h -@@ -19,7 +19,8 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListenerDelegate { +@@ -20,7 +20,8 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListenerDelegate { virtual void OnKeyPressed(KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, @@ -346,7 +346,7 @@ index a5b539d4e7461c4ca9faa08fef086fc28a4ebd3a..f3aacc605f07807a5b83b496bd8a8793 // Called back when the platform implementation is destroyed. virtual void OnPlatformListenerDestroyed() = 0; -@@ -51,11 +52,13 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListener { +@@ -52,11 +53,13 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListener { virtual bool RegisterAccelerator(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 b64fe0220c598..d61b71b8cfd92 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 a372e9bb12f9cec6235fe529d73b6e0009328038..58f6f559265d0da5e6ca4c711df4b1dbf3d40e38 100644 +index 62d15f57e4c5a0a24aa730e8979fb1e9537fecd3..77fd14f5e9a4330364da4e7e5ee089c9196b4939 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -111,6 +111,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 33cc2b52a8a15..b9e607f84e898 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 3c28019ae3d1d8fd43e5e027fa3abe6786658885..b1f8fd4494e7f5deac078023c2e0240d701e1f13 100644 +index 6aa864db880408bf7021ac58673f4d8d489426b4..1fa85302da7a64abc42fd9558ddbcaf68b387517 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -113,6 +113,7 @@ void SetUploadURL(const std::string& url) { diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index de0f40a292a83..0e7e6f5795476 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 2d21f2e408004fbaf6a19980ad5daf47493aec65..c6a0ac1c5dd98a41392bd170bb0ada7418f17453 100644 +index 1e6326a2f36f5a7e55e5193b69c36f870c1d00e7..2f51474d46544915b75185fc362aebf8b83164b0 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; @@ -51,7 +51,7 @@ index 2d21f2e408004fbaf6a19980ad5daf47493aec65..c6a0ac1c5dd98a41392bd170bb0ada74 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 73337f6b14516f93500705606c89e4c7b5a55f35..6badb272496a630031592372c1a766a9d70bb26a 100644 +index 65bf924561934d445e201aa2753ec7a3e32b6a6b..e4805643c6994404a1443fe89f0348a19310023b 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -207,6 +207,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 8ef3fa1c1b34a..28137ca9aa91c 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 691496d0ca6fce79c26b9da7322856b3bf06332f..4aadafbba17578cfa26a111eecd0cfaad676326d 100644 +index 65c468c4b882829fba7ab679c0fec3f637e96522..ca98a6e3992126b564d28e9d4429cd9a69cf7eed 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1853,6 +1853,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1857,6 +1857,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -80,7 +80,7 @@ index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index d3375aa2370158888d35e064b9613cd696d4b45b..a7a33cfd499925c23a26a6dacc5add3d4c462d78 100644 +index 4be758a498c1e5b17fd8eea6c5a7719e4252723a..e166e96b4b23725ad8735ab87afd3660ed22de50 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -92,7 +92,7 @@ index d3375aa2370158888d35e064b9613cd696d4b45b..a7a33cfd499925c23a26a6dacc5add3d 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 e186644f7592f7d0e827b7d8af6c31951738f6f5..5e8df8f92729ba851fe7ba8557e309a32899df93 100644 +index ece0f7a284fc87f879d21e754b0b050236081d61..68277794cf54100592f36f0c95985b2911074c52 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -199,6 +199,7 @@ @@ -103,7 +103,7 @@ index e186644f7592f7d0e827b7d8af6c31951738f6f5..5e8df8f92729ba851fe7ba8557e309a3 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3173,6 +3174,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3195,6 +3196,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_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 3e685e539e743..1104e02c2682e 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 19396ba065ebab86903e2d52dc72d22de9d6bc89..fdb09a51829db40f4bcba71e76cd0dcef16a47ad 100644 +index fc7c4474aaa74000b901b93b26bb46d7a7dc07a3..9444d5411cf7caffb3cf180089ca5468c2303803 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -511,7 +511,11 @@ +@@ -514,7 +514,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 2b6fcf3fa406d..980679fa1db0b 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 e3a14e47ac328261f48bcd137961a6e794d4f5af..205921ae492bf30c16869cdd7ed9605d7fdbd452 100644 +index 4b4a91a3fb6156ced046b414c131bc348f15b79f..852118f2599087c971ee6475f670a1f0e9d64bd3 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index e3a14e47ac328261f48bcd137961a6e794d4f5af..205921ae492bf30c16869cdd7ed9605d 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 e617a4496a5f8cfa7ca1904fea8b0c3c0ffa14f9..e5d0edc222755a20019dd1e4042b87abe3ae39d8 100644 +index f63c1aa3007fa532af250e6f222ab588d949dccc..6183ee520b48e09958f320c1091a80ce947f21b7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -34,7 +34,7 @@ index e617a4496a5f8cfa7ca1904fea8b0c3c0ffa14f9..e5d0edc222755a20019dd1e4042b87ab // |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 f20f35ae49d50f19bd4355defe1dfd3a20462c21..b8801f1a939aab5ea6c8db87d357c3d27c946e3c 100644 +index f709beca890c426c9355297c6a741d5a8c887fdb..8050e3b8d603e48323002475680d76dfa059e20e 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 219559b32e276..a5b8d7b4381d2 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 8779affce72baa97eebc68779fd3be08ba4505f8..3d2d03366a6e7776d0bd589c32c09b8bbed01b64 100644 +index b88a9d695e2e743cdd9446e8e3c3ca38a914630a..a35f8b3118632d503c5750d59e847580cbb47a9f 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1196,6 +1196,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1195,6 +1195,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 8779affce72baa97eebc68779fd3be08ba4505f8..3d2d03366a6e7776d0bd589c32c09b8b // 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 && -@@ -1246,6 +1247,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1245,6 +1246,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 c7d8872892bbe..2e26a11244292 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 @@ -3,7 +3,8 @@ From: John Kleinschmidt Date: Wed, 16 Jun 2021 11:30:28 -0400 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. +PCScan should not be invoked if PCScan is disabled. +Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2965109. diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944fae3694f 100644 @@ -19,7 +20,7 @@ index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944 using PCScan = internal::PCScan; const auto invocation_mode = flags & PurgeFlags::kAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index fb5df2ee7c40e93bf2ebf625b14d08044006534b..67aecdd1d70ff58eb5b1b8b67990a7448a3b1ba4 100644 +index 418efcb3c08c67e86ae3a0728f37c5a4b9e56e06..f5c3a127c4ac535773f087f8ee2306ab0433fbe6 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc @@ -44,6 +44,7 @@ @@ -36,20 +37,20 @@ index fb5df2ee7c40e93bf2ebf625b14d08044006534b..67aecdd1d70ff58eb5b1b8b67990a744 #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()); + partition_alloc::internal::PCScan::NotifyThreadCreated( + partition_alloc::internal::GetStackPointer()); #endif - -@@ -103,7 +104,7 @@ void* ThreadFunc(void* params) { +@@ -104,7 +105,7 @@ void* ThreadFunc(void* params) { PlatformThread::CurrentHandle().platform_handle(), PlatformThread::CurrentId()); -#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(); + partition_alloc::internal::PCScan::NotifyThreadDestroyed(); #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 5d01f8802e2144b9bb94d05b154bc5f5fa378b40..a872defd1c92f2ea590e5da1ecf34a6800dd4484 100644 +index 3327d353cd887d027cf1d9b483ebf6e6aaaef169..dab0d2cf3e87fc082f72f40d1d622efd390885d1 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -30,6 +30,7 @@ @@ -60,21 +61,21 @@ index 5d01f8802e2144b9bb94d05b154bc5f5fa378b40..a872defd1c92f2ea590e5da1ecf34a68 #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -113,7 +114,7 @@ DWORD __stdcall ThreadFunc(void* params) { +@@ -115,7 +116,7 @@ DWORD __stdcall ThreadFunc(void* params) { FALSE, DUPLICATE_SAME_ACCESS); -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) - internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); + partition_alloc::internal::PCScan::NotifyThreadCreated( + partition_alloc::internal::GetStackPointer()); #endif - -@@ -133,7 +134,7 @@ DWORD __stdcall ThreadFunc(void* params) { +@@ -136,7 +137,7 @@ DWORD __stdcall ThreadFunc(void* params) { PlatformThread::CurrentId()); } -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) - internal::PCScan::NotifyThreadDestroyed(); + partition_alloc::internal::PCScan::NotifyThreadDestroyed(); #endif 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 9e23e3f582a8f..6f739d8b35bfb 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 23dcc6507ed9151f657689904bf90d3b2e8ae3d3..5c81b7882dda7d9815555b43158140f894dbbd03 100644 +index 19bd5ef930bc094b315d2562c0f4917e78f63bad..bb1c66173df927499f1f28039f2255e3d6c28c96 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2369,7 +2369,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2287,7 +2287,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index c42efd45fb14b..4a0fa298d2719 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -19,7 +19,7 @@ index d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index c6a0ac1c5dd98a41392bd170bb0ada7418f17453..738a56e976a510fcdb44020193cc79522bae0855 100644 +index 2f51474d46544915b75185fc362aebf8b83164b0..c893bc030b266539f65d31bdc40ba0ba31b70986 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -1001,8 +1001,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { 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 3c54bc5d8c658..8f885d9d4f187 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 @@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead of the default V8 allocator. This probably can't be usptreamed. diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h -index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509647b714c 100644 +index 2f2e0d67c7141e5daad2d50031c71a542677e108..c53bd76fcd3703cb483949d5ec53f24f482317e5 100644 --- a/gin/public/v8_platform.h +++ b/gin/public/v8_platform.h @@ -30,6 +30,7 @@ class GIN_EXPORT V8Platform : public v8::Platform { @@ -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 03cbb536f9a5a3f9aaf8fe2a5baac1d62e398e3a..2f4cf65a7b75e1dfe6c2b6e472040b2a0617b912 100644 +index 9e79f7e411a3242e3e7662933389e05b94a4818c..05e3156571ac0dc9ff71464b8e73d74db96496a0 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index f9c1139dff817..ee5737d525899 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 7dc2ce4577594d16930fd97ad3370e28765a0327..68bd003bee2d85536f97569df8cdc9b7875c3086 100644 +index 61030982c4391dd1b4b508042628e7f006047158..c4f422553185d416a6abfd4647b219060705d0ad 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1400,6 +1400,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1406,6 +1406,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 7dc2ce4577594d16930fd97ad3370e28765a0327..68bd003bee2d85536f97569df8cdc9b7 // 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 9d86b641760c82f145d17a4e70813cd13fad9d9c..ac38bfa5d84b838ec3bcf6cbc244868105480c98 100644 +index d88d9d2bc4b95464ca9a8cacec33361f12d25ea4..74415ce53dc6d0b3e39dbe27ae9e225b281c8820 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -297,6 +297,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -296,6 +296,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 9d86b641760c82f145d17a4e70813cd13fad9d9c..ac38bfa5d84b838ec3bcf6cbc2448681 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 e180a77e7727acb093e12a2879c3cfb3b3771a6f..f440504f5d26b86ebe3e2a17a6374e16004f5b8b 100644 +index 118c6469c038e5b53eb76f76abf60f5df15a94d1..9f364ccfd22e736330a2ce9879495fa072373997 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1098,6 +1098,9 @@ interface NetworkContext { +@@ -1102,6 +1102,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ index e180a77e7727acb093e12a2879c3cfb3b3771a6f..f440504f5d26b86ebe3e2a17a6374e16 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index e1598a296f2f54061b7b408cc707d6727b51156f..b51f25bec1f8a79765c5b27326973da00c571f86 100644 +index b23f4227a6819d1b6b894262f5dda39841b5dd2b..3b8761ddb1d2111cb5b4df0f2448742adeb8f0c8 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 ea5cbf6672a20..8af2374fb4170 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 98c257b43cf198481bcaa8f080add28e60e7d9a2..d94a06f92bbdda28f4307dcc6a06dc2c381f274b 100644 +index 3e28873ed5181756ab62e14ca9c2c4b27b4378f1..831b6bab8e491fc0750ecf05b3ef0f105a5478f4 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -161,6 +161,7 @@ @@ -23,7 +23,7 @@ index 98c257b43cf198481bcaa8f080add28e60e7d9a2..d94a06f92bbdda28f4307dcc6a06dc2c #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" -@@ -1790,6 +1791,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_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 ae14136ebb6ad..d78049c092ce3 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -65,10 +65,10 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..55a2a78ce166a65cd11b26e0aa31968f #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508263d4ed3 100644 +index 2de07460462632680f9b16a019744527dcee5125..f7e7edd645f212750704d45a2967f584fab81b35 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -606,6 +606,7 @@ class ProcessSingleton::LinuxWatcher +@@ -607,6 +607,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector& argv, @@ -76,7 +76,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 SocketReader* reader); private: -@@ -660,13 +661,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -661,13 +662,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -95,7 +95,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 // Send back "ACK" message to prevent the client process from starting up. reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1); } else { -@@ -714,7 +718,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -715,7 +719,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -105,7 +105,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 const size_t kMinMessageLength = std::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -744,10 +749,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -745,10 +750,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -135,7 +135,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -776,8 +799,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -777,8 +800,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -146,7 +146,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -896,7 +921,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -897,7 +922,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -156,7 +156,7 @@ index 9d6ef0e143bdaf4a5043ebbb57d282d72d847433..fbc571666232742c9941ea07fea81508 std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -906,11 +932,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -907,11 +933,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); diff --git a/patches/chromium/feat_add_onclose_to_messageport.patch b/patches/chromium/feat_add_onclose_to_messageport.patch index 61f192d132639..70559ec9c26f6 100644 --- a/patches/chromium/feat_add_onclose_to_messageport.patch +++ b/patches/chromium/feat_add_onclose_to_messageport.patch @@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a whole bunch more useful! diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc -index b72ede668172bd8202b1d52736e4eb4ffe84d619..7ec7e3883925b50b064682e8976d09b18222d637 100644 +index 747ce956e2622e1bb881cf281365419743ef933f..43196369af48b7393919d2624451aa3528ed1c0a 100644 --- a/third_party/blink/renderer/core/messaging/message_port.cc +++ b/third_party/blink/renderer/core/messaging/message_port.cc -@@ -166,6 +166,7 @@ void MessagePort::close() { +@@ -167,6 +167,7 @@ void MessagePort::close() { Entangle(pipe.TakePort0()); } closed_ = true; 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 8b78ba638e7d5..275f12dd363ba 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,7 +13,7 @@ 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 3f596e0d24ccf7586e2e20d219b73300ee3f56a0..0eb957667b591d1215b60f83141d8431079c1f45 100644 +index 5dd898d8db8e6db8278f00d5caa5ab1a0d7f0fc0..90b80c3252a6134ba43f0496a7128cdbf21ce39b 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -124,6 +124,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, @@ -26,10 +26,10 @@ index 3f596e0d24ccf7586e2e20d219b73300ee3f56a0..0eb957667b591d1215b60f83141d8431 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 3b9c8841ac65471141307025394464a90b02daa9..dba57a6af6a3ce8dc258a747d721fbc9d50b0ebf 100644 +index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f01ea1c8b6 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -392,6 +392,23 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -393,6 +393,23 @@ class NATIVE_THEME_EXPORT NativeTheme { custom_theme, bool use_custom_frame = true) const; @@ -53,7 +53,7 @@ index 3b9c8841ac65471141307025394464a90b02daa9..dba57a6af6a3ce8dc258a747d721fbc9 // 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 -@@ -557,6 +574,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -566,6 +583,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 529cee547296b..6df94a6111ad2 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,7 +13,7 @@ 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/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 58256037e0a2485a9f8de9f4086550f39e865b2d..30cf2ee44f6e0629e664fcf2072ad14ca186f947 100644 +index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0ad1c2cd0 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 @@ 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 a8d36d481d1db..d191cb136ea35 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 fb1ce87c18a72deb815b78b2f989fe0a8ebaf0bc..417e89f3ba808d9e599d391d57df0e481afb5522 100644 +index db3c802746235c0dcfe7fe19ca4315ee77c96743..e9a7dfb8f3a4271d35ef1d33d2dd346c23d65b47 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -468,6 +468,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -20,7 +20,7 @@ index fb1ce87c18a72deb815b78b2f989fe0a8ebaf0bc..417e89f3ba808d9e599d391d57df0e48 hunspell_dictionaries_.back()->Load(); } -@@ -520,6 +523,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -519,6 +522,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } 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 18812a84eb3df..61987a15de836 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 d6cce8a676b93a67fa1a5e64d2b189c9dfa616a5..10f4ace6027c32b57f5d070026ecd9565c40b62f 100644 +index 267af5f85d4036e144ad9829922dcd3ac62b8a31..a658a43a12f5597a7bea094471191d040fc3d6c2 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -134,6 +134,8 @@ viz_component("service") { @@ -108,7 +108,7 @@ index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c } // 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 3aaccca596c0287f56841131fc6a5878281593fc..f0fc2e11ddbb7ded1964a815f79e5a1858ac25d2 100644 +index c019d729f29440e44d9dd47ff62d3f8fa1ee19a8..8f589394b12cff75df9708310c5f891664674c28 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -23,12 +23,14 @@ @@ -136,16 +136,16 @@ index 3aaccca596c0287f56841131fc6a5878281593fc..f0fc2e11ddbb7ded1964a815f79e5a18 #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -101,7 +104,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -97,7 +100,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { - output_surface = std::make_unique( + return std::make_unique( - CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client)); + CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client, offscreen)); } else { DCHECK(gpu_dependency); - { -@@ -139,10 +142,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( + +@@ -137,10 +140,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -212,10 +212,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 a480befb5d8db36e7e281d5033aeef0bea83d220..4e54acc897d08c87bccc3b44f68634e2873cb132 100644 +index 16a4e74e11775b694dfeeb82b475c628b86174b1..f8099e165da6c8253016abc92ea3021056e37c85 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.h +++ b/components/viz/service/display_embedder/software_output_device_mac.h -@@ -59,6 +59,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { +@@ -60,6 +60,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { void UpdateAndCopyBufferDamage(Buffer* previous_paint_buffer, const SkRegion& new_damage_rect); @@ -572,7 +572,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 68332e455e2d44efac75253179f3b78d7ce0717a..0ec6343dd574078d381155238ddc2f1d0abb5323 100644 +index e0345f5903a48013930767bee713c177a704970a..2881a4fee66f16e6367724a727abe4643a965a24 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -83,6 +83,7 @@ class DisplayPrivate; @@ -610,7 +610,7 @@ index 68332e455e2d44efac75253179f3b78d7ce0717a..0ec6343dd574078d381155238ddc2f1d // 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 -@@ -479,6 +493,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -482,6 +496,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 b5421f51314c2..7efba47601775 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,7 +17,7 @@ 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 a15e3c4bed344364f9c43e3f0b5c494d58dff789..24e3b291f8c25de2a0b82184fd731538b6586f86 100644 +index c8e468f41930dc8e31533e086d72743e12d134f1..5b54e21568019b108d92c28086b8d73db98fc704 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc @@ -233,6 +233,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { @@ -29,7 +29,7 @@ index a15e3c4bed344364f9c43e3f0b5c494d58dff789..24e3b291f8c25de2a0b82184fd731538 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 2ff43cc1ef683707001bf22c9b030bf6e7223e0f..cfaf9170666f04407adb5738ce6723900d234735 100644 +index 9af8605aaab177daf89524680cb88455fcb48d04..9c851c96588342b245b24fed51d9241f8da7ffcc 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h @@ -158,6 +158,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { @@ -41,7 +41,7 @@ index 2ff43cc1ef683707001bf22c9b030bf6e7223e0f..cfaf9170666f04407adb5738ce672390 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 4f2740ebf2dc4bee423cdbb72cae128f28a03f12..d3f531429598b3666aaba655356155c470e8b645 100644 +index 10295a165e2131b7cd5bff996f36f2214db7a125..2d1bb21bf5813125397a93d368de031b11bb4bbb 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc @@ -209,6 +209,7 @@ bool StructTraits< @@ -53,7 +53,7 @@ index 4f2740ebf2dc4bee423cdbb72cae128f28a03f12..d3f531429598b3666aaba655356155c4 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 069768e7ca727fc2ad8f5379900ad4a959a87f4f..3e6bc18564e2a3cdbac9af686636f75d64082464 100644 +index b4f785570ffab62087ef9be3d18cecb6c747fa38..f6ff5ebc9808e230ed358203c5d0024c676bcd85 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h @@ -269,6 +269,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -67,7 +67,7 @@ index 069768e7ca727fc2ad8f5379900ad4a959a87f4f..3e6bc18564e2a3cdbac9af686636f75d return request.previews_state; } diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index ef3e8e68621402db5a97977f49ac74c438b0a563..aa1c1bcf7ca30adde4c25ed9bd8ed8a70eb919e0 100644 +index 05cc03e830d2805d6d572a38e2606de0f346b6bd..75b8da2f1141dffa34d01e84e339b791fdd60664 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom @@ -312,6 +312,9 @@ struct URLRequest { @@ -81,7 +81,7 @@ index ef3e8e68621402db5a97977f49ac74c438b0a563..aa1c1bcf7ca30adde4c25ed9bd8ed8a7 // 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 5a0cc45fb7b695bef46e475232adb70893299b96..156073daca8c69e05b478e8365b812321af1bf19 100644 +index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd5c91ead8 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom @@ -8,6 +8,7 @@ import "mojo/public/mojom/base/time.mojom"; @@ -92,7 +92,7 @@ index 5a0cc45fb7b695bef46e475232adb70893299b96..156073daca8c69e05b478e8365b81232 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"; -@@ -29,6 +30,9 @@ struct URLResponseHead { +@@ -28,6 +29,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -103,10 +103,10 @@ index 5a0cc45fb7b695bef46e475232adb70893299b96..156073daca8c69e05b478e8365b81232 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index c1f5c1e8c4eab221ac4e2de312ade85fa41ab803..152c69b657a3fe549dd2ce7e6e9b9c4019554bdf 100644 +index 04ed3a3391b82751d0014027caf37c402a8f068a..7140c4ced6265c388a4015350b1da5d487a02569 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -605,6 +605,7 @@ URLLoader::URLLoader( +@@ -603,6 +603,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index c1f5c1e8c4eab221ac4e2de312ade85fa41ab803..152c69b657a3fe549dd2ce7e6e9b9c40 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -799,7 +800,7 @@ URLLoader::URLLoader( +@@ -794,7 +795,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index c1f5c1e8c4eab221ac4e2de312ade85fa41ab803..152c69b657a3fe549dd2ce7e6e9b9c40 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1531,6 +1532,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1536,6 +1537,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -144,10 +144,10 @@ index c1f5c1e8c4eab221ac4e2de312ade85fa41ab803..152c69b657a3fe549dd2ce7e6e9b9c40 // 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 6bddb19e692f274afd077bd58145fcb68d59c4a2..08b95c71575e31e5b4d87e4d95ea7d7c8d318d29 100644 +index 158eaacb1bf69afad16107491851dab750df9606..eff061c729bed4b8f3b41699f66d087416b08f47 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -522,6 +522,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -518,6 +518,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index b154b4ba47d35..ed93dd0e68f24 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 035aa45845d56d0a8edaa693689bb27e6cd3b158..26cfaa4c20794649dcbd5610796031a0f966e3c0 100644 +index 5f200acb893f6c6b4ffb7c5a6ca010dde8a245e9..c3a5751233c48255408db41c10118ffde72f51d6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3413,7 +3413,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3440,7 +3440,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index e863e3c246aef..2ad1da6657694 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 738a56e976a510fcdb44020193cc79522bae0855..7c7952755317a8069becfff58ca5ec89e2266ce4 100644 +index c893bc030b266539f65d31bdc40ba0ba31b70986..b1e8daf5e79cd838c87e01da0e764e12421747db 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3661,6 +3661,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3696,6 +3696,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); @@ -33,6 +33,6 @@ index 738a56e976a510fcdb44020193cc79522bae0855..7c7952755317a8069becfff58ca5ec89 + 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); - } + + absl::optional max_size_param; + if (!max_window_size.IsEmpty()) 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 33c6a648fb0fa..9eff513345501 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ 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 a44f6d7364ad26965e84a432ae376fa922af5fec..7279dc98acdece8658fbc7e2b343f53299234741 100644 +index df53d0d8371b2f7bbd04ffe6c2d1c171ae457bc8..688883c80d5005b58c39d66c520726bcc62eeac1 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1823,7 +1823,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, @@ -21,10 +21,10 @@ index a44f6d7364ad26965e84a432ae376fa922af5fec..7279dc98acdece8658fbc7e2b343f532 // 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 a99435a0a9c1c4e26a53d513f180a07f8308cbc9..273bf488259f7a85b01182edae2d609c32a55ba0 100644 +index 922048fbc03f7222e42e3640b46d3d5e1b2391ba..f2bdadbfaae703006f4888e3dd899a20bac84090 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -672,6 +672,10 @@ class WebContents : public PageNavigator, +@@ -667,6 +667,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; 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 64fa426f75151..e10ef4f219dd3 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 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8299fe9e8 100644 +index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f21e88f30 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -22,7 +22,10 @@ @@ -60,9 +60,9 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 + bool show_internal = true; data.SetStringKey(kInternal, show_internal ? kOn : kOff); - std::unique_ptr rvh_list(new base::ListValue()); -@@ -272,12 +279,12 @@ void HandleAccessibilityRequestCallback( - data.Set(kPagesField, std::move(rvh_list)); + std::unique_ptr page_list(new base::ListValue()); +@@ -274,12 +281,12 @@ void HandleAccessibilityRequestCallback( + data.Set(kPagesField, std::move(page_list)); std::unique_ptr browser_list(new base::ListValue()); -#if !BUILDFLAG(IS_ANDROID) @@ -76,7 +76,7 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr widgets_list(new base::ListValue()); -@@ -494,8 +501,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { +@@ -497,8 +504,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag( AllowJavascript(); if (flag_name_str == kInternal) { @@ -87,7 +87,7 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 return; } -@@ -602,10 +611,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -605,10 +614,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -101,7 +101,7 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 result->SetStringKey(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } -@@ -630,6 +641,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -633,6 +644,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -109,7 +109,7 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { std::unique_ptr result( -@@ -644,6 +656,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -647,6 +659,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -117,7 +117,7 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr result(new base::DictionaryValue()); -@@ -760,5 +773,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -763,5 +776,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -126,10 +126,10 @@ index 82794034de0fccde58d04acbe6a799ba5cd57619..505376836fb93df7ebececab0e4f8fe8 +#endif } diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h -index 0f73d3883093f6e49427ac6fe6428e97282a1e03..9041c90d13b07b03cc96e8a03a3821ef54a69a7d 100644 +index 6bc5891205fc94377040d9195b0ee15a47a90382..16a25b6a5670a74cf260210b06bc9892431cd760 100644 --- a/chrome/browser/accessibility/accessibility_ui.h +++ b/chrome/browser/accessibility/accessibility_ui.h -@@ -26,6 +26,8 @@ struct AXEventNotificationDetails; +@@ -25,6 +25,8 @@ struct AXEventNotificationDetails; class WebContents; } // namespace content @@ -138,7 +138,7 @@ index 0f73d3883093f6e49427ac6fe6428e97282a1e03..9041c90d13b07b03cc96e8a03a3821ef namespace user_prefs { class PrefRegistrySyncable; } // namespace user_prefs -@@ -67,6 +69,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler { +@@ -66,6 +68,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler { static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); private: diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 6d21c86fbadcf..df7e887c60b17 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 b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5b } 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 8ff9cf6dec605d5f56f0325fb3a03826b425970c..20d06930e81ad4b2b1ee789599ba84c6ff83682d 100644 +index db23b214107c2b4a137e623e183ca08b409959fb..3f10aa71ad6fe698392228dd4b8a73eae7b1dbc6 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -242,6 +242,24 @@ void PrintDialogGtk::UpdateSettings( +@@ -243,6 +243,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 afee9f92509fa..fd346c08904ef 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 398358851f4ec3d1373091c352fe864b8901f08b..0fadcf6eb5aa9e7e6ca32ec252f1722ab87b6be9 100644 +index acfea574749cce9c9babac12593679c1c2c3b1af..0d44d3b022042dbcbb9f188adb90074c752741b8 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3203,6 +3203,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3177,6 +3177,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 398358851f4ec3d1373091c352fe864b8901f08b..0fadcf6eb5aa9e7e6ca32ec252f1722a } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 2f786efe35ebdff7061118a14247859ed30eeb2a..6453286e79ac9edb6566c7db605ef2e3bfa7feb5 100644 +index cfe1fc63e293cb2bcafb6c9e6778ee39ef266e89..bbbdd32152f904d10e040ccf80dd1d1406b3d7a1 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -271,6 +271,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 8fbc394f99fbe..3cfbeec908477 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -40,10 +40,10 @@ index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec6303166 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 88b4436d618d8b110ead2b739f1249232698f218..20376095d83cfaf838992cb720f369c98ba816d1 100644 +index 54e4a915263eaf1cb6a2854c61b26d0269a49228..567f9e42a931975770f8ce63ce9b0ba80f8f234c 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1235,6 +1235,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1237,6 +1237,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 1148b8f694dd3..0e01d9d17a48c 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 626187e49ef53b5d74aa91dcf14821672a8f62b5..86f0e29fab782e5ebcf5977739dc6b72cf3c6b0a 100644 +index 1c50dbb9503e755ebbad2ea6d66484331862b72f..b9188ede8a4dc45bb5c573bc2cd8642c9256de36 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -959,6 +959,11 @@ +@@ -967,6 +967,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 6924ea290af6c..1d054623e40a4 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index 52c52a8425fb2940d77cc6a0f73414aff3b32ec6..6432c01da49b89ef9d5c1123dd7f191b48184032 100644 +index a4edf639f8fe7170ce15f80e6e429d035fd5d7f7..7bf86bfde863b05c4727f09b24f556f2073d928a 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") 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 22458236851b3..1bef249bf39cf 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 32a309a31994453c413b5bf78991fc1a1b0ec60b..b42d000283d52b72a7b85428e68b06a2a52d2a57 100755 +index 68b47d4f483b064d7be5a19552cddfe3f2b12bb2..d3191ad5984dcad633cbab5da45824871961d212 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 3342d70593fd8..cbfe9c8f66bbb 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were replaced with clean ozone native implementations. diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc -index 9008af973427d7dab8170449bc5767cebc9d2e9e..e312287e4aca61b51a69c8413088f56f9f704b5e 100644 +index 7ffb9d707407210e566c8f2bd2f89cf7f31690c9..06bb59fe5e855d0a339e738cf12c566afcf376ac 100644 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc -@@ -200,6 +200,7 @@ class OzonePlatformX11 : public OzonePlatform, +@@ -199,6 +199,7 @@ class OzonePlatformX11 : public OzonePlatform, properties->supports_vulkan_swap_chain = true; properties->uses_external_vulkan_image_factory = true; properties->skia_can_fall_back_to_x11 = true; diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 25236e534c2f9..63c91afd53a98 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 892ed9c63346595376ea89bd8161bd66bb43459a..328f8b800c36544f7906536416ac61dc87cc45d3 100644 +index 88e46d8d05c0b5732468568b84b3283d2f4a934e..f19e32fd33ff0ce8f44ecec76e4583273f43b231 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -253,11 +253,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -251,11 +251,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 def44cb73a8ec..f54ca7b264d4c 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 bb2d3e991195877264fca46abd224d3a6ffd17e8..fc4f271f54235d2d8d823fdb0d95e3c76243390f 100644 +index b54d534b4d408c30341b20409fec75d3a66ca519..d0a00518d06bbb0da228662924b2ab9e568ef940 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -387,8 +387,12 @@ RunContentProcess(ContentMainParams params, +@@ -386,8 +386,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 39aae9ea0f7b5..56b21c48e776f 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -39,7 +39,7 @@ index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a } // namespace base diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644 +index bb1cb98f246f120f566fab65565f49a6468b82b4..929188b8d0e39f171679067347d4f83632364cc7 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -30,12 +30,6 @@ @@ -55,7 +55,7 @@ index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46ca #endif } // extern "C" -@@ -316,8 +310,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) || @@ -65,7 +65,7 @@ index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46ca return ns_val; } -@@ -388,9 +381,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } @@ -142,7 +142,7 @@ index e12c36384ddc05554ed362bba2c0a8b418634f0a..1c740410de70ee5a888ee7cf406dfa3b std::vector argv_cstr; argv_cstr.reserve(argv.size() + 1); diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc -index 0e842caf7b6487d94978c7b68fb5b222e330581f..5eafcd163ee1a05203a5eb76592a449f5a84e71f 100644 +index de981fa288c19ca46a8172e99bc25df36ff29d50..45e5648826c60f6ba6332776e7579a62165b0e8d 100644 --- a/media/audio/mac/audio_low_latency_input_mac.cc +++ b/media/audio/mac/audio_low_latency_input_mac.cc @@ -34,19 +34,23 @@ diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index a6599f5be1646..2e62681443353 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063 } // 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 aa6a1a667af13a76ef299681367b31a8668d7425..949fdc533703862d02a19f08dcd26a56e7845d4a 100644 +index 34721e51d0ebe3a99751bba88b0afe026a910cc6..3a415dd6daf655c31ceb6fd6d307dc6e96c9aced 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 -@@ -580,10 +580,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -582,10 +582,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -86,11 +86,41 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4 }; } +diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm +index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f413d29aab 100644 +--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm ++++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm +@@ -21,7 +21,9 @@ + #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" + #include "ui/accessibility/ax_role_properties.h" + #include "ui/accessibility/platform/ax_private_webkit_constants_mac.h" ++#ifndef MAS_BUILD + #include "ui/base/cocoa/remote_accessibility_api.h" ++#endif + + namespace { + +@@ -609,6 +611,7 @@ void PostAnnouncementNotification(NSString* announcement) { + if ([NSApp isActive]) + return window == [NSApp accessibilityFocusedWindow]; + ++#ifndef MAS_BUILD + // TODO(accessibility): We need a solution to the problem described below. + // If the window is NSAccessibilityRemoteUIElement, there are some challenges: + // 1. NSApp is the browser which spawned the PWA, and what it considers the +@@ -636,6 +639,7 @@ void PostAnnouncementNotification(NSString* announcement) { + // from within the app shim content. + if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) + return true; ++#endif + + return false; + } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index 71369b69fe03409ec0eb7fe071b1d49524748fec..9ce1e4a7efce6b39306baceac953db23e8d14240 100644 +index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880db7b309e 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; +@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler; @protocol RenderWidgetHostViewMacDelegate; @@ -100,7 +130,7 @@ index 71369b69fe03409ec0eb7fe071b1d49524748fec..9ce1e4a7efce6b39306baceac953db23 @class RenderWidgetHostViewCocoa; namespace content { -@@ -661,10 +663,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -114,7 +144,7 @@ index 71369b69fe03409ec0eb7fe071b1d49524748fec..9ce1e4a7efce6b39306baceac953db23 // 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 c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22de9d6bc89 100644 +index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7a7dc07a3 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -258,8 +258,10 @@ @@ -128,7 +158,7 @@ index c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22d // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1548,8 +1550,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1555,8 +1557,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +169,7 @@ index c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22d return [GetInProcessNSView() window]; } -@@ -1593,9 +1597,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1600,9 +1604,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +181,7 @@ index c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22d } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2090,12 +2096,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2097,12 +2103,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,10 +197,10 @@ index c3aff789a9e540eace8c6e952c617c89ff8e26ab..19396ba065ebab86903e2d52dc72d22d /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 9de91819e2658a58b8b7a8c90fd97544e22964f0..ade6c4085720e16843faf63f43688f28057a34dc 100644 +index 7fc550eb16288cc5f4152362504a621abbaec3da..6be133c45a9b8c774b9f6e1e2de492c43bac33d3 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -337,6 +337,13 @@ component("base") { +@@ -341,6 +341,13 @@ component("base") { sources += [ "resource/resource_bundle_lacros.cc" ] } @@ -205,10 +235,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 1ca8dab6cec9f4160f557d034deda9f3b98b9459..e6d3656c0a66d94cdbdb0141e7e44439e84aa8dd 100644 +index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf76b43b00c 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h -@@ -31,7 +31,9 @@ +@@ -32,7 +32,9 @@ #include "ui/views/window/dialog_observer.h" @class NativeWidgetMacNSWindow; @@ -218,7 +248,7 @@ index 1ca8dab6cec9f4160f557d034deda9f3b98b9459..e6d3656c0a66d94cdbdb0141e7e44439 @class NSView; namespace remote_cocoa { -@@ -445,11 +447,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -447,11 +449,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +263,10 @@ index 1ca8dab6cec9f4160f557d034deda9f3b98b9459..e6d3656c0a66d94cdbdb0141e7e44439 // 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 e0a337647572929882c8dc4fdb6c1bcad54071df..2a18cbed5933419e2f8c830376bfee6ab1db9a9f 100644 +index 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea374bf9a0a 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -294,14 +294,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -295,14 +295,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 +289,7 @@ index e0a337647572929882c8dc4fdb6c1bcad54071df..2a18cbed5933419e2f8c830376bfee6a } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1257,6 +1265,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1261,6 +1269,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -267,7 +297,7 @@ index e0a337647572929882c8dc4fdb6c1bcad54071df..2a18cbed5933419e2f8c830376bfee6a remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1264,14 +1273,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1268,14 +1277,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_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index d6eb624fba6d6..d97162e9a4bcf 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -166,7 +166,7 @@ index 69e60d498941c34cfac9e79c7517765bf93849f5..b998ad7cf01c21e93c57e1283cfdcb1e void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index bf0142f0089d14e8fef22afe3d1d3916b7dccefd..cee63f36c1a802eacf878a119ab1904cf5b56d51 100644 +index 2a9cf9620bcc4453a24d48037f0092b6f270806a..6182aac37a7153b9a193565253fe77f9b72db55f 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -176,6 +176,12 @@ source_set("audio") { @@ -196,10 +196,10 @@ index eb0aff29b2f4fd2b035ef96186fd58d976876b05..8a68a8885ec42715c9b9dab0f04d1b90 } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 3cce5f20af78f4456466df64fe0d040b5dba5fa8..1814ebbca91007b242a4e4ef359896594c23616a 100644 +index 025078e112683380b484b7c47f786862f4e48a74..11c81ec36a9793afab0da8578f85378f9ce3a446 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -129,8 +129,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -130,8 +130,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { bool Watch() override { CheckOnCorrectSequence(); @@ -209,7 +209,7 @@ index 3cce5f20af78f4456466df64fe0d040b5dba5fa8..1814ebbca91007b242a4e4ef35989659 if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -147,6 +147,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -148,6 +148,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { success = false; } #endif // !BUILDFLAG(IS_IOS) 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 ab99d0e9c103b..8af5607e3924d 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28765a0327 100644 +index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f006047158 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -128,6 +128,11 @@ +@@ -129,6 +129,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -436,6 +441,91 @@ bool GetFullDataFilePath( +@@ -437,6 +442,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -742,6 +832,13 @@ void NetworkContext::SetClient( +@@ -739,6 +829,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,9 +128,9 @@ index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2295,6 +2392,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2303,6 +2400,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); - cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); + cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) + auto remote_cert_verifier = std::make_unique(std::move(cert_verifier)); + remote_cert_verifier_ = remote_cert_verifier.get(); @@ -139,10 +139,10 @@ index 872f6c27997242ce8d5fe8db155dd60516f03b5b..7dc2ce4577594d16930fd97ad3370e28 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 4da0446b68ff11f65df809f04209a0e0daf12015..9d86b641760c82f145d17a4e70813cd13fad9d9c 100644 +index 34b3e31549ee37b58eee4c11c54bd34af73af263..d88d9d2bc4b95464ca9a8cacec33361f12d25ea4 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -106,6 +106,7 @@ class URLMatcher; +@@ -105,6 +105,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index 4da0446b68ff11f65df809f04209a0e0daf12015..9d86b641760c82f145d17a4e70813cd1 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -237,6 +238,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index 4da0446b68ff11f65df809f04209a0e0daf12015..9d86b641760c82f145d17a4e70813cd1 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -824,6 +827,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -821,6 +824,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,7 +169,7 @@ index 4da0446b68ff11f65df809f04209a0e0daf12015..9d86b641760c82f145d17a4e70813cd1 // 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 9428fe1432ee5cae0d0f812dd48878861d31e09c..e180a77e7727acb093e12a2879c3cfb3b3771a6f 100644 +index 0a376689aeb81f85372ce163d9e199ada2cdcde2..118c6469c038e5b53eb76f76abf60f5df15a94d1 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -283,6 +283,17 @@ struct NetworkContextFilePaths { @@ -190,7 +190,7 @@ index 9428fe1432ee5cae0d0f812dd48878861d31e09c..e180a77e7727acb093e12a2879c3cfb3 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -844,6 +855,9 @@ interface NetworkContext { +@@ -848,6 +859,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 d835fbd379677..5978e72355e83 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -31,7 +31,7 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48 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 0c59d3cec404bc28acd112329ebd8332cfae96a4..62f06f55ec122597af442561fb688c0f6654be6e 100644 +index c969a5d35eac7b071b46d6a8106072e571f177a5..033618eda6e1e5b90a6e9b655e38f27bf051380a 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc @@ -83,11 +83,13 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( @@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 6a94b868e963d98c09d130c70b7c7740c6b544e3..654d7d77b2a7ea8e1819288bb49084e435072ba9 100644 +index db1e97364a68fdc987274f2a7a940d9d63ac111e..8b236cbd54011bc0008d56ca4213920e478f7a90 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2055,8 +2055,9 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2059,8 +2059,9 @@ void RenderProcessHostImpl::CreateNotificationService( // For workers: if (render_frame_id == MSG_ROUTING_NONE) { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -148,7 +148,7 @@ index 6a94b868e963d98c09d130c70b7c7740c6b544e3..654d7d77b2a7ea8e1819288bb49084e4 return; } -@@ -2064,7 +2065,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2068,7 +2069,7 @@ void RenderProcessHostImpl::CreateNotificationService( RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); CHECK(rfh); 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 52c431446b661..143f6b40db3d9 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,13 +8,13 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index b981338d714f66d14dd120cfc1185b97902c45b2..dbe2e0ce2bb9a2122c608ffcea923b650e4eccde 100644 +index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4966394e6 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -128,6 +128,16 @@ - E_CPONLY(kColorOverlayScrollbarStrokeHoveredDark) \ +@@ -129,6 +129,16 @@ E_CPONLY(kColorOverlayScrollbarStrokeHoveredLight) \ E_CPONLY(kColorProgressBar) \ + E_CPONLY(kColorProgressBarPaused) \ + E_CPONLY(kColorPwaSecurityChipForeground) \ + E_CPONLY(kColorPwaSecurityChipForegroundDangerous) \ + E_CPONLY(kColorPwaSecurityChipForegroundPolicyCert) \ @@ -28,7 +28,7 @@ index b981338d714f66d14dd120cfc1185b97902c45b2..dbe2e0ce2bb9a2122c608ffcea923b65 E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -180,6 +190,7 @@ +@@ -182,6 +192,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -37,12 +37,12 @@ index b981338d714f66d14dd120cfc1185b97902c45b2..dbe2e0ce2bb9a2122c608ffcea923b65 #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 8b5b8c6321aaf668ad90870a0567c1a97d268323..8296b2c017f1774c1a38d931add2b7cac4f57dfe 100644 +index 6e97a162f3a823090115fdcb47828c6e0b10ad06..5fcb8cb147aa1356853cb0ed1f3731456c434946 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -149,6 +149,17 @@ void AddUiColorMixer(ColorProvider* provider, - SetAlpha(GetColorWithMaxContrast(kColorOverlayScrollbarFillHoveredLight), +@@ -150,6 +150,17 @@ void AddUiColorMixer(ColorProvider* provider, gfx::kGoogleGreyAlpha500); + mixer[kColorProgressBarPaused] = {kColorDisabledForeground}; mixer[kColorProgressBar] = {kColorAccent}; + mixer[kColorResultsTableNormalBackground] = {SK_ColorWHITE}; + mixer[kColorResultsTableHoveredBackground] = @@ -58,7 +58,7 @@ index 8b5b8c6321aaf668ad90870a0567c1a97d268323..8296b2c017f1774c1a38d931add2b7ca mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -228,6 +239,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -230,6 +241,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch b/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch deleted file mode 100644 index 9bad1bda3874e..0000000000000 --- a/patches/chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch +++ /dev/null @@ -1,641 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Darshan Sen -Date: Fri, 17 Jun 2022 13:19:32 +0530 -Subject: posix: Replace DoubleForkAndExec() with ForkAndSpawn() - -The DoubleForkAndExec() function was taking over 622 milliseconds to run -on macOS 11 (BigSur) on Intel i5-1038NG7. I did some debugging by adding -some custom traces and found that the fork() syscall is the bottleneck -here, i.e., the first fork() takes around 359 milliseconds and the -nested fork() takes around 263 milliseconds. Replacing the nested fork() -and exec() with posix_spawn() reduces the time consumption to 257 -milliseconds! - -See https://github.com/libuv/libuv/pull/3064 to know why fork() is so -slow on macOS and why posix_spawn() is a better replacement. - -Another point to note is that even base::LaunchProcess() from Chromium -calls posix_spawnp() on macOS - -https://source.chromium.org/chromium/chromium/src/+/8f8d82dea0fa8f11f57c74dbb65126f8daba58f7:base/process/launch_mac.cc;l=295-296 - -Change-Id: I25c6ee9629a1ae5d0c32b361b56a1ce0b4b0fd26 -Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386 -Reviewed-by: Mark Mentovai -Commit-Queue: Mark Mentovai - -diff --git a/third_party/crashpad/crashpad/AUTHORS b/third_party/crashpad/crashpad/AUTHORS -index 8dcac3238870920d374b86033d05d77ebde351e9..02103924332eddbd158c04f8a395bb4a247e8bd9 100644 ---- a/third_party/crashpad/crashpad/AUTHORS -+++ b/third_party/crashpad/crashpad/AUTHORS -@@ -12,3 +12,4 @@ Opera Software ASA - Vewd Software AS - LG Electronics, Inc. - MIPS Technologies, Inc. -+Darshan Sen -diff --git a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc -index 295ec1615d83984835e238e349029b8755611f52..94c1cb02efe328ab45bc30fc7db8992872ed6b08 100644 ---- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc -+++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc -@@ -45,7 +45,7 @@ - #include "util/linux/socket.h" - #include "util/misc/address_sanitizer.h" - #include "util/misc/from_pointer_cast.h" --#include "util/posix/double_fork_and_exec.h" -+#include "util/posix/fork_and_spawn.h" - #include "util/posix/scoped_mmap.h" - #include "util/posix/signals.h" - -@@ -459,7 +459,7 @@ bool CrashpadClient::StartHandler( - - argv.push_back(FormatArgumentInt("initial-client-fd", handler_sock.get())); - argv.push_back("--shared-client-connection"); -- if (!DoubleForkAndExec(argv, nullptr, handler_sock.get(), false, nullptr)) { -+ if (!ForkAndSpawn(argv, nullptr, handler_sock.get(), false, nullptr)) { - return false; - } - -@@ -614,7 +614,7 @@ bool CrashpadClient::StartJavaHandlerForClient( - int socket) { - std::vector argv = BuildAppProcessArgs( - class_name, database, metrics_dir, url, annotations, arguments, socket); -- return DoubleForkAndExec(argv, env, socket, false, nullptr); -+ return ForkAndSpawn(argv, env, socket, false, nullptr); - } - - bool CrashpadClient::StartHandlerWithLinkerAtCrash( -@@ -663,7 +663,7 @@ bool CrashpadClient::StartHandlerWithLinkerForClient( - annotations, - arguments, - socket); -- return DoubleForkAndExec(argv, env, socket, false, nullptr); -+ return ForkAndSpawn(argv, env, socket, false, nullptr); - } - - #endif -@@ -697,7 +697,7 @@ bool CrashpadClient::StartHandlerForClient( - - argv.push_back(FormatArgumentInt("initial-client-fd", socket)); - -- return DoubleForkAndExec(argv, nullptr, socket, true, nullptr); -+ return ForkAndSpawn(argv, nullptr, socket, true, nullptr); - } - - // static -diff --git a/third_party/crashpad/crashpad/client/crashpad_client_mac.cc b/third_party/crashpad/crashpad/client/crashpad_client_mac.cc -index 39e35678ecdd036f8c8ae27c973c27102b77da96..84385f2569f2bd00ca8aed0aa332fb450b2de1d3 100644 ---- a/third_party/crashpad/crashpad/client/crashpad_client_mac.cc -+++ b/third_party/crashpad/crashpad/client/crashpad_client_mac.cc -@@ -36,7 +36,7 @@ - #include "util/mach/notify_server.h" - #include "util/misc/clock.h" - #include "util/misc/implicit_cast.h" --#include "util/posix/double_fork_and_exec.h" -+#include "util/posix/fork_and_spawn.h" - - namespace crashpad { - -@@ -343,7 +343,7 @@ class HandlerStarter final : public NotifyServer::DefaultInterface { - // this parent process, which was probably using the exception server now - // being restarted. The handler can’t monitor itself for its own crashes via - // this interface. -- if (!DoubleForkAndExec( -+ if (!ForkAndSpawn( - argv, - nullptr, - server_write_fd.get(), -diff --git a/third_party/crashpad/crashpad/handler/linux/cros_crash_report_exception_handler.cc b/third_party/crashpad/crashpad/handler/linux/cros_crash_report_exception_handler.cc -index 9e58d94aa499fdb7271a78ea21a1dcc1b12e3a52..3caa3b987b35be575558a312026cf6f19485c418 100644 ---- a/third_party/crashpad/crashpad/handler/linux/cros_crash_report_exception_handler.cc -+++ b/third_party/crashpad/crashpad/handler/linux/cros_crash_report_exception_handler.cc -@@ -29,7 +29,7 @@ - #include "util/linux/ptrace_client.h" - #include "util/misc/metrics.h" - #include "util/misc/uuid.h" --#include "util/posix/double_fork_and_exec.h" -+#include "util/posix/fork_and_spawn.h" - - namespace crashpad { - -@@ -266,12 +266,11 @@ bool CrosCrashReportExceptionHandler::HandleExceptionWithConnection( - argv.push_back("--always_allow_feedback"); - } - -- if (!DoubleForkAndExec(argv, -- nullptr /* envp */, -- file_writer.fd() /* preserve_fd */, -- false /* use_path */, -- nullptr /* child_function */)) { -- LOG(ERROR) << "DoubleForkAndExec failed"; -+ if (!ForkAndSpawn(argv, -+ nullptr /* envp */, -+ file_writer.fd() /* preserve_fd */, -+ false /* use_path */, -+ nullptr /* child_function */)) { - Metrics::ExceptionCaptureResult( - Metrics::CaptureResult::kFinishedWritingCrashReportFailed); - return false; -diff --git a/third_party/crashpad/crashpad/util/BUILD.gn b/third_party/crashpad/crashpad/util/BUILD.gn -index b8daef48b460ce2771a9f5502ee48d5efffc4039..8d4329e6b56062a1ef48a8607ddf52c31d251883 100644 ---- a/third_party/crashpad/crashpad/util/BUILD.gn -+++ b/third_party/crashpad/crashpad/util/BUILD.gn -@@ -296,10 +296,10 @@ crashpad_static_library("util") { - sources += [ - "posix/close_multiple.cc", - "posix/close_multiple.h", -- "posix/double_fork_and_exec.cc", -- "posix/double_fork_and_exec.h", - "posix/drop_privileges.cc", - "posix/drop_privileges.h", -+ "posix/fork_and_spawn.cc", -+ "posix/fork_and_spawn.h", - "posix/process_info.h", - - # These map signals to and from strings. While Fuchsia defines some of -diff --git a/third_party/crashpad/crashpad/util/posix/double_fork_and_exec.cc b/third_party/crashpad/crashpad/util/posix/double_fork_and_exec.cc -deleted file mode 100644 -index 1960430954d3f6459dce688493db5c42047567b0..0000000000000000000000000000000000000000 ---- a/third_party/crashpad/crashpad/util/posix/double_fork_and_exec.cc -+++ /dev/null -@@ -1,166 +0,0 @@ --// Copyright 2017 The Crashpad Authors. All rights reserved. --// --// Licensed under the Apache License, Version 2.0 (the "License"); --// you may not use this file except in compliance with the License. --// You may obtain a copy of the License at --// --// http://www.apache.org/licenses/LICENSE-2.0 --// --// Unless required by applicable law or agreed to in writing, software --// distributed under the License is distributed on an "AS IS" BASIS, --// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --// See the License for the specific language governing permissions and --// limitations under the License. -- --#include "util/posix/double_fork_and_exec.h" -- --#include --#include --#include --#include -- --#include "base/check_op.h" --#include "base/logging.h" --#include "base/posix/eintr_wrapper.h" --#include "base/strings/stringprintf.h" --#include "util/posix/close_multiple.h" -- --namespace crashpad { -- --bool DoubleForkAndExec(const std::vector& argv, -- const std::vector* envp, -- int preserve_fd, -- bool use_path, -- void (*child_function)()) { -- DCHECK(!envp || !use_path); -- -- // argv_c contains const char* pointers and is terminated by nullptr. This is -- // suitable for passing to execv(). Although argv_c is not used in the parent -- // process, it must be built in the parent process because it’s unsafe to do -- // so in the child or grandchild process. -- std::vector argv_c; -- argv_c.reserve(argv.size() + 1); -- for (const std::string& argument : argv) { -- argv_c.push_back(argument.c_str()); -- } -- argv_c.push_back(nullptr); -- -- std::vector envp_c; -- if (envp) { -- envp_c.reserve(envp->size() + 1); -- for (const std::string& variable : *envp) { -- envp_c.push_back(variable.c_str()); -- } -- envp_c.push_back(nullptr); -- } -- -- // Double-fork(). The three processes involved are parent, child, and -- // grandchild. The grandchild will call execv(). The child exits immediately -- // after spawning the grandchild, so the grandchild becomes an orphan and its -- // parent process ID becomes 1. This relieves the parent and child of the -- // responsibility to reap the grandchild with waitpid() or similar. The -- // grandchild is expected to outlive the parent process, so the parent -- // shouldn’t be concerned with reaping it. This approach means that accidental -- // early termination of the handler process will not result in a zombie -- // process. -- pid_t pid = fork(); -- if (pid < 0) { -- PLOG(ERROR) << "fork"; -- return false; -- } -- -- if (pid == 0) { -- // Child process. -- -- if (child_function) { -- child_function(); -- } -- -- // Call setsid(), creating a new process group and a new session, both led -- // by this process. The new process group has no controlling terminal. This -- // disconnects it from signals generated by the parent process’ terminal. -- // -- // setsid() is done in the child instead of the grandchild so that the -- // grandchild will not be a session leader. If it were a session leader, an -- // accidental open() of a terminal device without O_NOCTTY would make that -- // terminal the controlling terminal. -- // -- // It’s not desirable for the grandchild to have a controlling terminal. The -- // grandchild manages its own lifetime, such as by monitoring clients on its -- // own and exiting when it loses all clients and when it deems it -- // appropraite to do so. It may serve clients in different process groups or -- // sessions than its original client, and receiving signals intended for its -- // original client’s process group could be harmful in that case. -- PCHECK(setsid() != -1) << "setsid"; -- -- pid = fork(); -- if (pid < 0) { -- PLOG(FATAL) << "fork"; -- } -- -- if (pid > 0) { -- // Child process. -- -- // _exit() instead of exit(), because fork() was called. -- _exit(EXIT_SUCCESS); -- } -- -- // Grandchild process. -- -- CloseMultipleNowOrOnExec(STDERR_FILENO + 1, preserve_fd); -- -- // &argv_c[0] is a pointer to a pointer to const char data, but because of -- // how C (not C++) works, execvp() wants a pointer to a const pointer to -- // char data. It modifies neither the data nor the pointers, so the -- // const_cast is safe. -- char* const* argv_for_execv = const_cast(&argv_c[0]); -- -- if (envp) { -- // This cast is safe for the same reason that the argv_for_execv cast is. -- char* const* envp_for_execv = const_cast(&envp_c[0]); -- execve(argv_for_execv[0], argv_for_execv, envp_for_execv); -- PLOG(FATAL) << "execve " << argv_for_execv[0]; -- } -- -- if (use_path) { -- execvp(argv_for_execv[0], argv_for_execv); -- PLOG(FATAL) << "execvp " << argv_for_execv[0]; -- } -- -- execv(argv_for_execv[0], argv_for_execv); -- PLOG(FATAL) << "execv " << argv_for_execv[0]; -- } -- -- // waitpid() for the child, so that it does not become a zombie process. The -- // child normally exits quickly. -- // -- // Failures from this point on may result in the accumulation of a zombie, but -- // should not be considered fatal. Log only warnings, but don’t treat these -- // failures as a failure of the function overall. -- int status; -- pid_t wait_pid = HANDLE_EINTR(waitpid(pid, &status, 0)); -- if (wait_pid == -1) { -- PLOG(WARNING) << "waitpid"; -- return true; -- } -- DCHECK_EQ(wait_pid, pid); -- -- if (WIFSIGNALED(status)) { -- int sig = WTERMSIG(status); -- LOG(WARNING) << base::StringPrintf( -- "intermediate process terminated by signal %d (%s)%s", -- sig, -- strsignal(sig), -- WCOREDUMP(status) ? " (core dumped)" : ""); -- } else if (!WIFEXITED(status)) { -- LOG(WARNING) << base::StringPrintf( -- "intermediate process: unknown termination 0x%x", status); -- } else if (WEXITSTATUS(status) != EXIT_SUCCESS) { -- LOG(WARNING) << "intermediate process exited with code " -- << WEXITSTATUS(status); -- } -- -- return true; --} -- --} // namespace crashpad -diff --git a/third_party/crashpad/crashpad/util/posix/fork_and_spawn.cc b/third_party/crashpad/crashpad/util/posix/fork_and_spawn.cc -new file mode 100644 -index 0000000000000000000000000000000000000000..c6a95bbfdcba45995b0034789c8bdb4423a25642 ---- /dev/null -+++ b/third_party/crashpad/crashpad/util/posix/fork_and_spawn.cc -@@ -0,0 +1,235 @@ -+// Copyright 2017 The Crashpad Authors. All rights reserved. -+// -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+#include "util/posix/fork_and_spawn.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "base/check.h" -+#include "base/check_op.h" -+#include "base/logging.h" -+#include "base/posix/eintr_wrapper.h" -+#include "base/strings/stringprintf.h" -+#include "build/build_config.h" -+#include "util/posix/close_multiple.h" -+ -+extern char** environ; -+ -+namespace crashpad { -+ -+namespace { -+ -+#if BUILDFLAG(IS_APPLE) -+ -+class PosixSpawnAttr { -+ public: -+ PosixSpawnAttr() { -+ PCHECK((errno = posix_spawnattr_init(&attr_)) == 0) -+ << "posix_spawnattr_init"; -+ } -+ -+ PosixSpawnAttr(const PosixSpawnAttr&) = delete; -+ PosixSpawnAttr& operator=(const PosixSpawnAttr&) = delete; -+ -+ ~PosixSpawnAttr() { -+ PCHECK((errno = posix_spawnattr_destroy(&attr_)) == 0) -+ << "posix_spawnattr_destroy"; -+ } -+ -+ void SetFlags(short flags) { -+ PCHECK((errno = posix_spawnattr_setflags(&attr_, flags)) == 0) -+ << "posix_spawnattr_setflags"; -+ } -+ -+ const posix_spawnattr_t* Get() const { return &attr_; } -+ -+ private: -+ posix_spawnattr_t attr_; -+}; -+ -+class PosixSpawnFileActions { -+ public: -+ PosixSpawnFileActions() { -+ PCHECK((errno = posix_spawn_file_actions_init(&file_actions_)) == 0) -+ << "posix_spawn_file_actions_init"; -+ } -+ -+ PosixSpawnFileActions(const PosixSpawnFileActions&) = delete; -+ PosixSpawnFileActions& operator=(const PosixSpawnFileActions&) = delete; -+ -+ ~PosixSpawnFileActions() { -+ PCHECK((errno = posix_spawn_file_actions_destroy(&file_actions_)) == 0) -+ << "posix_spawn_file_actions_destroy"; -+ } -+ -+ void AddInheritedFileDescriptor(int fd) { -+ PCHECK((errno = posix_spawn_file_actions_addinherit_np(&file_actions_, -+ fd)) == 0) -+ << "posix_spawn_file_actions_addinherit_np"; -+ } -+ -+ const posix_spawn_file_actions_t* Get() const { return &file_actions_; } -+ -+ private: -+ posix_spawn_file_actions_t file_actions_; -+}; -+ -+#endif -+ -+} // namespace -+ -+bool ForkAndSpawn(const std::vector& argv, -+ const std::vector* envp, -+ int preserve_fd, -+ bool use_path, -+ void (*child_function)()) { -+ // argv_c contains const char* pointers and is terminated by nullptr. This is -+ // suitable for passing to posix_spawn() or posix_spawnp(). Although argv_c is -+ // not used in the parent process, it must be built in the parent process -+ // because it’s unsafe to do so in the child. -+ std::vector argv_c; -+ argv_c.reserve(argv.size() + 1); -+ for (const std::string& argument : argv) { -+ argv_c.push_back(argument.c_str()); -+ } -+ argv_c.push_back(nullptr); -+ -+ std::vector envp_c; -+ if (envp) { -+ envp_c.reserve(envp->size() + 1); -+ for (const std::string& variable : *envp) { -+ envp_c.push_back(variable.c_str()); -+ } -+ envp_c.push_back(nullptr); -+ } -+ -+ // The three processes involved are parent, child, and grandchild. The child -+ // exits immediately after spawning the grandchild, so the grandchild becomes -+ // an orphan and its parent process ID becomes 1. This relieves the parent and -+ // child of the responsibility to reap the grandchild with waitpid() or -+ // similar. The grandchild is expected to outlive the parent process, so the -+ // parent shouldn’t be concerned with reaping it. This approach means that -+ // accidental early termination of the handler process will not result in a -+ // zombie process. -+ pid_t pid = fork(); -+ if (pid < 0) { -+ PLOG(ERROR) << "fork"; -+ return false; -+ } -+ -+ if (pid == 0) { -+ // Child process. -+ -+ if (child_function) { -+ child_function(); -+ } -+ -+ // Call setsid(), creating a new process group and a new session, both led -+ // by this process. The new process group has no controlling terminal. This -+ // disconnects it from signals generated by the parent process’ terminal. -+ // -+ // setsid() is done in the child instead of the grandchild so that the -+ // grandchild will not be a session leader. If it were a session leader, an -+ // accidental open() of a terminal device without O_NOCTTY would make that -+ // terminal the controlling terminal. -+ // -+ // It’s not desirable for the grandchild to have a controlling terminal. The -+ // grandchild manages its own lifetime, such as by monitoring clients on its -+ // own and exiting when it loses all clients and when it deems it -+ // appropraite to do so. It may serve clients in different process groups or -+ // sessions than its original client, and receiving signals intended for its -+ // original client’s process group could be harmful in that case. -+ PCHECK(setsid() != -1) << "setsid"; -+ -+ // &argv_c[0] is a pointer to a pointer to const char data, but because of -+ // how C (not C++) works, posix_spawn() and posix_spawnp() want a pointer to -+ // a const pointer to char data. They modifies neither the data nor the -+ // pointers, so the const_cast is safe. -+ char* const* argv_for_spawn = const_cast(argv_c.data()); -+ -+ // This cast is safe for the same reason that the argv_for_spawn cast is. -+ char* const* envp_for_spawn = -+ envp ? const_cast(envp_c.data()) : environ; -+ -+#if BUILDFLAG(IS_APPLE) -+ PosixSpawnAttr attr; -+ attr.SetFlags(POSIX_SPAWN_CLOEXEC_DEFAULT); -+ -+ PosixSpawnFileActions file_actions; -+ for (int fd = 0; fd <= STDERR_FILENO; ++fd) { -+ file_actions.AddInheritedFileDescriptor(fd); -+ } -+ file_actions.AddInheritedFileDescriptor(preserve_fd); -+ -+ const posix_spawnattr_t* attr_p = attr.Get(); -+ const posix_spawn_file_actions_t* file_actions_p = file_actions.Get(); -+#else -+ CloseMultipleNowOrOnExec(STDERR_FILENO + 1, preserve_fd); -+ -+ const posix_spawnattr_t* attr_p = nullptr; -+ const posix_spawn_file_actions_t* file_actions_p = nullptr; -+#endif -+ -+ auto posix_spawn_fp = use_path ? posix_spawnp : posix_spawn; -+ if ((errno = posix_spawn_fp(&pid, -+ argv_for_spawn[0], -+ file_actions_p, -+ attr_p, -+ argv_for_spawn, -+ envp_for_spawn)) != 0) { -+ PLOG(FATAL) << (use_path ? "posix_spawnp" : "posix_spawn"); -+ } -+ -+ // _exit() instead of exit(), because fork() was called. -+ _exit(EXIT_SUCCESS); -+ } -+ -+ // waitpid() for the child, so that it does not become a zombie process. The -+ // child normally exits quickly. -+ // -+ // Failures from this point on may result in the accumulation of a zombie, but -+ // should not be considered fatal. Log only warnings, but don’t treat these -+ // failures as a failure of the function overall. -+ int status; -+ pid_t wait_pid = HANDLE_EINTR(waitpid(pid, &status, 0)); -+ if (wait_pid == -1) { -+ PLOG(WARNING) << "waitpid"; -+ return true; -+ } -+ DCHECK_EQ(wait_pid, pid); -+ -+ if (WIFSIGNALED(status)) { -+ int sig = WTERMSIG(status); -+ LOG(WARNING) << base::StringPrintf( -+ "intermediate process terminated by signal %d (%s)%s", -+ sig, -+ strsignal(sig), -+ WCOREDUMP(status) ? " (core dumped)" : ""); -+ } else if (!WIFEXITED(status)) { -+ LOG(WARNING) << base::StringPrintf( -+ "intermediate process: unknown termination 0x%x", status); -+ } else if (WEXITSTATUS(status) != EXIT_SUCCESS) { -+ LOG(WARNING) << "intermediate process exited with code " -+ << WEXITSTATUS(status); -+ } -+ -+ return true; -+} -+ -+} // namespace crashpad -diff --git a/third_party/crashpad/crashpad/util/posix/double_fork_and_exec.h b/third_party/crashpad/crashpad/util/posix/fork_and_spawn.h -similarity index 76% -rename from third_party/crashpad/crashpad/util/posix/double_fork_and_exec.h -rename to third_party/crashpad/crashpad/util/posix/fork_and_spawn.h -index 02fc0f28f196b447132a2dcfaebdaaa5a916a38a..fc55aa3a37652e4ba18c66db90124abd9cad2e51 100644 ---- a/third_party/crashpad/crashpad/util/posix/double_fork_and_exec.h -+++ b/third_party/crashpad/crashpad/util/posix/fork_and_spawn.h -@@ -12,8 +12,8 @@ - // See the License for the specific language governing permissions and - // limitations under the License. - --#ifndef CRASHPAD_UTIL_POSIX_DOUBLE_FORK_AND_EXEC_H_ --#define CRASHPAD_UTIL_POSIX_DOUBLE_FORK_AND_EXEC_H_ -+#ifndef CRASHPAD_UTIL_POSIX_FORK_AND_SPAWN_H_ -+#define CRASHPAD_UTIL_POSIX_FORK_AND_SPAWN_H_ - - #include - #include -@@ -23,7 +23,7 @@ namespace crashpad { - //! \brief Executes a (grand-)child process. - //! - //! The grandchild process will be started through the --//! double-`fork()`-and-`execv()` pattern. This allows the grandchild to fully -+//! `fork()`-and-`posix_spawn()` pattern. This allows the grandchild to fully - //! disassociate from the parent. The grandchild will not be a member of the - //! parent’s process group or session and will not have a controlling terminal, - //! providing isolation from signals not intended for it. The grandchild’s -@@ -37,7 +37,7 @@ namespace crashpad { - //! \param[in] argv The argument vector to start the grandchild process with. - //! `argv[0]` is used as the path to the executable. - //! \param[in] envp A vector of environment variables of the form `var=value` to --//! be passed to `execve()`. If this value is `nullptr`, the current -+//! be passed to `posix_spawn()`. If this value is `nullptr`, the current - //! environment is used. - //! \param[in] preserve_fd A file descriptor to be inherited by the grandchild - //! process. This file descriptor is inherited in addition to the three file -@@ -45,16 +45,13 @@ namespace crashpad { - //! if no additional file descriptors are to be inherited. - //! \param[in] use_path Whether to consult the `PATH` environment variable when - //! requested to start an executable at a non-absolute path. If `false`, --//! `execv()`, which does not consult `PATH`, will be used. If `true`, --//! `execvp()`, which does consult `PATH`, will be used. -+//! `posix_spawn()`, which does not consult `PATH`, will be used. If `true`, -+//! `posix_spawnp()`, which does consult `PATH`, will be used. - //! \param[in] child_function If not `nullptr`, this function will be called in --//! the intermediate child process, prior to the second `fork()`. Take note -+//! the intermediate child process, prior to the `posix_spawn()`. Take note - //! that this function will run in the context of a forked process, and must - //! be safe for that purpose. - //! --//! Setting both \a envp to a value other than `nullptr` and \a use_path to --//! `true` is not currently supported. --//! - //! \return `true` on success, and `false` on failure with a message logged. - //! Only failures that occur in the parent process that indicate a definite - //! failure to start the the grandchild are reported in the return value. -@@ -63,12 +60,12 @@ namespace crashpad { - //! terminating. The caller assumes the responsibility for detecting such - //! failures, for example, by observing a failure to perform a successful - //! handshake with the grandchild process. --bool DoubleForkAndExec(const std::vector& argv, -- const std::vector* envp, -- int preserve_fd, -- bool use_path, -- void (*child_function)()); -+bool ForkAndSpawn(const std::vector& argv, -+ const std::vector* envp, -+ int preserve_fd, -+ bool use_path, -+ void (*child_function)()); - - } // namespace crashpad - --#endif // CRASHPAD_UTIL_POSIX_DOUBLE_FORK_AND_EXEC_H_ -+#endif // CRASHPAD_UTIL_POSIX_FORK_AND_SPAWN_H_ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index ae77976658d6f..460fb3b6d5bc5 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/BUILD.gn b/BUILD.gn -index a7a198ddd0f33bc0786b59e5027c72662d2c24ed..dfc5ba7e101ef8521bcb4d1ecdf68f1957b347e9 100644 +index 861191e82aa304be0a71dcd356d31767540450ef..1f86538121bfc753b3587d9edaf1553726542af9 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -970,7 +970,6 @@ if (is_win) { +@@ -974,7 +974,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index a7a198ddd0f33bc0786b59e5027c72662d2c24ed..dfc5ba7e101ef8521bcb4d1ecdf68f19 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -979,6 +978,10 @@ if (is_win) { +@@ -983,6 +982,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -136,7 +136,7 @@ index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf0 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index e665eb42fad5f47b1643315d2cdcdf2eb66b069d..21451d9ae0cbb647cafe0e9ae47f067068aef1b7 100644 +index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d89882163c93ce89 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -406,7 +406,7 @@ index e665eb42fad5f47b1643315d2cdcdf2eb66b069d..21451d9ae0cbb647cafe0e9ae47f0670 return true; if (!cookie) { -@@ -1067,7 +1110,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1069,7 +1112,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -523,7 +523,7 @@ index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d18 // 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 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804fe5039b8 100644 +index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7da7d5c9e 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -581,7 +581,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2051,7 +2056,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2052,7 +2057,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -591,7 +591,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 // Check if |this| is still valid. if (!weak_this) return; -@@ -2066,7 +2072,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2067,7 +2073,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -602,7 +602,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2074,7 +2082,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2075,7 +2083,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -611,7 +611,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2094,8 +2102,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -628,7 +628,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 // Check if |this| is still valid. if (!self) return; -@@ -2327,36 +2342,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2328,36 +2343,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -693,7 +693,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2481,7 +2512,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2482,7 +2513,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -703,7 +703,7 @@ index 66ac411e4a70610cbf457e0bbbb0439a6e0f7c59..125fc9057ef5f2e01faa2e4db6ca6804 std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index f118cae62de1cebb78c8193365bafcaba3b863a8..6c8bb35f6ea00b8366134a3f00d1a43fa22d81b5 100644 +index c2bf286ef1741b53022adf420809a87c3bb53cfd..f8b38d09abd3253bfd38b874ebdad753c3f8c4db 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -255,7 +255,7 @@ class PrintRenderFrameHelper @@ -744,10 +744,10 @@ index f118cae62de1cebb78c8193365bafcaba3b863a8..6c8bb35f6ea00b8366134a3f00d1a43f #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 87c464f6a565b0ef4930c87b5e32329c55d0c223..26af5b09600e4e064b098bac884c4d941e88e3fc 100644 +index 9b8fe6eecdc7093ba43a324f37bbe380e43dc0c0..88164f568c27dc6bad4cedfd83bd2abeae956c5c 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2758,8 +2758,9 @@ source_set("browser") { +@@ -2756,8 +2756,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -816,10 +816,10 @@ index 58fcf619add5093bd99fd9c561e8686b060a01c6..76db2a2438cef84fcb6dfd4a67d2e171 bool skip_system_calls() const { #if BUILDFLAG(ENABLE_OOP_PRINTING) diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm -index 35d1091e0c555d00ac1fc5ac878fa2a6e09e718b..07411f07e69a645ba388348f01237f7d38755818 100644 +index 2a1a5aaf18d43a68b13783d55279e481bd91c2e5..156c6ca844d97376268baa57dcf220561a63fa04 100644 --- a/sandbox/policy/mac/sandbox_mac.mm +++ b/sandbox/policy/mac/sandbox_mac.mm -@@ -21,7 +21,6 @@ +@@ -22,7 +22,6 @@ #include "sandbox/policy/mac/nacl_loader.sb.h" #include "sandbox/policy/mac/network.sb.h" #include "sandbox/policy/mac/ppapi.sb.h" @@ -827,7 +827,7 @@ index 35d1091e0c555d00ac1fc5ac878fa2a6e09e718b..07411f07e69a645ba388348f01237f7d #include "sandbox/policy/mac/print_compositor.sb.h" #include "sandbox/policy/mac/renderer.sb.h" #include "sandbox/policy/mac/screen_ai.sb.h" -@@ -29,6 +28,10 @@ +@@ -30,6 +29,10 @@ #include "sandbox/policy/mac/utility.sb.h" #include "sandbox/policy/mojom/sandbox.mojom.h" diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index a44f1930965f3..e77c36ab6114a 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d72d847433 100644 +index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527dcee5125 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -86,7 +86,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 #include #include "base/base_paths.h" -@@ -96,9 +97,11 @@ +@@ -97,9 +98,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" @@ -98,7 +98,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 using content::BrowserThread; -@@ -342,6 +345,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -343,6 +346,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -108,7 +108,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -361,6 +367,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -362,6 +368,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -116,7 +116,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 } bool IsChromeProcess(pid_t pid) { -@@ -401,6 +408,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -402,6 +409,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -138,7 +138,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -768,6 +790,10 @@ ProcessSingleton::ProcessSingleton( +@@ -769,6 +791,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -149,7 +149,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -932,6 +958,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -933,6 +959,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -170,7 +170,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1031,14 +1071,32 @@ bool ProcessSingleton::Create() { +@@ -1032,14 +1072,32 @@ bool ProcessSingleton::Create() { #endif } @@ -208,7 +208,7 @@ index 3bf385781635bf6e7ccf97abdca43befd29e8e95..9d6ef0e143bdaf4a5043ebbb57d282d7 // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1081,10 +1139,13 @@ bool ProcessSingleton::Create() { +@@ -1082,10 +1140,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); 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 dc0896803f661..35d277bc7a7a9 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 205921ae492bf30c16869cdd7ed9605d7fdbd452..51a720da21417c1e83570770959a44d90f172d66 100644 +index 852118f2599087c971ee6475f670a1f0e9d64bd3..ed0e6cff036e76aa266306e5cb4202568ab5b952 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) { @@ -43,10 +43,10 @@ index 205921ae492bf30c16869cdd7ed9605d7fdbd452..51a720da21417c1e83570770959a44d9 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 1c69625326df08b85ec77d01b588fc3a8ce58553..686fc99becf068106cc9fb372d2dce1e8d8c5114 100644 +index c9f744c73f95ad6e63077fbfad2e0c935e6c44c1..a06d49c3ed7d809ddd3ab43f1cc4e3044a6b14d2 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4537,6 +4537,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4571,6 +4571,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,7 +59,7 @@ index 1c69625326df08b85ec77d01b588fc3a8ce58553..686fc99becf068106cc9fb372d2dce1e RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 9af9ea4e10a51572e726309e619fb31cb5a928ee..a44f6d7364ad26965e84a432ae376fa922af5fec 100644 +index 2ee5a7a78baba5974f99cd98d1ef378b6de2bcd7..df53d0d8371b2f7bbd04ffe6c2d1c171ae457bc8 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -957,6 +957,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index f7f2e7210be36..b748495a963c0 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 1bb9760fee301bebb5e940d6786999cfbf52656f..0b4b9fb7d64ca1615d5a03e86f421b8f282ed27a 100644 +index eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a78f6e1c1 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -699,6 +699,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -703,6 +703,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 1bb9760fee301bebb5e940d6786999cfbf52656f..0b4b9fb7d64ca1615d5a03e86f421b8f 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 2f7dabc3317f7b1a609e6b67795036696a6420d0..a300f9b497f206086d9bba01b0ea3948a1b6413a 100644 +index 912a21280fdd53e03cb92404b424f0b26740460a..98dda64426a1489cd44e90a211a6c4f94f62afb7 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 @@ @@ -50,7 +50,7 @@ index 2f7dabc3317f7b1a609e6b67795036696a6420d0..a300f9b497f206086d9bba01b0ea3948 class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -145,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -146,6 +150,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -60,7 +60,7 @@ index 2f7dabc3317f7b1a609e6b67795036696a6420d0..a300f9b497f206086d9bba01b0ea3948 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -299,6 +306,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -300,6 +307,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 bfcb6e2bb6da5..71fbcccf77efd 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ 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 6e4656b8f6dd76e4e13e066a87de4ec893063a46..2232f86b1c91700cdc371adbfdd7beed99d26418 100644 +index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39fe14086e 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 @@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string, diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index a5704c0b5bb82..db1be0f2a4649 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 ab74207b348f211ee78de1384c9c75f7682926fe..ff475b3978b215cdbe921c620661070309bc5f5d 100644 +index 2f86fff71f36353f1fc3d8024f16dbb4921a1db8..db9d0406637bca783f5a9f0beecbbaaac6d1c1cf 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1283,7 +1283,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1279,7 +1279,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 f56ee04810871..0ebb265485662 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 654d7d77b2a7ea8e1819288bb49084e435072ba9..e186644f7592f7d0e827b7d8af6c31951738f6f5 100644 +index 8b236cbd54011bc0008d56ca4213920e478f7a90..ece0f7a284fc87f879d21e754b0b050236081d61 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1748,9 +1748,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1752,9 +1752,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 360dd0395bc2e..bb2a2c91cd389 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 eb94d05bf03d04b508123675c31957b8d22ee13a..035aa45845d56d0a8edaa693689bb27e6cd3b158 100644 +index 1ebb4970ef9c440c5c2584785397696c7ebc14ce..5f200acb893f6c6b4ffb7c5a6ca010dde8a245e9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3032,6 +3032,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3059,6 +3059,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index eb94d05bf03d04b508123675c31957b8d22ee13a..035aa45845d56d0a8edaa693689bb27e std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3042,6 +3049,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3069,6 +3076,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index eb94d05bf03d04b508123675c31957b8d22ee13a..035aa45845d56d0a8edaa693689bb27e CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 92a075098c41f118a4114424715eb61f212b43b7..a99435a0a9c1c4e26a53d513f180a07f8308cbc9 100644 +index f1b8dee6699c02884372aa05279d2d23274efdfd..922048fbc03f7222e42e3640b46d3d5e1b2391ba 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_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index a476327757682..1ff868607e31f 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 bdf2fa0461840d6059b4a7d6660a356be5c38ba0..867b0efca67ce1d4198c2312a6ddc6a784784913 100644 +index 187b94d207570a77f058915b9e5b581c777adc5a..55b56c4b18bba342db29bc493e07b27aee1f586a 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6421,6 +6421,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6509,6 +6509,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 9cb4db7e26b71..efef6124f4d55 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,7 +26,7 @@ index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df // 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 d4e55604b9a8485bb9088a272abca4a6d4e7494d..e842f73029cd7a7a2bdfd7b7d7483a6ecca8527c 100644 +index a5f2807bfa3bd2515aac5fb2090780720a860314..0533dbcdb64af9ebf3f3dcec36038fe76136a15a 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -909,6 +909,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { @@ -43,7 +43,7 @@ index d4e55604b9a8485bb9088a272abca4a6d4e7494d..e842f73029cd7a7a2bdfd7b7d7483a6e 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 0d484ebcc48d5b230ba94a07745e14f4cf706702..0387f4de1e181200ecd7323d2cea2fa854de62c0 100644 +index 40146f89d1d946674025c51896fed23a9782b4fb..af85bef23dbc259ba4554aaa28cf3c06a80ea437 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -191,6 +191,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -55,10 +55,10 @@ index 0d484ebcc48d5b230ba94a07745e14f4cf706702..0387f4de1e181200ecd7323d2cea2fa8 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 00a10e9d00f0aad692fd87b9ea51085ef3fbfd1f..f346dfc768dca2f616e6e3197a98a8c896516568 100644 +index a9ba1b0ec765ee51b1341afe81210e87d2c93c82..2970cb32f408fa812cc006f3c70ec5c55115781b 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -676,6 +676,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -675,6 +675,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 00a10e9d00f0aad692fd87b9ea51085ef3fbfd1f..f346dfc768dca2f616e6e3197a98a8c8 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 265e4bed408747b5b22d2e930bc64fb2cb2c3b25..892b3e58443f1a82a6a41c6d52df7d2d701b377d 100644 +index ef06596ca9597496809064a4b5a5388caf2dac5a..aa045c3bebc0653449d99dd6e507ac76952ebf8c 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -734,6 +734,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -735,6 +735,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 fe77a9ab717ab..f816b1d0f401b 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,7 +35,7 @@ index dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7 // 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 e842f73029cd7a7a2bdfd7b7d7483a6ecca8527c..21b9c228654222263e4ec5b028f098e417ee45fc 100644 +index 0533dbcdb64af9ebf3f3dcec36038fe76136a15a..6f4019347855650cb2203f59c5568e2a029639a1 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -921,6 +921,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( @@ -52,7 +52,7 @@ index e842f73029cd7a7a2bdfd7b7d7483a6ecca8527c..21b9c228654222263e4ec5b028f098e4 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 0387f4de1e181200ecd7323d2cea2fa854de62c0..d1da5a8cd5c7967e5ace9050110314f9ea5d605d 100644 +index af85bef23dbc259ba4554aaa28cf3c06a80ea437..d6368cee4c3a87882bac1d1d63df8698dd96b0fa 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -191,6 +191,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -65,10 +65,10 @@ index 0387f4de1e181200ecd7323d2cea2fa854de62c0..d1da5a8cd5c7967e5ace9050110314f9 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 f346dfc768dca2f616e6e3197a98a8c896516568..bcf4ac6bce4f83a7fe97621a8c9b49e6684fed95 100644 +index 2970cb32f408fa812cc006f3c70ec5c55115781b..808234569ff2fc80945b2707020197302e20d856 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -676,6 +676,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -675,6 +675,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index adab060b9821c..47cea967e99d9 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 41dab6bec85e6898bb8bf78c6287178aa55a7e74..f5879e1361b127f1213e6abe649d7e82c45b43ce 100644 +index c51da9f12ecab41256bf0cdb7a0170e99302dc35..a0154b94bf390b639e1144bc3eb6041631b29716 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -620,7 +620,7 @@ config("internal_config") { +@@ -626,7 +626,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 41dab6bec85e6898bb8bf78c6287178aa55a7e74..f5879e1361b127f1213e6abe649d7e82 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5948,7 +5948,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5986,7 +5986,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 41dab6bec85e6898bb8bf78c6287178aa55a7e74..f5879e1361b127f1213e6abe649d7e82 deps = [ ":v8_libbase", -@@ -5986,6 +5986,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -6024,6 +6024,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/build_remove_legacy_oom_error_callback.patch b/patches/v8/build_remove_legacy_oom_error_callback.patch index 561e783936029..989e15f01b4b0 100644 --- a/patches/v8/build_remove_legacy_oom_error_callback.patch +++ b/patches/v8/build_remove_legacy_oom_error_callback.patch @@ -69,7 +69,7 @@ index b54c7388603b4582356f6741c9a36f2835aa1928..b9533b78046228705e2038396eebf23b void SetOOMErrorHandler(OOMErrorCallback that); diff --git a/src/api/api.cc b/src/api/api.cc -index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332f8778136 100644 +index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a0b9ae99a 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -167,13 +167,6 @@ @@ -115,7 +115,7 @@ index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332 } else { // TODO(wfh): Remove this fallback once Blink is setting OOM handler. See // crbug.com/614440. -@@ -6121,11 +6106,6 @@ void v8::V8::SetFatalMemoryErrorCallback( +@@ -6141,11 +6126,6 @@ void v8::V8::SetFatalMemoryErrorCallback( g_oom_error_callback = oom_error_callback; } @@ -127,7 +127,7 @@ index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332 void v8::V8::SetEntropySource(EntropySource entropy_source) { base::RandomNumberGenerator::SetEntropySource(entropy_source); } -@@ -8633,8 +8613,6 @@ void Isolate::Initialize(Isolate* v8_isolate, +@@ -8654,8 +8634,6 @@ void Isolate::Initialize(Isolate* v8_isolate, #endif if (params.oom_error_callback) { v8_isolate->SetOOMErrorHandler(params.oom_error_callback); @@ -136,7 +136,7 @@ index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332 } #if __clang__ #pragma clang diagnostic pop -@@ -9376,8 +9354,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { +@@ -9397,8 +9375,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior) CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior) @@ -146,10 +146,10 @@ index 7d8d8b699d2b10e026617ea9716ac913a2d44aea..95f77280c471d250eec7da2c7cd64332 ModifyCodeGenerationFromStringsCallback2, modify_code_gen_callback2) diff --git a/src/execution/isolate.h b/src/execution/isolate.h -index aed822d0779f3e7dac3c37b84b3aea277a5d57ea..ca9fd39138efb3196072b509ca9f5f9bae85c626 100644 +index 00494e347438e92b509ec67f4d77688e091d348b..8c151c8674fdb5d4b3af3de88e97e70239fa8ed7 100644 --- a/src/execution/isolate.h +++ b/src/execution/isolate.h -@@ -489,16 +489,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob(); +@@ -487,16 +487,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob(); using DebugObjectCache = std::vector>; diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 9a9c02bce0af1..d7b2329787ca3 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 8cb7a34b1a48956737e9964151db80308479dcc9..7d8d8b699d2b10e026617ea9716ac913a2d44aea 100644 +index fb22f212024d84555e5a5acdfc70ffa6259b9846..82ed3b8c44b62d67fc7e897423ca1c1999befb7f 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9125,7 +9125,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9146,7 +9146,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 8cb7a34b1a48956737e9964151db80308479dcc9..7d8d8b699d2b10e026617ea9716ac913 i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index a581b318b8cd729370a027fe6b2135dea42a7e78..8f6a2164fbf8016a57742e6048e7f99c5af86d0d 100644 +index df03810a6fea9ee45a9e8dfb8845f8e6eebbcc08..e2a2fdf77d434c504547d7589f67c556f1f2ae2c 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6211,9 +6211,9 @@ void Heap::TearDown() { +@@ -6195,9 +6195,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 ededb3c9c6d51..873945550cda7 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 1859c2bc4fa262aa4a7f28a5d36d222fc195de2e..71ee04624868f23a2e204b5ff1e973b45e2f1202 100644 +index 12df5c4fb41f5e710dfeac145d69d6a28e53c064..012e1755e11afed5cb154240cce4c6996790aa57 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -620,6 +620,10 @@ config("internal_config") { +@@ -626,6 +626,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 6e46db75295f4..fe13e37d5a64e 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 104a524dc45433b15f30529ecb4815210e72d90d..f3e234be7e3d63afb2c4560fe4d243dfa81e12a6 100644 +index 647fbb52bf1faaad92ef1b4537d6226344cb27b2..86b1123804058f1ecca5bd7076f5108cd1f28912 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -925,7 +925,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -929,7 +929,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 05a232bf5d8fb..00c560abdb606 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 f5879e1361b127f1213e6abe649d7e82c45b43ce..1859c2bc4fa262aa4a7f28a5d36d222fc195de2e 100644 +index a0154b94bf390b639e1144bc3eb6041631b29716..12df5c4fb41f5e710dfeac145d69d6a28e53c064 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5960,7 +5960,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5998,7 +5998,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index b3c635d8135de..8b7b4daa28561 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 0e5bb1558d096d152fd9388f081c5c9d150a3c7a..6aa16106c088c0a7e590c62eb3d06e0418cb5ebc 100644 +index 714d8a6f057ae98d8809a55e83c323c805170e8d..66ee2bd73b47231c17795ad0b23e558216878cae 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -454,10 +454,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index 94b427ba183b9..fa5ea09a847ee 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index 8b7cc072de2745002ebb715b606cf5f6f735a5f7..89162633cabc2d3f22e2fb4dd76321994e8fe66b 100644 +index 2d2ac48555bdec0b96acd0cd8aafb47e71d4a53c..81d6204d3efd0f55105ec48ee6627293b2ffe5fc 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6142,12 +6142,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6156,12 +6156,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index 8b7cc072de2745002ebb715b606cf5f6f735a5f7..89162633cabc2d3f22e2fb4dd7632199 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index a8dda45985e8e74b1b7c0200779fe8a3844617b0..c017dafaeff050045b4cf4d2a76a474b7b0a2c27 100644 +index 79844e15dff8bcc9da7df17e3b76677c8cd5f87c..7efd34e45a3e263d86f1f3cef54b24c68424a8d4 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2528,7 +2528,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2532,7 +2532,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 164c824a19d6c..e25c92d651333 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,10 +12,10 @@ 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 52c5d32227029a24d9576967f27e7a8554edd66b..35c5cbe4ce68539ed29e6b365651e6b2c678d457 100644 +index 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e19359ba5594e 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, +@@ -3630,6 +3630,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, ImmMoveWide(static_cast(imm)) | ShiftMoveWide(shift)); } diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 8179c7b6234a1..897f8a698a4b7 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -41,6 +41,7 @@ #include "shell/renderer/electron_renderer_client.h" #include "shell/renderer/electron_sandboxed_renderer_client.h" #include "shell/utility/electron_content_utility_client.h" +#include "third_party/abseil-cpp/absl/types/variant.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_switches.h" @@ -461,7 +462,7 @@ ElectronMainDelegate::RunProcess( } bool ElectronMainDelegate::ShouldCreateFeatureList(InvokedIn invoked_in) { - return invoked_in == InvokedIn::kChildProcess; + return absl::holds_alternative(invoked_in); } bool ElectronMainDelegate::ShouldLockSchemeRegistry() { diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index c02eddd57fe3c..3b691b06bdbc3 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -72,6 +72,7 @@ #include "shell/common/node_includes.h" #include "shell/common/options_switches.h" #include "shell/common/process_util.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" #include "ui/base/l10n/l10n_util.h" #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) @@ -115,7 +116,7 @@ PreconnectRequest::PreconnectRequest( namespace { struct ClearStorageDataOptions { - GURL origin; + blink::StorageKey storage_key; uint32_t storage_types = StoragePartition::REMOVE_DATA_MASK_ALL; uint32_t quota_types = StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL; }; @@ -170,7 +171,8 @@ struct Converter { gin_helper::Dictionary options; if (!ConvertFromV8(isolate, val, &options)) return false; - options.Get("origin", &out->origin); + if (GURL storage_origin; options.Get("origin", &storage_origin)) + out->storage_key = blink::StorageKey(url::Origin::Create(storage_origin)); std::vector types; if (options.Get("storages", &types)) out->storage_types = GetStorageMask(types); @@ -464,8 +466,8 @@ v8::Local Session::ClearStorageData(gin::Arguments* args) { } storage_partition->ClearData( - options.storage_types, options.quota_types, options.origin, base::Time(), - base::Time::Max(), + options.storage_types, options.quota_types, options.storage_key, + base::Time(), base::Time::Max(), base::BindOnce(gin_helper::Promise::ResolvePromise, std::move(promise))); return handle; diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index ce94fda7c1a9a..8a6feece589e5 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -637,6 +637,7 @@ WebContents::Type GetTypeFromViewType(extensions::mojom::ViewType view_type) { case extensions::mojom::ViewType::kBackgroundContents: case extensions::mojom::ViewType::kExtensionGuest: case extensions::mojom::ViewType::kTabContents: + case extensions::mojom::ViewType::kOffscreenDocument: case extensions::mojom::ViewType::kInvalid: return WebContents::Type::kRemote; } diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 03dd6c9ecaa32..a3a42a72e58da 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -143,6 +143,8 @@ void FrameSubscriber::OnFrameCaptured( Done(content_rect, bitmap); } +void FrameSubscriber::OnNewCropVersion(uint32_t crop_version) {} + void FrameSubscriber::OnFrameWithEmptyRegionCapture() {} void FrameSubscriber::OnStopped() {} diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 00b512251e9cd..a8d86cb0a3794 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -57,6 +57,7 @@ class FrameSubscriber : public content::WebContentsObserver, const gfx::Rect& content_rect, mojo::PendingRemote callbacks) override; + void OnNewCropVersion(uint32_t crop_version) override; void OnFrameWithEmptyRegionCapture() override; void OnStopped() override; void OnLog(const std::string& message) override; diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index 70fc5c6d84775..98330a4787bc7 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -47,14 +47,6 @@ ElectronBluetoothDelegate::ShowBluetoothScanningPrompt( return nullptr; } -void ElectronBluetoothDelegate::ShowDeviceCredentialsPrompt( - content::RenderFrameHost* frame, - const std::u16string& device_identifier, - CredentialsCallback callback) { - // TODO(jkleinsc) implement this - std::move(callback).Run(DeviceCredentialsPromptResult::kCancelled, u""); -} - WebBluetoothDeviceId ElectronBluetoothDelegate::GetWebBluetoothDeviceId( RenderFrameHost* frame, const std::string& device_address) { @@ -138,11 +130,14 @@ ElectronBluetoothDelegate::GetPermittedDevices( return permitted_devices; } -void ElectronBluetoothDelegate::ShowDevicePairConfirmPrompt( - RenderFrameHost* frame, +void ElectronBluetoothDelegate::ShowDevicePairPrompt( + content::RenderFrameHost* frame, const std::u16string& device_identifier, - PairConfirmCallback callback) { + PairPromptCallback callback, + PairingKind pairing_kind) { NOTIMPLEMENTED(); + std::move(callback).Run(BluetoothDelegate::PairPromptResult( + BluetoothDelegate::PairPromptStatus::kCancelled)); } } // namespace electron diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 39918dc2bfbc3..48d07dfb6f8b7 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -52,12 +52,10 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { content::RenderFrameHost* frame, const content::BluetoothScanningPrompt::EventHandler& event_handler) override; - void ShowDeviceCredentialsPrompt(content::RenderFrameHost* frame, - const std::u16string& device_identifier, - CredentialsCallback callback) override; - void ShowDevicePairConfirmPrompt(content::RenderFrameHost* frame, - const std::u16string& device_identifier, - PairConfirmCallback callback) override; + void ShowDevicePairPrompt(content::RenderFrameHost* frame, + const std::u16string& device_identifier, + PairPromptCallback callback, + PairingKind pairing_kind) override; blink::WebBluetoothDeviceId GetWebBluetoothDeviceId( content::RenderFrameHost* frame, const std::string& device_address) override; diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index d3b5f7902fdba..0eb3bcc1388f2 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1820,6 +1820,7 @@ void BindBadgeServiceForServiceWorker( } void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker( + content::BrowserContext* browser_context, mojo::BinderMapWithContext* map) { map->Add( diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index ed2447b4312e2..597eb58360ef9 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -82,6 +82,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, content::RenderFrameHost* render_frame_host, mojo::BinderMapWithContext* map) override; void RegisterBrowserInterfaceBindersForServiceWorker( + content::BrowserContext* browser_context, mojo::BinderMapWithContext* map) override; #if BUILDFLAG(IS_LINUX) diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index 917a3a466e9cd..813a6dce4ea3c 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -144,8 +144,7 @@ void ElectronDownloadManagerDelegate::OnDownloadPathGenerated( path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, item->GetMixedContentStatus(), path, base::FilePath(), - std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, - download::DOWNLOAD_INTERRUPT_REASON_NONE); + std::string() /*mime_type*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -185,8 +184,7 @@ void ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone( .Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, item->GetMixedContentStatus(), path, base::FilePath(), - std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, - interrupt_reason); + std::string() /*mime_type*/, interrupt_reason); } void ElectronDownloadManagerDelegate::Shutdown() { @@ -206,8 +204,7 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, download->GetForcedFilePath(), base::FilePath(), - std::string() /*mime_type*/, absl::nullopt /*download_schedule*/, - download::DOWNLOAD_INTERRUPT_REASON_NONE); + std::string() /*mime_type*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } @@ -220,7 +217,6 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget( download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, save_path, base::FilePath(), std::string() /*mime_type*/, - absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index f286f25a9a5f6..bf1fc1da6e87e 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -310,15 +310,12 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( return; } - std::vector event_args(args.size()); - std::transform(args.begin(), args.end(), event_args.begin(), - [](const base::Value& arg) { return arg.Clone(); }); auto event = std::make_unique(histogram_value, event_name, - std::move(event_args)); - auto& context_map = ElectronBrowserContext::browser_context_map(); - for (auto const& entry : context_map) { - if (entry.second) { - extensions::EventRouter::Get(entry.second.get()) + args.Clone()); + for (auto const& [key, browser_context] : + ElectronBrowserContext::browser_context_map()) { + if (browser_context) { + extensions::EventRouter::Get(browser_context.get()) ->BroadcastEvent(std::move(event)); } } diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index abdf7a53efeb1..6c67490e75893 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -8,6 +8,7 @@ #include #include "base/command_line.h" +#include "chrome/common/chrome_features.h" #include "content/public/browser/web_contents.h" #include "services/device/public/cpp/hid/hid_switches.h" #include "shell/browser/electron_permission_manager.h" @@ -17,6 +18,10 @@ #include "shell/browser/web_contents_permission_helper.h" #include "third_party/blink/public/common/permissions/permission_utils.h" +#if BUILDFLAG(ENABLE_EXTENSIONS) +#include "extensions/common/constants.h" +#endif // BUILDFLAG(ENABLE_EXTENSIONS) + namespace { electron::HidChooserContext* GetChooserContext( @@ -119,6 +124,19 @@ bool ElectronHidDelegate::IsFidoAllowedForOrigin( switches::kDisableHidBlocklist); } +bool ElectronHidDelegate::IsServiceWorkerAllowedForOrigin( + const url::Origin& origin) { +#if BUILDFLAG(ENABLE_EXTENSIONS) + // WebHID is only available on extension service workers with feature flag + // enabled for now. + if (base::FeatureList::IsEnabled( + features::kEnableWebHidOnExtensionServiceWorker) && + origin.scheme() == extensions::kExtensionScheme) + return true; +#endif // BUILDFLAG(ENABLE_EXTENSIONS) + return false; +} + void ElectronHidDelegate::OnDeviceAdded( const device::mojom::HidDeviceInfo& device_info) { for (auto& observer : observer_list_) diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index 2fc81abd3c172..91c1dccfcde2c 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/shell/browser/hid/electron_hid_delegate.h @@ -52,6 +52,7 @@ class ElectronHidDelegate : public content::HidDelegate, const std::string& guid) override; bool IsFidoAllowedForOrigin(content::BrowserContext* browser_context, const url::Origin& origin) override; + bool IsServiceWorkerAllowedForOrigin(const url::Origin& origin) override; // HidChooserContext::DeviceObserver: void OnDeviceAdded(const device::mojom::HidDeviceInfo&) override; diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index a8240681f814e..169e04c2b28cb 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -136,6 +136,8 @@ void OffScreenVideoConsumer::OnFrameCaptured( callback_.Run(*update_rect, bitmap); } +void OffScreenVideoConsumer::OnNewCropVersion(uint32_t crop_version) {} + void OffScreenVideoConsumer::OnFrameWithEmptyRegionCapture() {} void OffScreenVideoConsumer::OnStopped() {} diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index ee6bf0aafd419..5427eb1251609 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -43,6 +43,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { const gfx::Rect& content_rect, mojo::PendingRemote callbacks) override; + void OnNewCropVersion(uint32_t crop_version) override; void OnFrameWithEmptyRegionCapture() override; void OnStopped() override; void OnLog(const std::string& message) override; diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index d1c8e65426a68..16bf86cb016e7 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -903,32 +903,25 @@ void InspectableWebContents::RegisterExtensionsAPI(const std::string& origin, } void InspectableWebContents::HandleMessageFromDevToolsFrontend( - base::Value message) { + base::Value::Dict message) { // TODO(alexeykuzmin): Should we expect it to exist? if (!embedder_message_dispatcher_) { return; } - const std::string* method = nullptr; - base::Value* params = nullptr; - - if (message.is_dict()) { - method = message.FindStringKey(kFrontendHostMethod); - params = message.FindKey(kFrontendHostParams); - } + const std::string* method = message.FindString(kFrontendHostMethod); + base::Value* params = message.Find(kFrontendHostParams); if (!method || (params && !params->is_list())) { LOG(ERROR) << "Invalid message was sent to embedder: " << message; return; } - base::Value empty_params(base::Value::Type::LIST); - if (!params) { - params = &empty_params; - } - int id = message.FindIntKey(kFrontendHostId).value_or(0); - std::vector params_list; - if (params) - params_list = std::move(*params).TakeListDeprecated(); + + const base::Value::List no_params; + const base::Value::List& params_list = + params != nullptr && params->is_list() ? params->GetList() : no_params; + + const int id = message.FindInt(kFrontendHostId).value_or(0); embedder_message_dispatcher_->Dispatch( base::BindRepeating(&InspectableWebContents::SendMessageAck, weak_factory_.GetWeakPtr(), id), diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 68548d0c3c427..b283c48ff6137 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -170,7 +170,7 @@ class InspectableWebContents const std::string& trigger) override {} // content::DevToolsFrontendHostDelegate: - void HandleMessageFromDevToolsFrontend(base::Value message); + void HandleMessageFromDevToolsFrontend(base::Value::Dict message); // content::DevToolsAgentHostClient: void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 07dcb52162c45..608899531ea9e 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -332,34 +332,32 @@ ElectronAccessibilityUIMessageHandler::ElectronAccessibilityUIMessageHandler() = default; void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( - const base::ListValue* args) { - const base::DictionaryValue* data; - CHECK(args->GetDictionary(0, &data)); + const base::Value::List& args) { + const base::Value::Dict& data = args.front().GetDict(); - int window_id = *data->FindIntPath(kSessionIdField); - const std::string* request_type_p = data->FindStringPath(kRequestTypeField); + const int window_id = *data.FindInt(kSessionIdField); + const std::string* const request_type_p = data.FindString(kRequestTypeField); CHECK(IsValidJSValue(request_type_p)); std::string request_type = *request_type_p; CHECK(request_type == kShowOrRefreshTree || request_type == kCopyTree); request_type = "accessibility." + request_type; - const std::string* allow_p = data->FindStringPath("filters.allow"); + const std::string* const allow_p = + data.FindStringByDottedPath("filters.allow"); CHECK(IsValidJSValue(allow_p)); - std::string allow = *allow_p; - const std::string* allow_empty_p = data->FindStringPath("filters.allowEmpty"); + const std::string* const allow_empty_p = + data.FindStringByDottedPath("filters.allowEmpty"); CHECK(IsValidJSValue(allow_empty_p)); - std::string allow_empty = *allow_empty_p; - const std::string* deny_p = data->FindStringPath("filters.deny"); + const std::string* const deny_p = data.FindStringByDottedPath("filters.deny"); CHECK(IsValidJSValue(deny_p)); - std::string deny = *deny_p; AllowJavascript(); std::vector property_filters; - AddPropertyFilters(&property_filters, allow, ui::AXPropertyFilter::ALLOW); - AddPropertyFilters(&property_filters, allow_empty, + AddPropertyFilters(&property_filters, *allow_p, ui::AXPropertyFilter::ALLOW); + AddPropertyFilters(&property_filters, *allow_empty_p, ui::AXPropertyFilter::ALLOW_EMPTY); - AddPropertyFilters(&property_filters, deny, ui::AXPropertyFilter::DENY); + AddPropertyFilters(&property_filters, *deny_p, ui::AXPropertyFilter::DENY); for (auto* window : electron::WindowList::GetWindows()) { if (window->window_id() == window_id) { @@ -385,25 +383,25 @@ void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( void ElectronAccessibilityUIMessageHandler::RegisterMessages() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "toggleAccessibility", base::BindRepeating(&AccessibilityUIMessageHandler::ToggleAccessibility, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "setGlobalFlag", base::BindRepeating(&AccessibilityUIMessageHandler::SetGlobalFlag, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "requestWebContentsTree", base::BindRepeating( &AccessibilityUIMessageHandler::RequestWebContentsTree, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "requestNativeUITree", base::BindRepeating( &ElectronAccessibilityUIMessageHandler::RequestNativeUITree, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "requestAccessibilityEvents", base::BindRepeating( &AccessibilityUIMessageHandler::RequestAccessibilityEvents, diff --git a/shell/browser/ui/webui/accessibility_ui.h b/shell/browser/ui/webui/accessibility_ui.h index 8d8dd02721ea8..a9796934a50e2 100644 --- a/shell/browser/ui/webui/accessibility_ui.h +++ b/shell/browser/ui/webui/accessibility_ui.h @@ -32,7 +32,7 @@ class ElectronAccessibilityUIMessageHandler void RegisterMessages() final; private: - void RequestNativeUITree(const base::ListValue* args); + void RequestNativeUITree(const base::Value::List& args); }; #endif // ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ diff --git a/shell/common/api/electron_api_clipboard_mac.mm b/shell/common/api/electron_api_clipboard_mac.mm index 5303b89af6ca7..5607885c4c5e6 100644 --- a/shell/common/api/electron_api_clipboard_mac.mm +++ b/shell/common/api/electron_api_clipboard_mac.mm @@ -14,7 +14,7 @@ } std::u16string Clipboard::ReadFindText() { - return GetFindPboardText(); + return base::SysNSStringToUTF16([[FindPasteboard sharedInstance] findText]); } } // namespace electron::api diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 6a7a0c2387cd2..12e8cc1018e86 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -15,7 +15,6 @@ #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_visitor.h" -#include "content/public/renderer/render_view.h" #include "gin/handle.h" #include "gin/object_template_builder.h" #include "gin/wrappable.h" diff --git a/shell/renderer/electron_autofill_agent.cc b/shell/renderer/electron_autofill_agent.cc index ff3ae3deceb56..115f602c77660 100644 --- a/shell/renderer/electron_autofill_agent.cc +++ b/shell/renderer/electron_autofill_agent.cc @@ -8,7 +8,6 @@ #include #include "content/public/renderer/render_frame.h" -#include "content/public/renderer/render_view.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/input/web_keyboard_event.h" #include "third_party/blink/public/platform/web_string.h" diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index f3ef770262484..5c4f0d248fcdd 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -11,7 +11,6 @@ #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" #include "content/public/renderer/render_frame.h" -#include "content/public/renderer/render_view.h" #include "electron/buildflags/buildflags.h" #include "electron/shell/common/api/api.mojom.h" #include "ipc/ipc_message_macros.h" diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index a7ce97370f066..b57b46cc8c580 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -18,7 +18,6 @@ #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_thread.h" -#include "content/public/renderer/render_view.h" #include "electron/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "shell/browser/api/electron_api_protocol.h" From 9a5d759ea30724d2d3fd4872ddec54232a5e551a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 14 Jul 2022 01:46:41 -0700 Subject: [PATCH 585/811] fix: ensure that v8 sandbox isnt enabled for arm (#34914) --- ...pression_sandbox_is_enabled_on_64bit.patch | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch index 2b9a5edf16daa..a38e4f9dec637 100644 --- a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch +++ b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch @@ -8,29 +8,26 @@ Aligns common.gypi with the current build flag state of //v8. Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`. diff --git a/common.gypi b/common.gypi -index 559b7f7c220cb98946285bb15d0d63e203bbcea4..b0cba989da8d9b5bd7e1050510bb09646622f88c 100644 +index 559b7f7c220cb98946285bb15d0d63e203bbcea4..ea87c9f56ef83e6b0edddb9a467a21eb4ea3907b 100644 --- a/common.gypi +++ b/common.gypi -@@ -66,6 +66,8 @@ +@@ -65,6 +65,7 @@ + # node-gyp to build addons. 'v8_enable_pointer_compression%': 0, 'v8_enable_31bit_smis_on_64bit_arch%': 0, - + 'v8_enable_sandbox%': 0, -+ + # Disable V8 untrusted code mitigations. # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations - 'v8_untrusted_code_mitigations': 0, -@@ -135,6 +137,9 @@ +@@ -134,6 +135,7 @@ + ['target_arch in "arm ia32 mips mipsel ppc"', { 'v8_enable_pointer_compression': 0, 'v8_enable_31bit_smis_on_64bit_arch': 0, ++ 'v8_enable_sandbox': 0, }], -+ ['target_arch in "arm64 x64"', { -+ 'v8_enable_sandbox': 1, -+ }], ['target_arch in "ppc64 s390x"', { 'v8_enable_backtrace': 1, - }], -@@ -395,9 +400,15 @@ +@@ -395,9 +397,15 @@ ['v8_enable_pointer_compression == 1', { 'defines': [ 'V8_COMPRESS_POINTERS', @@ -47,3 +44,15 @@ index 559b7f7c220cb98946285bb15d0d63e203bbcea4..b0cba989da8d9b5bd7e1050510bb0964 ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], }], +diff --git a/configure.py b/configure.py +index 95b31769cb5756578d66193716c638f504bd44aa..fe741d15da821396883dd72b4e0a42c7758bd557 100755 +--- a/configure.py ++++ b/configure.py +@@ -1433,6 +1433,7 @@ def configure_v8(o): + o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1 + o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 + o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 ++ o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0 + o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 + o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) + o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) From e9f42b4ad44b39bc86aeebd0d768ee47d8847ec4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 06:03:36 -0700 Subject: [PATCH 586/811] Bump v21.0.0-nightly.20220714 --- 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 dbd21d769462d..96efc12e48120 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220713 \ No newline at end of file +21.0.0-nightly.20220714 \ No newline at end of file diff --git a/package.json b/package.json index c725b6a1cbbd8..2b3d88df386ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220713", + "version": "21.0.0-nightly.20220714", "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 389bdd60adc14..9e031ab3195ec 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 21,0,0,20220713 - PRODUCTVERSION 21,0,0,20220713 + FILEVERSION 21,0,0,20220714 + PRODUCTVERSION 21,0,0,20220714 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0cb39b5bb528a24ab3f129622d8576ca5caaa4f5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 08:12:33 -0700 Subject: [PATCH 587/811] Revert "Bump v21.0.0-nightly.20220714" This reverts commit e9f42b4ad44b39bc86aeebd0d768ee47d8847ec4. --- 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 96efc12e48120..dbd21d769462d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220714 \ No newline at end of file +21.0.0-nightly.20220713 \ No newline at end of file diff --git a/package.json b/package.json index 2b3d88df386ac..c725b6a1cbbd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220714", + "version": "21.0.0-nightly.20220713", "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 9e031ab3195ec..389bdd60adc14 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 21,0,0,20220714 - PRODUCTVERSION 21,0,0,20220714 + FILEVERSION 21,0,0,20220713 + PRODUCTVERSION 21,0,0,20220713 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4bec26cd0cb9336f4e75e3b15ae3b239dee6abbc Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 06:01:14 -0700 Subject: [PATCH 588/811] Bump v21.0.0-nightly.20220715 --- 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 dbd21d769462d..8020e29170eff 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220713 \ No newline at end of file +21.0.0-nightly.20220715 \ No newline at end of file diff --git a/package.json b/package.json index c725b6a1cbbd8..be7004caf984d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220713", + "version": "21.0.0-nightly.20220715", "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 389bdd60adc14..1227af1ae28a2 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 21,0,0,20220713 - PRODUCTVERSION 21,0,0,20220713 + FILEVERSION 21,0,0,20220715 + PRODUCTVERSION 21,0,0,20220715 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 2afb284456630be96573257c07b0eb4ecb3f04a2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 07:32:25 -0700 Subject: [PATCH 589/811] Revert "Bump v21.0.0-nightly.20220715" This reverts commit 4bec26cd0cb9336f4e75e3b15ae3b239dee6abbc. --- 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 8020e29170eff..dbd21d769462d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220715 \ No newline at end of file +21.0.0-nightly.20220713 \ No newline at end of file diff --git a/package.json b/package.json index be7004caf984d..c725b6a1cbbd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220715", + "version": "21.0.0-nightly.20220713", "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 1227af1ae28a2..389bdd60adc14 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 21,0,0,20220715 - PRODUCTVERSION 21,0,0,20220715 + FILEVERSION 21,0,0,20220713 + PRODUCTVERSION 21,0,0,20220713 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 574da5a9a1d8f5c77a957e772e34a06c9cf1d3b0 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 15 Jul 2022 15:12:01 -0700 Subject: [PATCH 590/811] chore: cherry-pick 5e227bebf193 from v8 (#34931) * chore: cherry-pick 5e227bebf193 from v8 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/v8/.patches | 1 + patches/v8/cherry-pick-5e227bebf193.patch | 72 +++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 patches/v8/cherry-pick-5e227bebf193.patch diff --git a/patches/v8/.patches b/patches/v8/.patches index 0e16c5eabc6fe..ea88a8670a84c 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -10,3 +10,4 @@ revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch chore_disable_is_execution_terminating_dcheck.patch build_remove_legacy_oom_error_callback.patch +cherry-pick-5e227bebf193.patch diff --git a/patches/v8/cherry-pick-5e227bebf193.patch b/patches/v8/cherry-pick-5e227bebf193.patch new file mode 100644 index 0000000000000..31e47fac5dcf5 --- /dev/null +++ b/patches/v8/cherry-pick-5e227bebf193.patch @@ -0,0 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Sat, 9 Jul 2022 14:05:56 +0200 +Subject: Fix undefined symbol linker error + +Assembler::CheckBuffer() was defined inline in a header file but without +inline linkage, causing an undefined symbol link error on arm64 macOS. + +Fixes: https://github.com/nodejs/node-v8/issues/233 +Bug: v8:13055 +Change-Id: Ifb638705e95de72b2e8d472e7092e88d77cf8ba8 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749583 +Auto-Submit: Ben Noordhuis +Reviewed-by: Leszek Swirski +Reviewed-by: Jakob Kummerow +Commit-Queue: Leszek Swirski +Cr-Commit-Position: refs/heads/main@{#81749} + +diff --git a/src/codegen/arm64/assembler-arm64-inl.h b/src/codegen/arm64/assembler-arm64-inl.h +index da4201b28307a71e988b50e26fc8854fdcc510d4..60deb07b65b5acaaa1e8762cc57730f366f483d2 100644 +--- a/src/codegen/arm64/assembler-arm64-inl.h ++++ b/src/codegen/arm64/assembler-arm64-inl.h +@@ -1066,21 +1066,6 @@ const Register& Assembler::AppropriateZeroRegFor(const CPURegister& reg) const { + return reg.Is64Bits() ? xzr : wzr; + } + +-inline void Assembler::CheckBufferSpace() { +- DCHECK_LT(pc_, buffer_start_ + buffer_->size()); +- if (V8_UNLIKELY(buffer_space() < kGap)) { +- GrowBuffer(); +- } +-} +- +-V8_INLINE void Assembler::CheckBuffer() { +- CheckBufferSpace(); +- if (pc_offset() >= next_veneer_pool_check_) { +- CheckVeneerPool(false, true); +- } +- constpool_.MaybeCheck(); +-} +- + EnsureSpace::EnsureSpace(Assembler* assembler) : block_pools_scope_(assembler) { + assembler->CheckBufferSpace(); + } +diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h +index 703e4bba9381c57849882e7cb2cdeb751064dd2a..dceda86275d3ef0bfc2b5bea9d8f04957b2e721c 100644 +--- a/src/codegen/arm64/assembler-arm64.h ++++ b/src/codegen/arm64/assembler-arm64.h +@@ -2625,8 +2625,21 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { + } + + void GrowBuffer(); +- V8_INLINE void CheckBufferSpace(); +- void CheckBuffer(); ++ ++ void CheckBufferSpace() { ++ DCHECK_LT(pc_, buffer_start_ + buffer_->size()); ++ if (V8_UNLIKELY(buffer_space() < kGap)) { ++ GrowBuffer(); ++ } ++ } ++ ++ void CheckBuffer() { ++ CheckBufferSpace(); ++ if (pc_offset() >= next_veneer_pool_check_) { ++ CheckVeneerPool(false, true); ++ } ++ constpool_.MaybeCheck(); ++ } + + // Emission of the veneer pools may be blocked in some code sequences. + int veneer_pool_blocked_nesting_; // Block emission if this is not zero. From 9d23a624c1e7c6ca4273d727cf4423d52d1a5de4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 15:12:54 -0700 Subject: [PATCH 591/811] Bump v21.0.0-nightly.20220715 --- 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 dbd21d769462d..8020e29170eff 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220713 \ No newline at end of file +21.0.0-nightly.20220715 \ No newline at end of file diff --git a/package.json b/package.json index c725b6a1cbbd8..be7004caf984d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220713", + "version": "21.0.0-nightly.20220715", "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 389bdd60adc14..1227af1ae28a2 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 21,0,0,20220713 - PRODUCTVERSION 21,0,0,20220713 + FILEVERSION 21,0,0,20220715 + PRODUCTVERSION 21,0,0,20220715 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f1746c81c66d6857e8b857a6eaedee8cc123c942 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 15 Jul 2022 16:57:29 -0700 Subject: [PATCH 592/811] fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules (#34932) This define is only needed when linking against Chromiums libc++ which we currently do not ship / expose the symbols of. We probably should make those symbols visible and actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++ but for now this fixes compilation issues on macOS where the default system clang links to the system libc++ which does not (obviously) use the Chromium ABI namespace. For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner. --- patches/node/.patches | 1 - ...mespace_as_cr_to_align_with_chromium.patch | 21 ------------------- ...pression_sandbox_is_enabled_on_64bit.patch | 4 ++-- script/nan-spec-runner.js | 1 + 4 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch diff --git a/patches/node/.patches b/patches/node/.patches index a175fc7472712..17a4ed067136a 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -43,6 +43,5 @@ macos_avoid_posix_spawnp_cwd_bug_3597.patch src_update_importmoduledynamically.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch json_parse_errors_made_user-friendly.patch -build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch support_v8_sandboxed_pointers.patch build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch diff --git a/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch b/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch deleted file mode 100644 index 1c47ff5336b9d..0000000000000 --- a/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 6 Jun 2022 14:46:40 -0700 -Subject: build: define _LIBCPP_ABI_NAMESPACE as Cr to align with chromium - -Without this define native modules will be built trying to link to _LIBCPP_ABI_NAMESPACE which is the default name, chromium overrides this to Cr for PDB size reasons but they override it on all platforms. Setting this define allows native modules to actually work. This should not be upstreamed as it is Electron specific. - -Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3655638 - -diff --git a/common.gypi b/common.gypi -index bdfe81d11cc50f492c93fe48f6946765b6fb5238..559b7f7c220cb98946285bb15d0d63e203bbcea4 100644 ---- a/common.gypi -+++ b/common.gypi -@@ -288,6 +288,7 @@ - 'V8_DEPRECATION_WARNINGS', - 'V8_IMMINENT_DEPRECATION_WARNINGS', - '_GLIBCXX_USE_CXX11_ABI=1', -+ '_LIBCPP_ABI_NAMESPACE=Cr', - ], - - # Forcibly disable -Werror. We support a wide range of compilers, it's diff --git a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch index a38e4f9dec637..622e1cc6d2de3 100644 --- a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch +++ b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch @@ -8,7 +8,7 @@ Aligns common.gypi with the current build flag state of //v8. Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`. diff --git a/common.gypi b/common.gypi -index 559b7f7c220cb98946285bb15d0d63e203bbcea4..ea87c9f56ef83e6b0edddb9a467a21eb4ea3907b 100644 +index bdfe81d11cc50f492c93fe48f6946765b6fb5238..ca08deeb19f5fe9ee399ad809b24579fdaa10036 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ @@ -27,7 +27,7 @@ index 559b7f7c220cb98946285bb15d0d63e203bbcea4..ea87c9f56ef83e6b0edddb9a467a21eb }], ['target_arch in "ppc64 s390x"', { 'v8_enable_backtrace': 1, -@@ -395,9 +397,15 @@ +@@ -394,9 +396,15 @@ ['v8_enable_pointer_compression == 1', { 'defines': [ 'V8_COMPRESS_POINTERS', diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index 8f14c6ef9bae7..04c8459a085f3 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -63,6 +63,7 @@ async function main () { `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`, '-fPIC', + '-D_LIBCPP_ABI_NAMESPACE=Cr', ...platformFlags ].join(' '); From c4cde78818fb7a67c0aa715927f40cab2d3817fa Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 06:01:46 -0700 Subject: [PATCH 593/811] Bump v21.0.0-nightly.20220718 --- 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 8020e29170eff..8f5eda4c50301 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220715 \ No newline at end of file +21.0.0-nightly.20220718 \ No newline at end of file diff --git a/package.json b/package.json index be7004caf984d..fe99e6c83a8da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220715", + "version": "21.0.0-nightly.20220718", "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 1227af1ae28a2..be04712a36d81 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 21,0,0,20220715 - PRODUCTVERSION 21,0,0,20220715 + FILEVERSION 21,0,0,20220718 + PRODUCTVERSION 21,0,0,20220718 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 8a0df1f487449e25ccc9a2bc13e7160fe82bc61d Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 19 Jul 2022 04:20:16 -0400 Subject: [PATCH 594/811] ci: wait longer for goma to be ready (#34956) --- .circleci/config/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index b1545fc175f1d..2f4d58e751e7f 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -346,7 +346,7 @@ step-wait-for-goma: &step-wait-for-goma sleep 5 done echo "Goma ready" - no_output_timeout: 2m + no_output_timeout: 5m step-restore-brew-cache: &step-restore-brew-cache restore_cache: From 57b02e153de798edb2fc415e19792e64f191a349 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 19 Jul 2022 11:45:10 +0200 Subject: [PATCH 595/811] fix: potential hang on print settings failure (#34892) --- patches/chromium/printing.patch | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 460fb3b6d5bc5..a602cca1f0089 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index d9ae000f1348529ab849349d7562dbb04fe9fd16..cf66978761f5dda2f8958234d62c3cf11ae4cf9c 100644 +index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac09986cfd9 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -97,7 +97,7 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..cf66978761f5dda2f8958234d62c3cf1 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -222,16 +222,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, +@@ -222,16 +222,19 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -111,12 +111,10 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..cf66978761f5dda2f8958234d62c3cf1 - result = printing_context_->UpdatePrintSettings(std::move(new_settings)); + // Reset settings from previous print job + printing_context_->ResetSettings(); -+ mojom::ResultCode get_default_result = printing_context_->UseDefaultSettings(); -+ if (get_default_result == mojom::ResultCode::kSuccess) { -+ mojom::ResultCode update_result = -+ printing_context_->UpdatePrintSettings(std::move(new_settings)); -+ GetSettingsDone(std::move(callback), update_result); -+ } ++ mojom::ResultCode result_code = printing_context_->UseDefaultSettings(); ++ if (result_code == mojom::ResultCode::kSuccess) ++ result_code = printing_context_->UpdatePrintSettings(std::move(new_settings)); ++ GetSettingsDone(std::move(callback), result_code); } - GetSettingsDone(std::move(callback), result); } From 38848c5bf77b2fa62b3dddecfe1aecba8d4ae48f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 19 Jul 2022 12:14:21 +0200 Subject: [PATCH 596/811] test: optionally validate disabled Node.js specs (#34899) --- script/node-disabled-tests.json | 6 ++---- script/node-spec-runner.js | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 8870c8fe8492e..1cec1b9e230f1 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -13,7 +13,6 @@ "parallel/test-crypto-des3-wrap", "parallel/test-crypto-dh-stateless", "parallel/test-crypto-ecb", - "parallel/test-crypto-engine", "parallel/test-crypto-fips", "parallel/test-crypto-keygen", "parallel/test-crypto-keygen-deprecation", @@ -21,7 +20,7 @@ "parallel/test-crypto-padding-aes256", "parallel/test-crypto-secure-heap", "parallel/test-fs-utimes-y2K38", - "parallel/test-heapsnapshot-near-heap-limit-worker.js", + "parallel/test-heapsnapshot-near-heap-limit-worker", "parallel/test-http2-clean-output", "parallel/test-https-agent-session-reuse", "parallel/test-https-options-boolean-check", @@ -96,7 +95,6 @@ "parallel/test-trace-events-fs-sync", "parallel/test-trace-events-metadata", "parallel/test-trace-events-none", - "parallel/test-trace-events-perf", "parallel/test-trace-events-process-exit", "parallel/test-trace-events-promises", "parallel/test-trace-events-v8", @@ -125,7 +123,7 @@ "report/test-report-writereport", "sequential/test-cpu-prof-kill", "sequential/test-diagnostic-dir-cpu-prof", - "sequential/test-cpu-prof-drained.js", + "sequential/test-cpu-prof-drained", "sequential/test-tls-connect", "wpt/test-webcrypto" ] diff --git a/script/node-spec-runner.js b/script/node-spec-runner.js index 3454843c86540..570a4d00dfe3e 100644 --- a/script/node-spec-runner.js +++ b/script/node-spec-runner.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); const args = require('minimist')(process.argv.slice(2), { - boolean: ['default'], + boolean: ['default', 'validateDisabled'], string: ['jUnitDir'] }); @@ -43,8 +43,7 @@ const getCustomOptions = () => { customOptions = customOptions.concat(extra); } - // We need this unilaterally or Node.js will try - // to run from out/Release/node. + // Necessary or Node.js will try to run from out/Release/node. customOptions = customOptions.concat([ '--shell', utils.getAbsoluteElectronExec() @@ -54,6 +53,22 @@ const getCustomOptions = () => { }; async function main () { + // Optionally validate that all disabled specs still exist. + if (args.validateDisabled) { + const missing = []; + for (const test of DISABLED_TESTS) { + const testName = test.endsWith('.js') ? test : `${test}.js`; + if (!fs.existsSync(path.join(NODE_DIR, 'test', testName))) { + missing.push(test); + } + } + + if (missing.length > 0) { + console.error(`Found ${missing.length} missing disabled specs: \n${missing.join('\n')}`); + process.exit(1); + } + } + const options = args.default ? defaultOptions : getCustomOptions(); const testChild = cp.spawn('python3', options, { From eb8c9452cb38b6bd32bdc92724cc1fb42a3d43dc Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 19 Jul 2022 12:31:49 +0200 Subject: [PATCH 597/811] fix: crash on `BrowserWindow.setEnabled()` (#34904) fix: crash on BrowserWindow.setEnabled() --- shell/browser/native_window_mac.mm | 19 +++++++++++++++---- spec-main/api-browser-window-spec.ts | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 721ed09c47e92..f535844af4712 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -484,7 +484,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { // [window_ performClose:nil], the window won't close properly // even after the user has ended the sheet. // Ensure it's closed before calling [window_ performClose:nil]. - SetEnabled(true); + if ([window_ attachedSheet]) + [window_ endSheet:[window_ attachedSheet]]; [window_ performClose:nil]; @@ -554,7 +555,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { // If a sheet is attached to the window when we call [window_ orderOut:nil], // the sheet won't be able to show again on the same window. // Ensure it's closed before calling [window_ orderOut:nil]. - SetEnabled(true); + if ([window_ attachedSheet]) + [window_ endSheet:[window_ attachedSheet]]; if (is_modal() && parent()) { [window_ orderOut:nil]; @@ -593,9 +595,18 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { void NativeWindowMac::SetEnabled(bool enable) { if (!enable) { - [window_ beginSheet:window_ + NSRect frame = [window_ frame]; + NSWindow* window = + [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, frame.size.width, + frame.size.height) + styleMask:NSWindowStyleMaskTitled + backing:NSBackingStoreBuffered + defer:NO]; + [window setAlphaValue:0.5]; + + [window_ beginSheet:window completionHandler:^(NSModalResponse returnCode) { - NSLog(@"modal enabled"); + NSLog(@"main window disabled"); return; }]; } else if ([window_ attachedSheet]) { diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 0c003416aa2ee..993c6ed2c3800 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4331,6 +4331,14 @@ describe('BrowserWindow module', () => { await createTwo(); }); + ifit(process.platform !== 'darwin')('can disable and enable a window', () => { + const w = new BrowserWindow({ show: false }); + w.setEnabled(false); + expect(w.isEnabled()).to.be.false('w.isEnabled()'); + w.setEnabled(true); + expect(w.isEnabled()).to.be.true('!w.isEnabled()'); + }); + ifit(process.platform !== 'darwin')('disables parent window', () => { const w = new BrowserWindow({ show: false }); const c = new BrowserWindow({ show: false, parent: w, modal: true }); From 05d4966251580cd4ae95479ccbbfdd5e8a70702f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 19 Jul 2022 14:46:08 +0200 Subject: [PATCH 598/811] fix: delegate to `PrintViewManagerBase` on failed print (#34893) fix: delegate to PrintViewManagerBase on failed print --- shell/browser/printing/print_view_manager_electron.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index 866f439f5aec4..369b97fbd049e 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -163,12 +163,23 @@ void PrintViewManagerElectron::ScriptedPrint( } void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() { + if (headless_jobs_.size() == 0) { + PrintViewManagerBase::ShowInvalidPrinterSettingsError(); + return; + } + ReleaseJob(INVALID_PRINTER_SETTINGS); } void PrintViewManagerElectron::PrintingFailed( int32_t cookie, printing::mojom::PrintFailureReason reason) { + auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), cookie); + if (entry == headless_jobs_.end()) { + PrintViewManagerBase::PrintingFailed(cookie, reason); + return; + } + ReleaseJob(reason == printing::mojom::PrintFailureReason::kInvalidPageRange ? PAGE_COUNT_EXCEEDED : PRINTING_FAILED); From ba25714e16386c1bdc517066ba67eb965120c709 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 19 Jul 2022 06:01:27 -0700 Subject: [PATCH 599/811] Bump v21.0.0-nightly.20220719 --- 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 8f5eda4c50301..06abe267f1c14 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220718 \ No newline at end of file +21.0.0-nightly.20220719 \ No newline at end of file diff --git a/package.json b/package.json index fe99e6c83a8da..b429ed901b9e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220718", + "version": "21.0.0-nightly.20220719", "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 be04712a36d81..11e3b14c478a7 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 21,0,0,20220718 - PRODUCTVERSION 21,0,0,20220718 + FILEVERSION 21,0,0,20220719 + PRODUCTVERSION 21,0,0,20220719 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 60b6e74e3fda131add79009ccae2e48e6a460620 Mon Sep 17 00:00:00 2001 From: Alexander Petrov Date: Tue, 19 Jul 2022 18:18:04 +0200 Subject: [PATCH 600/811] fix: merge crash annotations instead of overwriting (#34795) ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges annotations provided as argument with global_annotations_, preserving useful information. --- shell/app/electron_crash_reporter_client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/app/electron_crash_reporter_client.cc b/shell/app/electron_crash_reporter_client.cc index 245c55c90a13a..237c90c16f33a 100644 --- a/shell/app/electron_crash_reporter_client.cc +++ b/shell/app/electron_crash_reporter_client.cc @@ -190,7 +190,9 @@ bool ElectronCrashReporterClient::GetShouldCompressUploads() { void ElectronCrashReporterClient::GetProcessSimpleAnnotations( std::map* annotations) { - *annotations = global_annotations_; + for (auto&& pair : global_annotations_) { + (*annotations)[pair.first] = pair.second; + } (*annotations)["prod"] = ELECTRON_PRODUCT_NAME; (*annotations)["ver"] = ELECTRON_VERSION_STRING; } From 3c7d446fad5da5ea15e0795cbe1870a242efd1f4 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 20 Jul 2022 01:09:14 -0700 Subject: [PATCH 601/811] refactor: unduplicate MediaStreamDevicesController (#34895) * refactor: unduplicate MediaStreamDevicesController * restore old logic for GUM_* request types * lint * gn format * add test for unsupported getDisplayMedia * simplify + comment --- BUILD.gn | 1 + filenames.gni | 2 - patches/chromium/.patches | 1 + ...ecks_in_mediastreamdevicescontroller.patch | 88 +++++++ .../media/media_capture_devices_dispatcher.cc | 95 ------- .../media/media_capture_devices_dispatcher.h | 45 +--- .../media/media_stream_devices_controller.cc | 234 ------------------ .../media/media_stream_devices_controller.h | 49 ---- .../browser/web_contents_permission_helper.cc | 100 +++++++- spec-main/chromium-spec.ts | 8 + 10 files changed, 196 insertions(+), 427 deletions(-) create mode 100644 patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch delete mode 100644 shell/browser/media/media_stream_devices_controller.cc delete mode 100644 shell/browser/media/media_stream_devices_controller.h diff --git a/BUILD.gn b/BUILD.gn index b33a93c72a054..407bdedffccaf 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -390,6 +390,7 @@ source_set("electron_lib") { "//components/user_prefs", "//components/viz/host", "//components/viz/service", + "//components/webrtc", "//content/public/browser", "//content/public/child", "//content/public/gpu", diff --git a/filenames.gni b/filenames.gni index 5b9d3cc721dbb..df58773b49c74 100644 --- a/filenames.gni +++ b/filenames.gni @@ -415,8 +415,6 @@ filenames = { "shell/browser/media/media_capture_devices_dispatcher.h", "shell/browser/media/media_device_id_salt.cc", "shell/browser/media/media_device_id_salt.h", - "shell/browser/media/media_stream_devices_controller.cc", - "shell/browser/media/media_stream_devices_controller.h", "shell/browser/microtasks_runner.cc", "shell/browser/microtasks_runner.h", "shell/browser/native_browser_view.cc", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 1d5849b4368a6..0e6fdb164db03 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -112,3 +112,4 @@ custom_protocols_plzserviceworker.patch feat_filter_out_non-shareable_windows_in_the_current_application_in.patch fix_allow_guest_webcontents_to_enter_fullscreen.patch disable_freezing_flags_after_init_in_node.patch +short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch new file mode 100644 index 0000000000000..82c2e5920e0f2 --- /dev/null +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -0,0 +1,88 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Tue, 12 Jul 2022 16:51:43 -0700 +Subject: short-circuit permissions checks in MediaStreamDevicesController + +The //components/permissions architecture is complicated and not that +widely used in Chromium, and mostly oriented around showing permissions +UI and/or remembering per-site permissions, which we're not interested +in. + +Since we do a permissions check prior to invoking the +MediaStreamDevicesController, and don't (yet) provide the ability to set +granular permissions (e.g. allow video but not audio), just +short-circuit all the permissions checks in MSDC for now to allow us to +unduplicate this code. + +diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc +index 353ed84da62b954a90c8d0a886495c0822f30429..1a1162ba960419a4de5eb2839ebc3debadca86d5 100644 +--- a/components/webrtc/media_stream_devices_controller.cc ++++ b/components/webrtc/media_stream_devices_controller.cc +@@ -93,11 +93,14 @@ void MediaStreamDevicesController::RequestPermissions( + + std::vector permission_types; + ++#if 0 + permissions::PermissionManager* permission_manager = + permissions::PermissionsClient::Get()->GetPermissionManager( + web_contents->GetBrowserContext()); ++#endif + + if (controller->ShouldRequestAudio()) { ++#if 0 + permissions::PermissionResult permission_status = + permission_manager->GetPermissionStatusForCurrentDocument( + ContentSettingsType::MEDIASTREAM_MIC, rfh); +@@ -109,10 +112,12 @@ void MediaStreamDevicesController::RequestPermissions( + permissions::PermissionStatusSource::FEATURE_POLICY); + return; + } ++#endif + + permission_types.push_back(blink::PermissionType::AUDIO_CAPTURE); + } + if (controller->ShouldRequestVideo()) { ++#if 0 + permissions::PermissionResult permission_status = + permission_manager->GetPermissionStatusForCurrentDocument( + ContentSettingsType::MEDIASTREAM_CAMERA, rfh); +@@ -124,6 +129,7 @@ void MediaStreamDevicesController::RequestPermissions( + permissions::PermissionStatusSource::FEATURE_POLICY); + return; + } ++#endif + + permission_types.push_back(blink::PermissionType::VIDEO_CAPTURE); + +@@ -135,6 +141,7 @@ void MediaStreamDevicesController::RequestPermissions( + // pan-tilt-zoom permission and there are suitable PTZ capable devices + // available. + if (request.request_pan_tilt_zoom_permission && has_pan_tilt_zoom_camera) { ++#if 0 + permission_status = + permission_manager->GetPermissionStatusForCurrentDocument( + ContentSettingsType::CAMERA_PAN_TILT_ZOOM, rfh); +@@ -144,6 +151,7 @@ void MediaStreamDevicesController::RequestPermissions( + controller->RunCallback(/*blocked_by_permissions_policy=*/false); + return; + } ++#endif + + permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); + } +@@ -425,6 +433,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( + if (rfh->GetLastCommittedOrigin().GetURL() != request_.security_origin) { + return false; + } ++#if 0 + permissions::PermissionResult result = + permissions::PermissionsClient::Get() + ->GetPermissionManager(web_contents_->GetBrowserContext()) +@@ -433,6 +442,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( + DCHECK_EQ(CONTENT_SETTING_BLOCK, result.content_setting); + return true; + } ++#endif + return false; + } + diff --git a/shell/browser/media/media_capture_devices_dispatcher.cc b/shell/browser/media/media_capture_devices_dispatcher.cc index 33ad8ebe0d6b1..3ebafc583510a 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.cc +++ b/shell/browser/media/media_capture_devices_dispatcher.cc @@ -12,23 +12,6 @@ using content::BrowserThread; namespace electron { -namespace { - -// Finds a device in |devices| that has |device_id|, or NULL if not found. -const blink::MediaStreamDevice* FindDeviceWithId( - const blink::MediaStreamDevices& devices, - const std::string& device_id) { - auto iter = devices.begin(); - for (; iter != devices.end(); ++iter) { - if (iter->id == device_id) { - return &(*iter); - } - } - return nullptr; -} - -} // namespace - MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { return base::Singleton::get(); } @@ -41,84 +24,6 @@ MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher() { MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() = default; -const blink::MediaStreamDevices& -MediaCaptureDevicesDispatcher::GetAudioCaptureDevices() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (is_device_enumeration_disabled_) - return test_audio_devices_; - return content::MediaCaptureDevices::GetInstance()->GetAudioCaptureDevices(); -} - -const blink::MediaStreamDevices& -MediaCaptureDevicesDispatcher::GetVideoCaptureDevices() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (is_device_enumeration_disabled_) - return test_video_devices_; - return content::MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices(); -} - -void MediaCaptureDevicesDispatcher::GetDefaultDevices( - bool audio, - bool video, - blink::mojom::StreamDevices& devices) { // NOLINT(runtime/references) - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - DCHECK(audio || video); - - if (audio) { - const blink::MediaStreamDevice* device = GetFirstAvailableAudioDevice(); - if (device) - devices.audio_device = *device; - } - - if (video) { - const blink::MediaStreamDevice* device = GetFirstAvailableVideoDevice(); - if (device) - devices.video_device = *device; - } -} - -const blink::MediaStreamDevice* -MediaCaptureDevicesDispatcher::GetRequestedAudioDevice( - const std::string& requested_audio_device_id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); - const blink::MediaStreamDevice* const device = - FindDeviceWithId(audio_devices, requested_audio_device_id); - return device; -} - -const blink::MediaStreamDevice* -MediaCaptureDevicesDispatcher::GetFirstAvailableAudioDevice() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); - if (audio_devices.empty()) - return nullptr; - return &(*audio_devices.begin()); -} - -const blink::MediaStreamDevice* -MediaCaptureDevicesDispatcher::GetRequestedVideoDevice( - const std::string& requested_video_device_id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); - const blink::MediaStreamDevice* const device = - FindDeviceWithId(video_devices, requested_video_device_id); - return device; -} - -const blink::MediaStreamDevice* -MediaCaptureDevicesDispatcher::GetFirstAvailableVideoDevice() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); - if (video_devices.empty()) - return nullptr; - return &(*video_devices.begin()); -} - -void MediaCaptureDevicesDispatcher::DisableDeviceEnumerationForTesting() { - is_device_enumeration_disabled_ = true; -} - void MediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged() {} void MediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged() {} diff --git a/shell/browser/media/media_capture_devices_dispatcher.h b/shell/browser/media/media_capture_devices_dispatcher.h index 6b9dd746c633e..cb513230aa5d8 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.h +++ b/shell/browser/media/media_capture_devices_dispatcher.h @@ -8,6 +8,7 @@ #include #include "base/memory/singleton.h" +#include "components/webrtc/media_stream_device_enumerator_impl.h" #include "content/public/browser/media_observer.h" #include "content/public/browser/media_stream_request.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" @@ -17,41 +18,12 @@ namespace electron { // This singleton is used to receive updates about media events from the content // layer. -class MediaCaptureDevicesDispatcher : public content::MediaObserver { +class MediaCaptureDevicesDispatcher + : public content::MediaObserver, + public webrtc::MediaStreamDeviceEnumeratorImpl { public: static MediaCaptureDevicesDispatcher* GetInstance(); - // Methods for observers. Called on UI thread. - const blink::MediaStreamDevices& GetAudioCaptureDevices(); - const blink::MediaStreamDevices& GetVideoCaptureDevices(); - - // Helper to get the default devices which can be used by the media request. - // Uses the first available devices if the default devices are not available. - // If the return list is empty, it means there is no available device on the - // OS. - // Called on the UI thread. - void GetDefaultDevices( - bool audio, - bool video, - blink::mojom::StreamDevices& devices); // NOLINT(runtime/references) - - // Helpers for picking particular requested devices, identified by raw id. - // If the device requested is not available it will return NULL. - const blink::MediaStreamDevice* GetRequestedAudioDevice( - const std::string& requested_audio_device_id); - const blink::MediaStreamDevice* GetRequestedVideoDevice( - const std::string& requested_video_device_id); - - // Returns the first available audio or video device, or NULL if no devices - // are available. - const blink::MediaStreamDevice* GetFirstAvailableAudioDevice(); - const blink::MediaStreamDevice* GetFirstAvailableVideoDevice(); - - // Unittests that do not require actual device enumeration should call this - // API on the singleton. It is safe to call this multiple times on the - // singleton. - void DisableDeviceEnumerationForTesting(); - // Overridden from content::MediaObserver: void OnAudioCaptureDevicesChanged() override; void OnVideoCaptureDevicesChanged() override; @@ -79,15 +51,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { MediaCaptureDevicesDispatcher(); ~MediaCaptureDevicesDispatcher() override; - - // Only for testing, a list of cached audio capture devices. - blink::MediaStreamDevices test_audio_devices_; - - // Only for testing, a list of cached video capture devices. - blink::MediaStreamDevices test_video_devices_; - - // Flag used by unittests to disable device enumeration. - bool is_device_enumeration_disabled_ = false; }; } // namespace electron diff --git a/shell/browser/media/media_stream_devices_controller.cc b/shell/browser/media/media_stream_devices_controller.cc deleted file mode 100644 index c7594bfdd0bc9..0000000000000 --- a/shell/browser/media/media_stream_devices_controller.cc +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) 2012 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-CHROMIUM file. - -#include "shell/browser/media/media_stream_devices_controller.h" - -#include -#include - -#include "content/public/browser/desktop_media_id.h" -#include "content/public/browser/media_stream_request.h" -#include "shell/browser/media/media_capture_devices_dispatcher.h" - -namespace electron { - -namespace { - -bool HasAnyAvailableDevice() { - const blink::MediaStreamDevices& audio_devices = - MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices(); - const blink::MediaStreamDevices& video_devices = - MediaCaptureDevicesDispatcher::GetInstance()->GetVideoCaptureDevices(); - - return !audio_devices.empty() || !video_devices.empty(); -} - -} // namespace - -MediaStreamDevicesController::MediaStreamDevicesController( - const content::MediaStreamRequest& request, - content::MediaResponseCallback callback) - : request_(request), - callback_(std::move(callback)), - // For MEDIA_OPEN_DEVICE requests (Pepper) we always request both webcam - // and microphone to avoid popping two infobars. - microphone_requested_( - request.audio_type == - blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE || - request.request_type == blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY), - webcam_requested_( - request.video_type == - blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE || - request.request_type == blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY) {} - -MediaStreamDevicesController::~MediaStreamDevicesController() { - if (!callback_.is_null()) { - std::move(callback_).Run( - blink::mojom::StreamDevicesSet(), - blink::mojom::MediaStreamRequestResult::FAILED_DUE_TO_SHUTDOWN, - std::unique_ptr()); - } -} - -bool MediaStreamDevicesController::TakeAction() { - // Do special handling of desktop screen cast. - if (request_.audio_type == - blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE || - request_.video_type == - blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE || - request_.audio_type == - blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE || - request_.video_type == - blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE) { - HandleUserMediaRequest(); - return true; - } - - // Deny the request if there is no device attached to the OS. - if (!HasAnyAvailableDevice()) { - Deny(blink::mojom::MediaStreamRequestResult::NO_HARDWARE); - return true; - } - - Accept(); - return true; -} - -void MediaStreamDevicesController::Accept() { - // Get the default devices for the request. - blink::mojom::StreamDevicesSetPtr stream_devices_set = - blink::mojom::StreamDevicesSet::New(); - stream_devices_set->stream_devices.emplace_back( - blink::mojom::StreamDevices::New()); - blink::mojom::StreamDevices& stream_devices = - *stream_devices_set->stream_devices[0]; - - if (microphone_requested_ || webcam_requested_) { - switch (request_.request_type) { - case blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY: { - const blink::MediaStreamDevice* device = nullptr; - // For open device request pick the desired device or fall back to the - // first available of the given type. - if (request_.audio_type == - blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE) { - device = - MediaCaptureDevicesDispatcher::GetInstance() - ->GetRequestedAudioDevice(request_.requested_audio_device_id); - // TODO(wjia): Confirm this is the intended behavior. - if (!device) { - device = MediaCaptureDevicesDispatcher::GetInstance() - ->GetFirstAvailableAudioDevice(); - } - if (device) - stream_devices.audio_device = *device; - } else if (request_.video_type == - blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE) { - // Pepper API opens only one device at a time. - device = - MediaCaptureDevicesDispatcher::GetInstance() - ->GetRequestedVideoDevice(request_.requested_video_device_id); - // TODO(wjia): Confirm this is the intended behavior. - if (!device) { - device = MediaCaptureDevicesDispatcher::GetInstance() - ->GetFirstAvailableVideoDevice(); - } - if (device) - stream_devices.video_device = *device; - } - break; - } - case blink::MEDIA_GENERATE_STREAM: { - bool needs_audio_device = microphone_requested_; - bool needs_video_device = webcam_requested_; - - // Get the exact audio or video device if an id is specified. - if (!request_.requested_audio_device_id.empty()) { - const blink::MediaStreamDevice* audio_device = - MediaCaptureDevicesDispatcher::GetInstance() - ->GetRequestedAudioDevice(request_.requested_audio_device_id); - if (audio_device) { - stream_devices.audio_device = *audio_device; - needs_audio_device = false; - } - } - if (!request_.requested_video_device_id.empty()) { - const blink::MediaStreamDevice* video_device = - MediaCaptureDevicesDispatcher::GetInstance() - ->GetRequestedVideoDevice(request_.requested_video_device_id); - if (video_device) { - stream_devices.video_device = *video_device; - needs_video_device = false; - } - } - - // If either or both audio and video devices were requested but not - // specified by id, get the default devices. - if (needs_audio_device || needs_video_device) { - MediaCaptureDevicesDispatcher::GetInstance()->GetDefaultDevices( - needs_audio_device, needs_video_device, stream_devices); - } - break; - } - case blink::MEDIA_DEVICE_ACCESS: { - // Get the default devices for the request. - MediaCaptureDevicesDispatcher::GetInstance()->GetDefaultDevices( - microphone_requested_, webcam_requested_, stream_devices); - break; - } - case blink::MEDIA_DEVICE_UPDATE: { - NOTREACHED(); - break; - } - case blink::MEDIA_GET_OPEN_DEVICE: { - // Transferred tracks, that use blink::MEDIA_GET_OPEN_DEVICE type, do - // not need to get permissions for blink::mojom::StreamDevices as those - // are controlled by the original context. - NOTREACHED(); - break; - } - } - } - - std::move(callback_).Run(*stream_devices_set, - blink::mojom::MediaStreamRequestResult::OK, - std::unique_ptr()); -} - -void MediaStreamDevicesController::Deny( - blink::mojom::MediaStreamRequestResult result) { - std::move(callback_).Run(blink::mojom::StreamDevicesSet(), result, - std::unique_ptr()); -} - -void MediaStreamDevicesController::HandleUserMediaRequest() { - blink::mojom::StreamDevicesSetPtr stream_devices_set = - blink::mojom::StreamDevicesSet::New(); - stream_devices_set->stream_devices.emplace_back( - blink::mojom::StreamDevices::New()); - blink::mojom::StreamDevices& devices = *stream_devices_set->stream_devices[0]; - - if (request_.audio_type == - blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE) { - devices.audio_device = blink::MediaStreamDevice( - blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE, "", ""); - } - if (request_.video_type == - blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE) { - devices.video_device = blink::MediaStreamDevice( - blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE, "", ""); - } - if (request_.audio_type == - blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE) { - devices.audio_device = blink::MediaStreamDevice( - blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE, "loopback", - "System Audio"); - } - if (request_.video_type == - blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE) { - content::DesktopMediaID screen_id; - // If the device id wasn't specified then this is a screen capture request - // (i.e. chooseDesktopMedia() API wasn't used to generate device id). - if (request_.requested_video_device_id.empty()) { - screen_id = content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, - -1 /* kFullDesktopScreenId */); - } else { - screen_id = - content::DesktopMediaID::Parse(request_.requested_video_device_id); - } - - devices.video_device = blink::MediaStreamDevice( - blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE, - screen_id.ToString(), "Screen"); - } - - bool empty = - !devices.audio_device.has_value() && !devices.video_device.has_value(); - std::move(callback_).Run( - *stream_devices_set, - empty ? blink::mojom::MediaStreamRequestResult::NO_HARDWARE - : blink::mojom::MediaStreamRequestResult::OK, - std::unique_ptr()); -} - -} // namespace electron diff --git a/shell/browser/media/media_stream_devices_controller.h b/shell/browser/media/media_stream_devices_controller.h deleted file mode 100644 index 780d38e7cb4eb..0000000000000 --- a/shell/browser/media/media_stream_devices_controller.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012 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-CHROMIUM file. - -#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" - -namespace electron { - -class MediaStreamDevicesController { - public: - MediaStreamDevicesController(const content::MediaStreamRequest& request, - content::MediaResponseCallback callback); - - virtual ~MediaStreamDevicesController(); - - // disable copy - MediaStreamDevicesController(const MediaStreamDevicesController&) = delete; - MediaStreamDevicesController& operator=(const MediaStreamDevicesController&) = - delete; - - // Accept or deny the request based on the default policy. - bool TakeAction(); - - // Explicitly accept or deny the request. - void Accept(); - void Deny(blink::mojom::MediaStreamRequestResult result); - - private: - // Handle the request of desktop or tab screen cast. - void HandleUserMediaRequest(); - - // The original request for access to devices. - const content::MediaStreamRequest request_; - - // The callback that needs to be Run to notify WebRTC of whether access to - // audio/video devices was granted or not. - content::MediaResponseCallback callback_; - - bool microphone_requested_; - bool webcam_requested_; -}; - -} // namespace electron - -#endif // ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 1d9ab4683859b..49dcfc1a1c6cd 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -12,7 +12,10 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents_user_data.h" #include "shell/browser/electron_permission_manager.h" -#include "shell/browser/media/media_stream_devices_controller.h" +// #include "shell/browser/media/media_stream_devices_controller.h" +#include "components/content_settings/core/common/content_settings.h" +#include "components/webrtc/media_stream_devices_controller.h" +#include "shell/browser/media/media_capture_devices_dispatcher.h" namespace { @@ -33,14 +36,99 @@ namespace electron { namespace { +// Handles requests for legacy-style `navigator.getUserMedia(...)` calls. +// This includes desktop capture through the chromeMediaSource / +// chromeMediaSourceId constraints. +void HandleUserMediaRequest(const content::MediaStreamRequest& request, + content::MediaResponseCallback callback) { + blink::mojom::StreamDevicesSetPtr stream_devices_set = + blink::mojom::StreamDevicesSet::New(); + stream_devices_set->stream_devices.emplace_back( + blink::mojom::StreamDevices::New()); + blink::mojom::StreamDevices& devices = *stream_devices_set->stream_devices[0]; + + if (request.audio_type == + blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE) { + devices.audio_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE, "", ""); + } + if (request.video_type == + blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE) { + devices.video_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE, "", ""); + } + if (request.audio_type == + blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE) { + devices.audio_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE, "loopback", + "System Audio"); + } + if (request.video_type == + blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE) { + content::DesktopMediaID screen_id; + // If the device id wasn't specified then this is a screen capture request + // (i.e. chooseDesktopMedia() API wasn't used to generate device id). + if (request.requested_video_device_id.empty()) { + screen_id = content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, + -1 /* kFullDesktopScreenId */); + } else { + screen_id = + content::DesktopMediaID::Parse(request.requested_video_device_id); + } + + devices.video_device = blink::MediaStreamDevice( + blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE, + screen_id.ToString(), "Screen"); + } + + bool empty = + !devices.audio_device.has_value() && !devices.video_device.has_value(); + std::move(callback).Run( + *stream_devices_set, + empty ? blink::mojom::MediaStreamRequestResult::NO_HARDWARE + : blink::mojom::MediaStreamRequestResult::OK, + nullptr); +} + +void OnMediaStreamRequestResponse( + content::MediaResponseCallback callback, + const blink::mojom::StreamDevicesSet& stream_devices_set, + blink::mojom::MediaStreamRequestResult result, + bool blocked_by_permissions_policy, + ContentSetting audio_setting, + ContentSetting video_setting) { + std::move(callback).Run(stream_devices_set, result, nullptr); +} + void MediaAccessAllowed(const content::MediaStreamRequest& request, content::MediaResponseCallback callback, bool allowed) { - MediaStreamDevicesController controller(request, std::move(callback)); - if (allowed) - controller.TakeAction(); - else - controller.Deny(blink::mojom::MediaStreamRequestResult::PERMISSION_DENIED); + if (allowed) { + if (request.video_type == + blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE || + request.audio_type == + blink::mojom::MediaStreamType::GUM_DESKTOP_AUDIO_CAPTURE || + request.video_type == + blink::mojom::MediaStreamType::GUM_TAB_VIDEO_CAPTURE || + request.audio_type == + blink::mojom::MediaStreamType::GUM_TAB_AUDIO_CAPTURE) + HandleUserMediaRequest(request, std::move(callback)); + else if (request.video_type == + blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE || + request.audio_type == + blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE) + webrtc::MediaStreamDevicesController::RequestPermissions( + request, MediaCaptureDevicesDispatcher::GetInstance(), + base::BindOnce(&OnMediaStreamRequestResponse, std::move(callback))); + else + std::move(callback).Run( + blink::mojom::StreamDevicesSet(), + blink::mojom::MediaStreamRequestResult::NOT_SUPPORTED, nullptr); + } else { + std::move(callback).Run( + blink::mojom::StreamDevicesSet(), + blink::mojom::MediaStreamRequestResult::PERMISSION_DENIED, nullptr); + } } void OnPermissionResponse(base::OnceCallback callback, diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 26d0afbca2bb9..cac88b927f1ad 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -1037,6 +1037,14 @@ describe('chromium features', () => { }).then((stream) => stream.getVideoTracks())`); expect(labels.some((l: any) => l)).to.be.true(); }); + + it('fails with "not supported" for getDisplayMedia', async () => { + const w = new BrowserWindow({ show: false }); + w.loadFile(path.join(fixturesPath, 'pages', 'blank.html')); + const { ok, err } = await w.webContents.executeJavaScript('navigator.mediaDevices.getDisplayMedia({video: true}).then(s => ({ok: true}), e => ({ok: false, err: e.message}))'); + expect(ok).to.be.false(); + expect(err).to.equal('Not supported'); + }); }); describe('window.opener access', () => { From 1b96a3aa1d81837fa08b018bbb97c5917d1d8f45 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 20 Jul 2022 11:14:54 +0200 Subject: [PATCH 602/811] build: consolidate gn templates (#34918) --- build/asar.gni | 37 +++++++------------ build/node.gni | 21 ----------- patches/node/build_add_gn_build_files.patch | 39 +++++++++++++++++++-- 3 files changed, 50 insertions(+), 47 deletions(-) delete mode 100644 build/node.gni diff --git a/build/asar.gni b/build/asar.gni index 3e11845bd59bb..b8b290da2c670 100644 --- a/build/asar.gni +++ b/build/asar.gni @@ -1,33 +1,22 @@ -import("node.gni") +template("node_action") { + assert(defined(invoker.script), "Need script path to run") + assert(defined(invoker.args), "Need script arguments") -# TODO(MarshallOfSound): Move to electron/node, this is the only place it is used now -# Run an action with a given working directory. Behaves identically to the -# action() target type, with the exception that it changes directory before -# running the script. -# -# Parameters: -# cwd [required]: Directory to change to before running the script. -template("chdir_action") { action(target_name) { forward_variables_from(invoker, - "*", [ - "script", - "args", + "deps", + "public_deps", + "sources", + "inputs", + "outputs", ]) - assert(defined(cwd), "Need cwd in $target_name") - script = "//electron/build/run-in-dir.py" - if (defined(sources)) { - sources += [ invoker.script ] - } else { - assert(defined(inputs)) - inputs += [ invoker.script ] + if (!defined(inputs)) { + inputs = [] } - args = [ - rebase_path(cwd), - rebase_path(invoker.script), - ] - args += invoker.args + inputs += [ invoker.script ] + script = "//electron/build/run-node.py" + args = [ rebase_path(invoker.script) ] + invoker.args } } diff --git a/build/node.gni b/build/node.gni deleted file mode 100644 index 6d7882d34620e..0000000000000 --- a/build/node.gni +++ /dev/null @@ -1,21 +0,0 @@ -template("node_action") { - assert(defined(invoker.script), "Need script path to run") - assert(defined(invoker.args), "Need script arguments") - - action(target_name) { - forward_variables_from(invoker, - [ - "deps", - "public_deps", - "sources", - "inputs", - "outputs", - ]) - if (!defined(inputs)) { - inputs = [] - } - inputs += [ invoker.script ] - script = "//electron/build/run-node.py" - args = [ rebase_path(invoker.script) ] + invoker.args - } -} diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 69142b12e0d62..778d72eb5e98f 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -7,12 +7,12 @@ This adds GN build files for Node, so we don't have to build with GYP. diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..4afca42d22ee702af50da92aa08c1de897891424 +index 0000000000000000000000000000000000000000..9e34a074cfa7dec61c4e11821ba5f1969f393dfb --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,403 @@ -+import("//electron/build/asar.gni") +import("//v8/gni/v8.gni") ++import("node.gni") + +declare_args() { + # Enable the V8 inspector protocol for use with node. @@ -1593,6 +1593,41 @@ index 0000000000000000000000000000000000000000..a2cfdffcd7308b73c5c302ebc4b946c6 + "//v8/include/v8.h" + ] +} +diff --git a/node.gni b/node.gni +new file mode 100644 +index 0000000000000000000000000000000000000000..9b1a4048a4a64c36d88de0bbe1a548c906aaa22c +--- /dev/null ++++ b/node.gni +@@ -0,0 +1,29 @@ ++# Run an action with a given working directory. Behaves identically to the ++# action() target type, with the exception that it changes directory before ++# running the script. ++# ++# Parameters: ++# cwd [required]: Directory to change to before running the script. ++template("chdir_action") { ++ action(target_name) { ++ forward_variables_from(invoker, ++ "*", ++ [ ++ "script", ++ "args", ++ ]) ++ assert(defined(cwd), "Need cwd in $target_name") ++ script = "//electron/build/run-in-dir.py" ++ if (defined(sources)) { ++ sources += [ invoker.script ] ++ } else { ++ assert(defined(inputs)) ++ inputs += [ invoker.script ] ++ } ++ args = [ ++ rebase_path(cwd), ++ rebase_path(invoker.script), ++ ] ++ args += invoker.args ++ } ++} diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb3048361d9d591 From 9e0a3c44dd9dd55367f5c7b7fceb11460e1e6e40 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 13:03:34 +0200 Subject: [PATCH 603/811] chore: bump chromium to 105.0.5187.0 (main) (#34921) * chore: bump chromium in DEPS to 105.0.5179.0 * chore: update patches * 3758224: Reland^2 "[flags] Enable freezing of flags" https://chromium-review.googlesource.com/c/v8/v8/+/3758224 * chore: bump chromium in DEPS to 105.0.5181.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5183.0 * chore: bump chromium in DEPS to 105.0.5185.0 * chore: bump chromium in DEPS to 105.0.5187.0 * chore: update patches * 3723298: Pass RemoteFrame mojo channels through its creation messages. https://chromium-review.googlesource.com/c/chromium/src/+/3723298 * 3737382: [Code Heath] Replace base::{ListValue,DictionaryValue} in skia et al https://chromium-review.googlesource.com/c/chromium/src/+/3737382 * Pass RemoteFrame mojo channels through its creation messages. https://chromium-review.googlesource.com/c/chromium/src/+/3723298 * Changed PrintRenderFrame.PrintWithParams mojo interface to use callback. https://chromium-review.googlesource.com/c/chromium/src/+/3761203 * 3738183: [CSP] Add support for `DisableWasmEval` https://chromium-review.googlesource.com/c/chromium/src/+/3738183 * 3740498: Move LinuxUI from //ui/views/linux_ui to //ui/linux https://chromium-review.googlesource.com/c/chromium/src/+/3740498 * 3558277: Moves subsystem and semantics to enum class https://chromium-review.googlesource.com/c/chromium/src/+/3558277 * chore: fix broken steps-electron-gn-check * 3749583: [arm64] Fix undefined symbol linker error https://chromium-review.googlesource.com/c/v8/v8/+/3749583 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: Shelley Vohr --- .circleci/config/base.yml | 14 +++- BUILD.gn | 3 +- DEPS | 2 +- ...client_precreatemessageloop_callback.patch | 2 +- .../add_didinstallconditionalfeatures.patch | 20 ++--- ..._scheduler_throttling_per_renderview.patch | 14 ++-- ..._secondary_label_via_simplemenumodel.patch | 4 +- patches/chromium/blink_file_path.patch | 4 +- patches/chromium/blink_local_frame.patch | 8 +- ..._depend_on_packed_resource_integrity.patch | 20 ++--- patches/chromium/can_create_window.patch | 34 ++++---- ...screationoverridden_with_full_params.patch | 10 +-- .../crash_allow_setting_more_options.patch | 14 ++-- patches/chromium/dcheck.patch | 14 ---- patches/chromium/disable-redraw-lock.patch | 2 +- .../disable_color_correct_rendering.patch | 14 ++-- ...le_freezing_flags_after_init_in_node.patch | 6 +- patches/chromium/disable_hidden.patch | 4 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 2 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 2 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 6 +- .../extend_apply_webpreferences.patch | 2 +- ...screen_rendering_with_viz_compositor.patch | 2 +- ..._raw_response_headers_from_urlloader.patch | 6 +- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- patches/chromium/frame_host_manager.patch | 8 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...as_avoid_usage_of_private_macos_apis.patch | 4 +- .../mas_disable_remote_accessibility.patch | 2 +- .../chromium/mas_disable_remote_layer.patch | 8 +- ...emote_certificate_verification_logic.patch | 14 ++-- .../chromium/notification_provenance.patch | 6 +- patches/chromium/printing.patch | 60 +++++++------- ...r_changes_to_the_webcontentsobserver.patch | 10 +-- .../render_widget_host_view_base.patch | 4 +- patches/chromium/resource_file_conflict.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- ...andboxed_ppapi_processes_skip_zygote.patch | 2 +- patches/chromium/web_contents.patch | 12 +-- patches/chromium/webview_fullscreen.patch | 12 +-- .../worker_context_will_destroy.patch | 12 +-- ...feat_add_hook_to_notify_script_ready.patch | 16 ++-- patches/v8/.patches | 1 - patches/v8/build_gn.patch | 8 +- ...ild_remove_legacy_oom_error_callback.patch | 22 ++--- patches/v8/cherry-pick-5e227bebf193.patch | 72 ----------------- patches/v8/dcheck.patch | 6 +- ...export_private_v8_symbols_on_windows.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attribute_for_older_msvc_versions.patch | 2 +- ..._terminating_exception_in_microtasks.patch | 8 +- ...workaround_an_undefined_symbol_error.patch | 6 +- .../browser/api/electron_api_web_contents.cc | 4 +- shell/browser/electron_browser_client.cc | 4 +- shell/browser/electron_browser_main_parts.cc | 8 +- shell/browser/javascript_environment.cc | 1 + .../printing/print_view_manager_electron.cc | 80 ++++++++----------- .../printing/print_view_manager_electron.h | 9 +-- ...electron_desktop_window_tree_host_linux.cc | 2 +- .../electron_desktop_window_tree_host_linux.h | 12 +-- shell/browser/ui/gtk/app_indicator_icon.h | 6 +- shell/browser/ui/gtk/gtk_status_icon.h | 6 +- shell/browser/ui/gtk/status_icon.cc | 2 +- shell/browser/ui/gtk/status_icon.h | 4 +- shell/browser/ui/tray_icon_gtk.h | 8 +- .../ui/views/client_frame_view_linux.cc | 53 ++++++++---- .../ui/views/client_frame_view_linux.h | 26 +++--- .../ui/views/electron_views_delegate.cc | 2 +- shell/browser/web_view_guest_delegate.cc | 5 +- .../common/gin_converters/value_converter.cc | 6 +- spec-main/chromium-spec.ts | 2 +- 78 files changed, 366 insertions(+), 432 deletions(-) delete mode 100644 patches/v8/cherry-pick-5e227bebf193.patch diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 2f4d58e751e7f..61ee7d31ddf65 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -1006,9 +1006,17 @@ steps-electron-gn-check: &steps-electron-gn-check - *step-generate-deps-hash - *step-touch-sync-done - maybe-restore-portaled-src-cache - - *step-wait-for-goma - - *step-gn-gen-default - - *step-gn-check + - run: + name: Ensure src checkout worked + command: | + if [ ! -d "src/third_party/blink" ]; then + echo src cache was not restored for an unknown reason + exit 1 + fi + - run: + name: Wipe Electron + command: rm -rf src/electron + - *step-checkout-electron steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change steps: diff --git a/BUILD.gn b/BUILD.gn index 407bdedffccaf..ec385d1e8c8df 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -566,8 +566,9 @@ source_set("electron_lib") { "//ui/base/ime/linux", "//ui/events/devices/x11", "//ui/events/platform/x11", + "//ui/linux:linux_ui", + "//ui/linux:linux_ui_factory", "//ui/views/controls/webview", - "//ui/views/linux_ui:linux_ui_factory", "//ui/wm", ] if (ozone_platform_x11) { diff --git a/DEPS b/DEPS index 263fae42a7b34..110026e134caf 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '105.0.5173.0', + '105.0.5187.0', 'node_version': 'v16.15.1', 'nan_version': diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 9cb88ba5ded9f..1b789c2492f9b 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index ff57e2a67ccc37be912ba3fca9df4b9e28898c6e..0045b3c1b89728e3950929b49e15bbc67a826c02 100644 +index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf46257123 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 324d264d1abd3..9db40d62e73bf 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index eaf9a9483d89cd47bef63ff7f2868c0174a3c3bb..19bd5ef930bc094b315d2562c0f4917e78f63bad 100644 +index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749e3735a08 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4397,6 +4397,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4435,6 +4435,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index eaf9a9483d89cd47bef63ff7f2868c0174a3c3bb..19bd5ef930bc094b315d2562c0f4917e int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index feca00f2e36d1c02be5e56e787ea8f67eab45df6..9a4c57ddb3aebff2365ea7563803b169c7787c5e 100644 +index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef98153923101 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -605,6 +605,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index feca00f2e36d1c02be5e56e787ea8f67eab45df6..9a4c57ddb3aebff2365ea7563803b169 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 9e2dc9b2ea07a1f9bdfd92284f73dd1977ea1437..18c07f44196e83cf16cace6863e3db368a86ce0d 100644 +index acb427e4a6688f14f4a6ceaec8bf3988525c5e08..35623174f16399d5fff637a07554e43c55f902d1 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -605,6 +605,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -606,6 +606,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -67,10 +67,10 @@ index 9e2dc9b2ea07a1f9bdfd92284f73dd1977ea1437..18c07f44196e83cf16cace6863e3db36 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 a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b094153778e18b 100644 +index c8af53d40eaa1dd3a0067948a8cda80d1599cee3..4de918ee52efa7ec27a21aa2f57616d31dfd07d1 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 -@@ -207,6 +207,7 @@ void LocalWindowProxy::Initialize() { +@@ -209,6 +209,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -123,10 +123,10 @@ index c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f4 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 6b4142bf7f85c64af6f845613568679276c7e698..21462bb2196b353c32cf05d0c53635ac77673567 100644 +index d44adfd65bd9a71996cdd323a5220d2dcaa09de2..1011a318a7d79186abe556d03f78badc725c802a 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -359,6 +359,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} 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 688159b6c492e..79081580812fe 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 1f6d9be10432416f591a616805494b5d78975df1..e73f70c62ac2e69c918bdf39bd53f74a47066f4e 100644 +index 261e1dda1e128e22d15f3454f9012265db45bd74..98b130f0791d1ca2d59ef62151df7e60f3f40831 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -665,6 +665,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -666,6 +666,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -73,7 +73,7 @@ index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319 + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 99f0ceb45972df14813b72300e6a59710f13597f..f5e15865bf0bad73d9505698e788c1e954f46c2c 100644 +index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc2cfb7342 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h @@ -361,6 +361,7 @@ class WebView { @@ -85,10 +85,10 @@ index 99f0ceb45972df14813b72300e6a59710f13597f..f5e15865bf0bad73d9505698e788c1e9 // 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 96d329c005ad74f2409c42d2ef8e62b28a18174d..3e28873ed5181756ab62e14ca9c2c4b27b4378f1 100644 +index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc90e458696 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3723,6 +3723,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3742,6 +3742,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 96d329c005ad74f2409c42d2ef8e62b28a18174d..3e28873ed5181756ab62e14ca9c2c4b2 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3734,7 +3741,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3753,7 +3760,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,7 +113,7 @@ index 96d329c005ad74f2409c42d2ef8e62b28a18174d..3e28873ed5181756ab62e14ca9c2c4b2 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 6a36275fdd7ac12f91a40b60284b73fc93679749..f264c5ee5c2c38d4ccf15877accfdc31c48ec9f9 100644 +index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bbaa7584225 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, diff --git a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch index 1b4e797564bb2..3a1665ce876f7 100644 --- a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch +++ b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch @@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976 diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc -index a787411f89e2d95e2fa636a7cc6723bdd227e563..f8c67d10957c26fbcd21fa1fe05507efd78f1c29 100644 +index 20a3b1efcb52be5e10dc184df620ec8102f2aff3..dfebc65b2ce180e4cd175ab8d09ad7e16f6b8df5 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc @@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId( @@ -47,7 +47,7 @@ index a787411f89e2d95e2fa636a7cc6723bdd227e563..f8c67d10957c26fbcd21fa1fe05507ef return items_[ValidateItemIndex(index)].minor_text; } diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h -index bd2ebaf9f84946c708eba13c18869afadd2fdbb0..880d6f12ad188c5f8abf037b3b8d27fcf1fc2cb6 100644 +index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af83735bd7 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h @@ -49,6 +49,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { diff --git a/patches/chromium/blink_file_path.patch b/patches/chromium/blink_file_path.patch index ace4aa5924cca..8185b75732fb6 100644 --- a/patches/chromium/blink_file_path.patch +++ b/patches/chromium/blink_file_path.patch @@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See documentation at https://electronjs.org/docs/api/file-object diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h -index 72d6b7e109779c9785130ebb0e1e23202c5bc68d..e12c4acfd87f1d698d7c8c8459e7231ee03789fd 100644 +index c061962bec620d2da0e217d8f55b7db57d120f97..59d9946ecfb7d68b41f539ce7c29c7398e00e9b2 100644 --- a/third_party/blink/renderer/core/fileapi/file.h +++ b/third_party/blink/renderer/core/fileapi/file.h -@@ -212,6 +212,9 @@ class CORE_EXPORT File final : public Blob { +@@ -211,6 +211,9 @@ class CORE_EXPORT File final : public Blob { } const String& name() const { return name_; } diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index d70c093f57788..a6d6dfc7533ef 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,10 +15,10 @@ 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 80f4314d205f4cbf0d92a331062f8a01a46d6917..2e5c15fc2cf5d0db8d26c1eeb759f6d2837e0656 100644 +index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583fd836051 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc -@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) { +@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) { DCHECK(!IsDetached()); @@ -33,7 +33,7 @@ index 80f4314d205f4cbf0d92a331062f8a01a46d6917..2e5c15fc2cf5d0db8d26c1eeb759f6d2 if (type == FrameDetachType::kRemove) { if (provisional_frame_) { provisional_frame_->Detach(FrameDetachType::kRemove); -@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -155,6 +147,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,7 +49,7 @@ index 80f4314d205f4cbf0d92a331062f8a01a46d6917..2e5c15fc2cf5d0db8d26c1eeb759f6d2 // 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 4730c853097462638d3bc41b7c905874ab3dc29a..18615761121f83262da362b10b8022f80809ea07 100644 +index 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a294c27bb71 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { 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 9fee1e07d8327..9b872d4b44337 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 672bc56194e1ad8b03acd639c17b7f7e67a5dba0..59ba25815e511af5ca6aca5467cc91d5cc3c6bf1 100644 +index a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020687314c2 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -175,11 +175,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 672bc56194e1ad8b03acd639c17b7f7e67a5dba0..59ba25815e511af5ca6aca5467cc91d5 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index fdc5d388f80dcae2f1dd8a05d7d24ed5e59250b5..4570ad0308083a62e56a5fa9c91866f9216eed5f 100644 +index 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884b97ec8b5 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4582,7 +4582,7 @@ static_library("browser") { +@@ -4574,7 +4574,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,18 +46,18 @@ index fdc5d388f80dcae2f1dd8a05d7d24ed5e59250b5..4570ad0308083a62e56a5fa9c91866f9 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 5584fa001cf9bb0fab31cc6de053a536d18c4492..6541358b2a5d41f94c1e2d5a9d57ce20661f61a7 100644 +index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8e85e46cd 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5953,7 +5953,6 @@ test("unit_tests") { +@@ -5963,7 +5963,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", - "//chrome:packed_resources_integrity", "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", - "//chrome/browser:chrome_process_finder", -@@ -5977,6 +5976,10 @@ test("unit_tests") { + "//chrome/app:crash_reporter_client_win_unit_tests", +@@ -5988,6 +5987,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,16 +68,16 @@ index 5584fa001cf9bb0fab31cc6de053a536d18c4492..6541358b2a5d41f94c1e2d5a9d57ce20 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6867,7 +6870,7 @@ test("unit_tests") { +@@ -6879,7 +6882,7 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", + # "//chrome:packed_resources_integrity_hash", - "//chrome/browser/ash/system_web_apps/test_support", "//chrome/browser/enterprise/connectors/analysis:features", "//chrome/browser/media/router:test_support", -@@ -6982,6 +6985,10 @@ test("unit_tests") { + "//chrome/browser/media/router/discovery:discovery", +@@ -6993,6 +6996,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index d148c0eb9c8c8..f29b6178fa7ff 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 59ad3749cee7f8892884033d7507def1314aec75..187b94d207570a77f058915b9e5b581c777adc5a 100644 +index bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf633a324c7 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7221,6 +7221,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7283,6 +7283,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 59ad3749cee7f8892884033d7507def1314aec75..187b94d207570a77f058915b9e5b581c &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2cd68060a6d73b12190692f5973224e4816630bb..c9f744c73f95ad6e63077fbfad2e0c935e6c44c1 100644 +index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806d2a9e38c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3983,6 +3983,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3990,6 +3990,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 2cd68060a6d73b12190692f5973224e4816630bb..c9f744c73f95ad6e63077fbfad2e0c93 new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -4027,12 +4035,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4034,12 +4042,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 2cd68060a6d73b12190692f5973224e4816630bb..c9f744c73f95ad6e63077fbfad2e0c93 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 ac5575971f18588c25438a7285e1c25037c14b1b..af3c7dbb09de31e4079406cb5e18b5ffcc6e867c 100644 +index cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd698887604 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -579,6 +579,10 @@ struct CreateNewWindowParams { +@@ -587,6 +587,10 @@ struct CreateNewWindowParams { // Additional parameters for creating picture-in-picture windows. blink.mojom.PictureInPictureWindowOptions? pip_options; @@ -68,10 +68,10 @@ index ac5575971f18588c25438a7285e1c25037c14b1b..af3c7dbb09de31e4079406cb5e18b5ff // 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 3101f5faa5d87f10e0859e8a09c6ebb2678eb478..39682dddf0ec449f0bc34124bf3de6f8c216fdf9 100644 +index 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b44ba2c254 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -605,6 +605,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 3101f5faa5d87f10e0859e8a09c6ebb2678eb478..39682dddf0ec449f0bc34124bf3de6f8 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 0d79069d5a54a1a8907e459beb0235b2a78e1fa6..cfe1fc63e293cb2bcafb6c9e6778ee39ef266e89 100644 +index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823ddda956c4 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -164,6 +164,7 @@ class NetworkService; +@@ -165,6 +165,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index 0d79069d5a54a1a8907e459beb0235b2a78e1fa6..cfe1fc63e293cb2bcafb6c9e6778ee39 } // namespace network namespace sandbox { -@@ -977,6 +978,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -993,6 +994,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -124,7 +124,7 @@ index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 348dcde05d71e7d16e4c7bb1d8d9f8718070e669..5a9cc64d6e0d9d01f5dc133c7fcab34101bc32db 100644 +index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f064987b4d4d3 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,7 +150,7 @@ index 348dcde05d71e7d16e4c7bb1d8d9f8718070e669..5a9cc64d6e0d9d01f5dc133c7fcab341 // 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 11eaa6b307811b0b327c60ca8ee343331ed18b1b..87f35d4477fef2d6f5ee58455c10e1780a090ef9 100644 +index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569695b197e 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -315,6 +315,10 @@ WebView* RenderViewImpl::CreateView( @@ -165,7 +165,7 @@ index 11eaa6b307811b0b327c60ca8ee343331ed18b1b..87f35d4477fef2d6f5ee58455c10e178 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index e757a73ad55c997357bc26015423b69aaa3e895e..089b9e92b0b156fcdcf4b391c24b988a22e312c7 100644 +index d6dd69c53b66a89ea63927319d7b385f91921ea2..71748596f4d05de73263ed11b122d75a38b49616 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc @@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -212,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 6633a96d4eafce752b6a1dace29390203d7c4ac0..cb340f174618bd1c38e4216d85eb57f293f3367c 100644 +index ec10f16c6e6c5507ad2fb0afe306a744885eb58e..3f7a069c3f1b8412074864eb99bf47469a699837 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2100,6 +2100,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2084,6 +2084,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index aea8f9f1c17c5..674924efd4bbe 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 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index ce86697e47437832cd0d9692e44a19885f3b7174..62f3371827343fb30d3202f78af70968f169d9f2 100644 +index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a47e867c7a 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1794,12 +1794,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 a06d49c3ed7d809ddd3ab43f1cc4e3044a6b14d2..1ebb4970ef9c440c5c2584785397696c7ebc14ce 100644 +index ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2b8de1a5e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3909,8 +3909,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3916,8 +3916,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -274,7 +274,7 @@ index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb5 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 5a9cc64d6e0d9d01f5dc133c7fcab34101bc32db..166e506f1afbcb1a3a661479d489e71d8d8ff552 100644 +index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f0340295339c7838e5 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate { diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index b9e607f84e898..f4516dfd22cd5 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -21,10 +21,10 @@ index 6aa864db880408bf7021ac58673f4d8d489426b4..1fa85302da7a64abc42fd9558ddbcaf6 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 82b7f241e26184240260d0b6287ded159681e15b..abbb267f6a40de0cdf4d09700f9dd444a575fbdf 100644 +index 463f92a6e547006a46119f52203482dd6695a84a..34e6f087613d76947ae463fda2b107fad6ec14e9 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc -@@ -141,6 +141,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { +@@ -145,6 +145,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { return false; } @@ -43,7 +43,7 @@ index 82b7f241e26184240260d0b6287ded159681e15b..abbb267f6a40de0cdf4d09700f9dd444 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 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4353e2487 100644 +index 2532e99f00b39777cd9640c76704f7430d39502e..323e039e4591a4099b187f7a0097b4ee8be11a9f 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 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4 #include #include "build/build_config.h" -@@ -146,6 +147,19 @@ class CrashReporterClient { +@@ -151,6 +152,19 @@ class CrashReporterClient { // that case, |breakpad_enabled| is set to the value enforced by policies. virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); @@ -128,10 +128,10 @@ index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index 80f33dc5e2f2ed330e0726a5735b247ea8e99fd7..b96bf703f6b691886d6e4d5cd6d775945a8995e1 100644 +index ad401a7711ceff58abacb99a03fda258fccd12a0..de04f4df602e3a0b20af045111faf8a7bf8e9e28 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -90,6 +90,7 @@ bool PlatformCrashpadInitialization( +@@ -91,6 +91,7 @@ bool PlatformCrashpadInitialization( std::map process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -139,7 +139,7 @@ index 80f33dc5e2f2ed330e0726a5735b247ea8e99fd7..b96bf703f6b691886d6e4d5cd6d77594 std::string url = crash_reporter_client->GetUploadUrl(); -@@ -128,6 +129,13 @@ bool PlatformCrashpadInitialization( +@@ -129,6 +130,13 @@ bool PlatformCrashpadInitialization( std::vector arguments(start_arguments); diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index ccc3ddcd8566f..a7f845049f8af 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -16,20 +16,6 @@ example, the checks might be disabled for a whole build target, but actually 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 21e7b1cbada3856a7d91040c259be80ae95df07e..b19206ba58725f949403469a3e1d221b12833581 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 -@@ -542,8 +542,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; - double area = text->PhysicalAreaSize(); diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc index fe8d191217e24b08d36339dbf047beaeb6bd6538..870db0552544e3e89d9498c22ec3db81b46df741 100644 --- a/ui/base/clipboard/clipboard_win.cc diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 0e7e6f5795476..1cf28eb0621d3 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 1e6326a2f36f5a7e55e5193b69c36f870c1d00e7..2f51474d46544915b75185fc362aebf8b83164b0 100644 +index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a11bfee888 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; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 28137ca9aa91c..6f925b949bc91 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 65c468c4b882829fba7ab679c0fec3f637e96522..ca98a6e3992126b564d28e9d4429cd9a69cf7eed 100644 +index 6a148c3173f8f5653b945ed9b6ffcbf48d76d511..b30c2e686ff9b64691142ff893225c60cedeaebd 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1857,6 +1857,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1864,6 +1864,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -80,7 +80,7 @@ index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 4be758a498c1e5b17fd8eea6c5a7719e4252723a..e166e96b4b23725ad8735ab87afd3660ed22de50 100644 +index 9b29ab96d6e7dd7160502ee2252843bdeeab84c9..a9889d625dac9148dd8bbc2853c4e09f6546bd0d 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -92,7 +92,7 @@ index 4be758a498c1e5b17fd8eea6c5a7719e4252723a..e166e96b4b23725ad8735ab87afd3660 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 ece0f7a284fc87f879d21e754b0b050236081d61..68277794cf54100592f36f0c95985b2911074c52 100644 +index 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c27a154460 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -199,6 +199,7 @@ @@ -103,7 +103,7 @@ index ece0f7a284fc87f879d21e754b0b050236081d61..68277794cf54100592f36f0c95985b29 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3195,6 +3196,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3185,6 +3186,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[] = { @@ -166,7 +166,7 @@ index 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937 // 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 e030f01e72d18ef08d04ffbc72a5abb9a7b485c5..25155263bede8a465eb3f3bc2960f173c8f14935 100644 +index 8bdb9fafc4c5e59d6d6aad323ca2547ecc1b4069..069ed9744dca4fb208daaaf76d4618706c65b84e 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -20,6 +20,7 @@ @@ -192,7 +192,7 @@ index e030f01e72d18ef08d04ffbc72a5abb9a7b485c5..25155263bede8a465eb3f3bc2960f173 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -311,6 +320,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -312,6 +321,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index 908c926de71b6..0a4782f3fd4a5 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,7 +15,7 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index 02b4f803369202a81f2d54f3b35aef04be13dfa2..76dd21fc8e97c1a2836ae5a5a11b56334a656fe2 100644 +index 02b4f803369202a81f2d54f3b35aef04be13dfa2..04a8d29ba210313076eacf5074ed86402160c0c3 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -222,7 +222,8 @@ RenderProcessImpl::RenderProcessImpl() @@ -23,8 +23,8 @@ index 02b4f803369202a81f2d54f3b35aef04be13dfa2..76dd21fc8e97c1a2836ae5a5a11b5633 "--no-wasm-dynamic-tiering"); - v8::V8::SetFlagsFromString("--freeze-flags-after-init"); -+ // This conflicts with node in the renderer. -+ //v8::V8::SetFlagsFromString("--freeze-flags-after-init"); ++ // Freezing flags after init conflicts with node in the renderer. ++ v8::V8::SetFlagsFromString("--no-freeze-flags-after-init"); #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 980679fa1db0b..c0a58fa2a1c4d 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 4b4a91a3fb6156ced046b414c131bc348f15b79f..852118f2599087c971ee6475f670a1f0e9d64bd3 100644 +index 3c934fe49b745d79d502311af02c4b2409f87742..5647890d0f62bcd5b1d1b2e6adc511b262a83b7f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index 4b4a91a3fb6156ced046b414c131bc348f15b79f..852118f2599087c971ee6475f670a1f0 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 f63c1aa3007fa532af250e6f222ab588d949dccc..6183ee520b48e09958f320c1091a80ce947f21b7 100644 +index 4c568e15eaf82231004e89590dfe2e28e6ba0ac0..2ba5e20d961494995c11ac2a40d2c78b8b3d7de0 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl 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 2e26a11244292..d800d93049955 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 @@ -20,7 +20,7 @@ index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944 using PCScan = internal::PCScan; const auto invocation_mode = flags & PurgeFlags::kAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index 418efcb3c08c67e86ae3a0728f37c5a4b9e56e06..f5c3a127c4ac535773f087f8ee2306ab0433fbe6 100644 +index 714232b0c2707d6c256e634ff784c18322bf0a85..48c8d0051c427954fe7265fee9cd0c6b5f473984 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc @@ -44,6 +44,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 6f739d8b35bfb..f6fb27f797122 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 19bd5ef930bc094b315d2562c0f4917e78f63bad..bb1c66173df927499f1f28039f2255e3d6c28c96 100644 +index 3e186230715aaf840959a93038167749e3735a08..4c2dbe2b7629c94a16620988ae96fb10da39e0b8 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2287,7 +2287,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2294,7 +2294,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 4a0fa298d2719..5ecf357e66296 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -19,7 +19,7 @@ index d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 2f51474d46544915b75185fc362aebf8b83164b0..c893bc030b266539f65d31bdc40ba0ba31b70986 100644 +index 81f59c4476cd07930fc302ecbf0377a11bfee888..70e33b49e77240248c629fb18c5d3ca57ea32d66 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -1001,8 +1001,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { 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 8f885d9d4f187..d7180a32d1724 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 2f2e0d67c7141e5daad2d50031c71a542677e108..c53bd76fcd3703cb483949d5ec53f24f v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index 9e79f7e411a3242e3e7662933389e05b94a4818c..05e3156571ac0dc9ff71464b8e73d74db96496a0 100644 +index b02ab8b6ac701d948daac73bd89bc1fc6533d60c..36c096b4c053eae9326c8ccb7ed6aea07b68c3e5 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index ee5737d525899..4b9312ed4d48d 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 61030982c4391dd1b4b508042628e7f006047158..c4f422553185d416a6abfd4647b219060705d0ad 100644 +index d53e403bda407bb46f59395ebcbb39cd9495875b..4850469bb2bd96c87b0aa936c654f7bd58b7b17f 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1406,6 +1406,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1410,6 +1410,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index 61030982c4391dd1b4b508042628e7f006047158..c4f422553185d416a6abfd4647b21906 // 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 d88d9d2bc4b95464ca9a8cacec33361f12d25ea4..74415ce53dc6d0b3e39dbe27ae9e225b281c8820 100644 +index 614ba5b278f8bed722072ca07399b247ddb971be..21024709a79dc2bb838492090ce1365450427430 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -296,6 +296,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 8af2374fb4170..c48ce3e718343 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 3e28873ed5181756ab62e14ca9c2c4b27b4378f1..831b6bab8e491fc0750ecf05b3ef0f105a5478f4 100644 +index 9151815e6bf33a3a6980f8337f578dc90e458696..664b8c2b0a3eb5da577a6ac9d70cafff4702a622 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -161,6 +161,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 61987a15de836..58c3b92a3edbe 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -572,7 +572,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index e0345f5903a48013930767bee713c177a704970a..2881a4fee66f16e6367724a727abe4643a965a24 100644 +index 5dee5932ce9cacc68af498ef2312fd58cd285e15..d8f977154e5f0c0456ee03ddf67f94b0e7ab475d 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -83,6 +83,7 @@ class DisplayPrivate; 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 7efba47601775..0771278f2d6df 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -103,7 +103,7 @@ index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 04ed3a3391b82751d0014027caf37c402a8f068a..7140c4ced6265c388a4015350b1da5d487a02569 100644 +index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239ab71ae00 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -603,6 +603,7 @@ URLLoader::URLLoader( @@ -114,7 +114,7 @@ index 04ed3a3391b82751d0014027caf37c402a8f068a..7140c4ced6265c388a4015350b1da5d4 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -794,7 +795,7 @@ URLLoader::URLLoader( +@@ -792,7 +793,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 04ed3a3391b82751d0014027caf37c402a8f068a..7140c4ced6265c388a4015350b1da5d4 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1536,6 +1537,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1541,6 +1542,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index ed93dd0e68f24..4931611c59b59 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 5f200acb893f6c6b4ffb7c5a6ca010dde8a245e9..c3a5751233c48255408db41c10118ffde72f51d6 100644 +index 6f01f3eb8df96320700448e4583e4a4a0b3d2beb..e3c9f87e651be09fd40f1f51b3f9ba6fb18a770b 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3440,7 +3440,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3447,7 +3447,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 2ad1da6657694..1fedb8674bcc3 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 c893bc030b266539f65d31bdc40ba0ba31b70986..b1e8daf5e79cd838c87e01da0e764e12421747db 100644 +index 70e33b49e77240248c629fb18c5d3ca57ea32d66..3b546cf67089e6677fc668b4d1d6c0863282dff5 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3696,6 +3696,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3694,6 +3694,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 a687e2edd98ac..1c0ed1e2fd326 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,7 +13,7 @@ This patch can be removed should we choose to support chrome.fileSystem or support it enough to fix the crash. diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index a22dd8209fd9c67e9c3637fee61bca5524ee51da..6e3c8da273aa4d24c32200f3d67210eb08ee3dad 100644 +index 96d6028af1408c34f98ee638b8b8d41e8dc8b2ee..6e3c8da273aa4d24c32200f3d67210eb08ee3dad 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts @@ -860,26 +860,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { @@ -60,7 +60,7 @@ index a22dd8209fd9c67e9c3637fee61bca5524ee51da..6e3c8da273aa4d24c32200f3d67210eb - { - type: 'saveFile', - accepts: [{description: '*.pdf', extensions: ['pdf']}], -- suggestedName: fileName +- suggestedName: fileName, - }, - (entry?: FileSystemFileEntry) => { - if (chrome.runtime.lastError) { 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 9eff513345501..abdc12fa40bfd 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 df53d0d8371b2f7bbd04ffe6c2d1c171ae457bc8..688883c80d5005b58c39d66c520726bcc62eeac1 100644 +index 53435224b5e331bbe24119752c1a44a8d58bfa88..de1a5b60474ce872eba03dfb8931b9b566fd6cee 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1823,7 +1823,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1828,7 +1828,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,10 +21,10 @@ index df53d0d8371b2f7bbd04ffe6c2d1c171ae457bc8..688883c80d5005b58c39d66c520726bc // 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 922048fbc03f7222e42e3640b46d3d5e1b2391ba..f2bdadbfaae703006f4888e3dd899a20bac84090 100644 +index a3ae580ea073024882bd860abf914bbf7c0ed54d..85ae2b5ba31926d21ffb52ab31fca6a66ad6d5ec 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -667,6 +667,10 @@ class WebContents : public PageNavigator, +@@ -669,6 +669,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index fd346c08904ef..641d82a1db3ff 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 acfea574749cce9c9babac12593679c1c2c3b1af..0d44d3b022042dbcbb9f188adb90074c752741b8 100644 +index a64114d9eeb56b3dc0389415d44a842d3cda12fb..6c3b36f36e375a626f9fc2a59935c5ac851a128c 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3177,6 +3177,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3184,6 +3184,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index acfea574749cce9c9babac12593679c1c2c3b1af..0d44d3b022042dbcbb9f188adb90074c } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index cfe1fc63e293cb2bcafb6c9e6778ee39ef266e89..bbbdd32152f904d10e040ccf80dd1d1406b3d7a1 100644 +index e0bfafe859b600ac5033f78d1eb5823ddda956c4..e2b0937007413b158ac28e48352acd3ab68e6dd0 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -271,6 +271,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 0e01d9d17a48c..6394ab0ab0cc6 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 1c50dbb9503e755ebbad2ea6d66484331862b72f..b9188ede8a4dc45bb5c573bc2cd8642c9256de36 100644 +index 9a8d321de570ee1a0669aa6022e34f8ff604694f..abcdba63bcbd0b9e323bf482cc292360d30be8fe 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -967,6 +967,11 @@ +@@ -971,6 +971,11 @@ "includes": [4960], }, 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 1bef249bf39cf..1cd1f286df670 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 68b47d4f483b064d7be5a19552cddfe3f2b12bb2..d3191ad5984dcad633cbab5da45824871961d212 100755 +index 194ce0ca751da8677df74489a04e143276264fbe..9df287e5a9d122f26730480d54a1bbfd47e8d95e 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 56b21c48e776f..07ee9fd2c36f0 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -39,7 +39,7 @@ index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a } // namespace base diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index bb1cb98f246f120f566fab65565f49a6468b82b4..929188b8d0e39f171679067347d4f83632364cc7 100644 +index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a182626fee5 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -30,12 +30,6 @@ @@ -76,7 +76,7 @@ index bb1cb98f246f120f566fab65565f49a6468b82b4..929188b8d0e39f171679067347d4f836 if ([ns_val isKindOfClass:[NSFont class]]) { return (CTFontRef)(cf_val); diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index e12c36384ddc05554ed362bba2c0a8b418634f0a..1c740410de70ee5a888ee7cf406dfa3bccc28c9b 100644 +index bf33d321197226a74d4f26731108ad8b0b8c72a0..349dc2cdde63e32daf06f1ccc0d29e7ce8b2ac46 100644 --- a/base/process/launch_mac.cc +++ b/base/process/launch_mac.cc @@ -19,14 +19,19 @@ diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 2e62681443353..51317f699d640 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -197,7 +197,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 7fc550eb16288cc5f4152362504a621abbaec3da..6be133c45a9b8c774b9f6e1e2de492c43bac33d3 100644 +index a922dc6ce99ed32ede8812a63a836f72691bece3..9e4ef4235c49eeb7cd34f05ae2d75169d787fa55 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -341,6 +341,13 @@ component("base") { diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 87a806ed62c58..b31cf0975df7c 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -50,7 +50,7 @@ index 506ff3c2b9a14a725d13e3933bc281d05c0b6b13..9726e2d34d6d123ad3e62d843d21b755 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 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2aab75969 100644 +index 27b0c985b119095bd92ac021db10731a917dfa0c..83bd23a7ed0a5870f226442a6335b26de7676206 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm @@ -60,6 +60,7 @@ @@ -79,7 +79,7 @@ index 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2 } else { IOSurfaceRef io_surface = ca_layer_tree_coordinator_->GetIOSurfaceForDisplay(); -@@ -378,6 +382,7 @@ +@@ -379,6 +383,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -87,7 +87,7 @@ index 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -386,6 +391,7 @@ +@@ -387,6 +392,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -95,7 +95,7 @@ index 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2 } ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { -@@ -464,7 +470,9 @@ +@@ -465,7 +471,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { 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 8af5607e3924d..331914f8c122b 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f006047158 100644 +index 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd9495875b 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -129,6 +129,11 @@ +@@ -130,6 +130,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f0 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -437,6 +442,91 @@ bool GetFullDataFilePath( +@@ -438,6 +443,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f0 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -739,6 +829,13 @@ void NetworkContext::SetClient( +@@ -743,6 +833,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f0 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2303,6 +2400,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2304,6 +2401,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index c2824b6bcfab1c13d0e44ca96fc05c97b4a13a6e..61030982c4391dd1b4b508042628e7f0 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 34b3e31549ee37b58eee4c11c54bd34af73af263..d88d9d2bc4b95464ca9a8cacec33361f12d25ea4 100644 +index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247ddb971be 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -105,6 +105,7 @@ class URLMatcher; +@@ -104,6 +104,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 5978e72355e83..90182fe6604c9 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index db1e97364a68fdc987274f2a7a940d9d63ac111e..8b236cbd54011bc0008d56ca4213920e478f7a90 100644 +index 4b40e3faa498b6c86b381f6efae9d04e48a85c0f..5499f85fa578511d5817ecd9be2f33cf56e2db4b 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2059,8 +2059,9 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2069,8 +2069,9 @@ void RenderProcessHostImpl::CreateNotificationService( // For workers: if (render_frame_id == MSG_ROUTING_NONE) { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -148,7 +148,7 @@ index db1e97364a68fdc987274f2a7a940d9d63ac111e..8b236cbd54011bc0008d56ca4213920e return; } -@@ -2068,7 +2069,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2078,7 +2079,7 @@ void RenderProcessHostImpl::CreateNotificationService( RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index a602cca1f0089..fa69a6ac0c84f 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/BUILD.gn b/BUILD.gn -index 861191e82aa304be0a71dcd356d31767540450ef..1f86538121bfc753b3587d9edaf1553726542af9 100644 +index a3cf0a49943f53608f783f439917c256ec5b9040..d52cc220107218e53290d21ce1c52a7f855385b4 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -974,7 +974,6 @@ if (is_win) { +@@ -973,7 +973,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index 861191e82aa304be0a71dcd356d31767540450ef..1f86538121bfc753b3587d9edaf15537 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -983,6 +982,10 @@ if (is_win) { +@@ -982,6 +981,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -473,7 +473,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0d // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc -index b2bd74f28f70bc601ec47820030ad965b19cf068..027e4c0b78d44b69504d248755bf7f25ff423361 100644 +index f3c3f85edb19489d079dc93411be64828ae581e2..ff303dcbc034cd8f1530fe1543729e98d3035826 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc @@ -21,7 +21,7 @@ FakePrintRenderFrame::FakePrintRenderFrame( @@ -483,10 +483,10 @@ index b2bd74f28f70bc601ec47820030ad965b19cf068..027e4c0b78d44b69504d248755bf7f25 -void FakePrintRenderFrame::PrintRequestedPages() {} +void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value::Dict /*settings*/) {} - void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params) { - NOTREACHED(); + void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params, + PrintWithParamsCallback callback) { diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h -index 42f9f296e6ef65a934167c2d4773e504020378bc..3ac69d39e4eb380f97cb779be1e9ad8706ce8243 100644 +index 0e788384809f9f7218c6483822ffea08f86b4f79..c6f08845cb292ff406db5560c9a744dc7ab1c712 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h +++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h @@ -25,7 +25,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame { @@ -495,14 +495,14 @@ index 42f9f296e6ef65a934167c2d4773e504020378bc..3ac69d39e4eb380f97cb779be1e9ad87 // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; + void PrintRequestedPages(bool silent, ::base::Value::Dict settings) override; - void PrintWithParams(mojom::PrintPagesParamsPtr params) override; + void PrintWithParams(mojom::PrintPagesParamsPtr params, + PrintWithParamsCallback callback) override; void PrintForSystemDialog() override; - void SetPrintPreviewUI( diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d183ce10c0f 100644 +index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a5c621522 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -280,7 +280,7 @@ enum PrintFailureReason { +@@ -285,7 +285,7 @@ union PrintWithParamsResult { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. @@ -511,7 +511,7 @@ index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d18 // Requests the frame to be printed with specified parameters. This is used // to programmatically produce PDF by request from the browser (e.g. over -@@ -362,7 +362,7 @@ interface PrintManagerHost { +@@ -368,7 +368,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] @@ -521,7 +521,7 @@ index f2c17a8fecc36ea18de71598b582e206661763c5..599b34690da042b57fcd78d0c0557d18 // 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 bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7da7d5c9e 100644 +index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991aeed63e6d7 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -560,7 +560,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1391,7 +1393,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1402,7 +1404,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -570,7 +570,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1440,6 +1443,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1451,6 +1454,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -579,7 +579,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2052,7 +2057,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2063,7 +2068,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -589,7 +589,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 // Check if |this| is still valid. if (!weak_this) return; -@@ -2067,7 +2073,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2078,7 +2084,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -600,7 +600,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2075,7 +2083,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2086,7 +2094,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -609,7 +609,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2094,8 +2102,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2105,8 +2113,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -626,7 +626,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 // Check if |this| is still valid. if (!self) return; -@@ -2328,36 +2343,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2364,36 +2379,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -691,7 +691,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2482,7 +2513,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2518,7 +2549,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -701,7 +701,7 @@ index bb0a934fb658256370fe29c6dbc9f72e992a9a5c..da7161c51e94f285d2ad6c9f0e2edba7 std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index c2bf286ef1741b53022adf420809a87c3bb53cfd..f8b38d09abd3253bfd38b874ebdad753c3f8c4db 100644 +index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f0035f4c8f5d 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -255,7 +255,7 @@ class PrintRenderFrameHelper @@ -710,10 +710,10 @@ index c2bf286ef1741b53022adf420809a87c3bb53cfd..f8b38d09abd3253bfd38b874ebdad753 // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; + void PrintRequestedPages(bool silent, base::Value::Dict settings) override; - void PrintWithParams(mojom::PrintPagesParamsPtr params) override; + void PrintWithParams(mojom::PrintPagesParamsPtr params, + PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintForSystemDialog() override; -@@ -327,7 +327,9 @@ class PrintRenderFrameHelper +@@ -328,7 +328,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -724,7 +724,7 @@ index c2bf286ef1741b53022adf420809a87c3bb53cfd..f8b38d09abd3253bfd38b874ebdad753 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -336,12 +338,14 @@ class PrintRenderFrameHelper +@@ -337,12 +339,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -742,10 +742,10 @@ index c2bf286ef1741b53022adf420809a87c3bb53cfd..f8b38d09abd3253bfd38b874ebdad753 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 9b8fe6eecdc7093ba43a324f37bbe380e43dc0c0..88164f568c27dc6bad4cedfd83bd2abeae956c5c 100644 +index 56e3651f7e79957e444ec82b534a07dff9ef7415..43f2d487947eaf77171d918cc5072aee4291290b 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2756,8 +2756,9 @@ source_set("browser") { +@@ -2766,8 +2766,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -758,7 +758,7 @@ index 9b8fe6eecdc7093ba43a324f37bbe380e43dc0c0..88164f568c27dc6bad4cedfd83bd2abe if (is_chromeos) { sources += [ diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc -index 5f6847dcc9aa6970d7c8c4831f2be160c0aa15ad..4bd1f7e3b4c50a319043c8041a9ecf4fa8a99ac1 100644 +index e3c1b29138f175836424bcfe917cd00bd081b34c..7d8b6f06c5d1a7ea9a5ed86c5c612e8df08f2659 100644 --- a/content/browser/utility_sandbox_delegate_win.cc +++ b/content/browser/utility_sandbox_delegate_win.cc @@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) { @@ -778,7 +778,7 @@ index 5f6847dcc9aa6970d7c8c4831f2be160c0aa15ad..4bd1f7e3b4c50a319043c8041a9ecf4f bool UtilitySandboxedProcessLauncherDelegate::GetAppContainerId( diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 93db1a80a360702a36f2d3113c9a83105bf7fffe..c3e012ec8d9a1c19434240d27553e486c0729d43 100644 +index 56ee836445c53c5cde3947fca19d8576d2684f6f..454e26baa8b3688c2af98081085aa5378ff0554b 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -128,7 +128,6 @@ void PrintingContext::UsePdfSettings() { 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 35d277bc7a7a9..8a829b1be7f4c 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 852118f2599087c971ee6475f670a1f0e9d64bd3..ed0e6cff036e76aa266306e5cb4202568ab5b952 100644 +index 5647890d0f62bcd5b1d1b2e6adc511b262a83b7f..9a818c66d76d50e9ba678e7a8e57381315eacf88 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) { @@ -43,10 +43,10 @@ index 852118f2599087c971ee6475f670a1f0e9d64bd3..ed0e6cff036e76aa266306e5cb420256 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c9f744c73f95ad6e63077fbfad2e0c935e6c44c1..a06d49c3ed7d809ddd3ab43f1cc4e3044a6b14d2 100644 +index 14bc2c9e77b7db69d03c00314fe55806d2a9e38c..ad3f25362279d889e800cee3fd20240cc6d176a9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4571,6 +4571,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4587,6 +4587,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index c9f744c73f95ad6e63077fbfad2e0c935e6c44c1..a06d49c3ed7d809ddd3ab43f1cc4e304 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 2ee5a7a78baba5974f99cd98d1ef378b6de2bcd7..df53d0d8371b2f7bbd04ffe6c2d1c171ae457bc8 100644 +index a636e3c31860f67b01c178fd580df466266481ed..53435224b5e331bbe24119752c1a44a8d58bfa88 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -957,6 +957,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) 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 b748495a963c0..334712e8f5286 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -24,7 +24,7 @@ index eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a 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 912a21280fdd53e03cb92404b424f0b26740460a..98dda64426a1489cd44e90a211a6c4f94f62afb7 100644 +index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba71016d60ab99 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 @@ @@ -60,7 +60,7 @@ index 912a21280fdd53e03cb92404b424f0b26740460a..98dda64426a1489cd44e90a211a6c4f9 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -300,6 +307,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -308,6 +315,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 83075078e1b42..c0b985cf6b960 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 06e3385d4f148eb23f9ddf560afb563897846609..672bc56194e1ad8b03acd639c17b7f7e67a5dba0 100644 +index f42cc96b606f07f66a9d4dfacbdcd5b8cb157d21..a9e0afc645b8bd543590e80b55a7461381373187 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1539,7 +1539,7 @@ if (is_chrome_branded && !is_android) { +@@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 06e3385d4f148eb23f9ddf560afb563897846609..672bc56194e1ad8b03acd639c17b7f7e chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1568,6 +1568,12 @@ if (!is_android) { +@@ -1575,6 +1575,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index db1be0f2a4649..1047a3423e7df 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 2f86fff71f36353f1fc3d8024f16dbb4921a1db8..db9d0406637bca783f5a9f0beecbbaaac6d1c1cf 100644 +index 028c190ad21eb1899c61295695931bd2353518a5..9e74a54266460fc51e6b3492c842cda3c0b88538 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1279,7 +1279,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1255,7 +1255,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 0ebb265485662..ee020bad0e1f1 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 8b236cbd54011bc0008d56ca4213920e478f7a90..ece0f7a284fc87f879d21e754b0b050236081d61 100644 +index 5499f85fa578511d5817ecd9be2f33cf56e2db4b..3f0a3b2133f0d48054f33df28b93a9ee40d7ed78 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1752,9 +1752,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1762,9 +1762,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index 7e9b3c98af489..f0a87b75ca482 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,7 +6,7 @@ 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 b0279116fef365106926dd3b5e4cd5f0670c70ae..0b9e71de7a94d8b19b3534e8b8b9a5d56193567b 100644 +index 6e1d72902ec3e4a479304ff39b8b537d23f5cdf3..b7b198b159d250eca1498206ec29cc0270071f2a 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc @@ -8,6 +8,7 @@ diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index bb2a2c91cd389..a8d925dde904d 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 1ebb4970ef9c440c5c2584785397696c7ebc14ce..5f200acb893f6c6b4ffb7c5a6ca010dde8a245e9 100644 +index 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a0b3d2beb 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3059,6 +3059,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3066,6 +3066,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 1ebb4970ef9c440c5c2584785397696c7ebc14ce..5f200acb893f6c6b4ffb7c5a6ca010dd std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3069,6 +3076,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3076,6 +3083,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,10 +35,10 @@ index 1ebb4970ef9c440c5c2584785397696c7ebc14ce..5f200acb893f6c6b4ffb7c5a6ca010dd CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index f1b8dee6699c02884372aa05279d2d23274efdfd..922048fbc03f7222e42e3640b46d3d5e1b2391ba 100644 +index 5c710ded76711125c8e2de8e2c9bce7569548732..a3ae580ea073024882bd860abf914bbf7c0ed54d 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -93,10 +93,13 @@ class BrowserContext; +@@ -94,10 +94,13 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -52,7 +52,7 @@ index f1b8dee6699c02884372aa05279d2d23274efdfd..922048fbc03f7222e42e3640b46d3d5e class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -234,6 +237,10 @@ class WebContents : public PageNavigator, +@@ -236,6 +239,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 1ff868607e31f..2e374e7e83645 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,11 +14,11 @@ 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 187b94d207570a77f058915b9e5b581c777adc5a..55b56c4b18bba342db29bc493e07b27aee1f586a 100644 +index 9c6f51f1667d9bf1b430a83747faebf633a324c7..edc7111e2a61c917ec987264ddfbc4ee55f33730 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6509,6 +6509,15 @@ void RenderFrameHostImpl::EnterFullscreen( - notified_instances.insert(parent_site_instance); +@@ -6565,6 +6565,17 @@ void RenderFrameHostImpl::EnterFullscreen( + } } + // Entering fullscreen from webview should also notify its outer frame. @@ -26,8 +26,10 @@ index 187b94d207570a77f058915b9e5b581c777adc5a..55b56c4b18bba342db29bc493e07b27a + RenderFrameProxyHost* outer_proxy = + frame_tree_node()->render_manager()->GetProxyToOuterDelegate(); + DCHECK(outer_proxy); -+ outer_proxy->GetAssociatedRemoteFrame()->WillEnterFullscreen( -+ options.Clone()); ++ if (outer_proxy->is_render_frame_proxy_live()) { ++ outer_proxy->GetAssociatedRemoteFrame()->WillEnterFullscreen( ++ options.Clone()); ++ } + } + // Focus the window if another frame may have delegated the capability. diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index efef6124f4d55..994967d5e1d8a 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df // 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 a5f2807bfa3bd2515aac5fb2090780720a860314..0533dbcdb64af9ebf3f3dcec36038fe76136a15a 100644 +index e6ed59bb367c2ec8997867d847d79304b5e78be4..f2401245c4feb507966a47c82c66d956802d5ede 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -909,6 +909,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -873,6 +873,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index a5f2807bfa3bd2515aac5fb2090780720a860314..0533dbcdb64af9ebf3f3dcec36038fe7 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 40146f89d1d946674025c51896fed23a9782b4fb..af85bef23dbc259ba4554aaa28cf3c06a80ea437 100644 +index 62370f36f8b19c409e65c3d19a7536a50c7f3d0c..ad67b32366ee276d4a9917e17ce335c3ec507a48 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -191,6 +191,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -183,6 +183,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 40146f89d1d946674025c51896fed23a9782b4fb..af85bef23dbc259ba4554aaa28cf3c06 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 a9ba1b0ec765ee51b1341afe81210e87d2c93c82..2970cb32f408fa812cc006f3c70ec5c55115781b 100644 +index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768af8ba22f 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -675,6 +675,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -638,6 +638,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 f816b1d0f401b..33c10c2fd8b05 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 dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7 // 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 0533dbcdb64af9ebf3f3dcec36038fe76136a15a..6f4019347855650cb2203f59c5568e2a029639a1 100644 +index f2401245c4feb507966a47c82c66d956802d5ede..916fc0110338224c21bc6cc29536a152659e9569 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -921,6 +921,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -885,6 +885,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 0533dbcdb64af9ebf3f3dcec36038fe76136a15a..6f4019347855650cb2203f59c5568e2a 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 af85bef23dbc259ba4554aaa28cf3c06a80ea437..d6368cee4c3a87882bac1d1d63df8698dd96b0fa 100644 +index ad67b32366ee276d4a9917e17ce335c3ec507a48..62bc2b9122733d397093fdba0b2315cb0993cb48 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -191,6 +191,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -183,6 +183,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 af85bef23dbc259ba4554aaa28cf3c06a80ea437..d6368cee4c3a87882bac1d1d63df8698 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 2970cb32f408fa812cc006f3c70ec5c55115781b..808234569ff2fc80945b2707020197302e20d856 100644 +index d7fed3409f1846d9655aa2b4adc89768af8ba22f..169916298918d19f23f4e4dce5a306e94d640226 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -675,6 +675,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -638,6 +638,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -78,10 +78,10 @@ index 2970cb32f408fa812cc006f3c70ec5c55115781b..808234569ff2fc80945b270702019730 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 03288c7b1897ee2c18b80677ee5837246d36568a..fc10bbf3d92c7f88c734d8ecfb20dbc4b72ae200 100644 +index ae3d2a664a9bd758d495f90f237f4f0ae768aef9..b56470ef35862f1b1b2af69bc48d842d2aa4ba7c 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() { +@@ -262,6 +262,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { V8PerContextData* per_context_data = script_state_->PerContextData(); std::ignore = per_context_data->ConstructorForType(global_scope_->GetWrapperTypeInfo()); diff --git a/patches/v8/.patches b/patches/v8/.patches index ea88a8670a84c..0e16c5eabc6fe 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -10,4 +10,3 @@ revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch chore_disable_is_execution_terminating_dcheck.patch build_remove_legacy_oom_error_callback.patch -cherry-pick-5e227bebf193.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 47cea967e99d9..23d717ab96d75 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 c51da9f12ecab41256bf0cdb7a0170e99302dc35..a0154b94bf390b639e1144bc3eb6041631b29716 100644 +index c918081b31fdf15efd325ae9d688f6c4f59aded1..3820a03365e58a05f2df16195ed6061f1c451a05 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -626,7 +626,7 @@ config("internal_config") { +@@ -636,7 +636,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index c51da9f12ecab41256bf0cdb7a0170e99302dc35..a0154b94bf390b639e1144bc3eb60416 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5986,7 +5986,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5999,7 +5999,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index c51da9f12ecab41256bf0cdb7a0170e99302dc35..a0154b94bf390b639e1144bc3eb60416 deps = [ ":v8_libbase", -@@ -6024,6 +6024,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -6037,6 +6037,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/build_remove_legacy_oom_error_callback.patch b/patches/v8/build_remove_legacy_oom_error_callback.patch index 989e15f01b4b0..0fa0b7bbd422d 100644 --- a/patches/v8/build_remove_legacy_oom_error_callback.patch +++ b/patches/v8/build_remove_legacy_oom_error_callback.patch @@ -30,10 +30,10 @@ index b39921dea0415362d1a30159f3fac0e345e2313e..810fc4edaf69565959148d3c1ec662f0 bool is_heap_oom = false; const char* detail = nullptr; diff --git a/include/v8-initialization.h b/include/v8-initialization.h -index 5cadd1788926a7b305ba4d05792b9efa6183d73e..c01c337317afb088927cae0239542281a89d1bb1 100644 +index 66adf98c17998dd81178e515db01ef43daae14d7..224ae0dc6b34b4724192a1b0547be110f796a9b2 100644 --- a/include/v8-initialization.h +++ b/include/v8-initialization.h -@@ -286,9 +286,6 @@ class V8_EXPORT V8 { +@@ -284,9 +284,6 @@ class V8_EXPORT V8 { */ static void SetFatalMemoryErrorCallback(OOMErrorCallback callback); @@ -69,10 +69,10 @@ index b54c7388603b4582356f6741c9a36f2835aa1928..b9533b78046228705e2038396eebf23b void SetOOMErrorHandler(OOMErrorCallback that); diff --git a/src/api/api.cc b/src/api/api.cc -index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a0b9ae99a 100644 +index 9fafa6b0089aabf55984b68cff85e353fe50ce52..9472ad8f4f776f98d398113b22a6a710596b3cde 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -167,13 +167,6 @@ +@@ -171,13 +171,6 @@ namespace v8 { @@ -86,7 +86,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a static OOMErrorCallback g_oom_error_callback = nullptr; static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate, -@@ -231,9 +224,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, +@@ -235,9 +228,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, // Give the embedder a chance to handle the condition. If it doesn't, // just crash. if (g_oom_error_callback) g_oom_error_callback(location, details); @@ -96,7 +96,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a FATAL("Fatal process out of memory: %s", location); UNREACHABLE(); } -@@ -309,9 +299,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, +@@ -313,9 +303,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, } Utils::ReportOOMFailure(i_isolate, location, details); if (g_oom_error_callback) g_oom_error_callback(location, details); @@ -106,7 +106,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a // If the fatal error handler returns, we stop execution. FATAL("API fatal error handler returned after process out of memory"); } -@@ -343,8 +330,6 @@ void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location, +@@ -347,8 +334,6 @@ void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location, const OOMDetails& details) { if (auto oom_callback = i_isolate->oom_behavior()) { oom_callback(location, details); @@ -115,7 +115,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a } else { // TODO(wfh): Remove this fallback once Blink is setting OOM handler. See // crbug.com/614440. -@@ -6141,11 +6126,6 @@ void v8::V8::SetFatalMemoryErrorCallback( +@@ -6175,11 +6160,6 @@ void v8::V8::SetFatalMemoryErrorCallback( g_oom_error_callback = oom_error_callback; } @@ -127,7 +127,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a void v8::V8::SetEntropySource(EntropySource entropy_source) { base::RandomNumberGenerator::SetEntropySource(entropy_source); } -@@ -8654,8 +8634,6 @@ void Isolate::Initialize(Isolate* v8_isolate, +@@ -8702,8 +8682,6 @@ void Isolate::Initialize(Isolate* v8_isolate, #endif if (params.oom_error_callback) { v8_isolate->SetOOMErrorHandler(params.oom_error_callback); @@ -136,7 +136,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a } #if __clang__ #pragma clang diagnostic pop -@@ -9397,8 +9375,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { +@@ -9445,8 +9423,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior) CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior) @@ -146,7 +146,7 @@ index 82ed3b8c44b62d67fc7e897423ca1c1999befb7f..dcae2f80cba468c1a98e589fd68ce60a ModifyCodeGenerationFromStringsCallback2, modify_code_gen_callback2) diff --git a/src/execution/isolate.h b/src/execution/isolate.h -index 00494e347438e92b509ec67f4d77688e091d348b..8c151c8674fdb5d4b3af3de88e97e70239fa8ed7 100644 +index 13100146bdc981480a08156b54649b8f995789ae..9a117c4220704ed512b117aa2f50c3791f8e9189 100644 --- a/src/execution/isolate.h +++ b/src/execution/isolate.h @@ -487,16 +487,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob(); diff --git a/patches/v8/cherry-pick-5e227bebf193.patch b/patches/v8/cherry-pick-5e227bebf193.patch deleted file mode 100644 index 31e47fac5dcf5..0000000000000 --- a/patches/v8/cherry-pick-5e227bebf193.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Noordhuis -Date: Sat, 9 Jul 2022 14:05:56 +0200 -Subject: Fix undefined symbol linker error - -Assembler::CheckBuffer() was defined inline in a header file but without -inline linkage, causing an undefined symbol link error on arm64 macOS. - -Fixes: https://github.com/nodejs/node-v8/issues/233 -Bug: v8:13055 -Change-Id: Ifb638705e95de72b2e8d472e7092e88d77cf8ba8 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749583 -Auto-Submit: Ben Noordhuis -Reviewed-by: Leszek Swirski -Reviewed-by: Jakob Kummerow -Commit-Queue: Leszek Swirski -Cr-Commit-Position: refs/heads/main@{#81749} - -diff --git a/src/codegen/arm64/assembler-arm64-inl.h b/src/codegen/arm64/assembler-arm64-inl.h -index da4201b28307a71e988b50e26fc8854fdcc510d4..60deb07b65b5acaaa1e8762cc57730f366f483d2 100644 ---- a/src/codegen/arm64/assembler-arm64-inl.h -+++ b/src/codegen/arm64/assembler-arm64-inl.h -@@ -1066,21 +1066,6 @@ const Register& Assembler::AppropriateZeroRegFor(const CPURegister& reg) const { - return reg.Is64Bits() ? xzr : wzr; - } - --inline void Assembler::CheckBufferSpace() { -- DCHECK_LT(pc_, buffer_start_ + buffer_->size()); -- if (V8_UNLIKELY(buffer_space() < kGap)) { -- GrowBuffer(); -- } --} -- --V8_INLINE void Assembler::CheckBuffer() { -- CheckBufferSpace(); -- if (pc_offset() >= next_veneer_pool_check_) { -- CheckVeneerPool(false, true); -- } -- constpool_.MaybeCheck(); --} -- - EnsureSpace::EnsureSpace(Assembler* assembler) : block_pools_scope_(assembler) { - assembler->CheckBufferSpace(); - } -diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index 703e4bba9381c57849882e7cb2cdeb751064dd2a..dceda86275d3ef0bfc2b5bea9d8f04957b2e721c 100644 ---- a/src/codegen/arm64/assembler-arm64.h -+++ b/src/codegen/arm64/assembler-arm64.h -@@ -2625,8 +2625,21 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { - } - - void GrowBuffer(); -- V8_INLINE void CheckBufferSpace(); -- void CheckBuffer(); -+ -+ void CheckBufferSpace() { -+ DCHECK_LT(pc_, buffer_start_ + buffer_->size()); -+ if (V8_UNLIKELY(buffer_space() < kGap)) { -+ GrowBuffer(); -+ } -+ } -+ -+ void CheckBuffer() { -+ CheckBufferSpace(); -+ if (pc_offset() >= next_veneer_pool_check_) { -+ CheckVeneerPool(false, true); -+ } -+ constpool_.MaybeCheck(); -+ } - - // Emission of the veneer pools may be blocked in some code sequences. - int veneer_pool_blocked_nesting_; // Block emission if this is not zero. diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index d7b2329787ca3..3dd20921716bf 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 fb22f212024d84555e5a5acdfc70ffa6259b9846..82ed3b8c44b62d67fc7e897423ca1c1999befb7f 100644 +index bbab4c72ac93fe7a5bba5de531e66be0775244ca..9fafa6b0089aabf55984b68cff85e353fe50ce52 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9146,7 +9146,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9194,7 +9194,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,7 +19,7 @@ index fb22f212024d84555e5a5acdfc70ffa6259b9846..82ed3b8c44b62d67fc7e897423ca1c19 i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index df03810a6fea9ee45a9e8dfb8845f8e6eebbcc08..e2a2fdf77d434c504547d7589f67c556f1f2ae2c 100644 +index 5ed434303b6be71dc99abd7600f4ef489f763419..7e2952b9b14f915df72573d6be0813401da0cafb 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -6195,9 +6195,9 @@ void Heap::TearDown() { 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 873945550cda7..9c6435bc65f6d 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 12df5c4fb41f5e710dfeac145d69d6a28e53c064..012e1755e11afed5cb154240cce4c6996790aa57 100644 +index b6a232081301a74ffbffb98311fc29c4015fc9f9..f5d605043e7f43324fd0bdf74f1decf634143cb0 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -626,6 +626,10 @@ config("internal_config") { +@@ -636,6 +636,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 00c560abdb606..823df35e5a67e 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 a0154b94bf390b639e1144bc3eb6041631b29716..12df5c4fb41f5e710dfeac145d69d6a28e53c064 100644 +index 3820a03365e58a05f2df16195ed6061f1c451a05..b6a232081301a74ffbffb98311fc29c4015fc9f9 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5998,7 +5998,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6011,7 +6011,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 8b7b4daa28561..e39d8853848c3 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 714d8a6f057ae98d8809a55e83c323c805170e8d..66ee2bd73b47231c17795ad0b23e558216878cae 100644 +index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb59df80869 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -454,10 +454,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index fa5ea09a847ee..f4802be8f6e88 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index 2d2ac48555bdec0b96acd0cd8aafb47e71d4a53c..81d6204d3efd0f55105ec48ee6627293b2ffe5fc 100644 +index a984d2ce736a2c9a46eb7cc46eb03fc062f508d2..6bda9bc5878b1ee344eac9f9c4420db09a307792 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6156,12 +6156,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6123,12 +6123,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index 2d2ac48555bdec0b96acd0cd8aafb47e71d4a53c..81d6204d3efd0f55105ec48ee6627293 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index 79844e15dff8bcc9da7df17e3b76677c8cd5f87c..7efd34e45a3e263d86f1f3cef54b24c68424a8d4 100644 +index 9633ba5333c4f1c37e706f655fe37c59c4993b86..6022d5d5063bc6c4db1c15e1ffaaf4d5420c0a01 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2532,7 +2532,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2518,7 +2518,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index e25c92d651333..39c674b87d709 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -39,10 +39,10 @@ index 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e1935 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 f12e1ef130451afa1cb334a4ba07bdb2588ccc24..703e4bba9381c57849882e7cb2cdeb751064dd2a 100644 +index e3d8eb27dea2d241933bcb597bef35b46fcd2a09..0a752245ec25c80d5ed34b1a858fa43cc0d6dd40 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h -@@ -2119,11 +2119,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2120,11 +2120,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { return rm.code() << Rm_offset; } @@ -55,7 +55,7 @@ index f12e1ef130451afa1cb334a4ba07bdb2588ccc24..703e4bba9381c57849882e7cb2cdeb75 static Instr Ra(CPURegister ra) { DCHECK_NE(ra.code(), kSPRegInternalCode); -@@ -2147,15 +2143,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2148,15 +2144,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/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 8a6feece589e5..c444deba46a80 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -150,7 +150,7 @@ #endif #if BUILDFLAG(IS_LINUX) -#include "ui/views/linux_ui/linux_ui.h" +#include "ui/linux/linux_ui.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -395,7 +395,7 @@ absl::optional GetCursorBlinkInterval() { if (system_value) return *system_value; #elif BUILDFLAG(IS_LINUX) - if (auto* linux_ui = views::LinuxUI::instance()) + if (auto* linux_ui = ui::LinuxUi::instance()) return linux_ui->GetCursorBlinkInterval(); #elif BUILDFLAG(IS_WIN) const auto system_msec = ::GetCaretBlinkTime(); diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 0eb3bcc1388f2..ca46535c69055 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1541,8 +1541,8 @@ bool ElectronBrowserClient::PreSpawnChild(sandbox::TargetPolicy* policy, ChildSpawnFlags flags) { // Allow crashpad to communicate via named pipe. sandbox::ResultCode result = policy->AddRule( - sandbox::TargetPolicy::SUBSYS_FILES, - sandbox::TargetPolicy::FILES_ALLOW_ANY, L"\\??\\pipe\\crashpad_*"); + sandbox::SubSystem::kFiles, sandbox::Semantics::kFilesAllowAny, + L"\\??\\pipe\\crashpad_*"); if (result != sandbox::SBOX_ALL_OK) return false; return true; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 8ffd3e4a3089f..a8891a0a782da 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -76,9 +76,9 @@ #include "ui/gfx/color_utils.h" #include "ui/gtk/gtk_compat.h" // nogncheck #include "ui/gtk/gtk_util.h" // nogncheck +#include "ui/linux/linux_ui.h" +#include "ui/linux/linux_ui_factory.h" #include "ui/ozone/public/ozone_platform.h" -#include "ui/views/linux_ui/linux_ui.h" -#include "ui/views/linux_ui/linux_ui_factory.h" #endif #if BUILDFLAG(IS_WIN) @@ -366,7 +366,7 @@ void ElectronBrowserMainParts::PostDestroyThreads() { void ElectronBrowserMainParts::ToolkitInitialized() { #if BUILDFLAG(IS_LINUX) - auto linux_ui = CreateLinuxUi(); + auto linux_ui = ui::CreateLinuxUi(); DCHECK(ui::LinuxInputMethodContextFactory::instance()); // Try loading gtk symbols used by Electron. @@ -388,7 +388,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() { // here returns a NativeThemeGtk, which monitors GTK settings. dark_theme_observer_ = std::make_unique(); linux_ui->GetNativeTheme(nullptr)->AddObserver(dark_theme_observer_.get()); - views::LinuxUI::SetInstance(std::move(linux_ui)); + ui::LinuxUi::SetInstance(std::move(linux_ui)); // Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager // implementation). Start observing them once it's initialized. diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 02fe3d272567f..2acd06cbbafa1 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -253,6 +253,7 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) { // --js-flags. std::string js_flags = cmd->GetSwitchValueASCII(blink::switches::kJavaScriptFlags); + js_flags.append(" --no-freeze-flags-after-init"); if (!js_flags.empty()) v8::V8::SetFlagsFromString(js_flags.c_str(), js_flags.size()); diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index 369b97fbd049e..ccfb4d0f44ffe 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -6,6 +6,7 @@ #include +#include "base/bind.h" #include "build/build_config.h" #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" #include "printing/mojom/print.mojom.h" @@ -133,7 +134,39 @@ void PrintViewManagerElectron::PrintToPdf( headless_jobs_.emplace_back(cookie); callback_ = std::move(callback); - GetPrintRenderFrame(rfh)->PrintWithParams(std::move(print_pages_params)); + // There is no need for a weak pointer here since the mojo proxy is held + // in the base class. If we're gone, mojo will discard the callback. + GetPrintRenderFrame(rfh)->PrintWithParams( + std::move(print_pages_params), + base::BindOnce(&PrintViewManagerElectron::OnDidPrintWithParams, + base::Unretained(this))); +} + +void PrintViewManagerElectron::OnDidPrintWithParams( + printing::mojom::PrintWithParamsResultPtr result) { + if (result->is_failure_reason()) { + switch (result->get_failure_reason()) { + case printing::mojom::PrintFailureReason::kGeneralFailure: + ReleaseJob(PRINTING_FAILED); + return; + case printing::mojom::PrintFailureReason::kInvalidPageRange: + ReleaseJob(PAGE_COUNT_EXCEEDED); + return; + } + } + + auto& content = *result->get_params()->content; + if (!content.metafile_data_region.IsValid()) { + ReleaseJob(INVALID_MEMORY_HANDLE); + return; + } + base::ReadOnlySharedMemoryMapping map = content.metafile_data_region.Map(); + if (!map.IsValid()) { + ReleaseJob(METAFILE_MAP_ERROR); + return; + } + data_ = std::string(static_cast(map.memory()), map.size()); + ReleaseJob(PRINT_SUCCESS); } void PrintViewManagerElectron::GetDefaultPrintSettings( @@ -171,20 +204,6 @@ void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() { ReleaseJob(INVALID_PRINTER_SETTINGS); } -void PrintViewManagerElectron::PrintingFailed( - int32_t cookie, - printing::mojom::PrintFailureReason reason) { - auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), cookie); - if (entry == headless_jobs_.end()) { - PrintViewManagerBase::PrintingFailed(cookie, reason); - return; - } - - ReleaseJob(reason == printing::mojom::PrintFailureReason::kInvalidPageRange - ? PAGE_COUNT_EXCEEDED - : PRINTING_FAILED); -} - #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintViewManagerElectron::UpdatePrintSettings( int32_t cookie, @@ -245,37 +264,6 @@ void PrintViewManagerElectron::DidGetPrintedPagesCount(int32_t cookie, } } -void PrintViewManagerElectron::DidPrintDocument( - printing::mojom::DidPrintDocumentParamsPtr params, - DidPrintDocumentCallback callback) { - auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), - params->document_cookie); - if (entry == headless_jobs_.end()) { - PrintViewManagerBase::DidPrintDocument(std::move(params), - std::move(callback)); - return; - } - - auto& content = *params->content; - if (!content.metafile_data_region.IsValid()) { - ReleaseJob(INVALID_MEMORY_HANDLE); - std::move(callback).Run(false); - return; - } - - base::ReadOnlySharedMemoryMapping map = content.metafile_data_region.Map(); - if (!map.IsValid()) { - ReleaseJob(METAFILE_MAP_ERROR); - std::move(callback).Run(false); - return; - } - - data_ = std::string(static_cast(map.memory()), map.size()); - headless_jobs_.erase(entry); - std::move(callback).Run(true); - ReleaseJob(PRINT_SUCCESS); -} - void PrintViewManagerElectron::Reset() { printing_rfh_ = nullptr; callback_.Reset(); diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index 197b3c77adfa4..bf244a522ac2b 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -61,23 +61,22 @@ class PrintViewManagerElectron PrintToPDFCallback callback); private: - explicit PrintViewManagerElectron(content::WebContents* web_contents); friend class content::WebContentsUserData; + explicit PrintViewManagerElectron(content::WebContents* web_contents); + + void OnDidPrintWithParams(printing::mojom::PrintWithParamsResultPtr result); + // WebContentsObserver overrides (via PrintManager): void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; // printing::mojom::PrintManagerHost: - void DidPrintDocument(printing::mojom::DidPrintDocumentParamsPtr params, - DidPrintDocumentCallback callback) override; void DidGetPrintedPagesCount(int32_t cookie, uint32_t number_pages) override; void GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) override; void ScriptedPrint(printing::mojom::ScriptedPrintParamsPtr params, ScriptedPrintCallback callback) override; void ShowInvalidPrinterSettingsError() override; - void PrintingFailed(int32_t cookie, - printing::mojom::PrintFailureReason reason) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void UpdatePrintSettings(int32_t cookie, base::Value::Dict job_settings, diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc index 17b85784c0de8..0ab1f292619c3 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc @@ -16,8 +16,8 @@ #include "shell/browser/ui/views/client_frame_view_linux.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/skia_conversions.h" +#include "ui/linux/linux_ui.h" #include "ui/platform_window/platform_window.h" -#include "ui/views/linux_ui/linux_ui.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" #include "ui/views/window/non_client_view.h" diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.h b/shell/browser/ui/electron_desktop_window_tree_host_linux.h index e9bb28adb97dc..6a6130b4489b6 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.h +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.h @@ -13,9 +13,9 @@ #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/client_frame_view_linux.h" #include "third_party/skia/include/core/SkRRect.h" +#include "ui/linux/device_scale_factor_observer.h" #include "ui/native_theme/native_theme_observer.h" #include "ui/platform_window/platform_window.h" -#include "ui/views/linux_ui/device_scale_factor_observer.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" namespace electron { @@ -23,7 +23,7 @@ namespace electron { class ElectronDesktopWindowTreeHostLinux : public views::DesktopWindowTreeHostLinux, public ui::NativeThemeObserver, - public views::DeviceScaleFactorObserver { + public ui::DeviceScaleFactorObserver { public: ElectronDesktopWindowTreeHostLinux( NativeWindowViews* native_window_view, @@ -62,10 +62,10 @@ class ElectronDesktopWindowTreeHostLinux base::ScopedObservation theme_observation_{this}; - base::ScopedObservation + base::ScopedObservation scale_observation_{this}; ui::PlatformWindowState window_state_ = ui::PlatformWindowState::kUnknown; }; diff --git a/shell/browser/ui/gtk/app_indicator_icon.h b/shell/browser/ui/gtk/app_indicator_icon.h index ab0f4d5634156..8695545d9b4d9 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.h +++ b/shell/browser/ui/gtk/app_indicator_icon.h @@ -13,7 +13,7 @@ #include "base/nix/xdg_util.h" #include "third_party/skia/include/core/SkImage.h" #include "ui/base/glib/glib_signal.h" -#include "ui/views/linux_ui/status_icon_linux.h" +#include "ui/linux/status_icon_linux.h" typedef struct _AppIndicator AppIndicator; typedef struct _GtkWidget GtkWidget; @@ -33,7 +33,7 @@ namespace electron::gtkui { class AppIndicatorIconMenu; // Status icon implementation which uses libappindicator. -class AppIndicatorIcon : public views::StatusIconLinux { +class AppIndicatorIcon : public ui::StatusIconLinux { public: // The id uniquely identifies the new status icon from other chrome status // icons. @@ -49,7 +49,7 @@ class AppIndicatorIcon : public views::StatusIconLinux { // Indicates whether libappindicator so could be opened. static bool CouldOpen(); - // Overridden from views::StatusIconLinux: + // Overridden from ui::StatusIconLinux: void SetIcon(const gfx::ImageSkia& image) override; void SetToolTip(const std::u16string& tool_tip) override; void UpdatePlatformContextMenu(ui::MenuModel* menu) override; diff --git a/shell/browser/ui/gtk/gtk_status_icon.h b/shell/browser/ui/gtk/gtk_status_icon.h index 22b0788026a13..7d7163cea96bd 100644 --- a/shell/browser/ui/gtk/gtk_status_icon.h +++ b/shell/browser/ui/gtk/gtk_status_icon.h @@ -9,7 +9,7 @@ #include "ui/base/glib/glib_integers.h" #include "ui/base/glib/glib_signal.h" -#include "ui/views/linux_ui/status_icon_linux.h" +#include "ui/linux/status_icon_linux.h" typedef struct _GtkStatusIcon GtkStatusIcon; @@ -27,7 +27,7 @@ class AppIndicatorIconMenu; // Status icon implementation which uses the system tray X11 spec (via // GtkStatusIcon). -class GtkStatusIcon : public views::StatusIconLinux { +class GtkStatusIcon : public ui::StatusIconLinux { public: GtkStatusIcon(const gfx::ImageSkia& image, const std::u16string& tool_tip); ~GtkStatusIcon() override; @@ -36,7 +36,7 @@ class GtkStatusIcon : public views::StatusIconLinux { GtkStatusIcon(const GtkStatusIcon&) = delete; GtkStatusIcon& operator=(const GtkStatusIcon&) = delete; - // Overridden from views::StatusIconLinux: + // Overridden from ui::StatusIconLinux: void SetIcon(const gfx::ImageSkia& image) override; void SetToolTip(const std::u16string& tool_tip) override; void UpdatePlatformContextMenu(ui::MenuModel* menu) override; diff --git a/shell/browser/ui/gtk/status_icon.cc b/shell/browser/ui/gtk/status_icon.cc index 72eeeb81716a7..dea4a7f952794 100644 --- a/shell/browser/ui/gtk/status_icon.cc +++ b/shell/browser/ui/gtk/status_icon.cc @@ -33,7 +33,7 @@ bool IsStatusIconSupported() { #endif } -std::unique_ptr CreateLinuxStatusIcon( +std::unique_ptr CreateLinuxStatusIcon( const gfx::ImageSkia& image, const std::u16string& tool_tip, const char* id_prefix) { diff --git a/shell/browser/ui/gtk/status_icon.h b/shell/browser/ui/gtk/status_icon.h index 43203d2c780b7..df80d03157e04 100644 --- a/shell/browser/ui/gtk/status_icon.h +++ b/shell/browser/ui/gtk/status_icon.h @@ -13,12 +13,12 @@ #include "base/strings/string_util.h" #include "ui/gfx/image/image_skia.h" -#include "ui/views/linux_ui/status_icon_linux.h" +#include "ui/linux/status_icon_linux.h" namespace electron::gtkui { bool IsStatusIconSupported(); -std::unique_ptr CreateLinuxStatusIcon( +std::unique_ptr CreateLinuxStatusIcon( const gfx::ImageSkia& image, const std::u16string& tool_tip, const char* id_prefix); diff --git a/shell/browser/ui/tray_icon_gtk.h b/shell/browser/ui/tray_icon_gtk.h index c01621aed24a1..7da8890d6b702 100644 --- a/shell/browser/ui/tray_icon_gtk.h +++ b/shell/browser/ui/tray_icon_gtk.h @@ -9,11 +9,11 @@ #include #include "shell/browser/ui/tray_icon.h" -#include "ui/views/linux_ui/status_icon_linux.h" +#include "ui/linux/status_icon_linux.h" namespace electron { -class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { +class TrayIconGtk : public TrayIcon, public ui::StatusIconLinux::Delegate { public: TrayIconGtk(); ~TrayIconGtk() override; @@ -23,7 +23,7 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { void SetToolTip(const std::string& tool_tip) override; void SetContextMenu(ElectronMenuModel* menu_model) override; - // views::StatusIconLinux::Delegate + // ui::StatusIconLinux::Delegate void OnClick() override; bool HasClickAction() override; // The following four methods are only used by StatusIconLinuxDbus, which we @@ -34,7 +34,7 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { void OnImplInitializationFailed() override; private: - std::unique_ptr icon_; + std::unique_ptr icon_; gfx::ImageSkia image_; std::u16string tool_tip_; ui::MenuModel* menu_model_; diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 2a085d04d6af5..011764e864f96 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -23,11 +23,11 @@ #include "ui/gfx/text_constants.h" #include "ui/gtk/gtk_compat.h" // nogncheck #include "ui/gtk/gtk_util.h" // nogncheck +#include "ui/linux/linux_ui.h" +#include "ui/linux/nav_button_provider.h" #include "ui/native_theme/native_theme.h" #include "ui/strings/grit/ui_strings.h" #include "ui/views/controls/button/image_button.h" -#include "ui/views/linux_ui/linux_ui.h" -#include "ui/views/linux_ui/nav_button_provider.h" #include "ui/views/style/typography.h" #include "ui/views/widget/widget.h" #include "ui/views/window/frame_buttons.h" @@ -41,6 +41,25 @@ namespace { constexpr int kResizeOutsideBorderSize = 10; constexpr int kResizeInsideBoundsSize = 5; +ui::NavButtonProvider::ButtonState ButtonStateToNavButtonProviderState( + views::Button::ButtonState state) { + switch (state) { + case views::Button::STATE_NORMAL: + return ui::NavButtonProvider::ButtonState::kNormal; + case views::Button::STATE_HOVERED: + return ui::NavButtonProvider::ButtonState::kHovered; + case views::Button::STATE_PRESSED: + return ui::NavButtonProvider::ButtonState::kPressed; + case views::Button::STATE_DISABLED: + return ui::NavButtonProvider::ButtonState::kDisabled; + + case views::Button::STATE_COUNT: + default: + NOTREACHED(); + return ui::NavButtonProvider::ButtonState::kNormal; + } +} + } // namespace // static @@ -48,19 +67,18 @@ const char ClientFrameViewLinux::kViewClassName[] = "ClientFrameView"; ClientFrameViewLinux::ClientFrameViewLinux() : theme_(ui::NativeTheme::GetInstanceForNativeUi()), - nav_button_provider_( - views::LinuxUI::instance()->CreateNavButtonProvider()), + nav_button_provider_(ui::LinuxUi::instance()->CreateNavButtonProvider()), nav_buttons_{ - NavButton{views::NavButtonProvider::FrameButtonDisplayType::kClose, + NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kClose, views::FrameButton::kClose, &views::Widget::Close, IDS_APP_ACCNAME_CLOSE, HTCLOSE}, - NavButton{views::NavButtonProvider::FrameButtonDisplayType::kMaximize, + NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kMaximize, views::FrameButton::kMaximize, &views::Widget::Maximize, IDS_APP_ACCNAME_MAXIMIZE, HTMAXBUTTON}, - NavButton{views::NavButtonProvider::FrameButtonDisplayType::kRestore, + NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kRestore, views::FrameButton::kMaximize, &views::Widget::Restore, IDS_APP_ACCNAME_RESTORE, HTMAXBUTTON}, - NavButton{views::NavButtonProvider::FrameButtonDisplayType::kMinimize, + NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kMinimize, views::FrameButton::kMinimize, &views::Widget::Minimize, IDS_APP_ACCNAME_MINIMIZE, HTMINBUTTON}, }, @@ -85,14 +103,14 @@ ClientFrameViewLinux::ClientFrameViewLinux() native_theme_observer_.Observe(theme_); - if (views::LinuxUI* ui = views::LinuxUI::instance()) { + if (ui::LinuxUi* ui = ui::LinuxUi::instance()) { ui->AddWindowButtonOrderObserver(this); OnWindowButtonOrderingChange(); } } ClientFrameViewLinux::~ClientFrameViewLinux() { - if (views::LinuxUI* ui = views::LinuxUI::instance()) + if (ui::LinuxUi* ui = ui::LinuxUi::instance()) ui->RemoveWindowButtonOrderObserver(this); theme_->RemoveObserver(this); } @@ -112,7 +130,7 @@ void ClientFrameViewLinux::Init(NativeWindowViews* window, window->GetAcceleratedWidget())); host_supports_client_frame_shadow_ = tree_host->SupportsClientFrameShadow(); - frame_provider_ = views::LinuxUI::instance()->GetWindowFrameProvider( + frame_provider_ = ui::LinuxUi::instance()->GetWindowFrameProvider( !host_supports_client_frame_shadow_); UpdateWindowTitle(); @@ -326,11 +344,11 @@ void ClientFrameViewLinux::UpdateThemeValues() { SchedulePaint(); } -views::NavButtonProvider::FrameButtonDisplayType +ui::NavButtonProvider::FrameButtonDisplayType ClientFrameViewLinux::GetButtonTypeToSkip() const { return frame_->IsMaximized() - ? views::NavButtonProvider::FrameButtonDisplayType::kMaximize - : views::NavButtonProvider::FrameButtonDisplayType::kRestore; + ? ui::NavButtonProvider::FrameButtonDisplayType::kMaximize + : ui::NavButtonProvider::FrameButtonDisplayType::kRestore; } void ClientFrameViewLinux::UpdateButtonImages() { @@ -338,7 +356,7 @@ void ClientFrameViewLinux::UpdateButtonImages() { frame_->IsMaximized(), ShouldPaintAsActive()); - views::NavButtonProvider::FrameButtonDisplayType skip_type = + ui::NavButtonProvider::FrameButtonDisplayType skip_type = GetButtonTypeToSkip(); for (NavButton& button : nav_buttons_) { @@ -351,7 +369,8 @@ void ClientFrameViewLinux::UpdateButtonImages() { views::Button::ButtonState state = static_cast(state_id); button.button->SetImage( - state, nav_button_provider_->GetImage(button.type, state)); + state, nav_button_provider_->GetImage( + button.type, ButtonStateToNavButtonProviderState(state))); } } } @@ -369,7 +388,7 @@ void ClientFrameViewLinux::LayoutButtons() { void ClientFrameViewLinux::LayoutButtonsOnSide( ButtonSide side, gfx::Rect* remaining_content_bounds) { - views::NavButtonProvider::FrameButtonDisplayType skip_type = + ui::NavButtonProvider::FrameButtonDisplayType skip_type = GetButtonTypeToSkip(); std::vector frame_buttons; diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index b9bf50d8f7aa7..c76512465e023 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -11,14 +11,14 @@ #include "base/scoped_observation.h" #include "shell/browser/ui/views/frameless_view.h" +#include "ui/linux/linux_ui.h" +#include "ui/linux/nav_button_provider.h" +#include "ui/linux/window_button_order_observer.h" +#include "ui/linux/window_frame_provider.h" #include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme_observer.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/label.h" -#include "ui/views/linux_ui/linux_ui.h" -#include "ui/views/linux_ui/nav_button_provider.h" -#include "ui/views/linux_ui/window_button_order_observer.h" -#include "ui/views/linux_ui/window_frame_provider.h" #include "ui/views/widget/widget.h" #include "ui/views/window/frame_buttons.h" @@ -26,7 +26,7 @@ namespace electron { class ClientFrameViewLinux : public FramelessView, public ui::NativeThemeObserver, - public views::WindowButtonOrderObserver { + public ui::WindowButtonOrderObserver { public: static const char kViewClassName[]; ClientFrameViewLinux(); @@ -71,7 +71,7 @@ class ClientFrameViewLinux : public FramelessView, static constexpr int kNavButtonCount = 4; struct NavButton { - views::NavButtonProvider::FrameButtonDisplayType type; + ui::NavButtonProvider::FrameButtonDisplayType type; views::FrameButton frame_button; void (views::Widget::*callback)(); int accessibility_id; @@ -98,7 +98,7 @@ class ClientFrameViewLinux : public FramelessView, enum class ButtonSide { kLeading, kTrailing }; - views::NavButtonProvider::FrameButtonDisplayType GetButtonTypeToSkip() const; + ui::NavButtonProvider::FrameButtonDisplayType GetButtonTypeToSkip() const; void UpdateButtonImages(); void LayoutButtons(); void LayoutButtonsOnSide(ButtonSide side, @@ -115,7 +115,7 @@ class ClientFrameViewLinux : public FramelessView, views::Label* title_; - std::unique_ptr nav_button_provider_; + std::unique_ptr nav_button_provider_; std::array nav_buttons_; std::vector leading_frame_buttons_; @@ -123,14 +123,14 @@ class ClientFrameViewLinux : public FramelessView, bool host_supports_client_frame_shadow_ = false; - views::WindowFrameProvider* frame_provider_; + ui::WindowFrameProvider* frame_provider_; base::ScopedObservation native_theme_observer_{this}; - base::ScopedObservation + base::ScopedObservation window_button_order_observer_{this}; base::CallbackListSubscription paint_as_active_changed_subscription_; diff --git a/shell/browser/ui/views/electron_views_delegate.cc b/shell/browser/ui/views/electron_views_delegate.cc index 6f7859f2246fc..3510b896fc3c1 100644 --- a/shell/browser/ui/views/electron_views_delegate.cc +++ b/shell/browser/ui/views/electron_views_delegate.cc @@ -12,7 +12,7 @@ #if BUILDFLAG(IS_LINUX) #include "base/environment.h" #include "base/nix/xdg_util.h" -#include "ui/views/linux_ui/linux_ui.h" +#include "ui/linux/linux_ui.h" #endif namespace { diff --git a/shell/browser/web_view_guest_delegate.cc b/shell/browser/web_view_guest_delegate.cc index 884c4be1ab871..465e25e5e554a 100644 --- a/shell/browser/web_view_guest_delegate.cc +++ b/shell/browser/web_view_guest_delegate.cc @@ -49,7 +49,10 @@ void WebViewGuestDelegate::AttachToIframe( // frame |embedder_frame| hosts the inner WebContents. embedder_web_contents_->AttachInnerWebContents( base::WrapUnique(guest_web_contents), - embedder_frame, false); + embedder_frame, + /*remote_frame=*/mojo::NullAssociatedRemote(), + /*remote_frame_host_receiver=*/mojo::NullAssociatedReceiver(), + /*is_full_page=*/false); ResetZoomController(); diff --git a/shell/common/gin_converters/value_converter.cc b/shell/common/gin_converters/value_converter.cc index 414d535db5ebd..8510f50a0efec 100644 --- a/shell/common/gin_converters/value_converter.cc +++ b/shell/common/gin_converters/value_converter.cc @@ -30,7 +30,7 @@ v8::Local Converter::ToV8( const base::Value::Dict& val) { base::Value value(val.Clone()); return content::V8ValueConverter::Create()->ToV8Value( - &value, isolate->GetCurrentContext()); + value, isolate->GetCurrentContext()); } bool Converter::FromV8(v8::Isolate* isolate, @@ -50,7 +50,7 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8(v8::Isolate* isolate, const base::Value& val) { return content::V8ValueConverter::Create()->ToV8Value( - &val, isolate->GetCurrentContext()); + val, isolate->GetCurrentContext()); } bool Converter::FromV8(v8::Isolate* isolate, @@ -72,7 +72,7 @@ v8::Local Converter::ToV8( const base::Value::List& val) { base::Value value(val.Clone()); return content::V8ValueConverter::Create()->ToV8Value( - &value, isolate->GetCurrentContext()); + value, isolate->GetCurrentContext()); } } // namespace gin diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index cac88b927f1ad..c1e831d590379 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -345,7 +345,7 @@ describe('web security', () => { it('wasm codegen is disallowed by default', async () => { const r = await loadWasm(''); - expect(r).to.equal('WebAssembly.instantiate(): Wasm code generation disallowed by embedder'); + expect(r).to.equal('WebAssembly.instantiate(): Refused to compile or instantiate WebAssembly module because \'unsafe-eval\' is not an allowed source of script in the following Content Security Policy directive: "script-src \'self\' \'unsafe-inline\'"'); }); it('wasm codegen is allowed with "wasm-unsafe-eval" csp', async () => { From cffcd0d47a6bec4fbb1c02aa17b2d07724ad6d7b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 06:01:09 -0700 Subject: [PATCH 604/811] Bump v21.0.0-nightly.20220720 --- 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 06abe267f1c14..d3434d0a0d285 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220719 \ No newline at end of file +21.0.0-nightly.20220720 \ No newline at end of file diff --git a/package.json b/package.json index b429ed901b9e3..5ad09863cc96f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220719", + "version": "21.0.0-nightly.20220720", "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 11e3b14c478a7..7c2f4e4877d9f 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 21,0,0,20220719 - PRODUCTVERSION 21,0,0,20220719 + FILEVERSION 21,0,0,20220720 + PRODUCTVERSION 21,0,0,20220720 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6dc1218c372dadbea06faa209fb6c2042652cdf3 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 07:14:04 -0700 Subject: [PATCH 605/811] Revert "Bump v21.0.0-nightly.20220720" This reverts commit cffcd0d47a6bec4fbb1c02aa17b2d07724ad6d7b. --- 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 d3434d0a0d285..06abe267f1c14 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220720 \ No newline at end of file +21.0.0-nightly.20220719 \ No newline at end of file diff --git a/package.json b/package.json index 5ad09863cc96f..b429ed901b9e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220720", + "version": "21.0.0-nightly.20220719", "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 7c2f4e4877d9f..11e3b14c478a7 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 21,0,0,20220720 - PRODUCTVERSION 21,0,0,20220720 + FILEVERSION 21,0,0,20220719 + PRODUCTVERSION 21,0,0,20220719 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From be7f90481de6581401bb5f03ab18d2f89b1daef1 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 20 Jul 2022 08:00:31 -0700 Subject: [PATCH 606/811] build: update mediastreamdevicescontroller.patch (#34995) --- ...permissions_checks_in_mediastreamdevicescontroller.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index 82c2e5920e0f2..82cc6601cc08a 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,7 +15,7 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 353ed84da62b954a90c8d0a886495c0822f30429..1a1162ba960419a4de5eb2839ebc3debadca86d5 100644 +index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63052b7ee8 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc @@ -93,11 +93,14 @@ void MediaStreamDevicesController::RequestPermissions( @@ -70,7 +70,7 @@ index 353ed84da62b954a90c8d0a886495c0822f30429..1a1162ba960419a4de5eb2839ebc3deb permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); } -@@ -425,6 +433,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -417,6 +425,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( if (rfh->GetLastCommittedOrigin().GetURL() != request_.security_origin) { return false; } @@ -78,7 +78,7 @@ index 353ed84da62b954a90c8d0a886495c0822f30429..1a1162ba960419a4de5eb2839ebc3deb permissions::PermissionResult result = permissions::PermissionsClient::Get() ->GetPermissionManager(web_contents_->GetBrowserContext()) -@@ -433,6 +442,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -425,6 +434,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( DCHECK_EQ(CONTENT_SETTING_BLOCK, result.content_setting); return true; } From 9f0e7126c422c12333544de0a20f954addd13061 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 08:02:19 -0700 Subject: [PATCH 607/811] Bump v21.0.0-nightly.20220720 --- 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 06abe267f1c14..d3434d0a0d285 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220719 \ No newline at end of file +21.0.0-nightly.20220720 \ No newline at end of file diff --git a/package.json b/package.json index b429ed901b9e3..5ad09863cc96f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220719", + "version": "21.0.0-nightly.20220720", "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 11e3b14c478a7..7c2f4e4877d9f 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 21,0,0,20220719 - PRODUCTVERSION 21,0,0,20220719 + FILEVERSION 21,0,0,20220720 + PRODUCTVERSION 21,0,0,20220720 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 67eda4bcc81754a973a4455cd6db5ac624f4bfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20H=C4=83loiu?= Date: Thu, 21 Jul 2022 11:37:54 +0300 Subject: [PATCH 608/811] fix: add support for --ozone-platform-hint flag on Linux (#34937) --- filenames.gni | 1 + shell/browser/electron_browser_main_parts.cc | 1 + shell/browser/electron_browser_main_parts.h | 4 + .../electron_browser_main_parts_linux.cc | 134 ++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 shell/browser/electron_browser_main_parts_linux.cc diff --git a/filenames.gni b/filenames.gni index df58773b49c74..9fda05b41f983 100644 --- a/filenames.gni +++ b/filenames.gni @@ -23,6 +23,7 @@ filenames = { lib_sources_linux = [ "shell/browser/browser_linux.cc", + "shell/browser/electron_browser_main_parts_linux.cc", "shell/browser/lib/power_observer_linux.cc", "shell/browser/lib/power_observer_linux.h", "shell/browser/linux/unity_service.cc", diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index a8891a0a782da..13bd28b53443c 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -217,6 +217,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() { HandleSIGCHLD(); #endif #if BUILDFLAG(IS_LINUX) + DetectOzonePlatform(); ui::OzonePlatform::PreEarlyInitialization(); #endif #if BUILDFLAG(IS_MAC) diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index 95ced64ed7c9e..3c45ed29bfbb7 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -122,6 +122,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts { const scoped_refptr& task_runner); #endif +#if BUILDFLAG(IS_LINUX) + void DetectOzonePlatform(); +#endif + #if BUILDFLAG(IS_MAC) void FreeAppDelegate(); void RegisterURLHandler(); diff --git a/shell/browser/electron_browser_main_parts_linux.cc b/shell/browser/electron_browser_main_parts_linux.cc new file mode 100644 index 0000000000000..919cc085a2755 --- /dev/null +++ b/shell/browser/electron_browser_main_parts_linux.cc @@ -0,0 +1,134 @@ +// Copyright (c) 2022 GitHub, 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_main_parts.h" + +#include "base/command_line.h" +#include "base/environment.h" +#include "ui/ozone/public/ozone_switches.h" + +#if BUILDFLAG(OZONE_PLATFORM_WAYLAND) +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/nix/xdg_util.h" +#include "base/threading/thread_restrictions.h" +#endif + +#if BUILDFLAG(OZONE_PLATFORM_WAYLAND) + +constexpr char kPlatformWayland[] = "wayland"; + +bool HasWaylandDisplay(base::Environment* env) { + std::string wayland_display; + const bool has_wayland_display = + env->GetVar("WAYLAND_DISPLAY", &wayland_display) && + !wayland_display.empty(); + if (has_wayland_display) + return true; + + std::string xdg_runtime_dir; + const bool has_xdg_runtime_dir = + env->GetVar("XDG_RUNTIME_DIR", &xdg_runtime_dir) && + !xdg_runtime_dir.empty(); + if (has_xdg_runtime_dir) { + auto wayland_server_pipe = + base::FilePath(xdg_runtime_dir).Append("wayland-0"); + // Normally, this should happen exactly once, at the startup of the main + // process. + base::ScopedAllowBlocking allow_blocking; + return base::PathExists(wayland_server_pipe); + } + + return false; +} + +#endif // BUILDFLAG(OZONE_PLATFORM_WAYLAND) + +#if BUILDFLAG(OZONE_PLATFORM_X11) +constexpr char kPlatformX11[] = "x11"; +#endif + +namespace electron { + +namespace { + +// Evaluates the environment and returns the effective platform name for the +// given |ozone_platform_hint|. +// For the "auto" value, returns "wayland" if the XDG session type is "wayland", +// "x11" otherwise. +// For the "wayland" value, checks if the Wayland server is available, and +// returns "x11" if it is not. +// See https://crbug.com/1246928. +std::string MaybeFixPlatformName(const std::string& ozone_platform_hint) { +#if BUILDFLAG(OZONE_PLATFORM_WAYLAND) + // Wayland is selected if both conditions below are true: + // 1. The user selected either 'wayland' or 'auto'. + // 2. The XDG session type is 'wayland', OR the user has selected 'wayland' + // explicitly and a Wayland server is running. + // Otherwise, fall back to X11. + if (ozone_platform_hint == kPlatformWayland || + ozone_platform_hint == "auto") { + auto env(base::Environment::Create()); + + std::string xdg_session_type; + const bool has_xdg_session_type = + env->GetVar(base::nix::kXdgSessionTypeEnvVar, &xdg_session_type) && + !xdg_session_type.empty(); + + if ((has_xdg_session_type && xdg_session_type == "wayland") || + (ozone_platform_hint == kPlatformWayland && + HasWaylandDisplay(env.get()))) { + return kPlatformWayland; + } + } +#endif // BUILDFLAG(OZONE_PLATFORM_WAYLAND) + +#if BUILDFLAG(OZONE_PLATFORM_X11) + if (ozone_platform_hint == kPlatformX11) { + return kPlatformX11; + } +#if BUILDFLAG(OZONE_PLATFORM_WAYLAND) + if (ozone_platform_hint == kPlatformWayland || + ozone_platform_hint == "auto") { + // We are here if: + // - The binary has both X11 and Wayland backends. + // - The user wanted Wayland but that did not work, otherwise it would have + // been returned above. + if (ozone_platform_hint == kPlatformWayland) { + LOG(WARNING) << "No Wayland server is available. Falling back to X11."; + } else { + LOG(WARNING) << "This is not a Wayland session. Falling back to X11. " + "If you need to run Chrome on Wayland using some " + "embedded compositor, e. g., Weston, please specify " + "Wayland as your preferred Ozone platform, or use " + "--ozone-platform=wayland."; + } + return kPlatformX11; + } +#endif // BUILDFLAG(OZONE_PLATFORM_WAYLAND) +#endif // BUILDFLAG(OZONE_PLATFORM_X11) + + return ozone_platform_hint; +} + +} // namespace + +void ElectronBrowserMainParts::DetectOzonePlatform() { + auto* const command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(switches::kOzonePlatform)) { + const auto ozone_platform_hint = + command_line->GetSwitchValueASCII(switches::kOzonePlatformHint); + if (!ozone_platform_hint.empty()) { + command_line->AppendSwitchASCII( + switches::kOzonePlatform, MaybeFixPlatformName(ozone_platform_hint)); + } + } + + auto env = base::Environment::Create(); + std::string desktop_startup_id; + if (env->GetVar("DESKTOP_STARTUP_ID", &desktop_startup_id)) + command_line->AppendSwitchASCII("desktop-startup-id", desktop_startup_id); +} + +} // namespace electron From 7ae3025fd504c49c70d02d8f25f6c21a8bfa4bd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jul 2022 11:15:00 +0200 Subject: [PATCH 609/811] build(deps): bump terser from 4.6.7 to 4.8.1 (#34987) Bumps [terser](https://github.com/terser/terser) from 4.6.7 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8919a86531ea0..88ae9c5a8583d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1466,7 +1466,12 @@ buffer-equal-constant-time@1.0.1: resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= -buffer-from@^1.0.0, buffer-from@^1.1.0: +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-from@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== @@ -1865,9 +1870,9 @@ combined-stream@^1.0.8: delayed-stream "~1.0.0" commander@^2.20.0, commander@^2.9.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^4.1.0: version "4.1.1" @@ -7071,18 +7076,10 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@~0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== +source-map-support@^0.5.6, source-map-support@~0.5.12: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -7499,9 +7496,9 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser@^4.1.2: - version "4.6.7" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.7.tgz#478d7f9394ec1907f0e488c5f6a6a9a2bad55e72" - integrity sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g== + version "4.8.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" + integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== dependencies: commander "^2.20.0" source-map "~0.6.1" From d4e97483aa3880ed29f46603b19bac9d80d7e653 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 21 Jul 2022 11:29:31 +0200 Subject: [PATCH 610/811] refactor: only create webContents after 'will-attach-webview' (#32941) --- lib/browser/guest-view-manager.ts | 81 +++++-------------- lib/common/ipc-messages.ts | 1 - lib/renderer/web-view/guest-view-internal.ts | 7 -- lib/renderer/web-view/web-view-element.ts | 3 +- lib/renderer/web-view/web-view-impl.ts | 2 +- .../api/electron_api_web_view_manager.cc | 4 - shell/browser/web_contents_preferences.cc | 4 - shell/browser/web_contents_preferences.h | 2 - typings/internal-electron.d.ts | 1 - 9 files changed, 21 insertions(+), 84 deletions(-) diff --git a/lib/browser/guest-view-manager.ts b/lib/browser/guest-view-manager.ts index c9c4585de28e4..2d88a0a017ea7 100644 --- a/lib/browser/guest-view-manager.ts +++ b/lib/browser/guest-view-manager.ts @@ -7,7 +7,7 @@ import { webViewEvents } from '@electron/internal/browser/web-view-events'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; interface GuestInstance { - elementInstanceId?: number; + elementInstanceId: number; visibilityState?: VisibilityState; embedder: Electron.WebContents; guest: Electron.WebContents; @@ -46,6 +46,7 @@ function makeWebPreferences (embedder: Electron.WebContents, params: Record) { // Create a new guest instance. const createGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, params: Record) { + const webPreferences = makeWebPreferences(embedder, params); + const event = eventBinding.createWithSender(embedder); + + const { instanceId } = params; + + embedder.emit('will-attach-webview', event, webPreferences, params); + if (event.defaultPrevented) { + return -1; + } + // eslint-disable-next-line no-undef const guest = (webContents as typeof ElectronInternal.WebContents).create({ + ...webPreferences, type: 'webview', - partition: params.partition, embedder }); + const guestInstanceId = guest.id; guestInstances.set(guestInstanceId, { + elementInstanceId, guest, embedder }); @@ -108,11 +121,8 @@ 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) { - const params = this.attachParams!; - delete this.attachParams; - const previouslyAttached = this.viewInstanceId != null; - this.viewInstanceId = params.instanceId; + this.viewInstanceId = instanceId; // Only load URL and set size on first attach if (previouslyAttached) { @@ -120,7 +130,7 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n } if (params.src) { - this.loadURL(params.src, params.opts); + this.loadURL(params.src, makeLoadURLOptions(params)); } embedder.emit('did-attach-webview', event, guest); }); @@ -173,78 +183,25 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n } }); - if (attachGuest(embedder, embedderFrameId, elementInstanceId, guestInstanceId, params)) { - return guestInstanceId; - } - - return -1; -}; - -// Attach the guest to an element of embedder. -const attachGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, guestInstanceId: number, params: Record) { // Destroy the old guest when attaching. const key = `${embedder.id}-${elementInstanceId}`; const oldGuestInstanceId = embedderElementsMap.get(key); if (oldGuestInstanceId != null) { - // Reattachment to the same guest is just a no-op. - if (oldGuestInstanceId === guestInstanceId) { - return false; - } - const oldGuestInstance = guestInstances.get(oldGuestInstanceId); if (oldGuestInstance) { oldGuestInstance.guest.detachFromOuterFrame(); } } - const guestInstance = guestInstances.get(guestInstanceId); - // If this isn't a valid guest instance then do nothing. - if (!guestInstance) { - console.error(new Error(`Guest attach failed: Invalid guestInstanceId ${guestInstanceId}`)); - return false; - } - const { guest } = guestInstance; - if (guest.hostWebContents !== embedder) { - console.error(new Error(`Guest attach failed: Access denied to guestInstanceId ${guestInstanceId}`)); - 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 !== instanceId) { - webViewManager.removeGuest(guestInstance.embedder, guestInstanceId); - guestInstance.embedder._sendInternal(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${guest.viewInstanceId}`); - } - } - - const webPreferences = makeWebPreferences(embedder, params); - - const event = eventBinding.createWithSender(embedder); - embedder.emit('will-attach-webview', event, webPreferences, params); - if (event.defaultPrevented) { - if (guest.viewInstanceId == null) guest.viewInstanceId = instanceId; - guest.destroy(); - return false; - } - - guest.attachParams = { instanceId, src: params.src, opts: makeLoadURLOptions(params) }; embedderElementsMap.set(key, guestInstanceId); - guest.setEmbedder(embedder); - guestInstance.embedder = embedder; - guestInstance.elementInstanceId = elementInstanceId; watchEmbedder(embedder); webViewManager.addGuest(guestInstanceId, embedder, guest, webPreferences); guest.attachToIframe(embedder, embedderFrameId); - return true; + + return guestInstanceId; }; // Remove an guest-embedder relationship. diff --git a/lib/common/ipc-messages.ts b/lib/common/ipc-messages.ts index c6a881c3c0a23..3a85d592691c9 100644 --- a/lib/common/ipc-messages.ts +++ b/lib/common/ipc-messages.ts @@ -9,7 +9,6 @@ export const enum IPC_MESSAGES { GUEST_INSTANCE_VISIBILITY_CHANGE = 'GUEST_INSTANCE_VISIBILITY_CHANGE', - GUEST_VIEW_INTERNAL_DESTROY_GUEST = 'GUEST_VIEW_INTERNAL_DESTROY_GUEST', GUEST_VIEW_INTERNAL_DISPATCH_EVENT = 'GUEST_VIEW_INTERNAL_DISPATCH_EVENT', GUEST_VIEW_MANAGER_CREATE_AND_ATTACH_GUEST = 'GUEST_VIEW_MANAGER_CREATE_AND_ATTACH_GUEST', diff --git a/lib/renderer/web-view/guest-view-internal.ts b/lib/renderer/web-view/guest-view-internal.ts index 97b1ae6fea396..893a6e2305b8c 100644 --- a/lib/renderer/web-view/guest-view-internal.ts +++ b/lib/renderer/web-view/guest-view-internal.ts @@ -6,22 +6,15 @@ const { mainFrame: webFrame } = process._linkedBinding('electron_renderer_web_fr export interface GuestViewDelegate { dispatchEvent (eventName: string, props: Record): void; - reset(): void; } export function registerEvents (viewInstanceId: number, delegate: GuestViewDelegate) { - ipcRendererInternal.on(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${viewInstanceId}`, function () { - delegate.reset(); - delegate.dispatchEvent('destroyed', {}); - }); - ipcRendererInternal.on(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT}-${viewInstanceId}`, function (event, eventName, props) { delegate.dispatchEvent(eventName, props); }); } export function deregisterEvents (viewInstanceId: number) { - ipcRendererInternal.removeAllListeners(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${viewInstanceId}`); ipcRendererInternal.removeAllListeners(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT}-${viewInstanceId}`); } diff --git a/lib/renderer/web-view/web-view-element.ts b/lib/renderer/web-view/web-view-element.ts index 84ac5a9ba79c4..ee290ce09b0fc 100644 --- a/lib/renderer/web-view/web-view-element.ts +++ b/lib/renderer/web-view/web-view-element.ts @@ -55,8 +55,7 @@ const defineWebViewElement = (hooks: WebViewImplHooks) => { } if (!internal.elementAttached) { hooks.guestViewInternal.registerEvents(internal.viewInstanceId, { - dispatchEvent: internal.dispatchEvent.bind(internal), - reset: internal.reset.bind(internal) + dispatchEvent: internal.dispatchEvent.bind(internal) }); internal.elementAttached = true; (internal.attributes.get(WEB_VIEW_CONSTANTS.ATTRIBUTE_SRC) as SrcAttribute).parse(); diff --git a/lib/renderer/web-view/web-view-impl.ts b/lib/renderer/web-view/web-view-impl.ts index 691b477e1bdb2..f3cad33534539 100644 --- a/lib/renderer/web-view/web-view-impl.ts +++ b/lib/renderer/web-view/web-view-impl.ts @@ -191,7 +191,7 @@ export class WebViewImpl { attachGuestInstance (guestInstanceId: number) { if (guestInstanceId === -1) { - // Do nothing + this.dispatchEvent('destroyed'); return; } diff --git a/shell/browser/api/electron_api_web_view_manager.cc b/shell/browser/api/electron_api_web_view_manager.cc index 7758c59cd5fd6..2bf03616b711c 100644 --- a/shell/browser/api/electron_api_web_view_manager.cc +++ b/shell/browser/api/electron_api_web_view_manager.cc @@ -28,10 +28,6 @@ void AddGuest(int guest_instance_id, electron::WebContentsZoomController::FromWebContents(guest_web_contents) ->SetDefaultZoomFactor(zoom_factor); } - - WebContentsPreferences::From(guest_web_contents)->Merge(options); - // Trigger re-calculation of webkit prefs. - guest_web_contents->NotifyPreferencesChanged(); } void RemoveGuest(content::WebContents* embedder, int guest_instance_id) { diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index 300bf05b8a1bf..14069bfdde30e 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -176,11 +176,7 @@ void WebContentsPreferences::Clear() { void WebContentsPreferences::SetFromDictionary( const gin_helper::Dictionary& web_preferences) { Clear(); - Merge(web_preferences); -} -void WebContentsPreferences::Merge( - const gin_helper::Dictionary& web_preferences) { web_preferences.Get(options::kPlugins, &plugins_); web_preferences.Get(options::kExperimentalFeatures, &experimental_features_); web_preferences.Get(options::kNodeIntegration, &node_integration_); diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index 091778899c0ac..eac4f7e51eeb7 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -40,8 +40,6 @@ class WebContentsPreferences WebContentsPreferences(const WebContentsPreferences&) = delete; WebContentsPreferences& operator=(const WebContentsPreferences&) = delete; - void Merge(const gin_helper::Dictionary& new_web_preferences); - void SetFromDictionary(const gin_helper::Dictionary& new_web_preferences); // Append command parameters according to preferences. diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 891966d8e3e44..2d286f23d5cc8 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -81,7 +81,6 @@ declare namespace Electron { attachToIframe(embedderWebContents: Electron.WebContents, embedderFrameId: number): void; detachFromOuterFrame(): void; setEmbedder(embedder: Electron.WebContents): void; - attachParams?: { instanceId: number; src: string, opts: LoadURLOptions }; viewInstanceId: number; } From 1ed191114acb4182baef715729906ed7bfc02fa3 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 21 Jul 2022 12:46:15 +0200 Subject: [PATCH 611/811] fix: clean up callback handling in `webContents.print()` (#34894) * refactor: clean up callback handling in webContents.print() * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/printing.patch | 144 ++++++++++++++++++++++---------- 1 file changed, 99 insertions(+), 45 deletions(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index fa69a6ac0c84f..f056759708d26 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -134,7 +134,7 @@ index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf0 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d89882163c93ce89 100644 +index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851ac8b8df85 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -146,7 +146,22 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" #include "components/prefs/pref_service.h" -@@ -87,6 +85,8 @@ using PrintSettingsCallback = +@@ -83,10 +81,23 @@ namespace printing { + + namespace { + ++std::string PrintReasonFromPrintStatus(PrintViewManager::PrintStatus status) { ++ if (status == PrintViewManager::PrintStatus::kInvalid) { ++ return "Invalid printer settings"; ++ } else if (status == PrintViewManager::PrintStatus::kCanceled) { ++ return "Print job canceled"; ++ } else if (status == PrintViewManager::PrintStatus::kFailed) { ++ return "Print job failed"; ++ } ++ return ""; ++} ++ + using PrintSettingsCallback = base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { @@ -155,7 +170,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -95,6 +95,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -95,6 +106,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -163,7 +178,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 } void OnDidGetDefaultPrintSettings( -@@ -144,7 +145,9 @@ void OnDidUpdatePrintSettings( +@@ -144,7 +156,9 @@ void OnDidUpdatePrintSettings( DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -174,7 +189,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -172,6 +175,7 @@ void OnDidScriptedPrint( +@@ -172,6 +186,7 @@ void OnDidScriptedPrint( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -182,7 +197,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -181,7 +185,8 @@ void OnDidScriptedPrint( +@@ -181,7 +196,8 @@ void OnDidScriptedPrint( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -192,7 +207,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -196,12 +201,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -196,12 +212,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -207,7 +222,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -209,7 +216,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -209,7 +227,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -219,7 +234,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -237,6 +247,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -237,6 +258,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -229,7 +244,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -405,7 +418,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -405,7 +429,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -239,7 +254,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -420,8 +434,11 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -420,8 +445,11 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -252,7 +267,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 } void PrintViewManagerBase::UpdatePrintingEnabled() { -@@ -429,8 +446,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { +@@ -429,8 +457,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { // The Unretained() is safe because ForEachRenderFrameHost() is synchronous. web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost( base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, @@ -262,7 +277,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 } void PrintViewManagerBase::NavigationStopped() { -@@ -546,11 +562,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -546,11 +573,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -277,7 +292,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -588,18 +607,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -588,18 +618,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -299,7 +314,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -609,6 +630,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -609,6 +641,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -307,7 +322,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -640,14 +662,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -640,14 +673,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -324,7 +339,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 return; } #endif -@@ -685,7 +707,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -685,7 +718,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -332,19 +347,19 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 #endif ReleasePrinterQuery(); -@@ -700,6 +721,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -700,6 +732,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { + if (!callback_.is_null()) { -+ std::string cb_str = "Invalid printer settings"; -+ std::move(callback_).Run(printing_succeeded_, cb_str); ++ printing_status_ = PrintStatus::kInvalid; ++ TerminatePrintJob(true); + } + base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -710,10 +736,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -710,10 +747,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -357,19 +372,30 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 } void PrintViewManagerBase::DidStartLoading() { -@@ -773,6 +801,11 @@ void PrintViewManagerBase::OnJobDone() { - ReleasePrintJob(); - } - -+void PrintViewManagerBase::UserInitCanceled() { -+ printing_canceled_ = true; +@@ -769,7 +808,12 @@ void PrintViewManagerBase::OnJobDone() { + // Printing is done, we don't need it anymore. + // print_job_->is_job_pending() may still be true, depending on the order + // of object registration. +- printing_succeeded_ = true; ++ printing_status_ = PrintStatus::kSucceeded; + ReleasePrintJob(); +} + - void PrintViewManagerBase::OnFailed() { - TerminatePrintJob(true); ++void PrintViewManagerBase::UserInitCanceled() { ++ printing_status_ = PrintStatus::kCanceled; + ReleasePrintJob(); } -@@ -831,7 +864,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( + +@@ -783,7 +827,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { + + // Is the document already complete? + if (print_job_->document() && print_job_->document()->IsComplete()) { +- printing_succeeded_ = true; ++ printing_status_ = PrintStatus::kSucceeded; + return true; + } + +@@ -831,7 +875,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -381,21 +407,37 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 if (!weak_this) return false; -@@ -912,6 +948,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -852,7 +899,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( + #endif + print_job_->AddObserver(*this); + +- printing_succeeded_ = false; ++ printing_status_ = PrintStatus::kFailed; + return true; + } + +@@ -912,6 +959,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif + if (!callback_.is_null()) { -+ std::string cb_str = ""; -+ if (!printing_succeeded_) -+ cb_str = printing_canceled_ ? "canceled" : "failed"; -+ std::move(callback_).Run(printing_succeeded_, cb_str); ++ bool success = printing_status_ == PrintStatus::kSucceeded; ++ std::move(callback_).Run(success, PrintReasonFromPrintStatus(printing_status_)); + } + if (!print_job_) return; -@@ -961,7 +1004,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -919,7 +971,7 @@ void PrintViewManagerBase::ReleasePrintJob() { + // printing_rfh_ should only ever point to a RenderFrameHost with a live + // RenderFrame. + DCHECK(rfh->IsRenderFrameLive()); +- GetPrintRenderFrame(rfh)->PrintingDone(printing_succeeded_); ++ GetPrintRenderFrame(rfh)->PrintingDone(printing_status_ == PrintStatus::kSucceeded); + } + + print_job_->RemoveObserver(*this); +@@ -961,7 +1013,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -404,7 +446,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 return true; if (!cookie) { -@@ -1069,7 +1112,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1069,7 +1121,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -414,7 +456,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..e6201cbf8d1ed64b1b53ed43d8988216 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0de6669400 100644 +index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde990e10e1 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -41,6 +41,8 @@ namespace printing { @@ -446,7 +488,22 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0d // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -241,7 +247,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -120,6 +126,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { + void AddObserver(Observer& observer); + void RemoveObserver(Observer& observer); + ++ enum class PrintStatus { ++ kSucceeded, ++ kCanceled, ++ kFailed, ++ kInvalid, ++ kUnknown ++ }; ++ + protected: + explicit PrintViewManagerBase(content::WebContents* web_contents); + +@@ -241,7 +255,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -456,7 +513,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0d // 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 -@@ -314,9 +321,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -314,8 +329,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -464,14 +521,11 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0d + CompletionCallback callback_; + // Indication of success of the print job. - bool printing_succeeded_ = false; +- bool printing_succeeded_ = false; ++ PrintStatus printing_status_ = PrintStatus::kUnknown; -+ // 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/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc index f3c3f85edb19489d079dc93411be64828ae581e2..ff303dcbc034cd8f1530fe1543729e98d3035826 100644 --- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc From fec4cca8d48e07a0e76b7e3de2e01cfe1c33d04b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 21 Jul 2022 06:01:19 -0700 Subject: [PATCH 612/811] Bump v21.0.0-nightly.20220721 --- 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 d3434d0a0d285..7d0b2b4f2e598 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220720 \ No newline at end of file +21.0.0-nightly.20220721 \ No newline at end of file diff --git a/package.json b/package.json index 5ad09863cc96f..f31bf41ffb9bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220720", + "version": "21.0.0-nightly.20220721", "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 7c2f4e4877d9f..975dcfc84f1c0 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 21,0,0,20220720 - PRODUCTVERSION 21,0,0,20220720 + FILEVERSION 21,0,0,20220721 + PRODUCTVERSION 21,0,0,20220721 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3c63f075bd35333b80f78c462cdba1440b3fec55 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 21 Jul 2022 10:25:54 -0700 Subject: [PATCH 613/811] chore: remove unused WebContents._sendToFrameInternal (#35010) --- lib/browser/api/web-contents.ts | 7 ------- typings/internal-electron.d.ts | 1 - 2 files changed, 8 deletions(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 594c2fc28e653..6433bed4df568 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -124,13 +124,6 @@ WebContents.prototype.sendToFrame = function (frameId, channel, ...args) { return true; }; -WebContents.prototype._sendToFrameInternal = function (frameId, channel, ...args) { - const frame = getWebFrame(this, frameId); - if (!frame) return false; - frame._sendInternal(channel, ...args); - return true; -}; - // Following methods are mapped to webFrame. const webFrameMethods = [ 'insertCSS', diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 2d286f23d5cc8..7789f297e55e4 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -66,7 +66,6 @@ declare namespace Electron { _callWindowOpenHandler(event: any, details: Electron.HandlerDetails): {browserWindowConstructorOptions: Electron.BrowserWindowConstructorOptions | null, outlivesOpener: boolean}; _setNextChildWebPreferences(prefs: Partial & Pick): void; _send(internal: boolean, channel: string, args: any): boolean; - _sendToFrameInternal(frameId: number | [number, number], channel: string, ...args: any[]): boolean; _sendInternal(channel: string, ...args: any[]): void; _printToPDF(options: any): Promise; _print(options: any, callback?: (success: boolean, failureReason: string) => void): void; From dd82a26e956617cd8bef0aa19613b3fd581a6db7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 06:01:06 -0700 Subject: [PATCH 614/811] Bump v21.0.0-nightly.20220722 --- 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 7d0b2b4f2e598..e58a6291ea673 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220721 \ No newline at end of file +21.0.0-nightly.20220722 \ No newline at end of file diff --git a/package.json b/package.json index f31bf41ffb9bc..b4fd0f292b8d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220721", + "version": "21.0.0-nightly.20220722", "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 975dcfc84f1c0..3453470290fe7 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 21,0,0,20220721 - PRODUCTVERSION 21,0,0,20220721 + FILEVERSION 21,0,0,20220722 + PRODUCTVERSION 21,0,0,20220722 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 08dd38d9be8fde5ec44e60ad8a2da9af3c37afeb Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Sun, 24 Jul 2022 23:25:42 -0700 Subject: [PATCH 615/811] docs: update build dependencies for Fedora (#35024) --- docs/development/build-instructions-linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development/build-instructions-linux.md b/docs/development/build-instructions-linux.md index 7663773e511b4..8bfd6349a511a 100644 --- a/docs/development/build-instructions-linux.md +++ b/docs/development/build-instructions-linux.md @@ -47,10 +47,10 @@ $ sudo yum install clang dbus-devel gtk3-devel libnotify-devel \ On Fedora, install the following libraries: ```sh -$ sudo dnf install clang dbus-devel gtk3-devel libnotify-devel \ - libgnome-keyring-devel xorg-x11-server-utils libcap-devel \ +$ sudo dnf install clang dbus-devel gperf gtk3-devel \ + libnotify-devel libgnome-keyring-devel libcap-devel \ cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \ - nss-devel python-dbusmock openjdk-8-jre + nss-devel python-dbusmock ``` On Arch Linux / Manjaro, install the following libraries: From 57c265198efac773b5bcf4598bda5e31a20fdba2 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 25 Jul 2022 09:46:14 +0200 Subject: [PATCH 616/811] refactor: use Get/SetID from views:View in Button (#35022) --- shell/browser/ui/views/menu_bar.cc | 4 ++-- shell/browser/ui/views/menu_delegate.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index 8e72000d131b1..b8d254ee665a6 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -193,7 +193,7 @@ void MenuBar::ButtonPressed(int id, const ui::Event& event) { SubmenuButton* source = nullptr; for (auto* child : children()) { auto* button = static_cast(child); - if (button->tag() == id) { + if (button->GetID() == id) { source = button; break; } @@ -226,7 +226,7 @@ void MenuBar::RebuildChildren() { auto* button = new SubmenuButton( base::BindRepeating(&MenuBar::ButtonPressed, base::Unretained(this), i), menu_model_->GetLabelAt(i), background_color_); - button->set_tag(i); + button->SetID(i); AddChildView(button); } UpdateViewColors(); diff --git a/shell/browser/ui/views/menu_delegate.cc b/shell/browser/ui/views/menu_delegate.cc index c6effd2707aaf..e6f4c49b57f88 100644 --- a/shell/browser/ui/views/menu_delegate.cc +++ b/shell/browser/ui/views/menu_delegate.cc @@ -34,7 +34,7 @@ void MenuDelegate::RunMenu(ElectronMenuModel* model, hold_first_switch_ = true; } - id_ = button->tag(); + id_ = button->GetID(); adapter_ = std::make_unique(model); auto* item = new views::MenuItemView(this); @@ -127,7 +127,7 @@ views::MenuItemView* MenuDelegate::GetSiblingMenu( views::MenuButton* button; ElectronMenuModel* model; if (menu_bar_->GetMenuButtonFromScreenPoint(screen_point, &model, &button) && - button->tag() != id_) { + button->GetID() != id_) { bool switch_in_progress = !!button_to_open_; // Always update target to open. button_to_open_ = button; From 49302e4a2f8b32ff22b4092ffe401e35d19882b6 Mon Sep 17 00:00:00 2001 From: Mike Lee <17537040+leemun1@users.noreply.github.com> Date: Mon, 25 Jul 2022 05:22:06 -0400 Subject: [PATCH 617/811] docs: Add missing link to tutorial page (#35035) Add missing link to tutorial page --- docs/tutorial/introduction.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorial/introduction.md b/docs/tutorial/introduction.md index 71ce1a67ec448..14089d9a3a678 100644 --- a/docs/tutorial/introduction.md +++ b/docs/tutorial/introduction.md @@ -66,6 +66,7 @@ Are you getting stuck anywhere? Here are a few links to places to look: +[tutorial]: tutorial-1-prerequisites.md [api documentation]: ../api/app.md [chromium]: https://www.chromium.org/ [discord]: https://discord.gg/electronjs From aeba6ca973c8ed8a8b75cceb4e0dde33f3595850 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 06:01:47 -0700 Subject: [PATCH 618/811] Bump v21.0.0-nightly.20220725 --- 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 e58a6291ea673..7a659c8a9502d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220722 \ No newline at end of file +21.0.0-nightly.20220725 \ No newline at end of file diff --git a/package.json b/package.json index b4fd0f292b8d6..4f77087ca05e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220722", + "version": "21.0.0-nightly.20220725", "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 3453470290fe7..d70dd54e8727b 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 21,0,0,20220722 - PRODUCTVERSION 21,0,0,20220722 + FILEVERSION 21,0,0,20220725 + PRODUCTVERSION 21,0,0,20220725 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 648c9934c01c12ea082a18fdf690c37e3112ce12 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 25 Jul 2022 10:50:19 -0400 Subject: [PATCH 619/811] fix: properly fire serial-port-added and serial-port-removed events (#34958) Based on 2309652: [webhid] Notify chooser context observers on shutdown | https://chromium-review.googlesource.com/c/chromium/src/+/2309652 --- .../serial/electron_serial_delegate.cc | 33 ++++++++++++++++--- .../browser/serial/electron_serial_delegate.h | 18 +++++++++- .../browser/serial/serial_chooser_context.cc | 14 ++++---- shell/browser/serial/serial_chooser_context.h | 10 +++--- .../serial/serial_chooser_controller.cc | 10 +++--- .../serial/serial_chooser_controller.h | 7 ++++ 6 files changed, 71 insertions(+), 21 deletions(-) diff --git a/shell/browser/serial/electron_serial_delegate.cc b/shell/browser/serial/electron_serial_delegate.cc index 1c4d534ba38e0..98a5a3f803a7a 100644 --- a/shell/browser/serial/electron_serial_delegate.cc +++ b/shell/browser/serial/electron_serial_delegate.cc @@ -71,15 +71,15 @@ device::mojom::SerialPortManager* ElectronSerialDelegate::GetPortManager( void ElectronSerialDelegate::AddObserver(content::RenderFrameHost* frame, Observer* observer) { - return GetChooserContext(frame)->AddPortObserver(observer); + observer_list_.AddObserver(observer); + auto* chooser_context = GetChooserContext(frame); + if (!port_observation_.IsObserving()) + port_observation_.Observe(chooser_context); } void ElectronSerialDelegate::RemoveObserver(content::RenderFrameHost* frame, Observer* observer) { - SerialChooserContext* serial_chooser_context = GetChooserContext(frame); - if (serial_chooser_context) { - return serial_chooser_context->RemovePortObserver(observer); - } + observer_list_.RemoveObserver(observer); } void ElectronSerialDelegate::RevokePortPermissionWebInitiated( @@ -120,4 +120,27 @@ void ElectronSerialDelegate::DeleteControllerForFrame( controller_map_.erase(render_frame_host); } +// SerialChooserContext::PortObserver: +void ElectronSerialDelegate::OnPortAdded( + const device::mojom::SerialPortInfo& port) { + for (auto& observer : observer_list_) + observer.OnPortAdded(port); +} + +void ElectronSerialDelegate::OnPortRemoved( + const device::mojom::SerialPortInfo& port) { + for (auto& observer : observer_list_) + observer.OnPortRemoved(port); +} + +void ElectronSerialDelegate::OnPortManagerConnectionError() { + port_observation_.Reset(); + for (auto& observer : observer_list_) + observer.OnPortManagerConnectionError(); +} + +void ElectronSerialDelegate::OnSerialChooserContextShutdown() { + port_observation_.Reset(); +} + } // namespace electron diff --git a/shell/browser/serial/electron_serial_delegate.h b/shell/browser/serial/electron_serial_delegate.h index 1153bcd8ad297..5876d7e511041 100644 --- a/shell/browser/serial/electron_serial_delegate.h +++ b/shell/browser/serial/electron_serial_delegate.h @@ -11,13 +11,15 @@ #include "base/memory/weak_ptr.h" #include "content/public/browser/serial_delegate.h" +#include "shell/browser/serial/serial_chooser_context.h" #include "shell/browser/serial/serial_chooser_controller.h" namespace electron { class SerialChooserController; -class ElectronSerialDelegate : public content::SerialDelegate { +class ElectronSerialDelegate : public content::SerialDelegate, + public SerialChooserContext::PortObserver { public: ElectronSerialDelegate(); ~ElectronSerialDelegate() override; @@ -48,6 +50,13 @@ class ElectronSerialDelegate : public content::SerialDelegate { void DeleteControllerForFrame(content::RenderFrameHost* render_frame_host); + // SerialChooserContext::PortObserver: + void OnPortAdded(const device::mojom::SerialPortInfo& port) override; + void OnPortRemoved(const device::mojom::SerialPortInfo& port) override; + void OnPortManagerConnectionError() override; + void OnPermissionRevoked(const url::Origin& origin) override {} + void OnSerialChooserContextShutdown() override; + private: SerialChooserController* ControllerForFrame( content::RenderFrameHost* render_frame_host); @@ -56,6 +65,13 @@ class ElectronSerialDelegate : public content::SerialDelegate { std::vector filters, content::SerialChooser::Callback callback); + base::ScopedObservation + port_observation_{this}; + base::ObserverList observer_list_; + std::unordered_map> controller_map_; diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index 356547f81a55f..57798ccf5692f 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -90,11 +90,13 @@ base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) { SerialChooserContext::SerialChooserContext(ElectronBrowserContext* context) : browser_context_(context) {} -SerialChooserContext::~SerialChooserContext() = default; - -void SerialChooserContext::OnPermissionRevoked(const url::Origin& origin) { - for (auto& observer : port_observer_list_) - observer.OnPermissionRevoked(origin); +SerialChooserContext::~SerialChooserContext() { + // Notify observers that the chooser context is about to be destroyed. + // Observers must remove themselves from the observer lists. + for (auto& observer : port_observer_list_) { + observer.OnSerialChooserContextShutdown(); + DCHECK(!port_observer_list_.HasObserver(&observer)); + } } void SerialChooserContext::GrantPortPermission( @@ -127,8 +129,6 @@ void SerialChooserContext::RevokePortPermissionWebInitiated( auto it = port_info_.find(token); if (it == port_info_.end()) return; - - return OnPermissionRevoked(origin); } // static diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index a0426c8b8f0c4..2424ed1e64f19 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/shell/browser/serial/serial_chooser_context.h @@ -46,7 +46,12 @@ extern const char kUsbDriverKey[]; class SerialChooserContext : public KeyedService, public device::mojom::SerialPortManagerClient { public: - using PortObserver = content::SerialDelegate::Observer; + class PortObserver : public content::SerialDelegate::Observer { + public: + // Called when the SerialChooserContext is shutting down. Observers must + // remove themselves before returning. + virtual void OnSerialChooserContextShutdown() = 0; + }; explicit SerialChooserContext(ElectronBrowserContext* context); ~SerialChooserContext() override; @@ -55,9 +60,6 @@ class SerialChooserContext : public KeyedService, SerialChooserContext(const SerialChooserContext&) = delete; SerialChooserContext& operator=(const SerialChooserContext&) = delete; - // ObjectPermissionContextBase::PermissionObserver: - void OnPermissionRevoked(const url::Origin& origin); - // Serial-specific interface for granting and checking permissions. void GrantPortPermission(const url::Origin& origin, const device::mojom::SerialPortInfo& port, diff --git a/shell/browser/serial/serial_chooser_controller.cc b/shell/browser/serial/serial_chooser_controller.cc index f14811e65d1bc..017d951d4c01b 100644 --- a/shell/browser/serial/serial_chooser_controller.cc +++ b/shell/browser/serial/serial_chooser_controller.cc @@ -77,13 +77,11 @@ SerialChooserController::SerialChooserController( DCHECK(chooser_context_); chooser_context_->GetPortManager()->GetDevices(base::BindOnce( &SerialChooserController::OnGetDevices, weak_factory_.GetWeakPtr())); + observation_.Observe(chooser_context_.get()); } SerialChooserController::~SerialChooserController() { RunCallback(/*port=*/nullptr); - if (chooser_context_) { - chooser_context_->RemovePortObserver(this); - } } api::Session* SerialChooserController::GetSession() { @@ -117,7 +115,11 @@ void SerialChooserController::OnPortRemoved( } void SerialChooserController::OnPortManagerConnectionError() { - // TODO(nornagon/jkleinsc): report event + observation_.Reset(); +} + +void SerialChooserController::OnSerialChooserContextShutdown() { + observation_.Reset(); } void SerialChooserController::OnDeviceChosen(const std::string& port_id) { diff --git a/shell/browser/serial/serial_chooser_controller.h b/shell/browser/serial/serial_chooser_controller.h index 5635ea8bed743..761065763fbdb 100644 --- a/shell/browser/serial/serial_chooser_controller.h +++ b/shell/browser/serial/serial_chooser_controller.h @@ -48,6 +48,7 @@ class SerialChooserController final : public SerialChooserContext::PortObserver, void OnPortRemoved(const device::mojom::SerialPortInfo& port) override; void OnPortManagerConnectionError() override; void OnPermissionRevoked(const url::Origin& origin) override {} + void OnSerialChooserContextShutdown() override; private: api::Session* GetSession(); @@ -62,6 +63,12 @@ class SerialChooserController final : public SerialChooserContext::PortObserver, base::WeakPtr chooser_context_; + base::ScopedObservation + observation_{this}; + std::vector ports_; base::WeakPtr serial_delegate_; From 2c51a81e853be2cf01560a9e9c24bd83a0918798 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:06:52 -0400 Subject: [PATCH 620/811] chore: bump node to v16.16.0 (main) (#34853) * chore: bump node in DEPS to v16.16.0 * chore: update patches * 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 +- ...e_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 110026e134caf..a0ce155d6a56e 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '105.0.5187.0', 'node_version': - 'v16.15.1', + 'v16.16.0', 'nan_version': '16fa32231e2ccd89d2804b3f765319128b20c4ac', 'squirrel.mac_version': diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 778d72eb5e98f..61e2003bd275c 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1834,7 +1834,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 39f6406dd2b52e16a2be5c00c554da30a806ead9..36117c5b36c65f0a8a9bb9c421bc74b82f2b1f3a 100644 +index 0f1a9b52cccba1e54150494a7ee5b28961a8d59d..bb68b2dfef4a693d8a1d0fe056fe696254d12d09 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ diff --git a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch index 622e1cc6d2de3..b21f8958be5d3 100644 --- a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch +++ b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch @@ -45,10 +45,10 @@ index bdfe81d11cc50f492c93fe48f6946765b6fb5238..ca08deeb19f5fe9ee399ad809b24579f 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], }], diff --git a/configure.py b/configure.py -index 95b31769cb5756578d66193716c638f504bd44aa..fe741d15da821396883dd72b4e0a42c7758bd557 100755 +index fed2688c792486e5f86509eea0dd6d45f749a99d..426afed7cd0a3a403d4b753af0b25f55024d0f71 100755 --- a/configure.py +++ b/configure.py -@@ -1433,6 +1433,7 @@ def configure_v8(o): +@@ -1439,6 +1439,7 @@ def configure_v8(o): o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1 o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 From ad1bbc198b2e9387c5317b90466b77172f27ab56 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 00:37:37 -0700 Subject: [PATCH 621/811] test: migrate clipboard spec to spec-main (#35059) --- .../api-clipboard-spec.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename spec/api-clipboard-spec.js => spec-main/api-clipboard-spec.ts (92%) diff --git a/spec/api-clipboard-spec.js b/spec-main/api-clipboard-spec.ts similarity index 92% rename from spec/api-clipboard-spec.js rename to spec-main/api-clipboard-spec.ts index fb08eb768f6da..604c8d03bfa4e 100644 --- a/spec/api-clipboard-spec.js +++ b/spec-main/api-clipboard-spec.ts @@ -1,9 +1,8 @@ -const { expect } = require('chai'); -const path = require('path'); -const { Buffer } = require('buffer'); -const { ifdescribe, ifit } = require('./spec-helpers'); - -const { clipboard, nativeImage } = require('electron'); +import { expect } from 'chai'; +import * as path from 'path'; +import { Buffer } from 'buffer'; +import { ifdescribe, ifit } from './spec-helpers'; +import { clipboard, nativeImage } from 'electron/common'; // FIXME(zcbenz): Clipboard tests are failing on WOA. ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard module', () => { @@ -13,7 +12,7 @@ ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard it('returns NativeImage instance', () => { const p = path.join(fixtures, 'assets', 'logo.png'); const i = nativeImage.createFromPath(p); - clipboard.writeImage(p); + clipboard.writeImage(i); const readImage = clipboard.readImage(); expect(readImage.toDataURL()).to.equal(i.toDataURL()); }); @@ -67,7 +66,7 @@ ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard const type = process.platform === 'darwin' ? 'NSFilenamesPboardType' : 'FileNameW'; expect(() => { - const result = clipboard.read(type); + clipboard.read(type); }).to.not.throw(); }); it('can read data written with writeBuffer', () => { @@ -91,7 +90,7 @@ ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard html: 'Hi', rtf: '{\\rtf1\\utf8 text}', bookmark: 'a title', - image: p + image: i }); expect(clipboard.readText()).to.equal(text); @@ -126,7 +125,7 @@ ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard it('throws an error when a non-Buffer is specified', () => { expect(() => { - clipboard.writeBuffer('public/utf8-plain-text', 'hello'); + clipboard.writeBuffer('public/utf8-plain-text', 'hello' as any); }).to.throw(/buffer must be a node Buffer/); }); From dd68fae081c8cf9850b485ddc594ba6d68eda504 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 00:57:01 -0700 Subject: [PATCH 622/811] test: migrate nativeImage specs to main (#35062) * test: move nativeImage specs to main * simplify test --- docs/api/native-image.md | 22 +- .../api-native-image-spec.ts | 218 ++++++------------ 2 files changed, 86 insertions(+), 154 deletions(-) rename spec/api-native-image-spec.js => spec-main/api-native-image-spec.ts (76%) diff --git a/docs/api/native-image.md b/docs/api/native-image.md index a4d969d094e27..0ad349bb081a4 100644 --- a/docs/api/native-image.md +++ b/docs/api/native-image.md @@ -149,7 +149,7 @@ console.log(image) * `options` Object * `width` Integer * `height` Integer - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `NativeImage` @@ -162,7 +162,7 @@ pixel data returned by `toBitmap()`. The specific format is platform-dependent. * `options` Object (optional) * `width` Integer (optional) - Required for bitmap buffers. * `height` Integer (optional) - Required for bitmap buffers. - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `NativeImage` @@ -225,7 +225,7 @@ The following methods are available on instances of the `NativeImage` class: #### `image.toPNG([options])` * `options` Object (optional) - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded data. @@ -238,7 +238,7 @@ Returns `Buffer` - A [Buffer][buffer] that contains the image's `JPEG` encoded d #### `image.toBitmap([options])` * `options` Object (optional) - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `Buffer` - A [Buffer][buffer] that contains a copy of the image's raw bitmap pixel data. @@ -246,14 +246,14 @@ data. #### `image.toDataURL([options])` * `options` Object (optional) - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `string` - The data URL of the image. #### `image.getBitmap([options])` * `options` Object (optional) - * `scaleFactor` Double (optional) - Defaults to 1.0. + * `scaleFactor` Number (optional) - Defaults to 1.0. Returns `Buffer` - A [Buffer][buffer] that contains the image's raw bitmap pixel data. @@ -276,7 +276,7 @@ Returns `boolean` - Whether the image is empty. #### `image.getSize([scaleFactor])` -* `scaleFactor` Double (optional) - Defaults to 1.0. +* `scaleFactor` Number (optional) - Defaults to 1.0. Returns [`Size`](structures/size.md). @@ -317,20 +317,20 @@ will be preserved in the resized image. #### `image.getAspectRatio([scaleFactor])` -* `scaleFactor` Double (optional) - Defaults to 1.0. +* `scaleFactor` Number (optional) - Defaults to 1.0. -Returns `Float` - The image's aspect ratio. +Returns `Number` - The image's aspect ratio. If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value. #### `image.getScaleFactors()` -Returns `Float[]` - An array of all scale factors corresponding to representations for a given nativeImage. +Returns `Number[]` - An array of all scale factors corresponding to representations for a given nativeImage. #### `image.addRepresentation(options)` * `options` Object - * `scaleFactor` Double - The scale factor to add the image representation for. + * `scaleFactor` Number (optional) - The scale factor to add the image representation for. * `width` Integer (optional) - Defaults to 0. Required if a bitmap buffer is specified as `buffer`. * `height` Integer (optional) - Defaults to 0. Required if a bitmap buffer diff --git a/spec/api-native-image-spec.js b/spec-main/api-native-image-spec.ts similarity index 76% rename from spec/api-native-image-spec.js rename to spec-main/api-native-image-spec.ts index 715655f15fd2a..57b09ec8f6e0e 100644 --- a/spec/api-native-image-spec.js +++ b/spec-main/api-native-image-spec.ts @@ -1,119 +1,53 @@ -'use strict'; - -const { expect } = require('chai'); -const { nativeImage } = require('electron'); -const { ifdescribe, ifit } = require('./spec-helpers'); -const path = require('path'); +import { expect } from 'chai'; +import { nativeImage } from 'electron/common'; +import { ifdescribe, ifit } from './spec-helpers'; +import * as path from 'path'; describe('nativeImage module', () => { - const ImageFormat = { - PNG: 'png', - JPEG: 'jpeg' - }; - - const images = [ - { - filename: 'logo.png', - format: ImageFormat.PNG, - hasAlphaChannel: true, - hasDataUrl: false, - width: 538, - height: 190 - }, - { - dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYlWNgAAIAAAUAAdafFs0AAAAASUVORK5CYII=', - filename: '1x1.png', - format: ImageFormat.PNG, - hasAlphaChannel: true, - hasDataUrl: true, - height: 1, - width: 1 - }, - { - dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAFklEQVQYlWP8//8/AwMDEwMDAwMDAwAkBgMBBMzldwAAAABJRU5ErkJggg==', - filename: '2x2.jpg', - format: ImageFormat.JPEG, - hasAlphaChannel: false, - hasDataUrl: true, - height: 2, - width: 2 - }, - { - dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAADElEQVQYlWNgIAoAAAAnAAGZWEMnAAAAAElFTkSuQmCC', - filename: '3x3.png', - format: ImageFormat.PNG, - hasAlphaChannel: true, - hasDataUrl: true, - height: 3, - width: 3 - } - ]; + const fixturesPath = path.join(__dirname, '..', 'spec', 'fixtures'); - /** - * @param {?string} filename - * @returns {?string} Full path. - */ - const getImagePathFromFilename = (filename) => { - return (filename === null) ? null - : path.join(__dirname, 'fixtures', 'assets', filename); + const imageLogo = { + path: path.join(fixturesPath, 'assets', 'logo.png'), + width: 538, + height: 190 }; - - /** - * @param {!Object} image - * @param {Object} filters - * @returns {boolean} - */ - const imageMatchesTheFilters = (image, filters = null) => { - if (filters === null) { - return true; - } - - return Object.entries(filters) - .every(([key, value]) => image[key] === value); + const image1x1 = { + dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYlWNgAAIAAAUAAdafFs0AAAAASUVORK5CYII=', + path: path.join(fixturesPath, 'assets', '1x1.png'), + height: 1, + width: 1 }; - - /** - * @param {!Object} filters - * @returns {!Array} A matching images list. - */ - const getImages = (filters) => { - const matchingImages = images - .filter(i => imageMatchesTheFilters(i, filters)); - - // Add `.path` property to every image. - matchingImages - .forEach(i => { i.path = getImagePathFromFilename(i.filename); }); - - return matchingImages; + const image2x2 = { + dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAFklEQVQYlWP8//8/AwMDEwMDAwMDAwAkBgMBBMzldwAAAABJRU5ErkJggg==', + path: path.join(fixturesPath, 'assets', '2x2.jpg'), + height: 2, + width: 2 }; - - /** - * @param {!Object} filters - * @returns {Object} A matching image if any. - */ - const getImage = (filters) => { - const matchingImages = getImages(filters); - - let matchingImage = null; - if (matchingImages.length > 0) { - matchingImage = matchingImages[0]; - } - - return matchingImage; + const image3x3 = { + dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAADElEQVQYlWNgIAoAAAAnAAGZWEMnAAAAAElFTkSuQmCC', + path: path.join(fixturesPath, 'assets', '3x3.png'), + height: 3, + width: 3 }; + const dataUrlImages = [ + image1x1, + image2x2, + image3x3 + ]; + ifdescribe(process.platform === 'darwin')('isMacTemplateImage state', () => { describe('with properties', () => { it('correctly recognizes a template image', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); expect(image.isMacTemplateImage).to.be.false(); - const templateImage = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo_Template.png')); + const templateImage = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo_Template.png')); expect(templateImage.isMacTemplateImage).to.be.true(); }); it('sets a template image', function () { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); expect(image.isMacTemplateImage).to.be.false(); image.isMacTemplateImage = true; @@ -123,15 +57,15 @@ describe('nativeImage module', () => { describe('with functions', () => { it('correctly recognizes a template image', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); expect(image.isTemplateImage()).to.be.false(); - const templateImage = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo_Template.png')); + const templateImage = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo_Template.png')); expect(templateImage.isTemplateImage()).to.be.true(); }); it('sets a template image', function () { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); expect(image.isTemplateImage()).to.be.false(); image.setTemplateImage(true); @@ -168,7 +102,7 @@ describe('nativeImage module', () => { }); it('returns an image created from the given buffer', () => { - const imageA = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const imageA = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); const imageB = nativeImage.createFromBitmap(imageA.toBitmap(), imageA.getSize()); expect(imageB.getSize()).to.deep.equal({ width: 538, height: 190 }); @@ -178,10 +112,10 @@ describe('nativeImage module', () => { }); it('throws on invalid arguments', () => { - expect(() => nativeImage.createFromBitmap(null, {})).to.throw('buffer must be a node Buffer'); - expect(() => nativeImage.createFromBitmap([12, 14, 124, 12], {})).to.throw('buffer must be a node Buffer'); - expect(() => nativeImage.createFromBitmap(Buffer.from([]), {})).to.throw('width is required'); - expect(() => nativeImage.createFromBitmap(Buffer.from([]), { width: 1 })).to.throw('height is required'); + expect(() => nativeImage.createFromBitmap(null as any, {} as any)).to.throw('buffer must be a node Buffer'); + expect(() => nativeImage.createFromBitmap([12, 14, 124, 12] as any, {} as any)).to.throw('buffer must be a node Buffer'); + expect(() => nativeImage.createFromBitmap(Buffer.from([]), {} as any)).to.throw('width is required'); + expect(() => nativeImage.createFromBitmap(Buffer.from([]), { width: 1 } as any)).to.throw('height is required'); expect(() => nativeImage.createFromBitmap(Buffer.from([]), { width: 1, height: 1 })).to.throw('invalid buffer size'); }); }); @@ -197,7 +131,7 @@ describe('nativeImage module', () => { }); it('returns an image created from the given buffer', () => { - const imageA = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const imageA = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); const imageB = nativeImage.createFromBuffer(imageA.toPNG()); expect(imageB.getSize()).to.deep.equal({ width: 538, height: 190 }); @@ -231,8 +165,8 @@ describe('nativeImage module', () => { }); it('throws on invalid arguments', () => { - expect(() => nativeImage.createFromBuffer(null)).to.throw('buffer must be a node Buffer'); - expect(() => nativeImage.createFromBuffer([12, 14, 124, 12])).to.throw('buffer must be a node Buffer'); + expect(() => nativeImage.createFromBuffer(null as any)).to.throw('buffer must be a node Buffer'); + expect(() => nativeImage.createFromBuffer([12, 14, 124, 12] as any)).to.throw('buffer must be a node Buffer'); }); }); @@ -242,15 +176,14 @@ describe('nativeImage module', () => { }); it('returns an image created from the given string', () => { - const imagesData = getImages({ hasDataUrl: true }); - for (const imageData of imagesData) { + for (const imageData of dataUrlImages) { const imageFromPath = nativeImage.createFromPath(imageData.path); - const imageFromDataUrl = nativeImage.createFromDataURL(imageData.dataUrl); + const imageFromDataUrl = nativeImage.createFromDataURL(imageData.dataUrl!); expect(imageFromDataUrl.isEmpty()).to.be.false(); expect(imageFromDataUrl.getSize()).to.deep.equal(imageFromPath.getSize()); expect(imageFromDataUrl.toBitmap()).to.satisfy( - bitmap => imageFromPath.toBitmap().equals(bitmap)); + (bitmap: any) => imageFromPath.toBitmap().equals(bitmap)); expect(imageFromDataUrl.toDataURL()).to.equal(imageFromPath.toDataURL()); } }); @@ -258,9 +191,8 @@ describe('nativeImage module', () => { describe('toDataURL()', () => { it('returns a PNG data URL', () => { - const imagesData = getImages({ hasDataUrl: true }); - for (const imageData of imagesData) { - const imageFromPath = nativeImage.createFromPath(imageData.path); + for (const imageData of dataUrlImages) { + const imageFromPath = nativeImage.createFromPath(imageData.path!); const scaleFactors = [1.0, 2.0]; for (const scaleFactor of scaleFactors) { @@ -270,7 +202,7 @@ describe('nativeImage module', () => { }); it('returns a data URL at 1x scale factor by default', () => { - const imageData = getImage({ filename: 'logo.png' }); + const imageData = imageLogo; const image = nativeImage.createFromPath(imageData.path); const imageOne = nativeImage.createFromBuffer(image.toPNG(), { @@ -289,7 +221,7 @@ describe('nativeImage module', () => { }); it('supports a scale factor', () => { - const imageData = getImage({ filename: 'logo.png' }); + const imageData = imageLogo; const image = nativeImage.createFromPath(imageData.path); const expectedSize = { width: imageData.width, height: imageData.height }; @@ -305,7 +237,7 @@ describe('nativeImage module', () => { describe('toPNG()', () => { it('returns a buffer at 1x scale factor by default', () => { - const imageData = getImage({ filename: 'logo.png' }); + const imageData = imageLogo; const imageA = nativeImage.createFromPath(imageData.path); const imageB = nativeImage.createFromBuffer(imageA.toPNG(), { @@ -324,7 +256,7 @@ describe('nativeImage module', () => { }); it('supports a scale factor', () => { - const imageData = getImage({ filename: 'logo.png' }); + const imageData = imageLogo; const image = nativeImage.createFromPath(imageData.path); const imageFromBufferOne = nativeImage.createFromBuffer( @@ -349,28 +281,28 @@ describe('nativeImage module', () => { }); it('loads images from paths relative to the current working directory', () => { - const imagePath = path.relative('.', path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const imagePath = path.relative('.', path.join(fixturesPath, 'assets', 'logo.png')); const image = nativeImage.createFromPath(imagePath); expect(image.isEmpty()).to.be.false(); expect(image.getSize()).to.deep.equal({ width: 538, height: 190 }); }); it('loads images from paths with `.` segments', () => { - const imagePath = `${path.join(__dirname, 'fixtures')}${path.sep}.${path.sep}${path.join('assets', 'logo.png')}`; + const imagePath = `${path.join(fixturesPath)}${path.sep}.${path.sep}${path.join('assets', 'logo.png')}`; const image = nativeImage.createFromPath(imagePath); expect(image.isEmpty()).to.be.false(); expect(image.getSize()).to.deep.equal({ width: 538, height: 190 }); }); it('loads images from paths with `..` segments', () => { - const imagePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; + const imagePath = `${path.join(fixturesPath, 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; const image = nativeImage.createFromPath(imagePath); expect(image.isEmpty()).to.be.false(); expect(image.getSize()).to.deep.equal({ width: 538, height: 190 }); }); ifit(process.platform === 'darwin')('Gets an NSImage pointer on macOS', function () { - const imagePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; + const imagePath = `${path.join(fixturesPath, 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; const image = nativeImage.createFromPath(imagePath); const nsimage = image.getNativeHandle(); @@ -382,7 +314,7 @@ describe('nativeImage module', () => { }); ifit(process.platform === 'win32')('loads images from .ico files on Windows', function () { - const imagePath = path.join(__dirname, 'fixtures', 'assets', 'icon.ico'); + const imagePath = path.join(fixturesPath, 'assets', 'icon.ico'); const image = nativeImage.createFromPath(imagePath); expect(image.isEmpty()).to.be.false(); expect(image.getSize()).to.deep.equal({ width: 256, height: 256 }); @@ -413,7 +345,7 @@ describe('nativeImage module', () => { describe('resize(options)', () => { it('returns a resized image', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); for (const [resizeTo, expectedSize] of new Map([ [{}, { width: 538, height: 190 }], [{ width: 269 }, { width: 269, height: 95 }], @@ -436,7 +368,7 @@ describe('nativeImage module', () => { }); it('supports a quality option', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); const good = image.resize({ width: 100, height: 100, quality: 'good' }); const better = image.resize({ width: 100, height: 100, quality: 'better' }); const best = image.resize({ width: 100, height: 100, quality: 'best' }); @@ -453,7 +385,7 @@ describe('nativeImage module', () => { }); it('returns an empty image when the bounds are invalid', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); expect(image.crop({ width: 0, height: 0, x: 0, y: 0 }).isEmpty()).to.be.true(); expect(image.crop({ width: -1, height: 10, x: 0, y: 0 }).isEmpty()).to.be.true(); expect(image.crop({ width: 10, height: -35, x: 0, y: 0 }).isEmpty()).to.be.true(); @@ -461,7 +393,7 @@ describe('nativeImage module', () => { }); it('returns a cropped image', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); const cropA = image.crop({ width: 25, height: 64, x: 0, y: 0 }); const cropB = image.crop({ width: 25, height: 64, x: 30, y: 40 }); expect(cropA.getSize()).to.deep.equal({ width: 25, height: 64 }); @@ -470,7 +402,7 @@ describe('nativeImage module', () => { }); it('toBitmap() returns a buffer of the right size', () => { - const image = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')); + const image = nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'logo.png')); const crop = image.crop({ width: 25, height: 64, x: 0, y: 0 }); expect(crop.toBitmap().length).to.equal(25 * 64 * 4); }); @@ -482,7 +414,7 @@ describe('nativeImage module', () => { }); it('returns an aspect ratio of an image', () => { - const imageData = getImage({ filename: 'logo.png' }); + const imageData = imageLogo; // imageData.width / imageData.height = 2.831578947368421 const expectedAspectRatio = 2.8315789699554443; @@ -510,7 +442,7 @@ describe('nativeImage module', () => { }); it('returns native image given valid params', async () => { - const goodPath = path.join(__dirname, 'fixtures', 'assets', 'logo.png'); + const goodPath = path.join(fixturesPath, 'assets', 'logo.png'); const goodSize = { width: 100, height: 100 }; const result = await nativeImage.createThumbnailFromPath(goodPath, goodSize); expect(result.isEmpty()).to.equal(false); @@ -533,7 +465,7 @@ describe('nativeImage module', () => { it('supports adding a buffer representation for a scale factor', () => { const image = nativeImage.createEmpty(); - const imageDataOne = getImage({ width: 1, height: 1 }); + const imageDataOne = image1x1; image.addRepresentation({ scaleFactor: 1.0, buffer: nativeImage.createFromPath(imageDataOne.path).toPNG() @@ -541,7 +473,7 @@ describe('nativeImage module', () => { expect(image.getScaleFactors()).to.deep.equal([1]); - const imageDataTwo = getImage({ width: 2, height: 2 }); + const imageDataTwo = image2x2; image.addRepresentation({ scaleFactor: 2.0, buffer: nativeImage.createFromPath(imageDataTwo.path).toPNG() @@ -549,7 +481,7 @@ describe('nativeImage module', () => { expect(image.getScaleFactors()).to.deep.equal([1, 2]); - const imageDataThree = getImage({ width: 3, height: 3 }); + const imageDataThree = image3x3; image.addRepresentation({ scaleFactor: 3.0, buffer: nativeImage.createFromPath(imageDataThree.path).toPNG() @@ -559,7 +491,7 @@ describe('nativeImage module', () => { image.addRepresentation({ scaleFactor: 4.0, - buffer: 'invalid' + buffer: 'invalid' as any }); // this one failed, so it shouldn't show up in the scale factors @@ -577,19 +509,19 @@ describe('nativeImage module', () => { it('supports adding a data URL representation for a scale factor', () => { const image = nativeImage.createEmpty(); - const imageDataOne = getImage({ width: 1, height: 1 }); + const imageDataOne = image1x1; image.addRepresentation({ scaleFactor: 1.0, dataURL: imageDataOne.dataUrl }); - const imageDataTwo = getImage({ width: 2, height: 2 }); + const imageDataTwo = image2x2; image.addRepresentation({ scaleFactor: 2.0, dataURL: imageDataTwo.dataUrl }); - const imageDataThree = getImage({ width: 3, height: 3 }); + const imageDataThree = image3x3; image.addRepresentation({ scaleFactor: 3.0, dataURL: imageDataThree.dataUrl @@ -610,16 +542,16 @@ describe('nativeImage module', () => { }); it('supports adding a representation to an existing image', () => { - const imageDataOne = getImage({ width: 1, height: 1 }); + const imageDataOne = image1x1; const image = nativeImage.createFromPath(imageDataOne.path); - const imageDataTwo = getImage({ width: 2, height: 2 }); + const imageDataTwo = image2x2; image.addRepresentation({ scaleFactor: 2.0, dataURL: imageDataTwo.dataUrl }); - const imageDataThree = getImage({ width: 3, height: 3 }); + const imageDataThree = image3x3; image.addRepresentation({ scaleFactor: 2.0, dataURL: imageDataThree.dataUrl From aa40652456649125bdcd4cbab7936e0f77c17eb9 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 00:57:12 -0700 Subject: [PATCH 623/811] test: remove unused spec/expect-helpers (#35055) --- spec/chromium-spec.js | 1 - spec/expect-helpers.js | 18 ------------------ 2 files changed, 19 deletions(-) delete mode 100644 spec/expect-helpers.js diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 6e92dc6c7e0e7..2b213f45937cd 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -7,7 +7,6 @@ const url = require('url'); const ChildProcess = require('child_process'); const { ipcRenderer } = require('electron'); const { emittedOnce, waitForEvent } = require('./events-helpers'); -const { resolveGetters } = require('./expect-helpers'); const { ifit, ifdescribe, delay } = require('./spec-helpers'); const features = process._linkedBinding('electron_common_features'); diff --git a/spec/expect-helpers.js b/spec/expect-helpers.js deleted file mode 100644 index 18d72d1ec66b8..0000000000000 --- a/spec/expect-helpers.js +++ /dev/null @@ -1,18 +0,0 @@ -function resolveSingleObjectGetters (object) { - if (object && typeof object === 'object') { - const newObject = {}; - for (const key in object) { // eslint-disable-line guard-for-in - newObject[key] = resolveGetters(object[key])[0]; - } - return newObject; - } - return object; -} - -function resolveGetters (...args) { - return args.map(resolveSingleObjectGetters); -} - -module.exports = { - resolveGetters -}; From cabfb8507d02365bea0cb473c5c93e2027b6d5c4 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 01:12:04 -0700 Subject: [PATCH 624/811] test: remove references to robotjs (#35064) --- spec-main/api-global-shortcut-spec.ts | 18 +-------- spec-main/api-web-contents-spec.ts | 57 +-------------------------- spec/package.json | 3 -- 3 files changed, 2 insertions(+), 76 deletions(-) diff --git a/spec-main/api-global-shortcut-spec.ts b/spec-main/api-global-shortcut-spec.ts index 689ea56bbb363..36d5191e5642f 100644 --- a/spec-main/api-global-shortcut-spec.ts +++ b/spec-main/api-global-shortcut-spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { globalShortcut, BrowserWindow } from 'electron/main'; +import { globalShortcut } from 'electron/main'; import { ifdescribe } from './spec-helpers'; ifdescribe(process.platform !== 'win32')('globalShortcut module', () => { @@ -55,20 +55,4 @@ ifdescribe(process.platform !== 'win32')('globalShortcut module', () => { globalShortcut.unregisterAll(); }); - - it('successfully registers and calls the callback for media keys', function (done) { - let robotjs; - try { - robotjs = require('robotjs'); - } catch (err) { - this.skip(); - } - - globalShortcut.register('MediaPlayPause', () => done()); - - const w = new BrowserWindow({ show: false }); - w.loadURL('about:blank'); - - robotjs.keyTap('audio_play'); - }); }); diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 0152f9d158ed9..8f4df42e2348f 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -4,10 +4,9 @@ import * as path from 'path'; import * as fs from 'fs'; import * as http from 'http'; import { BrowserWindow, ipcMain, webContents, session, WebContents, app, BrowserView } from 'electron/main'; -import { clipboard } from 'electron/common'; import { emittedOnce } from './events-helpers'; import { closeAllWindows } from './window-helpers'; -import { ifdescribe, ifit, delay, defer } from './spec-helpers'; +import { ifdescribe, delay, defer } from './spec-helpers'; const pdfjs = require('pdfjs-dist'); const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures'); @@ -1906,60 +1905,6 @@ describe('webContents module', () => { }); }); - describe('devtools window', () => { - let hasRobotJS = false; - try { - // We have other tests that check if native modules work, if we fail to require - // robotjs let's skip this test to avoid false negatives - require('robotjs'); - hasRobotJS = true; - } catch (err) { /* no-op */ } - - afterEach(closeAllWindows); - - // NB. on macOS, this requires that you grant your terminal the ability to - // control your computer. Open System Preferences > Security & Privacy > - // Privacy > Accessibility and grant your terminal the permission to control - // your computer. - ifit(hasRobotJS)('can receive and handle menu events', async () => { - const w = new BrowserWindow({ show: true, webPreferences: { nodeIntegration: true } }); - w.loadFile(path.join(fixturesPath, 'pages', 'key-events.html')); - - // Ensure the devtools are loaded - w.webContents.closeDevTools(); - const opened = emittedOnce(w.webContents, 'devtools-opened'); - w.webContents.openDevTools(); - await opened; - await emittedOnce(w.webContents.devToolsWebContents!, 'did-finish-load'); - w.webContents.devToolsWebContents!.focus(); - - // Focus an input field - await w.webContents.devToolsWebContents!.executeJavaScript(` - const input = document.createElement('input') - document.body.innerHTML = '' - document.body.appendChild(input) - input.focus() - `); - - // Write something to the clipboard - clipboard.writeText('test value'); - - const pasted = w.webContents.devToolsWebContents!.executeJavaScript(`new Promise(resolve => { - document.querySelector('input').addEventListener('paste', (e) => { - resolve(e.target.value) - }) - })`); - - // Fake a paste request using robotjs to emulate a REAL keyboard paste event - require('robotjs').keyTap('v', process.platform === 'darwin' ? ['command'] : ['control']); - - const val = await pasted; - - // Once we're done expect the paste to have been successful - expect(val).to.equal('test value', 'value should eventually become the pasted value'); - }); - }); - describe('Shared Workers', () => { afterEach(closeAllWindows); diff --git a/spec/package.json b/spec/package.json index 38ccc292934a1..d14f50aac78e2 100644 --- a/spec/package.json +++ b/spec/package.json @@ -3,9 +3,6 @@ "productName": "Electron Test", "main": "static/main.js", "version": "0.1.0", - "scripts": { - "postinstall": "node ../script/run-if-exists.js node_modules/robotjs node-gyp rebuild" - }, "devDependencies": { "basic-auth": "^2.0.1", "chai": "^4.2.0", From 667408204138a837ff823b708dc7d43e6d2712b7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 06:01:07 -0700 Subject: [PATCH 625/811] Bump v21.0.0-nightly.20220726 --- 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 7a659c8a9502d..0c8e3b1b47a97 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220725 \ No newline at end of file +21.0.0-nightly.20220726 \ No newline at end of file diff --git a/package.json b/package.json index 4f77087ca05e4..a7ef000f01cf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220725", + "version": "21.0.0-nightly.20220726", "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 d70dd54e8727b..6feff27acb183 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 21,0,0,20220725 - PRODUCTVERSION 21,0,0,20220725 + FILEVERSION 21,0,0,20220726 + PRODUCTVERSION 21,0,0,20220726 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c842f63383d8d9500a850e3470972de74ff0809f Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 09:31:26 -0700 Subject: [PATCH 626/811] test: migrate process module specs to spec-main (#35056) --- spec-main/api-process-spec.ts | 124 ++++++++++++++++++++++++++++++++++ spec/api-process-spec.js | 124 ---------------------------------- 2 files changed, 124 insertions(+), 124 deletions(-) create mode 100644 spec-main/api-process-spec.ts delete mode 100644 spec/api-process-spec.js diff --git a/spec-main/api-process-spec.ts b/spec-main/api-process-spec.ts new file mode 100644 index 0000000000000..cb0fe9bede55e --- /dev/null +++ b/spec-main/api-process-spec.ts @@ -0,0 +1,124 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import { expect } from 'chai'; +import { BrowserWindow } from 'electron'; +import { defer, ifdescribe } from './spec-helpers'; +import { app } from 'electron/main'; +import { closeAllWindows } from './window-helpers'; + +describe('renderer process module', () => { + let w: BrowserWindow; + before(async () => { + w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); + await w.loadURL('about:blank'); + }); + after(closeAllWindows); + + describe('process.getCreationTime()', () => { + it('returns a creation time', async () => { + const creationTime = await w.webContents.executeJavaScript('process.getCreationTime()'); + expect(creationTime).to.be.a('number').and.be.at.least(0); + }); + }); + + describe('process.getCPUUsage()', () => { + it('returns a cpu usage object', async () => { + const cpuUsage = await w.webContents.executeJavaScript('process.getCPUUsage()'); + expect(cpuUsage.percentCPUUsage).to.be.a('number'); + expect(cpuUsage.idleWakeupsPerSecond).to.be.a('number'); + }); + }); + + ifdescribe(process.platform !== 'darwin')('process.getIOCounters()', () => { + it('returns an io counters object', async () => { + const ioCounters = await w.webContents.executeJavaScript('process.getIOCounters()'); + expect(ioCounters.readOperationCount).to.be.a('number'); + expect(ioCounters.writeOperationCount).to.be.a('number'); + expect(ioCounters.otherOperationCount).to.be.a('number'); + expect(ioCounters.readTransferCount).to.be.a('number'); + expect(ioCounters.writeTransferCount).to.be.a('number'); + expect(ioCounters.otherTransferCount).to.be.a('number'); + }); + }); + + describe('process.getBlinkMemoryInfo()', () => { + it('returns blink memory information object', async () => { + const heapStats = await w.webContents.executeJavaScript('process.getBlinkMemoryInfo()'); + expect(heapStats.allocated).to.be.a('number'); + expect(heapStats.total).to.be.a('number'); + }); + }); + + describe('process.getProcessMemoryInfo()', () => { + it('resolves promise successfully with valid data', async () => { + const memoryInfo = await w.webContents.executeJavaScript('process.getProcessMemoryInfo()'); + expect(memoryInfo).to.be.an('object'); + if (process.platform === 'linux' || process.platform === 'win32') { + expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); + } + expect(memoryInfo.private).to.be.a('number').greaterThan(0); + // Shared bytes can be zero + expect(memoryInfo.shared).to.be.a('number').greaterThan(-1); + }); + }); + + describe('process.getSystemMemoryInfo()', () => { + it('returns system memory info object', async () => { + const systemMemoryInfo = await w.webContents.executeJavaScript('process.getSystemMemoryInfo()'); + expect(systemMemoryInfo.free).to.be.a('number'); + expect(systemMemoryInfo.total).to.be.a('number'); + }); + }); + + describe('process.getSystemVersion()', () => { + it('returns a string', async () => { + const systemVersion = await w.webContents.executeJavaScript('process.getSystemVersion()'); + expect(systemVersion).to.be.a('string'); + }); + }); + + describe('process.getHeapStatistics()', () => { + it('returns heap statistics object', async () => { + const heapStats = await w.webContents.executeJavaScript('process.getHeapStatistics()'); + expect(heapStats.totalHeapSize).to.be.a('number'); + expect(heapStats.totalHeapSizeExecutable).to.be.a('number'); + expect(heapStats.totalPhysicalSize).to.be.a('number'); + expect(heapStats.totalAvailableSize).to.be.a('number'); + expect(heapStats.usedHeapSize).to.be.a('number'); + expect(heapStats.heapSizeLimit).to.be.a('number'); + expect(heapStats.mallocedMemory).to.be.a('number'); + expect(heapStats.peakMallocedMemory).to.be.a('number'); + expect(heapStats.doesZapGarbage).to.be.a('boolean'); + }); + }); + + describe('process.takeHeapSnapshot()', () => { + it('returns true on success', async () => { + const filePath = path.join(app.getPath('temp'), 'test.heapsnapshot'); + defer(() => { + try { + fs.unlinkSync(filePath); + } catch (e) { + // ignore error + } + }); + + const success = await w.webContents.executeJavaScript(`process.takeHeapSnapshot(${JSON.stringify(filePath)})`); + expect(success).to.be.true(); + const stats = fs.statSync(filePath); + expect(stats.size).not.to.be.equal(0); + }); + + it('returns false on failure', async () => { + const success = await w.webContents.executeJavaScript('process.takeHeapSnapshot("")'); + expect(success).to.be.false(); + }); + }); + + describe('process.contextId', () => { + it('is a string', async () => { + const contextId = await w.webContents.executeJavaScript('process.contextId'); + expect(contextId).to.be.a('string'); + }); + }); +}); diff --git a/spec/api-process-spec.js b/spec/api-process-spec.js deleted file mode 100644 index 8029107413227..0000000000000 --- a/spec/api-process-spec.js +++ /dev/null @@ -1,124 +0,0 @@ -const { ipcRenderer } = require('electron'); -const fs = require('fs'); -const path = require('path'); - -const { expect } = require('chai'); - -describe('process module', () => { - describe('process.getCreationTime()', () => { - it('returns a creation time', () => { - const creationTime = process.getCreationTime(); - expect(creationTime).to.be.a('number').and.be.at.least(0); - }); - }); - - describe('process.getCPUUsage()', () => { - it('returns a cpu usage object', () => { - const cpuUsage = process.getCPUUsage(); - expect(cpuUsage.percentCPUUsage).to.be.a('number'); - expect(cpuUsage.idleWakeupsPerSecond).to.be.a('number'); - }); - }); - - describe('process.getIOCounters()', () => { - before(function () { - if (process.platform === 'darwin') { - this.skip(); - } - }); - - it('returns an io counters object', () => { - const ioCounters = process.getIOCounters(); - expect(ioCounters.readOperationCount).to.be.a('number'); - expect(ioCounters.writeOperationCount).to.be.a('number'); - expect(ioCounters.otherOperationCount).to.be.a('number'); - expect(ioCounters.readTransferCount).to.be.a('number'); - expect(ioCounters.writeTransferCount).to.be.a('number'); - expect(ioCounters.otherTransferCount).to.be.a('number'); - }); - }); - - describe('process.getBlinkMemoryInfo()', () => { - it('returns blink memory information object', () => { - const heapStats = process.getBlinkMemoryInfo(); - expect(heapStats.allocated).to.be.a('number'); - expect(heapStats.total).to.be.a('number'); - }); - }); - - describe('process.getProcessMemoryInfo()', async () => { - it('resolves promise successfully with valid data', async () => { - const memoryInfo = await process.getProcessMemoryInfo(); - expect(memoryInfo).to.be.an('object'); - if (process.platform === 'linux' || process.platform === 'windows') { - expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); - } - expect(memoryInfo.private).to.be.a('number').greaterThan(0); - // Shared bytes can be zero - expect(memoryInfo.shared).to.be.a('number').greaterThan(-1); - }); - }); - - describe('process.getSystemMemoryInfo()', () => { - it('returns system memory info object', () => { - const systemMemoryInfo = process.getSystemMemoryInfo(); - expect(systemMemoryInfo.free).to.be.a('number'); - expect(systemMemoryInfo.total).to.be.a('number'); - }); - }); - - describe('process.getSystemVersion()', () => { - it('returns a string', () => { - expect(process.getSystemVersion()).to.be.a('string'); - }); - }); - - describe('process.getHeapStatistics()', () => { - it('returns heap statistics object', () => { - const heapStats = process.getHeapStatistics(); - expect(heapStats.totalHeapSize).to.be.a('number'); - expect(heapStats.totalHeapSizeExecutable).to.be.a('number'); - expect(heapStats.totalPhysicalSize).to.be.a('number'); - expect(heapStats.totalAvailableSize).to.be.a('number'); - expect(heapStats.usedHeapSize).to.be.a('number'); - expect(heapStats.heapSizeLimit).to.be.a('number'); - expect(heapStats.mallocedMemory).to.be.a('number'); - expect(heapStats.peakMallocedMemory).to.be.a('number'); - expect(heapStats.doesZapGarbage).to.be.a('boolean'); - }); - }); - - describe('process.takeHeapSnapshot()', () => { - it('returns true on success', async () => { - const filePath = path.join(await ipcRenderer.invoke('get-temp-dir'), 'test.heapsnapshot'); - - const cleanup = () => { - try { - fs.unlinkSync(filePath); - } catch (e) { - // ignore error - } - }; - - try { - const success = process.takeHeapSnapshot(filePath); - expect(success).to.be.true(); - const stats = fs.statSync(filePath); - expect(stats.size).not.to.be.equal(0); - } finally { - cleanup(); - } - }); - - it('returns false on failure', () => { - const success = process.takeHeapSnapshot(''); - expect(success).to.be.false(); - }); - }); - - describe('process.contextId', () => { - it('is a string', () => { - expect(process.contextId).to.be.a('string'); - }); - }); -}); From 0be73d18ef7386584fac964794c2f5a3dcc48f01 Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Tue, 26 Jul 2022 09:35:10 -0700 Subject: [PATCH 627/811] fix: Make disable_color_correct_rendering patch work again (#35050) Fix disable_color_correct_rendering patch. --- .../disable_color_correct_rendering.patch | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 6f925b949bc91..0a0817bf3cc3c 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,14 +20,15 @@ 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 6a148c3173f8f5653b945ed9b6ffcbf48d76d511..b30c2e686ff9b64691142ff893225c60cedeaebd 100644 +index 6a148c3173f8f5653b945ed9b6ffcbf48d76d511..3809ffe0f487e60539db58980b3232030ce8d4f8 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1864,6 +1864,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1864,6 +1864,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; + if (!settings_.enable_color_correct_rendering) { ++ params.color_space = gfx::ColorSpace(); + return params; + } @@ -112,7 +113,7 @@ index 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c2 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 75d7af9a79d4e7f2cd39e45496ab5fff66407638..b4ddafdd126edd16172f00448bbbd56eaf509b1f 100644 +index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..35b0bb908245330fbdc5205caa3299bf6fd8f7b4 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 @@ @@ -131,7 +132,18 @@ index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..b4ddafdd126edd16172f00448bbbd56e namespace blink { -@@ -118,6 +120,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { +@@ -19,6 +21,10 @@ namespace blink { + // Level 4 specification. + gfx::ColorSpace PredefinedColorSpaceToGfxColorSpace( + PredefinedColorSpace color_space) { ++ auto* cmd_line = base::CommandLine::ForCurrentProcess(); ++ if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) { ++ return gfx::ColorSpace(); ++ } + switch (color_space) { + case PredefinedColorSpace::kSRGB: + return gfx::ColorSpace::CreateSRGB(); +@@ -118,6 +124,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { } gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const { From 77e1a046ec6e9af2ee3b97599840e077caf821c7 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 09:37:11 -0700 Subject: [PATCH 628/811] test: move chromium spec config to its own folder (#35063) --- {spec => spec-chromium}/BUILD.gn | 0 {spec => spec-chromium}/configs/browsertests.yml | 0 {spec => spec-chromium}/configs/unittests.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {spec => spec-chromium}/BUILD.gn (100%) rename {spec => spec-chromium}/configs/browsertests.yml (100%) rename {spec => spec-chromium}/configs/unittests.yml (100%) diff --git a/spec/BUILD.gn b/spec-chromium/BUILD.gn similarity index 100% rename from spec/BUILD.gn rename to spec-chromium/BUILD.gn diff --git a/spec/configs/browsertests.yml b/spec-chromium/configs/browsertests.yml similarity index 100% rename from spec/configs/browsertests.yml rename to spec-chromium/configs/browsertests.yml diff --git a/spec/configs/unittests.yml b/spec-chromium/configs/unittests.yml similarity index 100% rename from spec/configs/unittests.yml rename to spec-chromium/configs/unittests.yml From 182ab9ad7646ccf42b25e539990f8cb0c40f68b5 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 26 Jul 2022 13:28:59 -0400 Subject: [PATCH 629/811] test: remove duplicate test that is causing hang in Windows (#35071) --- spec/chromium-spec.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 2b213f45937cd..154dffaff8eb9 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -62,14 +62,6 @@ describe('chromium feature', () => { }); describe('window.open', () => { - it('accepts "nodeIntegration" as feature', async () => { - const message = waitForEvent(window, 'message'); - const b = window.open(`file://${fixtures}/pages/window-opener-node.html`, '', 'nodeIntegration=no,show=no'); - const event = await message; - b.close(); - expect(event.data.isProcessGlobalUndefined).to.be.true(); - }); - it('inherit options of parent window', async () => { const message = waitForEvent(window, 'message'); const b = window.open(`file://${fixtures}/pages/window-open-size.html`, '', 'show=no'); From b42fd1ddca873b7354e39558935eba517fe1706e Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 26 Jul 2022 19:30:15 +0200 Subject: [PATCH 630/811] fix: handle WCO pressed state when going maximized -> minimized (#35070) --- shell/browser/native_window_views.h | 1 + shell/browser/native_window_views_win.cc | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 5454aafaec053..6672e3c2c7fcf 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -225,6 +225,7 @@ class NativeWindowViews : public NativeWindow, #if BUILDFLAG(IS_WIN) void HandleSizeEvent(WPARAM w_param, LPARAM l_param); + void ResetWindowControls(); void SetForwardMouseMessages(bool forward); static LRESULT CALLBACK SubclassProc(HWND hwnd, UINT msg, diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 9c0b54393958b..dc6f089d06bf6 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -415,6 +415,7 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) { last_window_state_ != ui::SHOW_STATE_MAXIMIZED) { last_window_state_ = ui::SHOW_STATE_MAXIMIZED; NotifyWindowMaximize(); + ResetWindowControls(); } else if (w_param == SIZE_MINIMIZED && last_window_state_ != ui::SHOW_STATE_MINIMIZED) { last_window_state_ = ui::SHOW_STATE_MINIMIZED; @@ -440,18 +441,23 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) { default: break; } - // If a given window was minimized/maximized and has since been - // restored, ensure the WCO buttons are set to normal state. - auto* ncv = widget()->non_client_view(); - if (IsWindowControlsOverlayEnabled() && ncv) { - auto* frame_view = static_cast(ncv->frame_view()); - frame_view->caption_button_container()->ResetWindowControls(); - } + ResetWindowControls(); break; } } } +void NativeWindowViews::ResetWindowControls() { + // If a given window was minimized and has since been + // unminimized (restored/maximized), ensure the WCO buttons + // are reset to their default unpressed state. + auto* ncv = widget()->non_client_view(); + if (IsWindowControlsOverlayEnabled() && ncv) { + auto* frame_view = static_cast(ncv->frame_view()); + frame_view->caption_button_container()->ResetWindowControls(); + } +} + void NativeWindowViews::SetForwardMouseMessages(bool forward) { if (forward && !forwarding_mouse_messages_) { forwarding_mouse_messages_ = true; From 6d9e8b65bc94dea8fc47f4e03c1833263c3622e9 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 26 Jul 2022 15:42:50 -0700 Subject: [PATCH 631/811] test: add process module tests for main process (#35057) --- spec-main/api-process-spec.ts | 283 +++++++++++++++++++++++----------- 1 file changed, 195 insertions(+), 88 deletions(-) diff --git a/spec-main/api-process-spec.ts b/spec-main/api-process-spec.ts index cb0fe9bede55e..163839349d70a 100644 --- a/spec-main/api-process-spec.ts +++ b/spec-main/api-process-spec.ts @@ -6,119 +6,226 @@ import { defer, ifdescribe } from './spec-helpers'; import { app } from 'electron/main'; import { closeAllWindows } from './window-helpers'; -describe('renderer process module', () => { - let w: BrowserWindow; - before(async () => { - w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); - await w.loadURL('about:blank'); - }); - after(closeAllWindows); +describe('process module', () => { + describe('renderer process', () => { + let w: BrowserWindow; + before(async () => { + w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); + await w.loadURL('about:blank'); + }); + after(closeAllWindows); - describe('process.getCreationTime()', () => { - it('returns a creation time', async () => { - const creationTime = await w.webContents.executeJavaScript('process.getCreationTime()'); - expect(creationTime).to.be.a('number').and.be.at.least(0); + describe('process.getCreationTime()', () => { + it('returns a creation time', async () => { + const creationTime = await w.webContents.executeJavaScript('process.getCreationTime()'); + expect(creationTime).to.be.a('number').and.be.at.least(0); + }); }); - }); - describe('process.getCPUUsage()', () => { - it('returns a cpu usage object', async () => { - const cpuUsage = await w.webContents.executeJavaScript('process.getCPUUsage()'); - expect(cpuUsage.percentCPUUsage).to.be.a('number'); - expect(cpuUsage.idleWakeupsPerSecond).to.be.a('number'); + describe('process.getCPUUsage()', () => { + it('returns a cpu usage object', async () => { + const cpuUsage = await w.webContents.executeJavaScript('process.getCPUUsage()'); + expect(cpuUsage.percentCPUUsage).to.be.a('number'); + expect(cpuUsage.idleWakeupsPerSecond).to.be.a('number'); + }); }); - }); - ifdescribe(process.platform !== 'darwin')('process.getIOCounters()', () => { - it('returns an io counters object', async () => { - const ioCounters = await w.webContents.executeJavaScript('process.getIOCounters()'); - expect(ioCounters.readOperationCount).to.be.a('number'); - expect(ioCounters.writeOperationCount).to.be.a('number'); - expect(ioCounters.otherOperationCount).to.be.a('number'); - expect(ioCounters.readTransferCount).to.be.a('number'); - expect(ioCounters.writeTransferCount).to.be.a('number'); - expect(ioCounters.otherTransferCount).to.be.a('number'); + ifdescribe(process.platform !== 'darwin')('process.getIOCounters()', () => { + it('returns an io counters object', async () => { + const ioCounters = await w.webContents.executeJavaScript('process.getIOCounters()'); + expect(ioCounters.readOperationCount).to.be.a('number'); + expect(ioCounters.writeOperationCount).to.be.a('number'); + expect(ioCounters.otherOperationCount).to.be.a('number'); + expect(ioCounters.readTransferCount).to.be.a('number'); + expect(ioCounters.writeTransferCount).to.be.a('number'); + expect(ioCounters.otherTransferCount).to.be.a('number'); + }); }); - }); - describe('process.getBlinkMemoryInfo()', () => { - it('returns blink memory information object', async () => { - const heapStats = await w.webContents.executeJavaScript('process.getBlinkMemoryInfo()'); - expect(heapStats.allocated).to.be.a('number'); - expect(heapStats.total).to.be.a('number'); + describe('process.getBlinkMemoryInfo()', () => { + it('returns blink memory information object', async () => { + const heapStats = await w.webContents.executeJavaScript('process.getBlinkMemoryInfo()'); + expect(heapStats.allocated).to.be.a('number'); + expect(heapStats.total).to.be.a('number'); + }); }); - }); - describe('process.getProcessMemoryInfo()', () => { - it('resolves promise successfully with valid data', async () => { - const memoryInfo = await w.webContents.executeJavaScript('process.getProcessMemoryInfo()'); - expect(memoryInfo).to.be.an('object'); - if (process.platform === 'linux' || process.platform === 'win32') { - expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); - } - expect(memoryInfo.private).to.be.a('number').greaterThan(0); - // Shared bytes can be zero - expect(memoryInfo.shared).to.be.a('number').greaterThan(-1); + describe('process.getProcessMemoryInfo()', () => { + it('resolves promise successfully with valid data', async () => { + const memoryInfo = await w.webContents.executeJavaScript('process.getProcessMemoryInfo()'); + expect(memoryInfo).to.be.an('object'); + if (process.platform === 'linux' || process.platform === 'win32') { + expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); + } + expect(memoryInfo.private).to.be.a('number').greaterThan(0); + // Shared bytes can be zero + expect(memoryInfo.shared).to.be.a('number').greaterThan(-1); + }); }); - }); - describe('process.getSystemMemoryInfo()', () => { - it('returns system memory info object', async () => { - const systemMemoryInfo = await w.webContents.executeJavaScript('process.getSystemMemoryInfo()'); - expect(systemMemoryInfo.free).to.be.a('number'); - expect(systemMemoryInfo.total).to.be.a('number'); + describe('process.getSystemMemoryInfo()', () => { + it('returns system memory info object', async () => { + const systemMemoryInfo = await w.webContents.executeJavaScript('process.getSystemMemoryInfo()'); + expect(systemMemoryInfo.free).to.be.a('number'); + expect(systemMemoryInfo.total).to.be.a('number'); + }); }); - }); - describe('process.getSystemVersion()', () => { - it('returns a string', async () => { - const systemVersion = await w.webContents.executeJavaScript('process.getSystemVersion()'); - expect(systemVersion).to.be.a('string'); + describe('process.getSystemVersion()', () => { + it('returns a string', async () => { + const systemVersion = await w.webContents.executeJavaScript('process.getSystemVersion()'); + expect(systemVersion).to.be.a('string'); + }); + }); + + describe('process.getHeapStatistics()', () => { + it('returns heap statistics object', async () => { + const heapStats = await w.webContents.executeJavaScript('process.getHeapStatistics()'); + expect(heapStats.totalHeapSize).to.be.a('number'); + expect(heapStats.totalHeapSizeExecutable).to.be.a('number'); + expect(heapStats.totalPhysicalSize).to.be.a('number'); + expect(heapStats.totalAvailableSize).to.be.a('number'); + expect(heapStats.usedHeapSize).to.be.a('number'); + expect(heapStats.heapSizeLimit).to.be.a('number'); + expect(heapStats.mallocedMemory).to.be.a('number'); + expect(heapStats.peakMallocedMemory).to.be.a('number'); + expect(heapStats.doesZapGarbage).to.be.a('boolean'); + }); + }); + + describe('process.takeHeapSnapshot()', () => { + it('returns true on success', async () => { + const filePath = path.join(app.getPath('temp'), 'test.heapsnapshot'); + defer(() => { + try { + fs.unlinkSync(filePath); + } catch (e) { + // ignore error + } + }); + + const success = await w.webContents.executeJavaScript(`process.takeHeapSnapshot(${JSON.stringify(filePath)})`); + expect(success).to.be.true(); + const stats = fs.statSync(filePath); + expect(stats.size).not.to.be.equal(0); + }); + + it('returns false on failure', async () => { + const success = await w.webContents.executeJavaScript('process.takeHeapSnapshot("")'); + expect(success).to.be.false(); + }); }); - }); - describe('process.getHeapStatistics()', () => { - it('returns heap statistics object', async () => { - const heapStats = await w.webContents.executeJavaScript('process.getHeapStatistics()'); - expect(heapStats.totalHeapSize).to.be.a('number'); - expect(heapStats.totalHeapSizeExecutable).to.be.a('number'); - expect(heapStats.totalPhysicalSize).to.be.a('number'); - expect(heapStats.totalAvailableSize).to.be.a('number'); - expect(heapStats.usedHeapSize).to.be.a('number'); - expect(heapStats.heapSizeLimit).to.be.a('number'); - expect(heapStats.mallocedMemory).to.be.a('number'); - expect(heapStats.peakMallocedMemory).to.be.a('number'); - expect(heapStats.doesZapGarbage).to.be.a('boolean'); + describe('process.contextId', () => { + it('is a string', async () => { + const contextId = await w.webContents.executeJavaScript('process.contextId'); + expect(contextId).to.be.a('string'); + }); }); }); - describe('process.takeHeapSnapshot()', () => { - it('returns true on success', async () => { - const filePath = path.join(app.getPath('temp'), 'test.heapsnapshot'); - defer(() => { - try { - fs.unlinkSync(filePath); - } catch (e) { - // ignore error + describe('main process', () => { + describe('process.getCreationTime()', () => { + it('returns a creation time', () => { + const creationTime = process.getCreationTime(); + expect(creationTime).to.be.a('number').and.be.at.least(0); + }); + }); + + describe('process.getCPUUsage()', () => { + it('returns a cpu usage object', () => { + const cpuUsage = process.getCPUUsage(); + expect(cpuUsage.percentCPUUsage).to.be.a('number'); + expect(cpuUsage.idleWakeupsPerSecond).to.be.a('number'); + }); + }); + + ifdescribe(process.platform !== 'darwin')('process.getIOCounters()', () => { + it('returns an io counters object', () => { + const ioCounters = process.getIOCounters(); + expect(ioCounters.readOperationCount).to.be.a('number'); + expect(ioCounters.writeOperationCount).to.be.a('number'); + expect(ioCounters.otherOperationCount).to.be.a('number'); + expect(ioCounters.readTransferCount).to.be.a('number'); + expect(ioCounters.writeTransferCount).to.be.a('number'); + expect(ioCounters.otherTransferCount).to.be.a('number'); + }); + }); + + describe('process.getBlinkMemoryInfo()', () => { + it('returns blink memory information object', () => { + const heapStats = process.getBlinkMemoryInfo(); + expect(heapStats.allocated).to.be.a('number'); + expect(heapStats.total).to.be.a('number'); + }); + }); + + describe('process.getProcessMemoryInfo()', () => { + it('resolves promise successfully with valid data', async () => { + const memoryInfo = await process.getProcessMemoryInfo(); + expect(memoryInfo).to.be.an('object'); + if (process.platform === 'linux' || process.platform === 'win32') { + expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); } + expect(memoryInfo.private).to.be.a('number').greaterThan(0); + // Shared bytes can be zero + expect(memoryInfo.shared).to.be.a('number').greaterThan(-1); }); + }); - const success = await w.webContents.executeJavaScript(`process.takeHeapSnapshot(${JSON.stringify(filePath)})`); - expect(success).to.be.true(); - const stats = fs.statSync(filePath); - expect(stats.size).not.to.be.equal(0); + describe('process.getSystemMemoryInfo()', () => { + it('returns system memory info object', () => { + const systemMemoryInfo = process.getSystemMemoryInfo(); + expect(systemMemoryInfo.free).to.be.a('number'); + expect(systemMemoryInfo.total).to.be.a('number'); + }); }); - it('returns false on failure', async () => { - const success = await w.webContents.executeJavaScript('process.takeHeapSnapshot("")'); - expect(success).to.be.false(); + describe('process.getSystemVersion()', () => { + it('returns a string', () => { + const systemVersion = process.getSystemVersion(); + expect(systemVersion).to.be.a('string'); + }); }); - }); - describe('process.contextId', () => { - it('is a string', async () => { - const contextId = await w.webContents.executeJavaScript('process.contextId'); - expect(contextId).to.be.a('string'); + describe('process.getHeapStatistics()', () => { + it('returns heap statistics object', async () => { + const heapStats = process.getHeapStatistics(); + expect(heapStats.totalHeapSize).to.be.a('number'); + expect(heapStats.totalHeapSizeExecutable).to.be.a('number'); + expect(heapStats.totalPhysicalSize).to.be.a('number'); + expect(heapStats.totalAvailableSize).to.be.a('number'); + expect(heapStats.usedHeapSize).to.be.a('number'); + expect(heapStats.heapSizeLimit).to.be.a('number'); + expect(heapStats.mallocedMemory).to.be.a('number'); + expect(heapStats.peakMallocedMemory).to.be.a('number'); + expect(heapStats.doesZapGarbage).to.be.a('boolean'); + }); + }); + + describe('process.takeHeapSnapshot()', () => { + // TODO(nornagon): this seems to take a really long time when run in the + // main process, for unknown reasons. + it.skip('returns true on success', () => { + const filePath = path.join(app.getPath('temp'), 'test.heapsnapshot'); + defer(() => { + try { + fs.unlinkSync(filePath); + } catch (e) { + // ignore error + } + }); + + const success = process.takeHeapSnapshot(filePath); + expect(success).to.be.true(); + const stats = fs.statSync(filePath); + expect(stats.size).not.to.be.equal(0); + }); + + it('returns false on failure', async () => { + const success = process.takeHeapSnapshot(''); + expect(success).to.be.false(); + }); }); }); }); From 9416091180e18c1ba1f625f86505332a018d9049 Mon Sep 17 00:00:00 2001 From: Ian German Mesner Date: Tue, 26 Jul 2022 20:02:06 -0400 Subject: [PATCH 632/811] fix: allow setsize to be called within a move or resize for preventDefault (#34843) fix: #34599 allow setsize to be called within a move or resize for preventDefault --- shell/browser/native_window_views.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 8b00fec300e15..c73ea669fd0ed 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -729,7 +729,6 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) { #if BUILDFLAG(IS_WIN) if (is_moving_ || is_resizing_) { pending_bounds_change_ = bounds; - return; } #endif From ff804e3a748c72f4812af8ccf3b1d7442a468f4a Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 26 Jul 2022 21:33:07 -0700 Subject: [PATCH 633/811] fix: use win_clang_x64 binary for x86 extract symbols (#35078) fix: use win_clang_x64 for x86 extract symbols --- appveyor.yml | 9 +++------ build/extract_symbols.gni | 6 +++++- script/release/release.js | 5 ++--- script/release/uploaders/upload.py | 14 ++++++-------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 04cdb20e35447..80ee94d49d314 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -170,19 +170,16 @@ build_script: - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - 7z a node_headers.zip out\Default\gen\node_headers - # Temporarily disable symbol generation on 32-bit Windows due to failures - ps: >- - if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') { + if ($env:GN_CONFIG -eq 'release') { # Needed for msdia140.dll on 64-bit windows $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" ninja -C out/Default electron:electron_symbols } - ps: >- if ($env:GN_CONFIG -eq 'release') { - if ($env:TARGET_ARCH -ne 'ia32') { - python electron\script\zip-symbols.py - appveyor-retry appveyor PushArtifact out/Default/symbols.zip - } + python electron\script\zip-symbols.py + appveyor-retry appveyor PushArtifact out/Default/symbols.zip } else { # It's useful to have pdb files when debugging testing builds that are # built on CI. diff --git a/build/extract_symbols.gni b/build/extract_symbols.gni index e3fa2a30f4ca0..2f98aa466ba15 100644 --- a/build/extract_symbols.gni +++ b/build/extract_symbols.gni @@ -24,7 +24,11 @@ template("extract_symbols") { assert(defined(invoker.binary), "Need binary to dump") assert(defined(invoker.symbol_dir), "Need directory for symbol output") - dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)" + if (host_os == "win" && target_cpu == "x86") { + dump_syms_label = "//third_party/breakpad:dump_syms(//build/toolchain/win:win_clang_x64)" + } else { + dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)" + } dump_syms_binary = get_label_info(dump_syms_label, "root_out_dir") + "/dump_syms$_host_executable_suffix" diff --git a/script/release/release.js b/script/release/release.js index e89d7ba920245..c3c8d6363b120 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -128,9 +128,8 @@ function assetsForVersion (version, validatingRelease) { `electron-${version}-mas-arm64-dsym-snapshot.zip`, `electron-${version}-mas-arm64-symbols.zip`, `electron-${version}-mas-arm64.zip`, - // TODO(vertedinde) Symbol generation on 32-bit Windows is temporarily disabled due to CI failures - // `electron-${version}-win32-ia32-pdb.zip`, - // `electron-${version}-win32-ia32-symbols.zip`, + `electron-${version}-win32-ia32-pdb.zip`, + `electron-${version}-win32-ia32-symbols.zip`, `electron-${version}-win32-ia32.zip`, `electron-${version}-win32-x64-pdb.zip`, `electron-${version}-win32-x64-symbols.zip`, diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index caaa726d55d8a..5845b88ede1b4 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -76,10 +76,9 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip) upload_electron(release, electron_zip, args) if get_target_arch() != 'mips64el': - if (get_target_arch() != 'ia32' or PLATFORM != 'win32'): - symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) - upload_electron(release, symbols_zip, args) + symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip) + upload_electron(release, symbols_zip, args) if PLATFORM == 'darwin': if get_platform_key() == 'darwin' and get_target_arch() == 'x64': api_path = os.path.join(ELECTRON_DIR, 'electron-api.json') @@ -96,10 +95,9 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snapshot_zip) upload_electron(release, dsym_snapshot_zip, args) elif PLATFORM == 'win32': - if get_target_arch() != 'ia32': - pdb_zip = os.path.join(OUT_DIR, PDB_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) - upload_electron(release, pdb_zip, args) + pdb_zip = os.path.join(OUT_DIR, PDB_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip) + upload_electron(release, pdb_zip, args) elif PLATFORM == 'linux': debug_zip = os.path.join(OUT_DIR, DEBUG_NAME) shutil.copy2(os.path.join(OUT_DIR, 'debug.zip'), debug_zip) From 62001dc6cbfd78a82d2fca849ca5eb0504cd0b71 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 26 Jul 2022 23:44:44 -0500 Subject: [PATCH 634/811] fix: crash on startup in X11 (#35075) Fixes #34996. --- shell/browser/electron_browser_main_parts.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 13bd28b53443c..b422d930769f8 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -278,12 +278,6 @@ void ElectronBrowserMainParts::PostEarlyInitialization() { } int ElectronBrowserMainParts::PreCreateThreads() { -#if defined(USE_AURA) - if (!display::Screen::GetScreen()) { - screen_ = views::CreateDesktopScreen(); - } -#endif - if (!views::LayoutProvider::Get()) layout_provider_ = std::make_unique(); @@ -314,6 +308,14 @@ int ElectronBrowserMainParts::PreCreateThreads() { // Load resources bundle according to locale. std::string loaded_locale = LoadResourceBundle(locale); +#if defined(USE_AURA) + // NB: must be called _after_ locale resource bundle is loaded, + // because ui lib makes use of it in X11 + if (!display::Screen::GetScreen()) { + screen_ = views::CreateDesktopScreen(); + } +#endif + // Initialize the app locale. std::string app_locale = l10n_util::GetApplicationLocale(loaded_locale); ElectronBrowserClient::SetApplicationLocale(app_locale); From 7c2ed98214093af33a7e428143b3ffaa5cc7915b Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 27 Jul 2022 02:10:04 -0700 Subject: [PATCH 635/811] test: migrate more chromium specs to main (#35081) --- spec-main/chromium-spec.ts | 192 ++++++++++++++++++++++++- spec/chromium-spec.js | 192 ------------------------- spec/fixtures/pages/shared_worker.html | 2 +- spec/fixtures/pages/worker.html | 2 +- 4 files changed, 187 insertions(+), 201 deletions(-) diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index c1e831d590379..cf241bccbc719 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -13,6 +13,7 @@ import { promisify } from 'util'; import { ifit, ifdescribe, defer, delay } from './spec-helpers'; import { AddressInfo } from 'net'; import { PipeTransport } from './pipe-transport'; +import * as ws from 'ws'; const features = process._linkedBinding('electron_common_features'); @@ -678,13 +679,7 @@ describe('chromium features', () => { }); }); - describe('navigator.geolocation', () => { - before(function () { - if (!features.isFakeLocationProviderEnabled()) { - return this.skip(); - } - }); - + ifdescribe(features.isFakeLocationProviderEnabled())('navigator.geolocation', () => { it('returns error when permission is denied', async () => { const w = new BrowserWindow({ show: false, @@ -706,6 +701,17 @@ describe('chromium features', () => { const [, channel] = await message; expect(channel).to.equal('success', 'unexpected response from geolocation api'); }); + + it('returns position when permission is granted', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const position = await w.webContents.executeJavaScript(`new Promise((resolve, reject) => + navigator.geolocation.getCurrentPosition( + x => resolve({coords: x.coords, timestamp: x.timestamp}), + reject))`); + expect(position).to.have.property('coords'); + expect(position).to.have.property('timestamp'); + }); }); describe('web workers', () => { @@ -726,6 +732,68 @@ describe('chromium features', () => { const [code] = await emittedOnce(appProcess, 'exit'); expect(code).to.equal(0); }); + + it('Worker can work', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const data = await w.webContents.executeJavaScript(` + const worker = new Worker('../workers/worker.js'); + const message = 'ping'; + const eventPromise = new Promise((resolve) => { worker.onmessage = resolve; }); + worker.postMessage(message); + eventPromise.then(t => t.data) + `); + expect(data).to.equal('ping'); + }); + + it('Worker has no node integration by default', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const data = await w.webContents.executeJavaScript(` + const worker = new Worker('../workers/worker_node.js'); + new Promise((resolve) => { worker.onmessage = e => resolve(e.data); }) + `); + expect(data).to.equal('undefined undefined undefined undefined'); + }); + + it('Worker has node integration with nodeIntegrationInWorker', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nodeIntegrationInWorker: true, contextIsolation: false } }); + w.loadURL(`file://${fixturesPath}/pages/worker.html`); + const [, data] = await emittedOnce(ipcMain, 'worker-result'); + expect(data).to.equal('object function object function'); + }); + + describe('SharedWorker', () => { + it('can work', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const data = await w.webContents.executeJavaScript(` + const worker = new SharedWorker('../workers/shared_worker.js'); + const message = 'ping'; + const eventPromise = new Promise((resolve) => { worker.port.onmessage = e => resolve(e.data); }); + worker.port.postMessage(message); + eventPromise + `); + expect(data).to.equal('ping'); + }); + + it('has no node integration by default', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const data = await w.webContents.executeJavaScript(` + const worker = new SharedWorker('../workers/shared_worker_node.js'); + new Promise((resolve) => { worker.port.onmessage = e => resolve(e.data); }) + `); + expect(data).to.equal('undefined undefined undefined undefined'); + }); + + it('has node integration with nodeIntegrationInWorker', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nodeIntegrationInWorker: true, contextIsolation: false } }); + w.loadURL(`file://${fixturesPath}/pages/shared_worker.html`); + const [, data] = await emittedOnce(ipcMain, 'worker-result'); + expect(data).to.equal('object function object function'); + }); + }); }); describe('form submit', () => { @@ -1613,6 +1681,116 @@ describe('chromium features', () => { }); }); }); + + describe('Badging API', () => { + it('does not crash', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + await w.webContents.executeJavaScript('navigator.setAppBadge(42)'); + await w.webContents.executeJavaScript('navigator.setAppBadge()'); + await w.webContents.executeJavaScript('navigator.clearAppBadge()'); + }); + }); + + describe('navigator.webkitGetUserMedia', () => { + it('calls its callbacks', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + await w.webContents.executeJavaScript(`new Promise((resolve) => { + navigator.webkitGetUserMedia({ + audio: true, + video: false + }, () => resolve(), + () => resolve()); + })`); + }); + }); + + describe('navigator.language', () => { + it('should not be empty', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL('about:blank'); + expect(await w.webContents.executeJavaScript('navigator.language')).to.not.equal(''); + }); + }); + + describe('heap snapshot', () => { + it('does not crash', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); + w.loadURL('about:blank'); + await w.webContents.executeJavaScript('process._linkedBinding(\'electron_common_v8_util\').takeHeapSnapshot()'); + }); + }); + + ifdescribe(process.platform !== 'win32' && process.platform !== 'linux')('webgl', () => { + it('can be gotten as context in canvas', async () => { + const w = new BrowserWindow({ show: false }); + w.loadURL('about:blank'); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const canWebglContextBeCreated = await w.webContents.executeJavaScript(` + document.createElement('canvas').getContext('webgl') != null; + `); + expect(canWebglContextBeCreated).to.be.true(); + }); + }); + + describe('iframe', () => { + it('does not have node integration', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const result = await w.webContents.executeJavaScript(` + const iframe = document.createElement('iframe') + iframe.src = './set-global.html'; + document.body.appendChild(iframe); + new Promise(resolve => iframe.onload = e => resolve(iframe.contentWindow.test)) + `); + expect(result).to.equal('undefined undefined undefined'); + }); + }); + + describe('websockets', () => { + it('has user agent', async () => { + const server = http.createServer(); + await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); + const port = (server.address() as AddressInfo).port; + const wss = new ws.Server({ server: server }); + const finished = new Promise((resolve, reject) => { + wss.on('error', reject); + wss.on('connection', (ws, upgradeReq) => { + resolve(upgradeReq.headers['user-agent']); + }); + }); + const w = new BrowserWindow({ show: false }); + w.loadURL('about:blank'); + w.webContents.executeJavaScript(` + new WebSocket('ws://127.0.0.1:${port}'); + `); + expect(await finished).to.include('Electron'); + }); + }); + + describe('fetch', () => { + it('does not crash', async () => { + const server = http.createServer((req, res) => { + res.end('test'); + }); + defer(() => server.close()); + await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); + const port = (server.address() as AddressInfo).port; + const w = new BrowserWindow({ show: false }); + w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const x = await w.webContents.executeJavaScript(` + fetch('http://127.0.0.1:${port}').then((res) => res.body.getReader()) + .then((reader) => { + return reader.read().then((r) => { + reader.cancel(); + return r.value; + }); + }) + `); + expect(x).to.deep.equal(new Uint8Array([116, 101, 115, 116])); + }); + }); }); describe('font fallback', () => { diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 154dffaff8eb9..0ae511ac5985f 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -2,7 +2,6 @@ const { expect } = require('chai'); const fs = require('fs'); const http = require('http'); const path = require('path'); -const ws = require('ws'); const url = require('url'); const ChildProcess = require('child_process'); const { ipcRenderer } = require('electron'); @@ -16,51 +15,6 @@ const features = process._linkedBinding('electron_common_features'); describe('chromium feature', () => { const fixtures = path.resolve(__dirname, 'fixtures'); - describe('Badging API', () => { - it('does not crash', () => { - expect(() => { - navigator.setAppBadge(42); - }).to.not.throw(); - expect(() => { - // setAppBadge with no argument should show dot - navigator.setAppBadge(); - }).to.not.throw(); - expect(() => { - navigator.clearAppBadge(); - }).to.not.throw(); - }); - }); - - describe('heap snapshot', () => { - it('does not crash', function () { - process._linkedBinding('electron_common_v8_util').takeHeapSnapshot(); - }); - }); - - describe('navigator.webkitGetUserMedia', () => { - it('calls its callbacks', (done) => { - navigator.webkitGetUserMedia({ - audio: true, - video: false - }, () => done(), - () => done()); - }); - }); - - describe('navigator.language', () => { - it('should not be empty', () => { - expect(navigator.language).to.not.equal(''); - }); - }); - - ifdescribe(features.isFakeLocationProviderEnabled())('navigator.geolocation', () => { - it('returns position when permission is granted', async () => { - const position = await new Promise((resolve, reject) => navigator.geolocation.getCurrentPosition(resolve, reject)); - expect(position).to.have.a.property('coords'); - expect(position).to.have.a.property('timestamp'); - }); - }); - describe('window.open', () => { it('inherit options of parent window', async () => { const message = waitForEvent(window, 'message'); @@ -208,105 +162,6 @@ describe('chromium feature', () => { }); }); - describe('webgl', () => { - before(function () { - if (process.platform === 'win32') { - this.skip(); - } - }); - - it('can be get as context in canvas', () => { - if (process.platform === 'linux') { - // FIXME(alexeykuzmin): Skip the test. - // this.skip() - return; - } - - const webgl = document.createElement('canvas').getContext('webgl'); - expect(webgl).to.not.be.null(); - }); - }); - - describe('web workers', () => { - it('Worker can work', async () => { - const worker = new Worker('../fixtures/workers/worker.js'); - const message = 'ping'; - const eventPromise = new Promise((resolve) => { worker.onmessage = resolve; }); - worker.postMessage(message); - const event = await eventPromise; - worker.terminate(); - expect(event.data).to.equal(message); - }); - - it('Worker has no node integration by default', async () => { - const worker = new Worker('../fixtures/workers/worker_node.js'); - const event = await new Promise((resolve) => { worker.onmessage = resolve; }); - worker.terminate(); - expect(event.data).to.equal('undefined undefined undefined undefined'); - }); - - it('Worker has node integration with nodeIntegrationInWorker', async () => { - const webview = new WebView(); - const eventPromise = waitForEvent(webview, 'ipc-message'); - webview.src = `file://${fixtures}/pages/worker.html`; - webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker, contextIsolation=no'); - document.body.appendChild(webview); - const event = await eventPromise; - webview.remove(); - expect(event.channel).to.equal('object function object function'); - }); - - describe('SharedWorker', () => { - it('can work', async () => { - const worker = new SharedWorker('../fixtures/workers/shared_worker.js'); - const message = 'ping'; - const eventPromise = new Promise((resolve) => { worker.port.onmessage = resolve; }); - worker.port.postMessage(message); - const event = await eventPromise; - expect(event.data).to.equal(message); - }); - - it('has no node integration by default', async () => { - const worker = new SharedWorker('../fixtures/workers/shared_worker_node.js'); - const event = await new Promise((resolve) => { worker.port.onmessage = resolve; }); - expect(event.data).to.equal('undefined undefined undefined undefined'); - }); - - it('has node integration with nodeIntegrationInWorker', async () => { - const webview = new WebView(); - webview.addEventListener('console-message', (e) => { - console.log(e); - }); - const eventPromise = waitForEvent(webview, 'ipc-message'); - webview.src = `file://${fixtures}/pages/shared_worker.html`; - webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker, contextIsolation=no'); - document.body.appendChild(webview); - const event = await eventPromise; - webview.remove(); - expect(event.channel).to.equal('object function object function'); - }); - }); - }); - - describe('iframe', () => { - let iframe = null; - - beforeEach(() => { - iframe = document.createElement('iframe'); - }); - - afterEach(() => { - document.body.removeChild(iframe); - }); - - it('does not have node integration', async () => { - iframe.src = `file://${fixtures}/pages/set-global.html`; - document.body.appendChild(iframe); - await waitForEvent(iframe, 'load'); - expect(iframe.contentWindow.test).to.equal('undefined undefined undefined'); - }); - }); - describe('storage', () => { describe('DOM storage quota increase', () => { ['localStorage', 'sessionStorage'].forEach((storageName) => { @@ -357,34 +212,6 @@ describe('chromium feature', () => { }); }); - describe('websockets', () => { - let wss = null; - let server = null; - const WebSocketServer = ws.Server; - - afterEach(() => { - wss.close(); - server.close(); - }); - - it('has user agent', (done) => { - server = http.createServer(); - server.listen(0, '127.0.0.1', () => { - const port = server.address().port; - wss = new WebSocketServer({ server: server }); - wss.on('error', done); - wss.on('connection', (ws, upgradeReq) => { - if (upgradeReq.headers['user-agent']) { - done(); - } else { - done('user agent is empty'); - } - }); - const socket = new WebSocket(`ws://127.0.0.1:${port}`); - }); - }); - }); - describe('Promise', () => { it('resolves correctly in Node.js calls', (done) => { class XElement extends HTMLElement {} @@ -413,25 +240,6 @@ describe('chromium feature', () => { }); }); - describe('fetch', () => { - it('does not crash', (done) => { - const server = http.createServer((req, res) => { - res.end('test'); - server.close(); - }); - server.listen(0, '127.0.0.1', () => { - const port = server.address().port; - fetch(`http://127.0.0.1:${port}`).then((res) => res.body.getReader()) - .then((reader) => { - reader.read().then((r) => { - reader.cancel(); - done(); - }); - }).catch((e) => done(e)); - }); - }); - }); - describe('window.alert(message, title)', () => { it('throws an exception when the arguments cannot be converted to strings', () => { expect(() => { diff --git a/spec/fixtures/pages/shared_worker.html b/spec/fixtures/pages/shared_worker.html index 7a0d0757ab262..5bd409d857b93 100644 --- a/spec/fixtures/pages/shared_worker.html +++ b/spec/fixtures/pages/shared_worker.html @@ -5,7 +5,7 @@ // Pass a random parameter to create independent worker. let worker = new SharedWorker(`../workers/shared_worker_node.js?a={Math.random()}`) worker.port.onmessage = function (event) { - ipcRenderer.sendToHost(event.data) + ipcRenderer.send('worker-result', event.data) } diff --git a/spec/fixtures/pages/worker.html b/spec/fixtures/pages/worker.html index c84ef52065e02..95aceac6c08aa 100644 --- a/spec/fixtures/pages/worker.html +++ b/spec/fixtures/pages/worker.html @@ -4,7 +4,7 @@ const {ipcRenderer} = require('electron') let worker = new Worker(`../workers/worker_node.js`) worker.onmessage = function (event) { - ipcRenderer.sendToHost(event.data) + ipcRenderer.send('worker-result', event.data) worker.terminate() } From 77b4aab720afde0c2a265ca6307e6770ca1feb80 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 27 Jul 2022 02:10:14 -0700 Subject: [PATCH 636/811] test: migrate the rest of the webFrame tests to main (#35080) --- spec-main/api-web-frame-spec.ts | 135 ++++++++++++++++++++++++++++++-- spec/api-web-frame-spec.js | 114 --------------------------- 2 files changed, 129 insertions(+), 120 deletions(-) delete mode 100644 spec/api-web-frame-spec.js diff --git a/spec-main/api-web-frame-spec.ts b/spec-main/api-web-frame-spec.ts index f7d9d9ffb138a..5b6b71b93f4b9 100644 --- a/spec-main/api-web-frame-spec.ts +++ b/spec-main/api-web-frame-spec.ts @@ -1,23 +1,22 @@ import { expect } from 'chai'; import * as path from 'path'; -import { BrowserWindow, ipcMain } from 'electron/main'; -import { closeAllWindows } from './window-helpers'; +import { BrowserWindow, ipcMain, WebContents } from 'electron/main'; import { emittedOnce } from './events-helpers'; +import { defer } from './spec-helpers'; describe('webFrame module', () => { const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures'); - afterEach(closeAllWindows); - it('can use executeJavaScript', async () => { const w = new BrowserWindow({ - show: true, + show: false, webPreferences: { nodeIntegration: true, contextIsolation: true, preload: path.join(fixtures, 'pages', 'world-safe-preload.js') } }); + defer(() => w.close()); const isSafe = emittedOnce(ipcMain, 'executejs-safe'); w.loadURL('about:blank'); const [, wasSafe] = await isSafe; @@ -26,13 +25,14 @@ describe('webFrame module', () => { it('can use executeJavaScript and catch conversion errors', async () => { const w = new BrowserWindow({ - show: true, + show: false, webPreferences: { nodeIntegration: true, contextIsolation: true, preload: path.join(fixtures, 'pages', 'world-safe-preload-error.js') } }); + defer(() => w.close()); const execError = emittedOnce(ipcMain, 'executejs-safe'); w.loadURL('about:blank'); const [, error] = await execError; @@ -48,6 +48,7 @@ describe('webFrame module', () => { contextIsolation: false } }); + defer(() => w.close()); await w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html')); w.focus(); await w.webContents.executeJavaScript('document.querySelector("input").focus()', true); @@ -70,4 +71,126 @@ describe('webFrame module', () => { expect(words.sort()).to.deep.equal(['spleling', 'test', 'you\'re', 'you', 're'].sort()); expect(callbackDefined).to.be.true(); }); + + describe('api', () => { + let w: WebContents; + before(async () => { + const win = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false, nodeIntegration: true } }); + await win.loadURL('about:blank'); + w = win.webContents; + await w.executeJavaScript('webFrame = require(\'electron\').webFrame; null'); + }); + it('top is self for top frame', async () => { + const equal = await w.executeJavaScript('webFrame.top.context === webFrame.context'); + expect(equal).to.be.true(); + }); + + it('opener is null for top frame', async () => { + const equal = await w.executeJavaScript('webFrame.opener === null'); + expect(equal).to.be.true(); + }); + + it('firstChild is null for top frame', async () => { + const equal = await w.executeJavaScript('webFrame.firstChild === null'); + expect(equal).to.be.true(); + }); + + it('getFrameForSelector() does not crash when not found', async () => { + const equal = await w.executeJavaScript('webFrame.getFrameForSelector(\'unexist-selector\') === null'); + expect(equal).to.be.true(); + }); + + it('findFrameByName() does not crash when not found', async () => { + const equal = await w.executeJavaScript('webFrame.findFrameByName(\'unexist-name\') === null'); + expect(equal).to.be.true(); + }); + + it('findFrameByRoutingId() does not crash when not found', async () => { + const equal = await w.executeJavaScript('webFrame.findFrameByRoutingId(-1) === null'); + expect(equal).to.be.true(); + }); + + describe('executeJavaScript', () => { + before(() => { + w.executeJavaScript(` + childFrameElement = document.createElement('iframe'); + document.body.appendChild(childFrameElement); + childFrame = webFrame.firstChild; + null + `); + }); + + after(() => { + w.executeJavaScript(` + childFrameElement.remove(); + null + `); + }); + + it('executeJavaScript() yields results via a promise and a sync callback', async () => { + const { callbackResult, callbackError, result } = await w.executeJavaScript(`new Promise(resolve => { + let callbackResult, callbackError; + childFrame + .executeJavaScript('1 + 1', (result, error) => { + callbackResult = result; + callbackError = error; + }).then(result => resolve({callbackResult, callbackError, result})) + })`); + + expect(callbackResult).to.equal(2); + expect(callbackError).to.be.undefined(); + expect(result).to.equal(2); + }); + + it('executeJavaScriptInIsolatedWorld() yields results via a promise and a sync callback', async () => { + const { callbackResult, callbackError, result } = await w.executeJavaScript(`new Promise(resolve => { + let callbackResult, callbackError; + childFrame + .executeJavaScriptInIsolatedWorld(999, [{code: '1 + 1'}], (result, error) => { + callbackResult = result; + callbackError = error; + }).then(result => resolve({callbackResult, callbackError, result})) + })`); + + expect(callbackResult).to.equal(2); + expect(callbackError).to.be.undefined(); + expect(result).to.equal(2); + }); + + it('executeJavaScript() yields errors via a promise and a sync callback', async () => { + const { callbackResult, callbackError, error } = await w.executeJavaScript(`new Promise(resolve => { + let callbackResult, callbackError; + childFrame + .executeJavaScript('thisShouldProduceAnError()', (result, error) => { + callbackResult = result; + callbackError = error; + }).then(result => {throw new Error}, error => resolve({callbackResult, callbackError, error})) + })`); + + expect(callbackResult).to.be.undefined(); + expect(callbackError).to.be.an('error'); + expect(error).to.be.an('error'); + }); + + it('executeJavaScriptInIsolatedWorld() yields errors via a promise and a sync callback', async () => { + const { callbackResult, callbackError, error } = await w.executeJavaScript(`new Promise(resolve => { + let callbackResult, callbackError; + childFrame + .executeJavaScriptInIsolatedWorld(999, [{code: 'thisShouldProduceAnError()'}], (result, error) => { + callbackResult = result; + callbackError = error; + }).then(result => {throw new Error}, error => resolve({callbackResult, callbackError, error})) + })`); + + expect(callbackResult).to.be.undefined(); + expect(callbackError).to.be.an('error'); + expect(error).to.be.an('error'); + }); + + it('executeJavaScript(InIsolatedWorld) can be used without a callback', async () => { + expect(await w.executeJavaScript('webFrame.executeJavaScript(\'1 + 1\')')).to.equal(2); + expect(await w.executeJavaScript('webFrame.executeJavaScriptInIsolatedWorld(999, [{code: \'1 + 1\'}])')).to.equal(2); + }); + }); + }); }); diff --git a/spec/api-web-frame-spec.js b/spec/api-web-frame-spec.js deleted file mode 100644 index a9a76839530b7..0000000000000 --- a/spec/api-web-frame-spec.js +++ /dev/null @@ -1,114 +0,0 @@ -const { expect } = require('chai'); -const { webFrame } = require('electron'); - -describe('webFrame module', function () { - it('top is self for top frame', () => { - expect(webFrame.top.context).to.equal(webFrame.context); - }); - - it('opener is null for top frame', () => { - expect(webFrame.opener).to.be.null(); - }); - - it('firstChild is null for top frame', () => { - expect(webFrame.firstChild).to.be.null(); - }); - - it('getFrameForSelector() does not crash when not found', () => { - expect(webFrame.getFrameForSelector('unexist-selector')).to.be.null(); - }); - - it('findFrameByName() does not crash when not found', () => { - expect(webFrame.findFrameByName('unexist-name')).to.be.null(); - }); - - it('findFrameByRoutingId() does not crash when not found', () => { - expect(webFrame.findFrameByRoutingId(-1)).to.be.null(); - }); - - describe('executeJavaScript', () => { - let childFrameElement, childFrame; - - before(() => { - childFrameElement = document.createElement('iframe'); - document.body.appendChild(childFrameElement); - childFrame = webFrame.firstChild; - }); - - after(() => { - childFrameElement.remove(); - }); - - it('executeJavaScript() yields results via a promise and a sync callback', async () => { - let callbackResult, callbackError; - - const executeJavaScript = childFrame - .executeJavaScript('1 + 1', (result, error) => { - callbackResult = result; - callbackError = error; - }); - - expect(callbackResult).to.equal(2); - expect(callbackError).to.be.undefined(); - - const promiseResult = await executeJavaScript; - expect(promiseResult).to.equal(2); - }); - - it('executeJavaScriptInIsolatedWorld() yields results via a promise and a sync callback', async () => { - let callbackResult, callbackError; - - const executeJavaScriptInIsolatedWorld = childFrame - .executeJavaScriptInIsolatedWorld(999, [{ code: '1 + 1' }], (result, error) => { - callbackResult = result; - callbackError = error; - }); - - expect(callbackResult).to.equal(2); - expect(callbackError).to.be.undefined(); - - const promiseResult = await executeJavaScriptInIsolatedWorld; - expect(promiseResult).to.equal(2); - }); - - it('executeJavaScript() yields errors via a promise and a sync callback', async () => { - let callbackResult, callbackError; - - const executeJavaScript = childFrame - .executeJavaScript('thisShouldProduceAnError()', (result, error) => { - callbackResult = result; - callbackError = error; - }); - - expect(callbackResult).to.be.undefined(); - expect(callbackError).to.be.an('error'); - - await expect(executeJavaScript).to.eventually.be.rejected('error is expected'); - }); - - // executeJavaScriptInIsolatedWorld is failing to detect exec errors and is neither - // rejecting nor passing the error to the callback. This predates the reintroduction - // of the callback so will not be fixed as part of the callback PR - // if/when this is fixed the test can be uncommented. - // - // it('executeJavaScriptInIsolatedWorld() yields errors via a promise and a sync callback', done => { - // let callbackResult, callbackError - // - // const executeJavaScriptInIsolatedWorld = childFrame - // .executeJavaScriptInIsolatedWorld(999, [{ code: 'thisShouldProduceAnError()' }], (result, error) => { - // callbackResult = result - // callbackError = error - // }); - // - // expect(callbackResult).to.be.undefined() - // expect(callbackError).to.be.an('error') - // - // expect(executeJavaScriptInIsolatedWorld).to.eventually.be.rejected('error is expected'); - // }) - - it('executeJavaScript(InIsolatedWorld) can be used without a callback', async () => { - expect(await webFrame.executeJavaScript('1 + 1')).to.equal(2); - expect(await webFrame.executeJavaScriptInIsolatedWorld(999, [{ code: '1 + 1' }])).to.equal(2); - }); - }); -}); From b0c6fb51525a3a7167e818183c55217cbba7421f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 27 Jul 2022 04:15:34 -0700 Subject: [PATCH 637/811] chore: add electon deps to //src gitignore (#35065) --- patches/chromium/.patches | 1 + ...hore_add_electron_deps_to_gitignores.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 patches/chromium/chore_add_electron_deps_to_gitignores.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 0e6fdb164db03..f45619f998f34 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -113,3 +113,4 @@ feat_filter_out_non-shareable_windows_in_the_current_application_in.patch fix_allow_guest_webcontents_to_enter_fullscreen.patch disable_freezing_flags_after_init_in_node.patch short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +chore_add_electron_deps_to_gitignores.patch diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch new file mode 100644 index 0000000000000..ab21d92a82438 --- /dev/null +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Tue, 26 Jul 2022 00:05:29 -0700 +Subject: chore: add electron deps to gitignores + +Makes things like "git status" quicker when developing electron locally + +diff --git a/.gitignore b/.gitignore +index d68a1b2dd91704a00be9cce6ccfa5daf7da35e1a..ab30dd802543491352d3b407f12127c04742d1ab 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -229,6 +229,7 @@ vs-chromium-project.txt + /delegate_execute + /device/serial/device_serial_mojo.xml + /docs/website ++/electron + /google_apis/gcm/gcm.xml + /google_apis/internal + /googleurl +diff --git a/third_party/.gitignore b/third_party/.gitignore +index 63611fc675a17af16dc20cbd9b20e28db63a7ead..eb369ac8b3bc0c2344491438b67e1618d2efb244 100644 +--- a/third_party/.gitignore ++++ b/third_party/.gitignore +@@ -83,6 +83,7 @@ + /directxsdk + /dom_distiller_js/dist + /eigen3/src ++/electron_node + /elfutils/src + /emoji-segmenter/src + /emoji-metadata/src +@@ -179,6 +180,7 @@ + /mocha + /mockito/src + /nacl_sdk_binaries/ ++/nan + /nasm + /nearby/src + /neon_2_sse/src +@@ -242,6 +244,7 @@ + /speex + /sqlite/src + /sqlite4java/lib/ ++/squirrel.mac + /subresource-filter-ruleset/data/UnindexedRules + /swift-format + /swiftshader/ From 63593ffb22b1b1252fd47e41e170113744f99e6f Mon Sep 17 00:00:00 2001 From: Stuart Schechter Date: Wed, 27 Jul 2022 08:00:35 -0400 Subject: [PATCH 638/811] docs: don't wait for ready event to register open-url listener (#35019) * Update app.md Add warning about late registration of the open-url event. * Update app.md --- docs/api/app.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/api/app.md b/docs/api/app.md index 0bfc137a214ee..960bed3dc8782 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -130,6 +130,11 @@ set `NSPrincipalClass` to `AtomApplication`. You should call `event.preventDefault()` if you want to handle this event. +As with the `open-file` event, be sure to register a listener for the `open-url` +event early in your application startup to detect if the the application being +is being opened to handle a URL. If you register the listener in response to a +`ready` event, you'll miss URLs that trigger the launch of your application. + ### Event: 'activate' _macOS_ Returns: From 99c2706376804dbe16537b96e8fdeb841281f93d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 06:01:22 -0700 Subject: [PATCH 639/811] Bump v21.0.0-nightly.20220727 --- 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 0c8e3b1b47a97..d604f94d46eee 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220726 \ No newline at end of file +21.0.0-nightly.20220727 \ No newline at end of file diff --git a/package.json b/package.json index a7ef000f01cf7..ae45ad91f9ebd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220726", + "version": "21.0.0-nightly.20220727", "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 6feff27acb183..aa085eb46e844 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 21,0,0,20220726 - PRODUCTVERSION 21,0,0,20220726 + FILEVERSION 21,0,0,20220727 + PRODUCTVERSION 21,0,0,20220727 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From de1cec8693e1d9572cce8459ef4beb8fbdf0a3ef Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 27 Jul 2022 09:18:33 -0700 Subject: [PATCH 640/811] test: migrate shell specs to main process (#35058) --- shell/common/api/electron_api_shell.cc | 8 +++ spec-main/api-shell-spec.ts | 72 ++++++++++++++++++++- spec/api-shell-spec.js | 87 -------------------------- 3 files changed, 79 insertions(+), 88 deletions(-) delete mode 100644 spec/api-shell-spec.js diff --git a/shell/common/api/electron_api_shell.cc b/shell/common/api/electron_api_shell.cc index 20fd7929ee540..e279f3a73fe14 100644 --- a/shell/common/api/electron_api_shell.cc +++ b/shell/common/api/electron_api_shell.cc @@ -15,6 +15,7 @@ #include "shell/common/platform_util.h" #if BUILDFLAG(IS_WIN) +#include "base/threading/thread_restrictions.h" #include "base/win/scoped_com_initializer.h" #include "base/win/shortcut.h" @@ -105,6 +106,11 @@ v8::Local TrashItem(v8::Isolate* isolate, } #if BUILDFLAG(IS_WIN) +// The use of the ForTesting flavors is a hack workaround to avoid having to +// patch these as friends into the associated guard classes. +class ShortcutAccessScopedAllowBlocking + : public base::ScopedAllowBlockingForTesting {}; + bool WriteShortcutLink(const base::FilePath& shortcut_path, gin_helper::Arguments* args) { base::win::ShortcutOperation operation = @@ -136,6 +142,7 @@ bool WriteShortcutLink(const base::FilePath& shortcut_path, if (options.Get("toastActivatorClsid", &toastActivatorClsid)) properties.set_toast_activator_clsid(toastActivatorClsid); + ShortcutAccessScopedAllowBlocking allow_blocking; base::win::ScopedCOMInitializer com_initializer; return base::win::CreateOrUpdateShortcutLink(shortcut_path, properties, operation); @@ -145,6 +152,7 @@ v8::Local ReadShortcutLink(gin_helper::ErrorThrower thrower, const base::FilePath& path) { using base::win::ShortcutProperties; gin::Dictionary options = gin::Dictionary::CreateEmpty(thrower.isolate()); + ShortcutAccessScopedAllowBlocking allow_blocking; base::win::ScopedCOMInitializer com_initializer; base::win::ShortcutProperties properties; if (!base::win::ResolveShortcutProperties( diff --git a/spec-main/api-shell-spec.ts b/spec-main/api-shell-spec.ts index 33bc29791fa78..f2cd1cdf8f744 100644 --- a/spec-main/api-shell-spec.ts +++ b/spec-main/api-shell-spec.ts @@ -2,9 +2,10 @@ import { BrowserWindow, app } from 'electron/main'; import { shell } from 'electron/common'; import { closeAllWindows } from './window-helpers'; import { emittedOnce } from './events-helpers'; -import { ifit } from './spec-helpers'; +import { ifdescribe, ifit } from './spec-helpers'; import * as http from 'http'; import * as fs from 'fs-extra'; +import * as os from 'os'; import * as path from 'path'; import { AddressInfo } from 'net'; import { expect } from 'chai'; @@ -84,4 +85,73 @@ describe('shell module', () => { await expect(w.webContents.executeJavaScript('require(\'electron\').shell.trashItem(\'does-not-exist\')')).to.be.rejectedWith(/does-not-exist|Failed to move item|Failed to create FileOperation/); }); }); + + const shortcutOptions = { + target: 'C:\\target', + description: 'description', + cwd: 'cwd', + args: 'args', + appUserModelId: 'appUserModelId', + icon: 'icon', + iconIndex: 1, + toastActivatorClsid: '{0E3CFA27-6FEA-410B-824F-A174B6E865E5}' + }; + ifdescribe(process.platform === 'win32')('shell.readShortcutLink(shortcutPath)', () => { + it('throws when failed', () => { + expect(() => { + shell.readShortcutLink('not-exist'); + }).to.throw('Failed to read shortcut link'); + }); + + const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures'); + it('reads all properties of a shortcut', () => { + const shortcut = shell.readShortcutLink(path.join(fixtures, 'assets', 'shortcut.lnk')); + expect(shortcut).to.deep.equal(shortcutOptions); + }); + }); + + ifdescribe(process.platform === 'win32')('shell.writeShortcutLink(shortcutPath[, operation], options)', () => { + const tmpShortcut = path.join(os.tmpdir(), `${Date.now()}.lnk`); + + afterEach(() => { + fs.unlinkSync(tmpShortcut); + }); + + it('writes the shortcut', () => { + expect(shell.writeShortcutLink(tmpShortcut, { target: 'C:\\' })).to.be.true(); + expect(fs.existsSync(tmpShortcut)).to.be.true(); + }); + + it('correctly sets the fields', () => { + expect(shell.writeShortcutLink(tmpShortcut, shortcutOptions)).to.be.true(); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); + }); + + it('updates the shortcut', () => { + expect(shell.writeShortcutLink(tmpShortcut, 'update', shortcutOptions)).to.be.false(); + expect(shell.writeShortcutLink(tmpShortcut, 'create', shortcutOptions)).to.be.true(); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); + const change = { target: 'D:\\' }; + expect(shell.writeShortcutLink(tmpShortcut, 'update', change)).to.be.true(); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal({ ...shortcutOptions, ...change }); + }); + + it('replaces the shortcut', () => { + expect(shell.writeShortcutLink(tmpShortcut, 'replace', shortcutOptions)).to.be.false(); + expect(shell.writeShortcutLink(tmpShortcut, 'create', shortcutOptions)).to.be.true(); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); + const change = { + target: 'D:\\', + description: 'description2', + cwd: 'cwd2', + args: 'args2', + appUserModelId: 'appUserModelId2', + icon: 'icon2', + iconIndex: 2, + toastActivatorClsid: '{C51A3996-CAD9-4934-848B-16285D4A1496}' + }; + expect(shell.writeShortcutLink(tmpShortcut, 'replace', change)).to.be.true(); + expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(change); + }); + }); }); diff --git a/spec/api-shell-spec.js b/spec/api-shell-spec.js deleted file mode 100644 index 6eacf51363992..0000000000000 --- a/spec/api-shell-spec.js +++ /dev/null @@ -1,87 +0,0 @@ -const { expect } = require('chai'); - -const fs = require('fs'); -const path = require('path'); -const os = require('os'); -const http = require('http'); -const { shell } = require('electron'); - -describe('shell module', () => { - const fixtures = path.resolve(__dirname, 'fixtures'); - const shortcutOptions = { - target: 'C:\\target', - description: 'description', - cwd: 'cwd', - args: 'args', - appUserModelId: 'appUserModelId', - icon: 'icon', - iconIndex: 1, - toastActivatorClsid: '{0E3CFA27-6FEA-410B-824F-A174B6E865E5}' - }; - - describe('shell.readShortcutLink(shortcutPath)', () => { - beforeEach(function () { - if (process.platform !== 'win32') this.skip(); - }); - - it('throws when failed', () => { - expect(() => { - shell.readShortcutLink('not-exist'); - }).to.throw('Failed to read shortcut link'); - }); - - it('reads all properties of a shortcut', () => { - const shortcut = shell.readShortcutLink(path.join(fixtures, 'assets', 'shortcut.lnk')); - expect(shortcut).to.deep.equal(shortcutOptions); - }); - }); - - describe('shell.writeShortcutLink(shortcutPath[, operation], options)', () => { - beforeEach(function () { - if (process.platform !== 'win32') this.skip(); - }); - - const tmpShortcut = path.join(os.tmpdir(), `${Date.now()}.lnk`); - - afterEach(() => { - fs.unlinkSync(tmpShortcut); - }); - - it('writes the shortcut', () => { - expect(shell.writeShortcutLink(tmpShortcut, { target: 'C:\\' })).to.be.true(); - expect(fs.existsSync(tmpShortcut)).to.be.true(); - }); - - it('correctly sets the fields', () => { - expect(shell.writeShortcutLink(tmpShortcut, shortcutOptions)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); - }); - - it('updates the shortcut', () => { - expect(shell.writeShortcutLink(tmpShortcut, 'update', shortcutOptions)).to.be.false(); - expect(shell.writeShortcutLink(tmpShortcut, 'create', shortcutOptions)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); - const change = { target: 'D:\\' }; - expect(shell.writeShortcutLink(tmpShortcut, 'update', change)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal({ ...shortcutOptions, ...change }); - }); - - it('replaces the shortcut', () => { - expect(shell.writeShortcutLink(tmpShortcut, 'replace', shortcutOptions)).to.be.false(); - expect(shell.writeShortcutLink(tmpShortcut, 'create', shortcutOptions)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(shortcutOptions); - const change = { - target: 'D:\\', - description: 'description2', - cwd: 'cwd2', - args: 'args2', - appUserModelId: 'appUserModelId2', - icon: 'icon2', - iconIndex: 2, - toastActivatorClsid: '{C51A3996-CAD9-4934-848B-16285D4A1496}' - }; - expect(shell.writeShortcutLink(tmpShortcut, 'replace', change)).to.be.true(); - expect(shell.readShortcutLink(tmpShortcut)).to.deep.equal(change); - }); - }); -}); From 3c2ec2280e2bc64d4a2b52e031e2e2099afe74a5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 06:03:11 -0700 Subject: [PATCH 641/811] Bump v21.0.0-nightly.20220728 --- 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 d604f94d46eee..b30ad1810548f 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220727 \ No newline at end of file +21.0.0-nightly.20220728 \ No newline at end of file diff --git a/package.json b/package.json index ae45ad91f9ebd..33bac7c4d6b04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220727", + "version": "21.0.0-nightly.20220728", "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 aa085eb46e844..5c6ad5fe6db91 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 21,0,0,20220727 - PRODUCTVERSION 21,0,0,20220727 + FILEVERSION 21,0,0,20220728 + PRODUCTVERSION 21,0,0,20220728 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 674596d11e5ad72b6651073619d282fbfea74ae1 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 28 Jul 2022 19:05:59 -0400 Subject: [PATCH 642/811] ci: switch to GHA for WOA (#35109) * ci: switch to GHA for WOA Co-authored-by: Shelley Vohr --- .github/workflows/electron_woa_testing.yml | 166 +++++++++++++++++++++ appveyor.yml | 2 +- azure-pipelines-arm.yml | 121 --------------- azure-pipelines-woa.yml | 130 ---------------- script/release/ci-release-build.js | 93 +++--------- vsts-arm-test-steps.yml | 110 -------------- vsts-arm32v7.yml | 13 -- vsts-arm64v8.yml | 13 -- 8 files changed, 188 insertions(+), 460 deletions(-) create mode 100644 .github/workflows/electron_woa_testing.yml delete mode 100644 azure-pipelines-arm.yml delete mode 100644 azure-pipelines-woa.yml delete mode 100644 vsts-arm-test-steps.yml delete mode 100644 vsts-arm32v7.yml delete mode 100644 vsts-arm64v8.yml diff --git a/.github/workflows/electron_woa_testing.yml b/.github/workflows/electron_woa_testing.yml new file mode 100644 index 0000000000000..1c20eda0aefb6 --- /dev/null +++ b/.github/workflows/electron_woa_testing.yml @@ -0,0 +1,166 @@ +name: Electron WOA Testing + +on: + push: + branches: '**' + workflow_dispatch: + inputs: + appveyor_job_id: + description: 'Job Id of Appveyor WOA job to test' + type: text + required: true + +jobs: + electron-woa-testing: + + runs-on: [self-hosted, woa] + + permissions: + checks: write + pull-requests: write + + steps: + - uses: LouisBrunner/checks-action@v1.1.1 + if: ${{ github.event_name == 'push' && github.repository == 'electron/electron' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: electron-woa-testing + status: in_progress + - name: Clean Workspace + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + Remove-Item * -Recurse -Force + shell: powershell + - name: Checkout + uses: actions/checkout@v3 + if: ${{ github.event_name == 'workflow_dispatch' }} + with: + path: src\electron + fetch-depth: 0 + - name: Yarn install + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + cd src\electron + node script/yarn.js install --frozen-lockfile + - name: Download and extract dist.zip for test + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + $localArtifactPath = "$pwd\dist.zip" + $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/dist.zip" + Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" } + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath + shell: powershell + - name: Download and extract native test executables for test + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + $localArtifactPath = "src\out\Default\shell_browser_ui_unittests.exe" + $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/shell_browser_ui_unittests.exe" + Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" } + shell: powershell + - name: Download and extract ffmpeg.zip for test + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + $localArtifactPath = "$pwd\ffmpeg.zip" + $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/ffmpeg.zip" + Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" } + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath + shell: powershell + - name: Download node headers for test + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + $localArtifactPath = "src\node_headers.zip" + $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/node_headers.zip" + Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" } + cd src + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip + shell: powershell + - name: Download electron.lib for test + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + $localArtifactPath = "src\out\Default\electron.lib" + $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/electron.lib" + Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" } + shell: powershell + # Uncomment the following block if pdb files are needed to debug issues + # - name: Download pdb files for detailed stacktraces + # if: ${{ github.event_name == 'workflow_dispatch' }} + # run: | + # try { + # $localArtifactPath = "src\pdb.zip" + # $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/pdb.zip" + # Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.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 + # } + # shell: powershell + - name: Setup node headers + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + 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 + shell: powershell + - name: Run Electron Main process tests + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + cd src + set npm_config_nodedir=%cd%\out\Default\gen\node_headers + set npm_config_arch=arm64 + cd electron + node script/yarn test --runners=main --enable-logging --disable-features=CalculateNativeWinOcclusion + env: + ELECTRON_ENABLE_STACK_DUMPING: true + ELECTRON_OUT_DIR: Default + IGNORE_YARN_INSTALL_ERROR: 1 + ELECTRON_TEST_RESULTS_DIR: junit + MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' + MOCHA_REPORTER: mocha-multi-reporters + ELECTRON_SKIP_NATIVE_MODULE_TESTS: true + - name: Run Electron Remote based tests + if: ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) }} + run: | + cd src + set npm_config_nodedir=%cd%\out\Default\gen\node_headers + set npm_config_arch=arm64 + cd electron + node script/yarn test --runners=remote --enable-logging --disable-features=CalculateNativeWinOcclusion + env: + ELECTRON_OUT_DIR: Default + IGNORE_YARN_INSTALL_ERROR: 1 + ELECTRON_TEST_RESULTS_DIR: junit + MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' + MOCHA_REPORTER: mocha-multi-reporters + ELECTRON_SKIP_NATIVE_MODULE_TESTS: true + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/composite@v1 + if: ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) }} + with: + files: "src/junit/**/*.xml" + check_name: "electron-woa-testing" + - name: Verify ffmpeg + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + cd src + echo "Verifying non proprietary ffmpeg" + python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg + shell: cmd + - name: Kill processes left running from last test run + if: ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled() }} + run: | + Get-Process | Where Name -Like "electron*" | Stop-Process + Get-Process | Where Name -Like "msedge*" | Stop-Process + shell: powershell + - name: Delete user app data directories + if: ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled() }} + run: | + Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore + shell: powershell + - uses: LouisBrunner/checks-action@v1.1.1 + if: ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled() }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: electron-woa-testing + conclusion: "${{ job.status }}" \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 80ee94d49d314..b4593261bde6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -223,7 +223,7 @@ deploy_script: & python script\release\uploaders\upload.py --verbose } } 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 + node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH } on_finish: # Uncomment this lines to enable RDP diff --git a/azure-pipelines-arm.yml b/azure-pipelines-arm.yml deleted file mode 100644 index 868b7753944e2..0000000000000 --- a/azure-pipelines-arm.yml +++ /dev/null @@ -1,121 +0,0 @@ -steps: -- task: CopyFiles@2 - displayName: 'Copy Files to: src/electron' - inputs: - TargetFolder: src/electron - -- bash: | - cd src/electron - node script/yarn.js install --frozen-lockfile - displayName: 'Yarn install' - -- bash: | - export ZIP_DEST=$PWD/src/out/Default - echo "##vso[task.setvariable variable=ZIP_DEST]$ZIP_DEST" - mkdir -p $ZIP_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=dist.zip --dest=$ZIP_DEST - cd $ZIP_DEST - unzip -o dist.zip - xattr -cr Electron.app - displayName: 'Download and unzip dist files for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export FFMPEG_ZIP_DEST=$PWD/src/out/ffmpeg - mkdir -p $FFMPEG_ZIP_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=ffmpeg.zip --dest=$FFMPEG_ZIP_DEST - cd $FFMPEG_ZIP_DEST - unzip -o ffmpeg.zip - displayName: 'Download and unzip ffmpeg for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export NODE_HEADERS_DEST=$PWD/src/out/Default/gen - mkdir -p $NODE_HEADERS_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=node_headers.tar.gz --dest=$NODE_HEADERS_DEST - cd $NODE_HEADERS_DEST - tar xzf node_headers.tar.gz - displayName: 'Download and untar node header files for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export CROSS_ARCH_SNAPSHOTS=$PWD/src/out/Default/cross-arch-snapshots - mkdir -p $CROSS_ARCH_SNAPSHOTS - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/snapshot_blob.bin --dest=$CROSS_ARCH_SNAPSHOTS - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/v8_context_snapshot.arm64.bin --dest=$CROSS_ARCH_SNAPSHOTS - displayName: 'Download cross arch snapshot files' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - cd src - export ELECTRON_OUT_DIR=Default - export npm_config_arch=arm64 - (cd electron && node script/yarn test --enable-logging --runners main) - displayName: 'Run Electron main tests' - timeoutInMinutes: 20 - env: - ELECTRON_DISABLE_SECURITY_WARNINGS: 1 - IGNORE_YARN_INSTALL_ERROR: 1 - ELECTRON_TEST_RESULTS_DIR: junit - -- bash: | - cd src - export ELECTRON_OUT_DIR=Default - export npm_config_arch=arm64 - (cd electron && node script/yarn test --enable-logging --runners remote) - displayName: 'Run Electron remote tests' - timeoutInMinutes: 20 - condition: succeededOrFailed() - env: - ELECTRON_DISABLE_SECURITY_WARNINGS: 1 - IGNORE_YARN_INSTALL_ERROR: 1 - ELECTRON_TEST_RESULTS_DIR: junit - -- bash: | - cd src - python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg - displayName: Verify non proprietary ffmpeg - timeoutInMinutes: 5 - condition: succeededOrFailed() - env: - TARGET_ARCH: arm64 - -- bash: | - cd src - echo Verify cross arch snapshot - python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/out/Default/cross-arch-snapshots - displayName: Verify cross arch snapshot - timeoutInMinutes: 5 - condition: succeededOrFailed() - -- task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '*.xml' - - searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/' - - condition: succeededOrFailed() - -- bash: killall Electron || echo "No Electron processes left running" - displayName: 'Kill processes left running from last test run' - condition: always() - -- bash: | - rm -rf ~/Library/Application\ Support/Electron* - rm -rf ~/Library/Application\ Support/electron* - displayName: 'Delete user app data directories' - condition: always() - -- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 - displayName: 'Clean Agent Directories' - - condition: always() diff --git a/azure-pipelines-woa.yml b/azure-pipelines-woa.yml deleted file mode 100644 index 9942f97f79dc3..0000000000000 --- a/azure-pipelines-woa.yml +++ /dev/null @@ -1,130 +0,0 @@ -workspace: - clean: all - -steps: -- checkout: self - path: src\electron - -- script: | - node script/yarn.js install --frozen-lockfile - displayName: 'Yarn install' - -- powershell: | - $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 -o$(Pipeline.Workspace)\src\out\Default -y $localArtifactPath - displayName: 'Download and extract dist.zip for test' - env: - APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - -- powershell: | - $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' - env: - APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - -- powershell: | - $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 -o$(Pipeline.Workspace)\src\out\ffmpeg $localArtifactPath - displayName: 'Download and extract ffmpeg.zip for test' - env: - APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - -- powershell: | - $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 $(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 = "$(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) - -# 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 $(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 $(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 --enable-logging --disable-features=CalculateNativeWinOcclusion - displayName: 'Run Electron Main process tests' - env: - ELECTRON_ENABLE_STACK_DUMPING: true - ELECTRON_OUT_DIR: Default - IGNORE_YARN_INSTALL_ERROR: 1 - ELECTRON_TEST_RESULTS_DIR: junit - MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' - MOCHA_REPORTER: mocha-multi-reporters - -- script: | - 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=remote --enable-logging --disable-features=CalculateNativeWinOcclusion - displayName: 'Run Electron Remote based tests' - env: - ELECTRON_OUT_DIR: Default - IGNORE_YARN_INSTALL_ERROR: 1 - ELECTRON_TEST_RESULTS_DIR: junit - MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' - MOCHA_REPORTER: mocha-multi-reporters - condition: succeededOrFailed() - -- task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '*.xml' - searchFolder: '$(Pipeline.Workspace)/src/junit/' - condition: always() - -- script: | - 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' - -- powershell: | - Get-Process | Where Name –Like "electron*" | Stop-Process - Get-Process | Where Name –Like "msedge*" | Stop-Process - displayName: 'Kill processes left running from last test run' - condition: always() - -- powershell: | - Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore - displayName: 'Delete user app data directories' - condition: always() diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index b31cfaa980784..ef3616374b4c8 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -2,11 +2,10 @@ if (!process.env.CI) require('dotenv-safe').load(); const assert = require('assert'); const got = require('got'); +const { Octokit } = require('@octokit/rest'); const BUILD_APPVEYOR_URL = 'https://ci.appveyor.com/api/builds'; const CIRCLECI_PIPELINE_URL = 'https://circleci.com/api/v2/project/gh/electron/electron/pipeline'; -const VSTS_URL = 'https://github.visualstudio.com/electron/_apis/build'; -const DEVOPS_URL = 'https://dev.azure.com/electron-ci/electron/_apis/build'; const CIRCLECI_WAIT_TIME = process.env.CIRCLECI_WAIT_TIME || 30000; const appVeyorJobs = { @@ -25,13 +24,7 @@ const circleCIPublishIndividualArches = { 'linux-publish': ['arm', 'arm64', 'x64'] }; -const vstsArmJobs = [ - 'electron-arm-testing', - 'electron-osx-arm64-testing', - 'electron-mas-arm64-testing', - 'electron-arm64-testing', - 'electron-woa-testing' -]; +const GHAJobs = ['electron-woa-testing']; let jobRequestedCount = 0; @@ -257,71 +250,28 @@ function buildCircleCI (targetBranch, options) { } } -async function buildVSTS (targetBranch, options) { - assert(options.armTest, `${options.ci} only works with the --armTest option.`); - assert(vstsArmJobs.includes(options.job), `Unknown VSTS CI arm test job name: ${options.job}. Valid values are: ${vstsArmJobs}.`); +async function buildGHA (targetBranch, options) { + const { GHA_TOKEN } = process.env; + assert(GHA_TOKEN, `${options.ci} requires the $GHA_TOKEN environment variable to be provided`); - console.log(`Triggering VSTS to run build on branch: ${targetBranch}.`); - const environmentVariables = {}; + const octokit = new Octokit({ auth: GHA_TOKEN }); - if (options.circleBuildNum) { - environmentVariables.CIRCLE_BUILD_NUM = options.circleBuildNum; - } else if (options.appveyorJobId) { - environmentVariables.APPVEYOR_JOB_ID = options.appveyorJobId; - } + assert(GHAJobs.includes(options.job), `Unknown GitHub Actions arm test job name: ${options.job}. Valid values are: ${GHAJobs}.`); + assert(options.commit !== null, 'commit is a required option for GitHub Actions'); - let vstsURL = VSTS_URL; - let vstsToken = process.env.VSTS_TOKEN; - assert(vstsToken, `${options.ci} requires the $VSTS_TOKEN environment variable to be provided`); - if (options.ci === 'DevOps') { - vstsURL = DEVOPS_URL; - vstsToken = process.env.DEVOPS_TOKEN; - } - const requestOpts = { - url: `${vstsURL}/definitions?api-version=4.1`, - user: '', - password: vstsToken, - headers: { - 'Content-Type': 'application/json' - } - }; + console.log(`Triggering GitHub Actions to run build on branch: ${targetBranch}.`); jobRequestedCount++; try { - const vstsResponse = await makeRequest(requestOpts, true); - const buildToRun = vstsResponse.value.find(build => build.name === options.job); - callVSTSBuild(buildToRun, targetBranch, environmentVariables, vstsURL, vstsToken); - } catch (err) { - console.log('Problem calling VSTS to get build definitions: ', err); - } -} - -async function callVSTSBuild (build, targetBranch, environmentVariables, vstsURL, vstsToken) { - const buildBody = { - definition: build, - sourceBranch: targetBranch, - priority: 'high' - }; - if (Object.keys(environmentVariables).length !== 0) { - buildBody.parameters = JSON.stringify(environmentVariables); - } - const requestOpts = { - url: `${vstsURL}/builds?api-version=4.1`, - user: '', - password: vstsToken, - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(buildBody), - method: 'POST' - }; - - try { - const { _links } = await makeRequest(requestOpts, true); - console.log(`VSTS release build request for ${build.name} successful. Check ${_links.web.href} for status.`); + const response = await octokit.request('POST /repos/electron/electron/actions/workflows/electron_woa_testing.yml/dispatches', { + ref: targetBranch, + inputs: { + appveyor_job_id: `${options.appveyorJobId}` + } + }); } catch (err) { - console.log(`Could not call VSTS for job ${build.name}: `, err); + console.log('Problem calling GitHub Actions to get build definitions: ', err); } } @@ -336,9 +286,8 @@ function runRelease (targetBranch, options) { buildAppVeyor(targetBranch, options); break; } - case 'DevOps': - case 'VSTS': { - buildVSTS(targetBranch, options); + case 'GHA': { + buildGHA(targetBranch, options); break; } default: { @@ -357,13 +306,13 @@ module.exports = runRelease; if (require.main === module) { const args = require('minimist')(process.argv.slice(2), { - boolean: ['ghRelease', 'armTest'] + boolean: ['ghRelease'] }); const targetBranch = args._[0]; if (args._.length < 1) { console.log(`Trigger CI to build release builds of electron. - Usage: ci-release-build.js [--job=CI_JOB_NAME] [--arch=INDIVIDUAL_ARCH] [--ci=CircleCI|AppVeyor|VSTS|DevOps] - [--ghRelease] [--armTest] [--circleBuildNum=xxx] [--appveyorJobId=xxx] [--commit=sha] TARGET_BRANCH + Usage: ci-release-build.js [--job=CI_JOB_NAME] [--arch=INDIVIDUAL_ARCH] [--ci=CircleCI|AppVeyor|GHA] + [--ghRelease] [--circleBuildNum=xxx] [--appveyorJobId=xxx] [--commit=sha] TARGET_BRANCH `); process.exit(0); } diff --git a/vsts-arm-test-steps.yml b/vsts-arm-test-steps.yml deleted file mode 100644 index 5985e4d2637e4..0000000000000 --- a/vsts-arm-test-steps.yml +++ /dev/null @@ -1,110 +0,0 @@ -steps: -- task: CopyFiles@2 - displayName: 'Copy Files to: src/electron' - inputs: - TargetFolder: src/electron - -- bash: | - cd src/electron - node script/yarn.js install --frozen-lockfile - displayName: 'Yarn install' - -- bash: | - export ZIP_DEST=$PWD/src/out/Default - echo "##vso[task.setvariable variable=ZIP_DEST]$ZIP_DEST" - mkdir -p $ZIP_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=dist.zip --dest=$ZIP_DEST - cd $ZIP_DEST - unzip -o dist.zip - displayName: 'Download and unzip dist files for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export FFMPEG_ZIP_DEST=$PWD/src/out/ffmpeg - mkdir -p $FFMPEG_ZIP_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=ffmpeg.zip --dest=$FFMPEG_ZIP_DEST - cd $FFMPEG_ZIP_DEST - unzip -o ffmpeg.zip - displayName: 'Download and unzip ffmpeg for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export NODE_HEADERS_DEST=$PWD/src/out/Default/gen - mkdir -p $NODE_HEADERS_DEST - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=node_headers.tar.gz --dest=$NODE_HEADERS_DEST - cd $NODE_HEADERS_DEST - tar xzf node_headers.tar.gz - displayName: 'Download and untar node header files for test' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export CROSS_ARCH_SNAPSHOTS=$PWD/src/out/Default/cross-arch-snapshots - mkdir -p $CROSS_ARCH_SNAPSHOTS - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/snapshot_blob.bin --dest=$CROSS_ARCH_SNAPSHOTS - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/v8_context_snapshot.bin --dest=$CROSS_ARCH_SNAPSHOTS - displayName: 'Download cross arch snapshot files' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - export NATIVE_UNITTESTS_DEST=$PWD/src/out/Default - cd src/electron - node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=shell_browser_ui_unittests --dest=$NATIVE_UNITTESTS_DEST - chmod +x $NATIVE_UNITTESTS_DEST/shell_browser_ui_unittests - displayName: 'Download native unittest executables' - env: - CIRCLE_TOKEN: $(CIRCLECI_TOKEN) - -- bash: | - sh -e /etc/init.d/xvfb start - displayName: Setup for headless testing - env: - DISPLAY: ":99.0" - -- bash: | - # Next line needed to avoid crash on arm32 - sudo gdk-pixbuf-query-loaders --update-cache - cd src - export ELECTRON_OUT_DIR=Default - (cd electron && node script/yarn test -- --enable-logging) - displayName: 'Run Electron tests' - timeoutInMinutes: 20 - env: - ELECTRON_DISABLE_SECURITY_WARNINGS: 1 - IGNORE_YARN_INSTALL_ERROR: 1 - ELECTRON_TEST_RESULTS_DIR: junit - CI: 1 - -- bash: | - cd src - python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg - displayName: Verify non proprietary ffmpeg - timeoutInMinutes: 5 - -- bash: | - cd src - echo Verify cross arch snapshot - python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/out/Default/cross-arch-snapshots - displayName: Verify cross arch snapshot - timeoutInMinutes: 5 - -- task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '*.xml' - - searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/' - - condition: succeededOrFailed() - -- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 - displayName: 'Clean Agent Directories' - - condition: always() diff --git a/vsts-arm32v7.yml b/vsts-arm32v7.yml deleted file mode 100644 index feeb920ba8f39..0000000000000 --- a/vsts-arm32v7.yml +++ /dev/null @@ -1,13 +0,0 @@ -resources: - containers: - - container: arm32v7-test-container - image: ghcr.io/electron/build:arm32v7-27db4a3e3512bfd2e47f58cea69922da0835f1d9 - options: --shm-size 128m - -jobs: -- job: Test_Arm32v7 - container: arm32v7-test-container - displayName: Test Arm on Arm32v7 hardware - timeoutInMinutes: 30 - steps: - - template: vsts-arm-test-steps.yml diff --git a/vsts-arm64v8.yml b/vsts-arm64v8.yml deleted file mode 100644 index e64708663b393..0000000000000 --- a/vsts-arm64v8.yml +++ /dev/null @@ -1,13 +0,0 @@ -resources: - containers: - - container: arm64v8-test-container - image: ghcr.io/electron/build:arm64v8-27db4a3e3512bfd2e47f58cea69922da0835f1d9 - options: --shm-size 128m - -jobs: -- job: Test_Arm64 - container: arm64v8-test-container - displayName: Test Arm64 on Arm64 hardware - timeoutInMinutes: 30 - steps: - - template: vsts-arm-test-steps.yml From 7f757075bc5ac35c751aecf0dd4a94d0daf21f7d Mon Sep 17 00:00:00 2001 From: Sofia Nguy Date: Thu, 28 Jul 2022 21:54:48 -0700 Subject: [PATCH 643/811] docs: update E21 release date (#35122) * docs: update E21 release date * chore: fix lint Co-authored-by: Keeley Hammond --- docs/tutorial/electron-timelines.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/electron-timelines.md b/docs/tutorial/electron-timelines.md index e98f5b14ed11d..6af3e41815f35 100644 --- a/docs/tutorial/electron-timelines.md +++ b/docs/tutorial/electron-timelines.md @@ -24,10 +24,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc. | 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 | v16.13 | ✅ | +| 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 | v16.13 | ✅ | | 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | v16.14 | ✅ | -| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | TBD | ✅ | +| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | v16.15 | ✅ | +| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | M106 | TBD | ✅ | **Notes:** From 8004cb8722c8d52f4cd553bbaea86750149e8ca4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 06:00:43 -0700 Subject: [PATCH 644/811] Bump v21.0.0-nightly.20220729 --- 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 b30ad1810548f..03b7d494e44ea 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-nightly.20220728 \ No newline at end of file +21.0.0-nightly.20220729 \ No newline at end of file diff --git a/package.json b/package.json index 33bac7c4d6b04..ee8f36d254278 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-nightly.20220728", + "version": "21.0.0-nightly.20220729", "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 5c6ad5fe6db91..3380c1a4a1a9a 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 21,0,0,20220728 - PRODUCTVERSION 21,0,0,20220728 + FILEVERSION 21,0,0,20220729 + PRODUCTVERSION 21,0,0,20220729 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9028bb79a85fedf64230c2f1c6a29ab072c98c20 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 29 Jul 2022 17:09:47 +0200 Subject: [PATCH 645/811] fix: empty result of `webContents.getUserAgent()` (#35069) fix: empty result of webContents.getUserAgent() --- shell/browser/api/electron_api_web_contents.cc | 11 +++-------- shell/browser/electron_browser_context.cc | 5 ----- shell/browser/electron_browser_context.h | 1 - spec-main/api-web-contents-spec.ts | 6 ++++++ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index c444deba46a80..243db0489238d 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -675,10 +675,8 @@ WebContents::WebContents(v8::Isolate* isolate, auto session = Session::CreateFrom(isolate, GetBrowserContext()); session_.Reset(isolate, session.ToV8()); - absl::optional user_agent_override = - GetBrowserContext()->GetUserAgentOverride(); - if (user_agent_override) - SetUserAgent(*user_agent_override); + SetUserAgent(GetBrowserContext()->GetUserAgent()); + web_contents->SetUserData(kElectronApiWebContentsKey, std::make_unique(GetWeakPtr())); InitZoomController(web_contents, gin::Dictionary::CreateEmpty(isolate)); @@ -884,10 +882,7 @@ void WebContents::InitWithSessionAndOptions( AutofillDriverFactory::CreateForWebContents(web_contents()); - absl::optional user_agent_override = - GetBrowserContext()->GetUserAgentOverride(); - if (user_agent_override) - SetUserAgent(*user_agent_override); + SetUserAgent(GetBrowserContext()->GetUserAgent()); if (IsGuest()) { NativeWindow* owner_window = nullptr; diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index ff4ed57d35964..432ea24c9ea22 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -308,11 +308,6 @@ std::string ElectronBrowserContext::GetUserAgent() const { return user_agent_.value_or(ElectronBrowserClient::Get()->GetUserAgent()); } -absl::optional ElectronBrowserContext::GetUserAgentOverride() - const { - return user_agent_; -} - predictors::PreconnectManager* ElectronBrowserContext::GetPreconnectManager() { if (!preconnect_manager_.get()) { preconnect_manager_ = diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index baaa2ee4ee3a3..b1fa4715cb758 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -89,7 +89,6 @@ class ElectronBrowserContext : public content::BrowserContext { void SetUserAgent(const std::string& user_agent); std::string GetUserAgent() const; - absl::optional GetUserAgentOverride() const; bool CanUseHttpCache() const; int GetMaxCacheSize() const; ResolveProxyHelper* GetResolveProxyHelper(); diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 8f4df42e2348f..3050b926988a6 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -902,6 +902,12 @@ describe('webContents module', () => { }); describe('userAgent APIs', () => { + it('is not empty by default', () => { + const w = new BrowserWindow({ show: false }); + const userAgent = w.webContents.getUserAgent(); + expect(userAgent).to.be.a('string').that.is.not.empty(); + }); + it('can set the user agent (functions)', () => { const w = new BrowserWindow({ show: false }); const userAgent = w.webContents.getUserAgent(); From 00e9bf107a6357029b3e4c247456450c3d2554a4 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Fri, 29 Jul 2022 18:47:43 +0200 Subject: [PATCH 646/811] docs: new main -> renderers messageChannel example (#34978) * docs: new main -> renderers messageChannel example * consistent use of your * fix a typo * linting * markdown linting * Update docs/tutorial/message-ports.md Co-authored-by: Erick Zhao * update code example headings, reference contextIsolation example * remove nodeIntegration: false from browserWindows * rename "messagePort" to "electronMessagePort" for compatibility Co-authored-by: Erick Zhao --- docs/tutorial/message-ports.md | 103 ++++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 22 deletions(-) diff --git a/docs/tutorial/message-ports.md b/docs/tutorial/message-ports.md index 9f1e9bf467aff..b236f4133e450 100644 --- a/docs/tutorial/message-ports.md +++ b/docs/tutorial/message-ports.md @@ -8,8 +8,7 @@ your app. Here is a very brief example of what a MessagePort is and how it works: -```js -// renderer.js /////////////////////////////////////////////////////////////// +```js title='renderer.js (Renderer Process)' // MessagePorts are created in pairs. A connected pair of message ports is // called a channel. const channel = new MessageChannel() @@ -28,8 +27,7 @@ port2.postMessage({ answer: 42 }) ipcRenderer.postMessage('port', null, [port1]) ``` -```js -// main.js /////////////////////////////////////////////////////////////////// +```js title='main.js (Main Process)' // In the main process, we receive the port. ipcMain.on('port', (event) => { // When we receive a MessagePort in the main process, it becomes a @@ -84,14 +82,84 @@ process, you can listen for the `close` event by calling `port.on('close', ## Example use cases +### Setting up a MessageChannel between two renderers + +In this example, the main process sets up a MessageChannel, then sends each port +to a different renderer. This allows renderers to send messages to each other +without needing to use the main process as an in-between. + +```js title='main.js (Main Process)' +const { BrowserWindow, app, MessageChannelMain } = require('electron') + +app.whenReady().then(async () => { + // create the windows. + const mainWindow = new BrowserWindow({ + show: false, + webPreferences: { + contextIsolation: false, + preload: 'preloadMain.js' + } + }) + + const secondaryWindow = BrowserWindow({ + show: false, + webPreferences: { + contextIsolation: false, + preload: 'preloadSecondary.js' + } + }) + + // set up the channel. + const { port1, port2 } = new MessageChannelMain() + + // once the webContents are ready, send a port to each webContents with postMessage. + mainWindow.once('ready-to-show', () => { + mainWindow.webContents.postMessage('port', null, [port1]) + }) + + secondaryWindow.once('ready-to-show', () => { + secondaryWindow.webContents.postMessage('port', null, [port2]) + }) +}) +``` + +Then, in your preload scripts you receive the port through IPC and set up the +listeners. + +```js title='preloadMain.js and preloadSecondary.js (Preload scripts)' +const { ipcRenderer } = require('electron') + +ipcRenderer.on('port', e => { + // port received, make it globally available. + window.electronMessagePort = e.ports[0] + + window.electronMessagePort.onmessage = messageEvent => { + // handle message + } +}) +``` + +In this example messagePort is bound to the `window` object directly. It is better +to use `contextIsolation` and set up specific contextBridge calls for each of your +expected messages, but for the simplicity of this example we don't. You can find an +example of context isolation further down this page at [Communicating directly between the main process and the main world of a context-isolated page](#communicating-directly-between-the-main-process-and-the-main-world-of-a-context-isolated-page) + +That means window.messagePort is globally available and you can call +`postMessage` on it from anywhere in your app to send a message to the other +renderer. + +```js title='renderer.js (Renderer Process)' +// elsewhere in your code to send a message to the other renderers message handler +window.electronMessagePort.postmessage('ping') +``` + ### Worker process In this example, your app has a worker process implemented as a hidden window. You want the app page to be able to communicate directly with the worker process, without the performance overhead of relaying via the main process. -```js -// main.js /////////////////////////////////////////////////////////////////// +```js title='main.js (Main Process)' const { BrowserWindow, app, ipcMain, MessageChannelMain } = require('electron') app.whenReady().then(async () => { @@ -129,8 +197,7 @@ app.whenReady().then(async () => { }) ``` -```html - +```html title='worker.html' ``` -```html - +```html title='app.html' '); + }); + + ses.setPermissionCheckHandler((wc, permission, requestingOrigin, details) => { + if (permission === 'clipboard-read') { + handlerDetails = details; + return true; + } + return false; + }); + + const readClipboardPermission: any = () => { + return w.webContents.executeJavaScript(` + navigator.permissions.query({name: 'clipboard-read'}) + .then(permission => permission.state).catch(err => err.message); + `, true); + }; + + await w.loadURL(loadUrl); + const state = await readClipboardPermission(); + expect(state).to.equal('granted'); + expect(handlerDetails!.requestingUrl).to.equal(loadUrl); + }); + + it('details provides requestingURL for cross origin subFrame', async () => { + const w = new BrowserWindow({ + show: false, + webPreferences: { + partition: 'very-temp-permission-handler' + } + }); + const ses = w.webContents.session; + const loadUrl = 'https://myfakesite/'; + let handlerDetails : Electron.PermissionCheckHandlerHandlerDetails; + + ses.protocol.interceptStringProtocol('https', (req, cb) => { + cb(''); + }); + + ses.setPermissionCheckHandler((wc, permission, requestingOrigin, details) => { + if (permission === 'clipboard-read') { + handlerDetails = details; + return true; + } + return false; + }); + + const readClipboardPermission: any = (frame: WebFrameMain) => { + return frame.executeJavaScript(` + navigator.permissions.query({name: 'clipboard-read'}) + .then(permission => permission.state).catch(err => err.message); + `, true); + }; + + await w.loadFile(path.join(fixtures, 'api', 'blank.html')); + w.webContents.executeJavaScript(` + var iframe = document.createElement('iframe'); + iframe.src = '${loadUrl}'; + document.body.appendChild(iframe); + null; + `); + const [,, frameProcessId, frameRoutingId] = await emittedOnce(w.webContents, 'did-frame-finish-load'); + const state = await readClipboardPermission(webFrameMain.fromId(frameProcessId, frameRoutingId)); + expect(state).to.equal('granted'); + expect(handlerDetails!.requestingUrl).to.equal(loadUrl); + expect(handlerDetails!.isMainFrame).to.be.false(); + expect(handlerDetails!.embeddingOrigin).to.equal('file:///'); + }); + }); + describe('ses.isPersistent()', () => { afterEach(closeAllWindows); From c99a52eab46fc2c716396900c522d3166f0cc0e8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 15:22:47 -0400 Subject: [PATCH 688/811] chore: bump chromium to 106.0.5216.0 (21-x-y) (#35363) * chore: bump chromium to 106.0.5216.0 (main) (#34993) * Trigger Build Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- .circleci/config/base.yml | 1 + DEPS | 2 +- patches/chromium/.patches | 2 +- .../add_didinstallconditionalfeatures.patch | 18 +- ...er_to_linuxui_getwindowframeprovider.patch | 16 +- ..._scheduler_throttling_per_renderview.patch | 24 +-- ..._windows_to_have_different_web_prefs.patch | 46 +++-- ..._secondary_label_via_simplemenumodel.patch | 44 ++--- patches/chromium/blink_local_frame.patch | 12 +- ...getting_string_values_for_crash_keys.patch | 2 +- .../build_add_electron_tracing_category.patch | 2 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 16 +- .../build_libc_as_static_library.patch | 2 +- ...bcxx_abi_unstable_false_for_electron.patch | 2 +- patches/chromium/can_create_window.patch | 40 ++--- ...hore_add_electron_deps_to_gitignores.patch | 4 +- ...dle_synthetic_mouse_events_for_touch.patch | 6 +- ...screationoverridden_with_full_params.patch | 32 ++-- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/disable-redraw-lock.patch | 10 +- .../disable_color_correct_rendering.patch | 12 +- .../disable_compositor_recycling.patch | 4 +- ...le_freezing_flags_after_init_in_node.patch | 2 +- patches/chromium/disable_hidden.patch | 6 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ll_getwebframe_-_view_when_get_blink.patch | 25 --- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...xpose_setuseragent_on_networkcontext.patch | 12 +- .../extend_apply_webpreferences.patch | 4 +- ...dd_set_theme_source_to_allow_apps_to.patch | 14 +- ...screen_rendering_with_viz_compositor.patch | 18 +- ..._raw_response_headers_from_urlloader.patch | 18 +- ..._exclusive_access_for_electron_needs.patch | 34 ++-- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 2 +- ...ete_SerialPortManager_on_main_thread.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 6 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 14 +- ...gpu_notify_when_dxdiag_request_fails.patch | 14 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...tform_electron_can_call_x11_property.patch | 8 +- patches/chromium/isolate_holder.patch | 41 ++++- .../load_v8_snapshot_in_browser_process.patch | 2 +- .../chromium/make_gtk_getlibgtk_public.patch | 2 +- ...as_avoid_usage_of_private_macos_apis.patch | 12 +- .../mas_disable_custom_window_frame.patch | 8 +- .../mas_disable_remote_accessibility.patch | 34 ++-- patches/chromium/mas_no_private_api.patch | 8 +- ...emote_certificate_verification_logic.patch | 10 +- .../chromium/notification_provenance.patch | 6 +- patches/chromium/picture-in-picture.patch | 4 +- ...utofill_colors_to_the_color_pipeline.patch | 10 +- patches/chromium/printing.patch | 116 ++++++------ patches/chromium/process_singleton.patch | 124 +++++++++++-- ...r_changes_to_the_webcontentsobserver.patch | 14 +- .../render_widget_host_view_mac.patch | 20 +-- patches/chromium/resource_file_conflict.patch | 2 +- ...h_spell_check_delayed_initialization.patch | 112 ++++++++++++ patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 6 +- ...andboxed_ppapi_processes_skip_zygote.patch | 4 +- patches/chromium/web_contents.patch | 8 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 14 +- ...feat_add_hook_to_notify_script_ready.patch | 10 +- patches/config.json | 4 +- patches/lss/.patches | 1 + ...ix_cast_pwrite64_arg_to_long_for_arm.patch | 24 +++ patches/node/.patches | 1 + ..._override_createjob_in_node_platform.patch | 41 +++++ patches/v8/.patches | 1 - patches/v8/build_gn.patch | 6 +- ...ild_remove_legacy_oom_error_callback.patch | 168 ------------------ ...able_is_execution_terminating_dcheck.patch | 13 ++ 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_attribute_for_older_msvc_versions.patch | 8 +- ..._terminating_exception_in_microtasks.patch | 21 +-- script/apply_all_patches.py | 7 +- script/verify-mksnapshot.py | 3 + shell/app/electron_main_delegate.cc | 7 +- shell/app/electron_main_delegate.h | 4 +- shell/browser/api/electron_api_menu.cc | 2 +- .../browser/api/electron_api_web_contents.cc | 2 +- .../bluetooth/electron_bluetooth_delegate.cc | 3 +- .../bluetooth/electron_bluetooth_delegate.h | 3 +- shell/browser/electron_browser_client.cc | 3 +- shell/browser/electron_browser_main_parts.cc | 7 +- shell/browser/hid/electron_hid_delegate.cc | 2 + shell/browser/hid/electron_hid_delegate.h | 3 +- .../printing/print_view_manager_electron.cc | 90 +++++----- .../printing/print_view_manager_electron.h | 24 +-- shell/browser/special_storage_policy.cc | 6 +- shell/browser/special_storage_policy.h | 1 - shell/browser/ui/accelerator_util.cc | 4 +- shell/browser/ui/accelerator_util.h | 2 +- shell/browser/ui/electron_menu_model.cc | 24 +-- shell/browser/ui/electron_menu_model.h | 22 +-- shell/browser/ui/gtk/menu_util.cc | 4 +- shell/browser/ui/views/global_menu_bar_x11.cc | 10 +- shell/browser/ui/views/menu_bar.cc | 11 +- shell/browser/ui/views/menu_bar.h | 4 +- shell/browser/ui/views/menu_model_adapter.cc | 2 +- .../browser_exposed_renderer_interfaces.cc | 5 +- .../electron_render_frame_observer.cc | 1 + .../electron_content_utility_client.cc | 2 +- 114 files changed, 886 insertions(+), 779 deletions(-) delete mode 100644 patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch create mode 100644 patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch create mode 100644 patches/lss/.patches create mode 100644 patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch create mode 100644 patches/node/fix_override_createjob_in_node_platform.patch delete mode 100644 patches/v8/build_remove_legacy_oom_error_callback.patch diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 61ee7d31ddf65..95094dec8728f 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -661,6 +661,7 @@ step-persist-data-for-tests: &step-persist-data-for-tests - src/buildtools/third_party/libc++ - src/buildtools/third_party/libc++abi - src/out/Default/obj/buildtools/third_party + - src/v8/tools/builtins-pgo step-electron-dist-unzip: &step-electron-dist-unzip run: diff --git a/DEPS b/DEPS index a0ce155d6a56e..63e9d857212b9 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '105.0.5187.0', + '106.0.5216.0', 'node_version': 'v16.16.0', 'nan_version': diff --git a/patches/chromium/.patches b/patches/chromium/.patches index c9e516ffc0929..485f18915fba5 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -76,7 +76,6 @@ chore_provide_iswebcontentscreationoverridden_with_full_params.patch fix_properly_honor_printing_page_ranges.patch export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch fix_export_zlib_symbols.patch -don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch web_contents.patch webview_fullscreen.patch disable_unload_metrics.patch @@ -115,5 +114,6 @@ short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch chore_add_electron_deps_to_gitignores.patch chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch add_electron_deps_to_license_credits_file.patch feat_add_set_can_resize_mutator.patch diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 9db40d62e73bf..bb65405ceecdc 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749e3735a08 100644 +index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c275ff0dc6 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4435,6 +4435,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4294,6 +4294,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef98153923101 100644 +index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21760ac96d 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -585,6 +585,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef981 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 acb427e4a6688f14f4a6ceaec8bf3988525c5e08..35623174f16399d5fff637a07554e43c55f902d1 100644 +index 544ea3f5cd705d61dd0b99f2e0f541d98ca75c53..d863681a4297cbf2844469a1baae2a81cb0d1238 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -606,6 +606,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -579,6 +579,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,7 +79,7 @@ index c8af53d40eaa1dd3a0067948a8cda80d1599cee3..4de918ee52efa7ec27a21aa2f57616d3 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 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847dd6a38d86 100644 +index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614d7e1d8c7 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h @@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { @@ -92,7 +92,7 @@ index 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847d 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 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d266b18cbe5 100644 +index f40f022ff8ff88f1f128d4996f4460b8fdea1d95..480503e245dbb28dffc8ac9d2843d541793db534 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( @@ -110,7 +110,7 @@ index 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d26 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 c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f48c3c837a 100644 +index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8d33e89e8 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 @@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index a7d6873b9ed49..cf013cc6850e6 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused by decoration shadows and rounded titlebars around the window while maximized. diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc -index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533bb1f293d8 100644 +index 1fbb58152c19193d480b437aea123abdd61c24fe..2b7e305d643aa2e0afef4c578688897c3a8832bf 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc -@@ -511,13 +511,15 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { +@@ -500,13 +500,15 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { return nullptr; } @@ -31,10 +31,10 @@ index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533b } diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67021c949f 100644 +index e73bbdf28fba1f5b96d326dd7b0fd9aaa33ba221..5a537c8f6291909392824d62fc04209ad662d59a 100644 --- a/ui/gtk/gtk_ui.h +++ b/ui/gtk/gtk_ui.h -@@ -93,7 +93,7 @@ class GtkUi : public ui::LinuxUi { +@@ -94,7 +94,7 @@ class GtkUi : public ui::LinuxUiBase { bool PreferDarkTheme() const override; bool AnimationsEnabled() const override; std::unique_ptr CreateNavButtonProvider() override; @@ -43,7 +43,7 @@ index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67 base::flat_map GetKeyboardLayoutMap() override; std::string GetCursorThemeName() override; int GetCursorThemeSize() override; -@@ -197,6 +197,8 @@ class GtkUi : public ui::LinuxUi { +@@ -199,6 +199,8 @@ class GtkUi : public ui::LinuxUiBase { // while Chrome is running. std::unique_ptr solid_frame_provider_; std::unique_ptr transparent_frame_provider_; @@ -139,7 +139,7 @@ index e4dbdad327eb77994ffd7f068c67336a19897915..d3ae0636455489a7c7443df85cb76995 // In GTK4, there's no way to obtain the frame thickness from CSS values // directly, so we must determine it experimentally based on the drawn diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h -index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f03dcb8aeb 100644 +index 8370c1cb3f8c3532d94e1265242cbf2397920480..2e0105ba8782dfe0a3ac169850734032c8ab071c 100644 --- a/ui/gtk/window_frame_provider_gtk.h +++ b/ui/gtk/window_frame_provider_gtk.h @@ -14,7 +14,7 @@ namespace gtk { @@ -162,10 +162,10 @@ index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f0 } // namespace gtk diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h -index 0cd8a0e101de186e11ead65526c7f0abc60c6577..7db580ce04a407877ca4108ec087120cdb9ce2ad 100644 +index dee97740309e29c29d9c9c6c757455cddc817dbb..e5b71cd2b5e9e6252fe13c54bb54e26365347e2a 100644 --- a/ui/linux/linux_ui.h +++ b/ui/linux/linux_ui.h -@@ -176,7 +176,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi +@@ -175,7 +175,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi { // if transparency is unsupported and the frame should be rendered opaque. // The returned object is not owned by the caller and will remain alive until // the process ends. 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 79081580812fe..b49de0ad61135 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 261e1dda1e128e22d15f3454f9012265db45bd74..98b130f0791d1ca2d59ef62151df7e60f3f40831 100644 +index 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a162891935d5c4b7 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -666,6 +666,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -658,6 +658,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -48,10 +48,10 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da // 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 2f073474d8be6d8051606b0f07272969d3936f28..7f9ec06a10b4cba254737fabdc38dddf86137ad7 100644 +index f55211fdb346c8659c93d077ec04ccebdae5b450..19b846f6ccf99423b712f0b589c20c1ab35bdfcf 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -147,6 +147,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient { +@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient { bool was_created_by_renderer, scoped_refptr task_runner); @@ -73,10 +73,10 @@ index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319 + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc2cfb7342 100644 +index 3af33a4d699b5bbfb0a1abac9408ad322a47a5ac..30bc8aa73fb46a0306ccc837a99cc4d58daef99d 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -361,6 +361,7 @@ class WebView { +@@ -366,6 +366,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -85,10 +85,10 @@ index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc // 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 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc90e458696 100644 +index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b7183233b4bc 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3742,6 +3742,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3758,6 +3758,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3753,7 +3760,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3769,7 +3776,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9 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 ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bbaa7584225 100644 +index 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc99099e16b 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, +@@ -416,6 +416,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bba void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -864,6 +865,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -866,6 +867,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 2065bea3be2d5..d6f96237169cf 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,13 +8,13 @@ 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 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff290113a833c3 100644 +index e5c9ebda8156c1a7c32f7eb0661dff40f022c264..8840d4be4b49b27dfb257866f6a074efc34ff869 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -142,6 +142,19 @@ WebPreferences::WebPreferences() - fake_no_alloc_direct_call_for_testing_enabled(false), +@@ -143,6 +143,19 @@ WebPreferences::WebPreferences() v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), + stylus_handwriting_enabled(false), + // Begin Electron-specific WebPreferences. + context_isolation(false), + is_webview(false), @@ -32,13 +32,13 @@ index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff2901 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 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2332dd9c2 100644 +index a910d7b53a1346797f0e2bd030dff7ff84a834b8..4847c7587484eb02b8d7f532be53e499517a95fb 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 -@@ -148,6 +148,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); + out->stylus_handwriting_enabled = data.stylus_handwriting_enabled(); + // Begin Electron-specific WebPreferences. + out->context_isolation = data.context_isolation(); + out->is_webview = data.is_webview(); @@ -51,12 +51,12 @@ index 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2 + out->enable_plugins = data.enable_plugins(); + out->enable_websql = data.enable_websql(); + out->webview_tag = data.webview_tag(); -+ // End Electron-specific WebPreferences.s ++ // End Electron-specific WebPreferences. out->cookie_enabled = data.cookie_enabled(); 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 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a140aace71 100644 +index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eeac87b0cca 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 @@ @@ -67,10 +67,10 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1 #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" -@@ -154,6 +155,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { - blink::mojom::V8CacheOptions v8_cache_options; - bool record_whole_document; - +@@ -157,6 +158,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { + // If true, stylus handwriting recognition to text input will be available in + // editable input fields which are non-password type. + bool stylus_handwriting_enabled; + // Begin Electron-specific WebPreferences. + bool context_isolation; + bool is_webview; @@ -84,12 +84,11 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1 + bool enable_websql; + bool webview_tag; + // End Electron-specific WebPreferences. -+ + // This flags corresponds to a Page's Settings' setCookieEnabled state. It // 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 bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd91cbf309 100644 +index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a4afe8e4f 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 @@ @@ -100,8 +99,8 @@ index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -428,6 +429,52 @@ struct BLINK_COMMON_EXPORT StructTraitsGetSecondaryLabelForCommandId(GetCommandIdAt(index)); + return items_[ValidateItemIndex(index)].secondary_label; +} + - std::u16string SimpleMenuModel::GetMinorTextAt(int index) const { + std::u16string SimpleMenuModel::GetMinorTextAt(size_t index) const { return items_[ValidateItemIndex(index)].minor_text; } diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h -index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af83735bd7 100644 +index 7ecb2f6cae709af8c512cfb6cac71d449a9b39c4..b7781d44125c1d66dba90bc39f9f17b194a85665 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h -@@ -49,6 +49,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { // Some command ids have labels and icons that change over time. virtual bool IsItemForCommandIdDynamic(int command_id) const; virtual std::u16string GetLabelForCommandId(int command_id) const; @@ -58,25 +58,25 @@ index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af // Gets the icon for the item with the specified id. virtual ImageModel GetIconForCommandId(int command_id) const; -@@ -160,6 +161,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -167,6 +168,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { // Sets the label for the item at |index|. - void SetLabel(int index, const std::u16string& label); + void SetLabel(size_t index, const std::u16string& label); + // Sets the secondary_label for the item at |index|. -+ void SetSecondaryLabel(int index, const std::u16string& secondary_label); ++ void SetSecondaryLabel(size_t index, const std::u16string& secondary_label); + // Sets the minor text for the item at |index|. - void SetMinorText(int index, const std::u16string& minor_text); + void SetMinorText(size_t index, const std::u16string& minor_text); -@@ -199,6 +203,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { - ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override; - int GetCommandIdAt(int index) const override; - std::u16string GetLabelAt(int index) const override; -+ std::u16string GetSecondaryLabelAt(int index) const override; - std::u16string GetMinorTextAt(int index) const override; - ImageModel GetMinorIconAt(int index) const override; - bool IsItemDynamicAt(int index) const override; -@@ -238,6 +243,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -206,6 +210,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { + ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override; + int GetCommandIdAt(size_t index) const override; + std::u16string GetLabelAt(size_t index) const override; ++ std::u16string GetSecondaryLabelAt(size_t index) const override; + std::u16string GetMinorTextAt(size_t index) const override; + ImageModel GetMinorIconAt(size_t index) const override; + bool IsItemDynamicAt(size_t index) const override; +@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { int command_id = 0; ItemType type = TYPE_COMMAND; std::u16string label; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index a6d6dfc7533ef..c3266e9e6c628 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,10 +15,10 @@ 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 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583fd836051 100644 +index 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43be61659d9 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc -@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) { +@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) { DCHECK(!IsDetached()); @@ -33,7 +33,7 @@ index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583 if (type == FrameDetachType::kRemove) { if (provisional_frame_) { provisional_frame_->Detach(FrameDetachType::kRemove); -@@ -155,6 +147,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583 // 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 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a294c27bb71 100644 +index dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee2139648501d377dfb 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a29 if (!Client()) return false; -@@ -593,6 +589,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); 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 0cd9d06f2e8de..9c2342ded0f3b 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,7 +13,7 @@ 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 c0771b00922c1f21ec9dba726c5c7cd51c267d69..d731c7bf168c4b8df0a46da40c9164b4ac6239f3 100644 +index bf88c1180ee507c97e2613d4aba12a8e87fcfcd3..fae2b77315784f9167c0fcf4cc5330520c14b862 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 { diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index f650856864da7..beea0817b40cb 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 a1a93418b0b0d56f92647aa1087bb4485c354201..191bfe2d3922d2e65f0be10d6436c50efc3b0880 100644 +index be712614ac5be3573427247d7032432f18e47a15..4ad49e65f6139b43a8f9d1041dfdd4b6951ca7a7 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -80,6 +80,7 @@ diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index 47744405285ac..f0253548ac409 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 c3c62f83553bd0d258de4d5d9ecd8b02a74f594b..3dbf4462fa056db7a4084453ef35f1b944fbd093 100644 +index 605a2d455a8affffb3e864d872ffa767fdbc988f..ab4da059149f51724c057cdff7e04e9f6bc85270 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 9b872d4b44337..e4d390ca6ea25 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 a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020687314c2 100644 +index 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfefb578981 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -175,11 +175,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884b97ec8b5 100644 +index db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c7fbdcf50 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4574,7 +4574,7 @@ static_library("browser") { +@@ -4614,7 +4614,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 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8e85e46cd 100644 +index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34e9a0c579 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5963,7 +5963,6 @@ test("unit_tests") { +@@ -6011,7 +6011,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:crash_reporter_client_win_unit_tests", -@@ -5988,6 +5987,10 @@ test("unit_tests") { +@@ -6036,6 +6035,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6879,7 +6882,7 @@ test("unit_tests") { +@@ -6933,7 +6936,7 @@ test("unit_tests") { } deps += [ @@ -77,7 +77,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8 "//chrome/browser/enterprise/connectors/analysis:features", "//chrome/browser/media/router:test_support", "//chrome/browser/media/router/discovery:discovery", -@@ -6993,6 +6996,10 @@ test("unit_tests") { +@@ -7051,6 +7054,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index ea753eee3f9e0..14af10cde5c1f 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 b3e5378f711c54b76c73179e791646d4e5e4e96b..262c8e53ec25b2e91a73b5971d64dbe5d5e005a1 100644 +index 4fec8db3c0431294f65e2a7f0046b6ac5ba78c47..2a4ad0955b3c01b2f1d1665fb65e6d9bb16f5fc2 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 2e6dc709deca9..9aa331ea94321 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn -index 09324583a2f98621fe328ec9f0178736dabe6d2b..d57c2c16ea3475c3ad77e81bdb9700ec2f64976a 100644 +index 5d222aaccd15cbcdd413094e33bd48fd3798de8f..a2653637c2735b268dc4e6174536565d9add17bf 100644 --- a/build/config/c++/BUILD.gn +++ b/build/config/c++/BUILD.gn @@ -29,10 +29,12 @@ config("runtime_library") { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index f29b6178fa7ff..005caa9f6af02 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 bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf633a324c7 100644 +index 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad75a0ff582 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7283,6 +7283,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7298,6 +7298,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 bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf6 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806d2a9e38c 100644 +index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d06dd4436 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3990,6 +3990,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3996,6 +3996,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806 new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -4034,12 +4042,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4040,12 +4048,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806 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 cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd698887604 100644 +index fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bdcd7b8f01 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -587,6 +587,10 @@ struct CreateNewWindowParams { +@@ -571,6 +571,10 @@ struct CreateNewWindowParams { // Additional parameters for creating picture-in-picture windows. blink.mojom.PictureInPictureWindowOptions? pip_options; @@ -68,10 +68,10 @@ index cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd6 // 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 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b44ba2c254 100644 +index 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f14902e6f 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -610,6 +610,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b4 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 cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823ddda956c4 100644 +index 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a029c40ea 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -165,6 +165,7 @@ class NetworkService; +@@ -164,6 +164,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d } // namespace network namespace sandbox { -@@ -993,6 +994,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -991,6 +992,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d 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 ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae139178fe 100644 +index 74847a4fbd4d0d897ce6aecd1b39e30bc226f8f4..3ddcc2d403a68fdc2b4b0246899cd9507ecc6195 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -26,6 +26,17 @@ namespace content { @@ -124,7 +124,7 @@ index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f064987b4d4d3 100644 +index 0274e3bb5cc62ce2c52be68a50b57c339fc5bba7..1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,12 +150,12 @@ index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f0649 // 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 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569695b197e 100644 +index f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a0d1d2016 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -315,6 +315,10 @@ WebView* RenderViewImpl::CreateView( +@@ -297,6 +297,10 @@ WebView* RenderViewImpl::CreateView( /*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(), - creator->IsAdSubframe()); + creator->IsAdFrame()); + params->raw_features = features.raw_features.Utf8( + WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD); @@ -165,7 +165,7 @@ index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index d6dd69c53b66a89ea63927319d7b385f91921ea2..71748596f4d05de73263ed11b122d75a38b49616 100644 +index 6abdcf70bdeeb3a34d01c3b00e5f629373eef76b..537f71cbf3cc1112100a199a15b77a535efd8a4e 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc @@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -212,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 ec10f16c6e6c5507ad2fb0afe306a744885eb58e..3f7a069c3f1b8412074864eb99bf47469a699837 100644 +index cc39235616f0249c8a979a870885aec2d0e04cc4..77e6bbe18556279a98b5453d4ba1c3eb5b850287 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2084,6 +2084,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2090,6 +2090,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index ab21d92a82438..0808a245ec7e3 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index d68a1b2dd91704a00be9cce6ccfa5daf7da35e1a..ab30dd802543491352d3b407f12127c04742d1ab 100644 +index baf86ec0cde417fa4287f794de10b78d19439930..29d7b595fbfd6e211864e3baa8e2d3014b2e7a5b 100644 --- a/.gitignore +++ b/.gitignore -@@ -229,6 +229,7 @@ vs-chromium-project.txt +@@ -230,6 +230,7 @@ vs-chromium-project.txt /delegate_execute /device/serial/device_serial_mojo.xml /docs/website diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index 890c5af769a57..8c6aeac216019 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch actions in the non-client caption area. 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 f6b37bdec2343d45447b419aeadbe2aa19493c3c..bdbf7153f27376bd68459f9cb480bff7485c9e98 100644 +index 2b1fa6a345247fdbb17bd2381ab9e74a8af40b8d..f11cefe945c33c82cafe7ac0d496f3fcfbc48931 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 @@ -1169,6 +1169,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( @@ -34,10 +34,10 @@ index 0aae49ec83b88057434af5bbfb54b10e53469918..058e5dc978e76a71fa02dc9e275592f3 Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 3b546cf67089e6677fc668b4d1d6c0863282dff5..c6810f162806b36494885b2f63982a756d4dcd38 100644 +index 67871eec9821cf100acc719a1765be489dfbe7d8..1f883dc7d46d5cc3fddffe75c55e6b96fb0fc5f2 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3129,15 +3129,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3136,15 +3136,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, SetMsgHandled(FALSE); // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 674924efd4bbe..e0a059103b137 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 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a47e867c7a 100644 +index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4ca6b3b66e 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1821,12 +1821,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a4 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 64eeec32ac70f32b71cd30f7d1adb1f12fa6fa46..8ebf50854a4fdf2cdc9b7f90844456c12902cb4b 100644 +index b0f70cfaa60d28547f74b199d41ce81a5cdc8891..74efdc0a0ba5e5b862e12180dbfdb9534e9e0a5d 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -843,8 +843,7 @@ class Browser : public TabStripModelObserver, +@@ -855,8 +855,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2b8de1a5e 100644 +index a2f1f72a30f694d53f28d38d823341e7b4f008e1..7ff6febe70e9ec82becfbe036883fbc7572b5b01 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3916,8 +3916,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3922,8 +3922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,7 +260,7 @@ index ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2 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 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb53327aa69 100644 +index 3ddcc2d403a68fdc2b4b0246899cd9507ecc6195..eecc92f2ffce2c2eeb5fde977da6b94a29923b67 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -274,7 +274,7 @@ index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb5 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f0340295339c7838e5 100644 +index 1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f..aa9af63f6d4708660496e5892f00766281be22c9 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -288,10 +288,10 @@ index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f034029533 // 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 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590efd3892c61 100644 +index add3f3f73b1e44401b31330cd06f8c9211c62516..a64b0d6dac663b23e6cec32c2898ae88157ad602 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( +@@ -199,8 +199,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -302,7 +302,7 @@ index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590ef // 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 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e1002cf38cc 100644 +index f1c474143b087988b8084ad1bdf01b8ba80327e8..47ffb7d406eb04622fffce9f0671eddab4ff8fe3 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,10 +316,10 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10 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 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf3a137dc3 100644 +index 75a2534e3be7102a221378afbfef3df8e6a8555e..495fc687379c6456384acc3a1864c5f0c49ad47f 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 -@@ -403,8 +403,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -399,8 +399,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -330,10 +330,10 @@ index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf } 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 ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec4844497334 100644 +index 26dc86a7534d9296f1b1f772ec95f5313c61061c..925152a6c1fb645dfff5bd7238b620a8344de734 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 +@@ -170,8 +170,7 @@ class MimeHandlerViewGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,7 +372,7 @@ index 0661fd642dcee69a7c8f955490dadf32dc0eb468..e3fa74da87513fbfcd035fa872dc938d 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 807879aa4894e5fabe043d07d5899e5700a7c172..5044c462ccfeaeb4aeb2dd3189e40e60c835ed73 100644 +index aa488570851f68e892b024c901f31b658929fc72..efe6a6bc939a6bdea0eaca65e12242e23f3e6d59 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc @@ -179,8 +179,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 831959365e6b5..3e7651e9250b7 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 f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867e9f75cce 100644 +index 732260f0da15c50f660348e0c66e0b3098aa418f..0a0394a3607e9b955f9fc517e0814ac07b3ba67e 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 f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867 #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" -@@ -184,12 +186,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { +@@ -235,12 +237,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { // Returns whether persistent-license session can be supported. bool CanSupportPersistentLicense() { diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 1cf28eb0621d3..39f1919a402ef 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 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a11bfee888 100644 +index 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7cccaee61d61 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; +@@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; } // namespace @@ -29,7 +29,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1 // 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. // -@@ -358,7 +362,8 @@ class HWNDMessageHandler::ScopedRedrawLock { +@@ -359,7 +363,8 @@ class HWNDMessageHandler::ScopedRedrawLock { hwnd_(owner_->hwnd()), cancel_unlock_(false), should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() && @@ -39,7 +39,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -1051,6 +1056,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -1052,6 +1057,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -51,7 +51,7 @@ index 1208238fbfb501e1776e8c3ba414a8c9ef23bc59..81f59c4476cd07930fc302ecbf0377a1 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 65bf924561934d445e201aa2753ec7a3e32b6a6b..e4805643c6994404a1443fe89f0348a19310023b 100644 +index cdc283b7e1aa89c8a273c4df97ad8aea55024743..caa02c07b371569be5ac5ac3ce7efe40359cd017 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -207,6 +207,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 0a0817bf3cc3c..31116543398e5 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 6a148c3173f8f5653b945ed9b6ffcbf48d76d511..3809ffe0f487e60539db58980b3232030ce8d4f8 100644 +index 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c5130e93e74d 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1864,6 +1864,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1866,6 +1866,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -81,7 +81,7 @@ index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 9b29ab96d6e7dd7160502ee2252843bdeeab84c9..a9889d625dac9148dd8bbc2853c4e09f6546bd0d 100644 +index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363b1203c58 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -93,7 +93,7 @@ index 9b29ab96d6e7dd7160502ee2252843bdeeab84c9..a9889d625dac9148dd8bbc2853c4e09f 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 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c27a154460 100644 +index 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf26423d0e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -199,6 +199,7 @@ @@ -104,7 +104,7 @@ index 3f0a3b2133f0d48054f33df28b93a9ee40d7ed78..801bf4b1090a8f0de922fdac6c4145c2 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3185,6 +3186,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3195,6 +3196,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[] = { @@ -178,7 +178,7 @@ index 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937 // 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 8bdb9fafc4c5e59d6d6aad323ca2547ecc1b4069..069ed9744dca4fb208daaaf76d4618706c65b84e 100644 +index 961b730933d285ccea7b81b8c21dd5bb0ecea56a..d6e536924f0b397d3e8808298d2b9fdd6025411f 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -20,6 +20,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 1104e02c2682e..47a43cc533925 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 fc7c4474aaa74000b901b93b26bb46d7a7dc07a3..9444d5411cf7caffb3cf180089ca5468c2303803 100644 +index 54681d4aaaa52ee07fba0055a8411b8e19b4cc8c..8109976614a9ae39dd802d433517bbf29a51349e 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -514,7 +514,11 @@ +@@ -516,7 +516,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index 0a4782f3fd4a5..cf6502b77a868 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,7 +15,7 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index 02b4f803369202a81f2d54f3b35aef04be13dfa2..04a8d29ba210313076eacf5074ed86402160c0c3 100644 +index 207cda4b937282a3a719e4285f21066b4d1322f6..4367002caa2b3fd5885204a16f1802f67cde3ebc 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -222,7 +222,8 @@ RenderProcessImpl::RenderProcessImpl() diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index c0a58fa2a1c4d..9c55c0da75f4a 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 3c934fe49b745d79d502311af02c4b2409f87742..5647890d0f62bcd5b1d1b2e6adc511b262a83b7f 100644 +index cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468cef6e56d 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index 3c934fe49b745d79d502311af02c4b2409f87742..5647890d0f62bcd5b1d1b2e6adc511b2 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 4c568e15eaf82231004e89590dfe2e28e6ba0ac0..2ba5e20d961494995c11ac2a40d2c78b8b3d7de0 100644 +index db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545cade0e23 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -34,7 +34,7 @@ index 4c568e15eaf82231004e89590dfe2e28e6ba0ac0..2ba5e20d961494995c11ac2a40d2c78b // |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 f709beca890c426c9355297c6a741d5a8c887fdb..8050e3b8d603e48323002475680d76dfa059e20e 100644 +index ea62c4a966dd76c1964b6d7f9053cb4fb73376f5..79253c9d5c8f4e71e5c0d0d87dd641feab901e51 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index a5b8d7b4381d2..b9a96fd79cc60 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 b88a9d695e2e743cdd9446e8e3c3ca38a914630a..a35f8b3118632d503c5750d59e847580cbb47a9f 100644 +index 8caea1c8d54c59efc5f7b758e78638042f7db23c..579c335888f4df61cfeb08e01ecef09ad1b3a92f 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1195,6 +1195,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1200,6 +1200,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index b88a9d695e2e743cdd9446e8e3c3ca38a914630a..a35f8b3118632d503c5750d59e847580 // 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 && -@@ -1245,6 +1246,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1250,6 +1251,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } 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 deleted file mode 100644 index f6fb27f797122..0000000000000 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Fri, 18 Dec 2020 15:19:39 -0800 -Subject: Don't use potentially null "GetWebFrame()->View()" when get blink - prefs - -For whatever reason (still haven't narrowed it down to an exact test case) when using OOPIFs the "GetWebFrame()->View()" call during "RenderFrameCreated" call be nullptr. Accessing the prefs via the render_view though still works. - -This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572256 - -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 3e186230715aaf840959a93038167749e3735a08..4c2dbe2b7629c94a16620988ae96fb10da39e0b8 100644 ---- a/content/renderer/render_frame_impl.cc -+++ b/content/renderer/render_frame_impl.cc -@@ -2294,7 +2294,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { - } - - const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { -- return GetWebView()->GetWebPreferences(); -+ return render_view_->GetWebView()->GetWebPreferences(); - } - - const blink::RendererPreferences& RenderFrameImpl::GetRendererPreferences() diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 5ecf357e66296..aa0b4d98274fc 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 d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa19493c3c 100644 +index b6d243983474cfc2c314b555ccc1de4d833a7f00..2b1fa6a345247fdbb17bd2381ab9e74a8af40b8d 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 d7260950ca1ba9c71d9500560bc13314e78e2170..f6b37bdec2343d45447b419aeadbe2aa aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 81f59c4476cd07930fc302ecbf0377a11bfee888..70e33b49e77240248c629fb18c5d3ca57ea32d66 100644 +index fe882b31026b527df28d384e6e7e7cccaee61d61..82616ebcb1f56de12cbd932a4614bb3858e9bad9 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1001,8 +1001,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -1002,8 +1002,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 4b9312ed4d48d..b94ce7ad7c34b 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 d53e403bda407bb46f59395ebcbb39cd9495875b..4850469bb2bd96c87b0aa936c654f7bd58b7b17f 100644 +index 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f84811dde 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1410,6 +1410,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1412,6 +1412,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index d53e403bda407bb46f59395ebcbb39cd9495875b..4850469bb2bd96c87b0aa936c654f7bd // 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 614ba5b278f8bed722072ca07399b247ddb971be..21024709a79dc2bb838492090ce1365450427430 100644 +index 07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9..d4dd2699fa0876d374750135851e1e5325bf4e0d 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -296,6 +296,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index 614ba5b278f8bed722072ca07399b247ddb971be..21024709a79dc2bb838492090ce13654 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 118c6469c038e5b53eb76f76abf60f5df15a94d1..9f364ccfd22e736330a2ce9879495fa072373997 100644 +index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529d3f603b3 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1102,6 +1102,9 @@ interface NetworkContext { +@@ -1103,6 +1103,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ index 118c6469c038e5b53eb76f76abf60f5df15a94d1..9f364ccfd22e736330a2ce9879495fa0 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index b23f4227a6819d1b6b894262f5dda39841b5dd2b..3b8761ddb1d2111cb5b4df0f2448742adeb8f0c8 100644 +index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e6ee7916d 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 c48ce3e718343..ce7e8f62fcf44 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 9151815e6bf33a3a6980f8337f578dc90e458696..664b8c2b0a3eb5da577a6ac9d70cafff4702a622 100644 +index 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502b5d47996 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -161,6 +161,7 @@ @@ -23,7 +23,7 @@ index 9151815e6bf33a3a6980f8337f578dc90e458696..664b8c2b0a3eb5da577a6ac9d70cafff #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" -@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1797,6 +1798,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 275f12dd363ba..4ce0b49181b6a 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,7 +13,7 @@ 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 5dd898d8db8e6db8278f00d5caa5ab1a0d7f0fc0..90b80c3252a6134ba43f0496a7128cdbf21ce39b 100644 +index d7be414239f8e120c3b833a5f12ef06d0b3e57b5..eb6f2cd02483a7cf398fc6631f6b46cf336b481e 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -124,6 +124,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, @@ -26,10 +26,10 @@ index 5dd898d8db8e6db8278f00d5caa5ab1a0d7f0fc0..90b80c3252a6134ba43f0496a7128cdb } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f01ea1c8b6 100644 +index bd6a77d5f0f5dd93ea57455651d3cc5024dc45fb..63f4bee073cdcb5b37662b60a9bb0386d7f480c0 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -393,6 +393,23 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -406,6 +406,23 @@ class NATIVE_THEME_EXPORT NativeTheme { custom_theme, bool use_custom_frame = true) const; @@ -53,8 +53,8 @@ index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f0 // 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 -@@ -566,6 +583,7 @@ class NATIVE_THEME_EXPORT NativeTheme { - bool forced_colors_ = false; +@@ -584,6 +601,7 @@ class NATIVE_THEME_EXPORT NativeTheme { + PageColors page_colors_ = PageColors::kOff; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; + ThemeSource theme_source_ = ThemeSource::kSystem; @@ -62,10 +62,10 @@ index eefc078dffa1751b7ee812a90a1da5cc91606de0..14e68fab3ad52e60e36c57b7a66393f0 SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 6b9fb74004eba57fdff396124214356f4bcf0852..70807b315f805baab2574148520323ce78f624cb 100644 +index b4840142322aa216369985a52567727f4e6806b7..63d77806ed6ed324d37e715319288c843c16f7a0 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -618,6 +618,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -621,6 +621,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_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 58c3b92a3edbe..6d34964ea3bf5 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 267af5f85d4036e144ad9829922dcd3ac62b8a31..a658a43a12f5597a7bea094471191d040fc3d6c2 100644 +index 90e1c4adeab61374adf9da5708497ea32a46c7f5..b812a22802c7c425ab259dfe5681cafe6ad758c8 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -134,6 +134,8 @@ viz_component("service") { @@ -94,7 +94,7 @@ index 267af5f85d4036e144ad9829922dcd3ac62b8a31..a658a43a12f5597a7bea094471191d04 "display_embedder/software_output_surface.h", "display_embedder/vsync_parameter_listener.cc", diff --git a/components/viz/service/display_embedder/output_surface_provider.h b/components/viz/service/display_embedder/output_surface_provider.h -index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c06a01a60 100644 +index 18ea9142343e68dfa64c5e81269dbc80e55c1277..c76c4bcd3b30230753be51d87eabffa93a107b6e 100644 --- a/components/viz/service/display_embedder/output_surface_provider.h +++ b/components/viz/service/display_embedder/output_surface_provider.h @@ -38,7 +38,8 @@ class OutputSurfaceProvider { @@ -108,7 +108,7 @@ index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c } // 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 c019d729f29440e44d9dd47ff62d3f8fa1ee19a8..8f589394b12cff75df9708310c5f891664674c28 100644 +index d6ffe3a759fbde3fbb0f86fda9a07c63d50ff73a..4854bca8e1d3117534e4bf02ea8ebf5b2e6ea70c 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -23,12 +23,14 @@ @@ -119,9 +119,9 @@ index c019d729f29440e44d9dd47ff62d3f8fa1ee19a8..8f589394b12cff75df9708310c5f8916 #include "components/viz/service/display_embedder/software_output_surface.h" #include "components/viz/service/gl/gpu_service_impl.h" #include "gpu/command_buffer/client/shared_memory_limits.h" + #include "gpu/command_buffer/service/scheduler_sequence.h" #include "gpu/config/gpu_finch_features.h" #include "gpu/ipc/common/surface_handle.h" - #include "gpu/ipc/scheduler_sequence.h" +#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" #include "ui/base/ui_base_switches.h" @@ -502,7 +502,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 8eeb87e2322821ac52e4bc0000cb777d69515a2c..5a7d1501aed1f01b1b67ae156cfb927ee696f83b 100644 +index 4e150f1fc12884d92b11605b6f39ec4a1d720b99..569b4e2277c758f628e528b80917f0f1e65f76d8 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( @@ -516,7 +516,7 @@ index 8eeb87e2322821ac52e4bc0000cb777d69515a2c..5a7d1501aed1f01b1b67ae156cfb927e // 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 0e3af0f9280abe8560393325b400ad2543ed0556..7fe490e55a4bb8a183d0d241188ea15a44347245 100644 +index 4a9cf8ff4a94ecda70e3d0f8d1b9d18687e4aa87..27a7adcf524e33819b372213285bfccb1f3924ba 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -549,13 +549,13 @@ index b2f873919d68633103d115d7d9550a098c1a254c..8e38831a6df15d37e5fb87d63613b7db // 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 3c495dfe499e1bae90fa0d576d5f58f1300c17fa..678700882d379f528ee1d77819b063cfdcdad036 100644 +index 2534c06b9de7de9b6353c81016ae0fa8609effd3..e5edff80fcdd969c0854641a6e67af12b80138dc 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 { +@@ -31,6 +31,7 @@ struct RootCompositorFrameSinkParams { + bool send_swap_size_notifications = false; // Disables begin frame rate limiting for the display compositor. bool disable_frame_rate_limit = false; - bool use_preferred_interval_for_video = false; + bool offscreen = false; [EnableIf=is_android] 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 0771278f2d6df..b2f1ce41117e1 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 c8e468f41930dc8e31533e086d72743e12d134f1..5b54e21568019b108d92c28086b8d73db98fc704 100644 +index 7e02d8c952d2228a39d1fd1fa5a36859e2ea9ab9..1cfa83a0d0d0fa3fec3f92faa94aece678f83552 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -233,6 +233,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -234,6 +234,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { do_not_prompt_for_login == request.do_not_prompt_for_login && is_outermost_main_frame == request.is_outermost_main_frame && transition_type == request.transition_type && @@ -29,10 +29,10 @@ index c8e468f41930dc8e31533e086d72743e12d134f1..5b54e21568019b108d92c28086b8d73d 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 9af8605aaab177daf89524680cb88455fcb48d04..9c851c96588342b245b24fed51d9241f8da7ffcc 100644 +index 10d7912016a57e413e7f6056697028bbc5a4e0e6..f22a212ca8dc3f95373e23d22689c896720b7ee0 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -158,6 +158,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -159,6 +159,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool do_not_prompt_for_login = false; bool is_outermost_main_frame = false; int transition_type = 0; @@ -103,10 +103,10 @@ index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239ab71ae00 100644 +index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6aeacaf22f2 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -603,6 +603,7 @@ URLLoader::URLLoader( +@@ -606,6 +606,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -792,7 +793,7 @@ URLLoader::URLLoader( +@@ -795,7 +796,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1541,6 +1542,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1545,6 +1546,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -144,7 +144,7 @@ index 6805b5f3976f60e0cc72634f71bcb21879ffbde1..4d60c127bec00859ed523ca652336239 // 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 158eaacb1bf69afad16107491851dab750df9606..eff061c729bed4b8f3b41699f66d087416b08f47 100644 +index 7a1d7fe570c3b3d94d1dbcfdda2b965323ce5e95..9bc4eb1a1f300529308a2f120b4bc676b11acfbe 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h @@ -518,6 +518,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index ad32e434ee6bd..b9facbb0e987d 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,10 +16,10 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e415735e4 100644 +index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff118eed07 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -@@ -16,12 +16,16 @@ +@@ -17,12 +17,16 @@ #include "build/build_config.h" #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/profiles/profile.h" @@ -36,7 +36,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e #include "chrome/common/chrome_switches.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" -@@ -165,6 +169,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -177,6 +181,7 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -44,7 +44,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e if (base::FeatureList::IsEnabled( blink::features::kWindowPlacementFullscreenCompanionWindow)) { if (!popunder_preventer_) -@@ -172,6 +177,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -184,6 +189,7 @@ void FullscreenController::EnterFullscreenModeForTab( else popunder_preventer_->WillActivateWebContents(web_contents); } @@ -52,7 +52,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -221,7 +227,9 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -233,7 +239,9 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -62,7 +62,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -276,11 +284,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -288,11 +296,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -76,7 +76,7 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e } void FullscreenController::OnTabDeactivated( -@@ -443,17 +453,15 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -460,18 +470,17 @@ 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. @@ -96,25 +96,19 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e bool entering_tab_fullscreen = option == TAB && !tab_fullscreen_; +#endif GURL url; ++#if 0 if (option == TAB) { url = GetRequestingOrigin(); -@@ -463,6 +471,7 @@ void FullscreenController::EnterFullscreenModeInternal( + tab_fullscreen_ = true; +@@ -498,6 +507,7 @@ void FullscreenController::EnterFullscreenModeInternal( + if (!extension_caused_fullscreen_.is_empty()) url = extension_caused_fullscreen_; } - -+#if 0 - if (option == TAB && 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. -@@ -480,6 +489,7 @@ void FullscreenController::EnterFullscreenModeInternal( - GetDisplayId(WebContents::FromRenderFrameHost(requesting_frame)); - } - } +#endif if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); -@@ -507,12 +517,12 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -525,12 +535,12 @@ void FullscreenController::ExitFullscreenModeInternal() { RecordExitingUMA(); toggled_into_fullscreen_ = false; started_fullscreen_transition_ = true; @@ -131,10 +125,10 @@ index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..ebc0f0fe568d7219486360bbe4b6c65e extension_caused_fullscreen_ = GURL(); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index f0841982cb296079c8b943067564d74bc1b7067c..49f59fc2c12c98faada52e0e7c8c9c6e6251b599 100644 +index a31c0b1a17d4cda765a4511923686b7f44d10e81..0b0a015f0500432273bf0e7f7231987cdd11b440 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -242,10 +242,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -247,10 +247,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Used in testing to set the state to tab fullscreen. bool is_tab_fullscreen_for_testing_ = false; diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index 4931611c59b59..a66d7be8c24c1 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6f01f3eb8df96320700448e4583e4a4a0b3d2beb..e3c9f87e651be09fd40f1f51b3f9ba6fb18a770b 100644 +index 2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4..fd6477ee04aee6a87dd33ea0e573eec3d7bba175 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3447,7 +3447,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3453,7 +3453,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 1fedb8674bcc3..3d0218f166189 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 70e33b49e77240248c629fb18c5d3ca57ea32d66..3b546cf67089e6677fc668b4d1d6c0863282dff5 100644 +index 82616ebcb1f56de12cbd932a4614bb3858e9bad9..67871eec9821cf100acc719a1765be489dfbe7d8 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3694,6 +3694,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3702,6 +3702,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 1c0ed1e2fd326..28b418cf624a8 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,7 +13,7 @@ This patch can be removed should we choose to support chrome.fileSystem or support it enough to fix the crash. diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 96d6028af1408c34f98ee638b8b8d41e8dc8b2ee..6e3c8da273aa4d24c32200f3d67210eb08ee3dad 100644 +index 940a00b9b9f992d4254fc74922c3d8b31772fa4e..b3373265a65a6b50276a09bfb54065521ad6eac4 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts @@ -860,26 +860,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { 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 d1d1cd7380be1..dc7c6ef34bdba 100644 --- a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch +++ b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch @@ -50,10 +50,10 @@ 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 1f18714dd0c79359173f8e9204b9314a92e3b2a8..068570dba8673d2b0af674f556465abda2ed16f5 100644 +index e1066e90022485463adb69f5738107670d94ba3f..85cdc5d2df4b17d41305fa8ff4337de65056cdf7 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc -@@ -158,7 +158,7 @@ DeviceService::~DeviceService() { +@@ -159,7 +159,7 @@ DeviceService::~DeviceService() { // naturally sequenced after the last task on // |serial_port_manager_task_runner_| per ThreadPool shutdown semantics). // See crbug.com/1263149#c20 for details. 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 abdc12fa40bfd..c0a55bfbbaaf3 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 53435224b5e331bbe24119752c1a44a8d58bfa88..de1a5b60474ce872eba03dfb8931b9b566fd6cee 100644 +index 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c6935c90a 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1828,7 +1828,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1837,7 +1837,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,7 +21,7 @@ index 53435224b5e331bbe24119752c1a44a8d58bfa88..de1a5b60474ce872eba03dfb8931b9b5 // 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 a3ae580ea073024882bd860abf914bbf7c0ed54d..85ae2b5ba31926d21ffb52ab31fca6a66ad6d5ec 100644 +index f92bcc8f2a212e6cda464d9b6060a561d689f467..f9cb0eea11665148a4be669acaf5703cf9c0ea09 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -669,6 +669,10 @@ class WebContents : public PageNavigator, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 641d82a1db3ff..972b408dbbc00 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 a64114d9eeb56b3dc0389415d44a842d3cda12fb..6c3b36f36e375a626f9fc2a59935c5ac851a128c 100644 +index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d27548f6b62a7 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3184,6 +3184,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3271,6 +3271,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index a64114d9eeb56b3dc0389415d44a842d3cda12fb..6c3b36f36e375a626f9fc2a59935c5ac } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index e0bfafe859b600ac5033f78d1eb5823ddda956c4..e2b0937007413b158ac28e48352acd3ab68e6dd0 100644 +index f399bc59be5705542b34185e7fe7202a029c40ea..3293b6e035a6ea182504aa2700866fea8c213f4c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -270,6 +270,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 f2cfeb9bf75dc..0c82f2e509740 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 7b4b42449a60e9309135aae38213cb3b003337e0..7d9068b87eee4dbc3435ed6f67285d428dc85f52 100644 +index 88f9e4dd05d8efdabbbdd044f5e09e844ced3d55..c254b045494936eca14ce947e1c2de3327820aa2 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -123,9 +123,10 @@ void IsolateHolder::Initialize(ScriptMode mode, +@@ -137,9 +137,10 @@ void IsolateHolder::Initialize(ScriptMode mode, const intptr_t* reference_table, const std::string js_command_line_flags, v8::FatalErrorCallback fatal_error_callback, @@ -24,10 +24,10 @@ index 7b4b42449a60e9309135aae38213cb3b003337e0..7d9068b87eee4dbc3435ed6f67285d42 g_reference_table = reference_table; g_fatal_error_callback = fatal_error_callback; diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d064318627452ba852b2 100644 +index d7739924bc3c3daec848db52730bd60c72ff2d8a..78af701cb06f6cb1bdd9829b2fcc46c8d63f5c4f 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder { +@@ -109,7 +109,8 @@ class GIN_EXPORT IsolateHolder { const intptr_t* reference_table = nullptr, const std::string js_command_line_flags = {}, v8::FatalErrorCallback fatal_error_callback = nullptr, @@ -38,10 +38,10 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745 // 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 d04aa76f6667c941637de26998b52b4b2f0d2802..1b41c6ad5681ee85250b27cb9d221995ca1e4b7f 100644 +index ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b3c640dd4 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -353,7 +353,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -362,7 +362,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index d04aa76f6667c941637de26998b52b4b2f0d2802..1b41c6ad5681ee85250b27cb9d221995 static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -363,7 +364,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -372,7 +373,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 3cfbeec908477..d43e9228ce721 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,7 +12,7 @@ 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 bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb008827ed 100644 +index 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58ef31931ae 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { @@ -28,10 +28,10 @@ index bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec63031666e6b978e 100644 +index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb00a156332 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h -@@ -128,6 +128,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, +@@ -125,6 +125,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, // BrowserMainParts override instead. void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); @@ -40,10 +40,10 @@ index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec6303166 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 54e4a915263eaf1cb6a2854c61b26d0269a49228..567f9e42a931975770f8ce63ce9b0ba80f8f234c 100644 +index 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f0c91ee61 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1237,6 +1237,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1209,6 +1209,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,10 +57,10 @@ index 54e4a915263eaf1cb6a2854c61b26d0269a49228..567f9e42a931975770f8ce63ce9b0ba8 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 85a4d09a54922205d416538ea97c7f2b5897f86a..acba97124a8643c7452bea63e91533cbfa7e182c 100644 +index 1aff605f7c126104edc9e74adc80d56344177a80..93e589d1ede1fb33dde3b099d04540fef777e182 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h -@@ -90,6 +90,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -87,6 +87,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 6394ab0ab0cc6..fba6f47a9f03f 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 9a8d321de570ee1a0669aa6022e34f8ff604694f..abcdba63bcbd0b9e323bf482cc292360d30be8fe 100644 +index 1bc95f7cab225ff4ff5d9819fa07d8a8cf7d9f9c..3631ccc4e41db1b6c9d3873f52cc3ff708b18d68 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -971,6 +971,11 @@ +@@ -975,6 +975,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 1d054623e40a4..20894a2cf14e9 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb119 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index a4edf639f8fe7170ce15f80e6e429d035fd5d7f7..7bf86bfde863b05c4727f09b24f556f2073d928a 100644 +index 34126e87bb62c312230e4a0c479f49736fa20e35..7320904ca819b6f6616192dd9f04f02ead2430a8 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") 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 1cd1f286df670..4249d68d5c2b2 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 194ce0ca751da8677df74489a04e143276264fbe..9df287e5a9d122f26730480d54a1bbfd47e8d95e 100755 +index f25be7d134b65a6caf65241a78111de145727fcd..4fcbd6e5fd6e0d692c3bad4232b37d2a95a7073f 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index cbfe9c8f66bbb..963907108c66e 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were replaced with clean ozone native implementations. diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc -index 7ffb9d707407210e566c8f2bd2f89cf7f31690c9..06bb59fe5e855d0a339e738cf12c566afcf376ac 100644 +index f7fe443469c54e6cf76c2eb7f00c94d245515e59..d2dac184b3bfa69e142c106ec91f94d5c5e38d5a 100644 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc -@@ -199,6 +199,7 @@ class OzonePlatformX11 : public OzonePlatform, +@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform, properties->supports_vulkan_swap_chain = true; properties->uses_external_vulkan_image_factory = true; properties->skia_can_fall_back_to_x11 = true; @@ -21,10 +21,10 @@ index 7ffb9d707407210e566c8f2bd2f89cf7f31690c9..06bb59fe5e855d0a339e738cf12c566a properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index df6b551b94bd4e04f4c0d6e976c68cc187a57d85..3b6dd20277af88568cdb17a7fddf89bdf89b5640 100644 +index 193224d33283d4d3c45dc11b9620700a3a379cce..81abd63261952f0930a4659f270791d27d9d74a3 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h -@@ -132,6 +132,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { +@@ -129,6 +129,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { // Linux only: determines if Skia can fall back to the X11 output device. bool skia_can_fall_back_to_x11 = false; diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index 70d8833b4744a..4d79064e76138 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,38 +15,65 @@ 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 7d9068b87eee4dbc3435ed6f67285d428dc85f52..c0b8c6e5b49390b8a87d6a9d19605f6b6a1c3562 100644 +index c254b045494936eca14ce947e1c2de3327820aa2..63c9b9681fcc4e1e9a9590d59d74349bb8aee3b1 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -59,7 +59,8 @@ IsolateHolder::IsolateHolder( +@@ -73,7 +73,8 @@ IsolateHolder::IsolateHolder( IsolateType isolate_type, IsolateCreationMode isolate_creation_mode, v8::CreateHistogramCallback create_histogram_callback, - v8::AddHistogramSampleCallback add_histogram_sample_callback) + v8::AddHistogramSampleCallback add_histogram_sample_callback, ++ v8::Isolate* isolate) + : IsolateHolder(task_runner, + access_mode, + isolate_type, +@@ -81,14 +82,16 @@ IsolateHolder::IsolateHolder( + atomics_wait_mode, + create_histogram_callback, + add_histogram_sample_callback), +- isolate_creation_mode) {} ++ isolate_creation_mode, ++ isolate) {} + + IsolateHolder::IsolateHolder( + scoped_refptr task_runner, + AccessMode access_mode, + IsolateType isolate_type, + std::unique_ptr params, +- IsolateCreationMode isolate_creation_mode) ++ IsolateCreationMode isolate_creation_mode, + v8::Isolate* isolate) : access_mode_(access_mode), isolate_type_(isolate_type) { CHECK(Initialized()) << "You need to invoke gin::IsolateHolder::Initialize first"; -@@ -70,7 +71,7 @@ IsolateHolder::IsolateHolder( - v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; +@@ -99,7 +102,7 @@ IsolateHolder::IsolateHolder( + v8::ArrayBuffer::Allocator* allocator = params->array_buffer_allocator; DCHECK(allocator); - isolate_ = v8::Isolate::Allocate(); + isolate_ = isolate ? isolate : v8::Isolate::Allocate(); isolate_data_ = std::make_unique(isolate_, allocator, access_mode_, task_runner); - if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) { + // TODO(https://crbug.com/1347092): Refactor such that caller need not diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 4efc13c79ae742fa1925d064318627452ba852b2..978c0d144370162e65038cf8a2e125fbfd0f7ebf 100644 +index 78af701cb06f6cb1bdd9829b2fcc46c8d63f5c4f..4a36f4826f9df765c664a819eb4e3679fbecb104 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder { +@@ -83,13 +83,15 @@ class GIN_EXPORT IsolateHolder { IsolateType isolate_type, 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( + scoped_refptr task_runner, + AccessMode access_mode, + IsolateType isolate_type, + std::unique_ptr params, +- IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal); ++ IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, + 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 63c91afd53a98..e3d33b36f6ce7 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 88e46d8d05c0b5732468568b84b3283d2f4a934e..f19e32fd33ff0ce8f44ecec76e4583273f43b231 100644 +index ed19f7f1a283da619c01e2dc476d9d1ace950dc7..ef51df5e85584329c9c02aa2b6b88ba9eadd1a31 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -251,11 +251,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { diff --git a/patches/chromium/make_gtk_getlibgtk_public.patch b/patches/chromium/make_gtk_getlibgtk_public.patch index 730a2877e5aa2..cb65b28e8d8c0 100644 --- a/patches/chromium/make_gtk_getlibgtk_public.patch +++ b/patches/chromium/make_gtk_getlibgtk_public.patch @@ -7,7 +7,7 @@ Allows embedders to get a handle to the gtk and gdk_pixbuf libraries already loaded in the process. diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc -index b5c7af5bdb93b320f95252d35d2d76bae7f8c445..65b097cfab72b92f301968715eb218ef0e468567 100644 +index 2ba5b4c4468fca1bf76011754e358c81f670a8d3..e831abb6d14be75b3f5e5b4b3455b8b136f921b1 100644 --- a/ui/gtk/gtk_compat.cc +++ b/ui/gtk/gtk_compat.cc @@ -66,11 +66,6 @@ void* GetLibGio() { diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 07ee9fd2c36f0..73fcfcd3ddf79 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -39,13 +39,13 @@ index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a } // namespace base diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a182626fee5 100644 +index 1cbc8d582610426c870ac14ee825345805a9639a..1889df911a449e0b2ed80b42d55d747b36f9cf8c 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm -@@ -30,12 +30,6 @@ +@@ -28,12 +28,6 @@ + extern "C" { + CFTypeID SecKeyGetTypeID(); #if !BUILDFLAG(IS_IOS) - CFTypeID SecACLGetTypeID(); - CFTypeID SecTrustedApplicationGetTypeID(); -// The NSFont/CTFont toll-free bridging is broken before 10.15. -// http://www.openradar.me/15341349 rdar://15341349 -// @@ -55,7 +55,7 @@ index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a18 #endif } // extern "C" -@@ -317,8 +311,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -315,8 +309,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -65,7 +65,7 @@ index cee826cf8ca533778c716fd2592e625e93fe7efb..adfec0021ae00b3a9ccc792695a51a18 return ns_val; } -@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -387,9 +380,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 7c7230f4a4dce..6753852394ca9 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b + @end diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h -index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807eb797316 100644 +index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90209ee47c 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h @@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge; @@ -95,7 +95,7 @@ index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e866244fdb 100644 +index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583513ea8ec 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window, @@ -126,7 +126,7 @@ index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e8 @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -281,6 +287,8 @@ - (BOOL)hasViewsMenuActive { +@@ -287,6 +293,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -135,7 +135,7 @@ index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e8 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -292,6 +300,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -298,6 +306,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 51317f699d640..4a955cba8a74e 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063 } // 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 34721e51d0ebe3a99751bba88b0afe026a910cc6..3a415dd6daf655c31ceb6fd6d307dc6e96c9aced 100644 +index c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94494d5a97 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 -@@ -582,10 +582,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,10 +61,10 @@ index 34721e51d0ebe3a99751bba88b0afe026a910cc6..3a415dd6daf655c31ceb6fd6d307dc6e // 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 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4fb37ae38 100644 +index d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550fb973e03 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 -@@ -74,8 +74,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -76,8 +76,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4 } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -137,8 +139,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -139,8 +141,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -87,7 +87,7 @@ index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4 } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f413d29aab 100644 +index 6c0700b182e9765afd60d8deec501d13432e1b0a..c85c024a5a5711471e24698f14dda21b49817424 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -21,7 +21,9 @@ @@ -100,7 +100,7 @@ index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f4 namespace { -@@ -609,6 +611,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -613,6 +615,7 @@ void PostAnnouncementNotification(NSString* announcement) { if ([NSApp isActive]) return window == [NSApp accessibilityFocusedWindow]; @@ -108,7 +108,7 @@ index f61b04b02673e9a73f9c23823017a56b65b47dee..297b5c5584e9221adf11515c015fd7f4 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -636,6 +639,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -640,6 +643,7 @@ void PostAnnouncementNotification(NSString* announcement) { // from within the app shim content. if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) return true; @@ -144,7 +144,7 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880 // 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 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7a7dc07a3 100644 +index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e19b4cc8c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -258,8 +258,10 @@ @@ -158,7 +158,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1555,8 +1557,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1559,8 +1561,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -169,7 +169,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7 return [GetInProcessNSView() window]; } -@@ -1600,9 +1604,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1604,9 +1608,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -181,7 +181,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2097,12 +2103,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2101,12 +2107,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -197,7 +197,7 @@ index 6975087ef6cc6483aa0d8c301cedfb126d471e11..fc7c4474aaa74000b901b93b26bb46d7 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index a922dc6ce99ed32ede8812a63a836f72691bece3..9e4ef4235c49eeb7cd34f05ae2d75169d787fa55 100644 +index 012ab83bb9f4887646decb030b4a18f6b21e0d01..0d8b56cc387b24833ec7950a8049e038f650020c 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -341,6 +341,13 @@ component("base") { @@ -263,10 +263,10 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7 // 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 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea374bf9a0a 100644 +index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372424d0eb8 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -295,14 +295,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -325,14 +325,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -289,7 +289,7 @@ index 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea3 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1261,6 +1269,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1289,6 +1297,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -297,7 +297,7 @@ index 0ca869c22670d057362132b30c704876e1d4d850..839a6777ebd596f41467fd90c725eea3 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1268,14 +1277,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1296,14 +1305,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_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index d97162e9a4bcf..fe24e81ac7299 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -313,10 +313,10 @@ index d59a16112d27e2696437163483c44eca414c225c..1ccd20fe7efa3cbae48f99d0660b0252 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 +index 397f01d7249f491840e5953b65c2d54eb92dc638..a7279e44346cb5b0b26599bd62693ad40a59e84f 100644 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm +++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm -@@ -86,6 +86,7 @@ +@@ -87,6 +87,7 @@ } } @@ -324,11 +324,11 @@ index 7cb34e119cd30353fe56e7c71ed5e1d417896888..dbb6cc8e37eff9b30269687f29808ec3 // AXTextMarker if (IsAXTextMarker(value)) { return AXTextMarkerToBaseValue(value, indexer); -@@ -94,6 +95,7 @@ +@@ -95,6 +96,7 @@ // AXTextMarkerRange if (IsAXTextMarkerRange(value)) return AXTextMarkerRangeToBaseValue(value, indexer); +#endif // Accessible object - if (IsNSAccessibilityElement(value) || IsAXUIElement(value)) { + if (AXElementWrapper::IsValidElement(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 331914f8c122b..1ef84ebf1677c 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 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd9495875b 100644 +index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059e4289a9b 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -130,6 +130,11 @@ @@ -128,7 +128,7 @@ index 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2304,6 +2401,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2320,6 +2417,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,7 +139,7 @@ index 2aaf6fb9cca420cde28635d7628c1b7830570f5a..d53e403bda407bb46f59395ebcbb39cd builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247ddb971be 100644 +index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -104,6 +104,7 @@ class URLMatcher; @@ -159,7 +159,7 @@ index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -821,6 +824,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -822,6 +825,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,7 +169,7 @@ index 97039f97082b79e4b7bd5cdb4a5b28023dc70e47..614ba5b278f8bed722072ca07399b247 // 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 0a376689aeb81f85372ce163d9e199ada2cdcde2..118c6469c038e5b53eb76f76abf60f5df15a94d1 100644 +index 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83725d3b0b 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -283,6 +283,17 @@ struct NetworkContextFilePaths { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 90182fe6604c9..9209f4710b026 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 4b40e3faa498b6c86b381f6efae9d04e48a85c0f..5499f85fa578511d5817ecd9be2f33cf56e2db4b 100644 +index f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518bccab6a7c 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2069,8 +2069,9 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2073,8 +2073,9 @@ void RenderProcessHostImpl::CreateNotificationService( // For workers: if (render_frame_id == MSG_ROUTING_NONE) { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -148,7 +148,7 @@ index 4b40e3faa498b6c86b381f6efae9d04e48a85c0f..5499f85fa578511d5817ecd9be2f33cf return; } -@@ -2078,7 +2079,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2082,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService( RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 57f571ce58cc4..bf82c0887b174 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/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc -index 27e776fcf770b0ef72151d98d07778badabe807e..f7fb7850497a289ca8627752ba952d9f59468079 100644 +index be17e30aa831282c4be52e788d67993d47eba5df..d5c3988af5be1d9e89330eb5c5195f9b94d13ffc 100644 --- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc @@ -15,15 +15,19 @@ @@ -138,7 +138,7 @@ index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d1 #include "ui/aura/window.h" #include "ui/aura/window_tree_host.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 0d5857b5f3afa823a7a2aff68f833623ec2e7b1c..fb6217f28c306921a86afc9b854a60b4e38e1584 100644 +index 9ce062e48c356f2ac23feb97c31aabcac8610942..08c27dc6f54c9216098d29b6a5331483722517d2 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 @@ 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 143f6b40db3d9..f137b04a6e09e 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4966394e6 100644 +index 277c93b46025fc5efa7c9462222bf3704172e035..6683578241804b9634965f96d0d1c1a317b94643 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h @@ -129,6 +129,16 @@ @@ -28,7 +28,7 @@ index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4 E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -182,6 +192,7 @@ +@@ -183,6 +193,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -37,10 +37,10 @@ index 989f4dc6d156aef77dadf111f12c403196e5342b..9fd2b3484016df7a622aaadf094028c4 #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 6e97a162f3a823090115fdcb47828c6e0b10ad06..5fcb8cb147aa1356853cb0ed1f3731456c434946 100644 +index ca33acaffdb3c3dbd8f5f1b7012b1013a983645e..ae5ca280a3965c5922f272fdbc45247fcc8a9750 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -150,6 +150,17 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -151,6 +151,17 @@ void AddUiColorMixer(ColorProvider* provider, gfx::kGoogleGreyAlpha500); mixer[kColorProgressBarPaused] = {kColorDisabledForeground}; mixer[kColorProgressBar] = {kColorAccent}; @@ -58,7 +58,7 @@ index 6e97a162f3a823090115fdcb47828c6e0b10ad06..5fcb8cb147aa1356853cb0ed1f373145 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -230,6 +241,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -232,6 +243,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index f056759708d26..ff4a4d114645c 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/BUILD.gn b/BUILD.gn -index a3cf0a49943f53608f783f439917c256ec5b9040..d52cc220107218e53290d21ce1c52a7f855385b4 100644 +index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0ca8b03202 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -973,7 +973,6 @@ if (is_win) { @@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac09986cfd9 100644 +index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2661cf5db 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -97,7 +97,7 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac0 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -222,16 +222,19 @@ void PrintJobWorker::UpdatePrintSettings(base::Value::Dict new_settings, +@@ -209,16 +209,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -121,10 +121,10 @@ index d9ae000f1348529ab849349d7562dbb04fe9fd16..fcfeffd86bd897467b12bf1aba4aaac0 #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 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf06d4852f5 100644 +index 398d59a0ebad165981e9e96b29ffc672e4b841eb..e420d87ef0e90cddb740ac4b24f92519a6eb3347 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -362,7 +362,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -356,7 +356,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -134,7 +134,7 @@ index 1e158ecd686e775f656d5a05a9d916ce8f075fa8..20613012d1e6f435c3211d78ec311cf0 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851ac8b8df85 100644 +index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212b98a2b15 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -146,7 +146,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" #include "components/prefs/pref_service.h" -@@ -83,10 +81,23 @@ namespace printing { +@@ -86,10 +84,23 @@ namespace printing { namespace { @@ -170,7 +170,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -95,6 +106,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -98,6 +109,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -178,7 +178,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } void OnDidGetDefaultPrintSettings( -@@ -144,7 +156,9 @@ void OnDidUpdatePrintSettings( +@@ -147,7 +159,9 @@ void OnDidUpdatePrintSettings( DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -189,7 +189,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -172,6 +186,7 @@ void OnDidScriptedPrint( +@@ -175,6 +189,7 @@ void OnDidScriptedPrint( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -197,7 +197,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -181,7 +196,8 @@ void OnDidScriptedPrint( +@@ -184,7 +199,8 @@ void OnDidScriptedPrint( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -207,7 +207,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -196,12 +212,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -199,12 +215,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -222,7 +222,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -209,7 +227,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -212,7 +230,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -234,7 +234,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -237,6 +258,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -240,6 +261,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); @@ -244,7 +244,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -405,7 +429,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -452,7 +476,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -254,7 +254,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -420,8 +445,11 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -467,8 +492,11 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -267,7 +267,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } void PrintViewManagerBase::UpdatePrintingEnabled() { -@@ -429,8 +457,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { +@@ -476,8 +504,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { // The Unretained() is safe because ForEachRenderFrameHost() is synchronous. web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost( base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, @@ -277,7 +277,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } void PrintViewManagerBase::NavigationStopped() { -@@ -546,11 +573,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -593,11 +620,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -292,7 +292,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -588,18 +618,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -635,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -314,7 +314,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -609,6 +641,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -656,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -322,7 +322,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -640,14 +673,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -687,14 +720,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -339,7 +339,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a return; } #endif -@@ -685,7 +718,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -732,7 +765,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -347,7 +347,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a #endif ReleasePrinterQuery(); -@@ -700,6 +732,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -747,6 +779,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -359,7 +359,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -710,10 +747,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -757,10 +794,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -372,7 +372,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } void PrintViewManagerBase::DidStartLoading() { -@@ -769,7 +808,12 @@ void PrintViewManagerBase::OnJobDone() { +@@ -821,7 +860,12 @@ void PrintViewManagerBase::OnJobDone() { // Printing is done, we don't need it anymore. // print_job_->is_job_pending() may still be true, depending on the order // of object registration. @@ -386,7 +386,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a ReleasePrintJob(); } -@@ -783,7 +827,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { +@@ -835,7 +879,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -395,7 +395,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a return true; } -@@ -831,7 +875,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -883,7 +927,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -407,7 +407,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a if (!weak_this) return false; -@@ -852,7 +899,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -904,7 +951,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( #endif print_job_->AddObserver(*this); @@ -416,7 +416,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a return true; } -@@ -912,6 +959,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -964,6 +1011,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -428,7 +428,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a if (!print_job_) return; -@@ -919,7 +971,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -971,7 +1023,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -437,7 +437,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a } print_job_->RemoveObserver(*this); -@@ -961,7 +1013,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1013,7 +1065,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -446,7 +446,7 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a return true; if (!cookie) { -@@ -1069,7 +1121,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1121,7 +1173,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -456,10 +456,10 @@ index 4bd871e5cadc693aea6e8c71b3fe3296b743d9ec..78f3db8a6fb8b9184cfd41188b11851a for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde990e10e1 100644 +index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187845e6a75 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h -@@ -41,6 +41,8 @@ namespace printing { +@@ -43,6 +43,8 @@ namespace printing { class PrintQueriesQueue; class PrinterQuery; @@ -468,7 +468,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { public: -@@ -64,7 +66,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -70,7 +72,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -480,7 +480,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in -@@ -113,6 +118,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -128,6 +133,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void ShowInvalidPrinterSettingsError() override; void PrintingFailed(int32_t cookie, mojom::PrintFailureReason reason) override; @@ -488,7 +488,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -120,6 +126,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -135,6 +141,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void AddObserver(Observer& observer); void RemoveObserver(Observer& observer); @@ -503,7 +503,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde protected: explicit PrintViewManagerBase(content::WebContents* web_contents); -@@ -241,7 +255,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -256,7 +270,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -513,7 +513,7 @@ index 746df417a23f7760818ba265d4a7d589dec8bf34..0d3e4491826be629c7251a69afc7ebde // 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 -@@ -314,8 +329,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -575,7 +575,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a // 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 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991aeed63e6d7 100644 +index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86bc0e0f90 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -586,7 +586,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae #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" -@@ -1279,7 +1280,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1282,7 +1283,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -596,7 +596,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae if (!weak_this) return; -@@ -1310,7 +1312,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1313,7 +1315,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -605,7 +605,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1325,7 +1327,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1328,7 +1330,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -614,7 +614,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1402,7 +1404,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1405,7 +1407,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -624,7 +624,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1451,6 +1454,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1454,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -633,7 +633,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2063,7 +2068,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2066,7 +2071,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -643,7 +643,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae // Check if |this| is still valid. if (!weak_this) return; -@@ -2078,7 +2084,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2081,7 +2087,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -654,7 +654,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2086,7 +2094,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2089,7 +2097,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -663,7 +663,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2105,8 +2113,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2108,8 +2116,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -680,7 +680,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae // Check if |this| is still valid. if (!self) return; -@@ -2364,36 +2379,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2374,36 +2389,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -745,7 +745,7 @@ index 0766270f7c8ff9f903395229a541ae1f6183899c..3f9b4a7ade69f3447f8537d2585991ae notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2518,7 +2549,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2528,7 +2559,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -796,10 +796,10 @@ index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f003 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 56e3651f7e79957e444ec82b534a07dff9ef7415..43f2d487947eaf77171d918cc5072aee4291290b 100644 +index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6b2992922 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2766,8 +2766,9 @@ source_set("browser") { +@@ -2783,8 +2783,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -812,7 +812,7 @@ index 56e3651f7e79957e444ec82b534a07dff9ef7415..43f2d487947eaf77171d918cc5072aee if (is_chromeos) { sources += [ diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc -index e3c1b29138f175836424bcfe917cd00bd081b34c..7d8b6f06c5d1a7ea9a5ed86c5c612e8df08f2659 100644 +index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da79270244062c210d6 100644 --- a/content/browser/utility_sandbox_delegate_win.cc +++ b/content/browser/utility_sandbox_delegate_win.cc @@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) { @@ -830,12 +830,12 @@ index e3c1b29138f175836424bcfe917cd00bd081b34c..7d8b6f06c5d1a7ea9a5ed86c5c612e8d +#endif } // namespace - bool UtilitySandboxedProcessLauncherDelegate::GetAppContainerId( + std::string UtilitySandboxedProcessLauncherDelegate::GetSandboxTag() { diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 56ee836445c53c5cde3947fca19d8576d2684f6f..454e26baa8b3688c2af98081085aa5378ff0554b 100644 +index 6cca846b9831da669ca52aff776caf5a23f6f4d1..39d1032f276181a535de9fba89c2246c7a9814d7 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc -@@ -128,7 +128,6 @@ void PrintingContext::UsePdfSettings() { +@@ -143,7 +143,6 @@ void PrintingContext::UsePdfSettings() { mojom::ResultCode PrintingContext::UpdatePrintSettings( base::Value::Dict job_settings) { @@ -844,7 +844,7 @@ index 56ee836445c53c5cde3947fca19d8576d2684f6f..454e26baa8b3688c2af98081085aa537 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 58fcf619add5093bd99fd9c561e8686b060a01c6..76db2a2438cef84fcb6dfd4a67d2e171428e4be0 100644 +index 0e6dd8092f6025790560ca2bab2d68daf47caff2..a4aa6e21b1d37e534b543ad8b112070eedd12d2e 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -171,6 +171,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index e77c36ab6114a..f91220b02b3ec 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -23,8 +23,35 @@ This patch adds a few changes to the Chromium code: `ProcessSingleton` instance that tries to connect to the socket before the browser thread is ready. +diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc +index aca2f19f53657fc2b944b69418e099b056c8e734..e43b0d89e2e6ad0bcb2c34bfacc4ef3b59eaaab1 100644 +--- a/chrome/browser/chrome_browser_main.cc ++++ b/chrome/browser/chrome_browser_main.cc +@@ -1424,7 +1424,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { + switch (notify_result_) { + case ProcessSingleton::PROCESS_NONE: + // No process already running, fall through to starting a new one. +- process_singleton_->StartWatching(); + g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing( + *base::CommandLine::ForCurrentProcess()); + break; +diff --git a/chrome/browser/chrome_process_singleton.cc b/chrome/browser/chrome_process_singleton.cc +index d97fa8a96c110acc25b0ef46d7a4ac1c708f7c76..0919af8e8b0a51ef8e8dd28f2f07139d197a7384 100644 +--- a/chrome/browser/chrome_process_singleton.cc ++++ b/chrome/browser/chrome_process_singleton.cc +@@ -31,10 +31,6 @@ ProcessSingleton::NotifyResult + return process_singleton_.NotifyOtherProcessOrCreate(); + } + +-void ChromeProcessSingleton::StartWatching() { +- process_singleton_.StartWatching(); +-} +- + void ChromeProcessSingleton::Cleanup() { + process_singleton_.Cleanup(); + } diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de67fe0a779 100644 +index 7cd82d27a741f194da5d0b3fcfd9c15c8ea1fa5c..5a64220aaf1309832dc0ad543e353de67fe0a779 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -102,12 +102,19 @@ class ProcessSingleton { @@ -56,7 +83,17 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 // 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 { +@@ -127,9 +136,6 @@ class ProcessSingleton { + // another process should call this directly. + bool Create(); + +- // Start watching for notifications from other processes. +- void StartWatching(); +- + // Clear any lock state during shutdown. + void Cleanup(); + +@@ -176,6 +182,8 @@ class ProcessSingleton { #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); @@ -65,7 +102,13 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 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. -@@ -222,6 +233,8 @@ class ProcessSingleton { +@@ -220,12 +228,13 @@ class ProcessSingleton { + + // Temporary directory to hold the socket. + base::ScopedTempDir socket_dir_; +- int sock_ = -1; + + // Helper class for linux specific messages. LinuxWatcher is ref counted // because it posts messages between threads. class LinuxWatcher; scoped_refptr watcher_; @@ -75,7 +118,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6 #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527dcee5125 100644 +index 7e4cc9cdd350e814c20feccdcc8d70b1080e60a1..2de07460462632680f9b16a019744527dcee5125 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -138,7 +181,17 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527 bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -769,6 +791,10 @@ ProcessSingleton::ProcessSingleton( +@@ -757,7 +779,8 @@ ProcessSingleton::ProcessSingleton( + const base::FilePath& user_data_dir, + const NotificationCallback& notification_callback) + : notification_callback_(notification_callback), +- current_pid_(base::GetCurrentProcId()) { ++ current_pid_(base::GetCurrentProcId()), ++ watcher_(new LinuxWatcher(this)) { + socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); + lock_path_ = user_data_dir.Append(chrome::kSingletonLockFilename); + cookie_path_ = user_data_dir.Append(chrome::kSingletonCookieFilename); +@@ -768,6 +791,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -149,7 +202,7 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527 } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -933,6 +959,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -932,6 +959,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -170,7 +223,7 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1032,14 +1072,32 @@ bool ProcessSingleton::Create() { +@@ -1031,14 +1072,32 @@ bool ProcessSingleton::Create() { #endif } @@ -208,26 +261,58 @@ index fa7ae4812ae5c13355d06dde1e99a17b17da6184..2de07460462632680f9b16a019744527 // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1082,10 +1140,13 @@ bool ProcessSingleton::Create() { - if (listen(sock, 5) < 0) +@@ -1050,9 +1109,10 @@ bool ProcessSingleton::Create() { + // leaving a dangling symlink. + base::FilePath socket_target_path = + socket_dir_.GetPath().Append(chrome::kSingletonSocketFilename); ++ int sock; + SockaddrUn addr; + socklen_t socklen; +- SetupSocket(socket_target_path.value(), &sock_, &addr, &socklen); ++ SetupSocket(socket_target_path.value(), &sock, &addr, &socklen); + + // Setup the socket symlink and the two cookies. + base::FilePath cookie(GenerateCookie()); +@@ -1071,26 +1131,24 @@ bool ProcessSingleton::Create() { + return false; + } + +- if (bind(sock_, reinterpret_cast(&addr), socklen) < 0) { ++ if (bind(sock, reinterpret_cast(&addr), socklen) < 0) { + PLOG(ERROR) << "Failed to bind() " << socket_target_path.value(); +- CloseSocket(sock_); ++ CloseSocket(sock); + return false; + } + +- if (listen(sock_, 5) < 0) ++ if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); +- return true; +-} ++ sock_ = sock; + +-void ProcessSingleton::StartWatching() { +- DCHECK_GE(sock_, 0); +- DCHECK(!watcher_); +- watcher_ = new LinuxWatcher(this); - DCHECK(BrowserThread::IsThreadInitialized(BrowserThread::IO)); - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(&ProcessSingleton::LinuxWatcher::StartListening, -- watcher_, sock)); -+ sock_ = sock; -+ +- watcher_, sock_)); + if (BrowserThread::IsThreadInitialized(BrowserThread::IO)) { + StartListeningOnSocket(); + } else { + listen_on_ready_ = true; + } - - return true; ++ ++ return true; } + + void ProcessSingleton::Cleanup() { diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644 +index 41bc176510f93ef667e4f1373eab61142f3e264f..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -29,7 +29,9 @@ @@ -316,3 +401,12 @@ index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5d CHECK(result && window_.hwnd()); } } +@@ -430,8 +455,6 @@ bool ProcessSingleton::Create() { + return window_.hwnd() != NULL; + } + +-void ProcessSingleton::StartWatching() {} +- + void ProcessSingleton::Cleanup() { + } + 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 8a829b1be7f4c..7cc9d0f959433 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 5647890d0f62bcd5b1d1b2e6adc511b262a83b7f..9a818c66d76d50e9ba678e7a8e57381315eacf88 100644 +index 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e6f060787 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) { @@ -43,10 +43,10 @@ index 5647890d0f62bcd5b1d1b2e6adc511b262a83b7f..9a818c66d76d50e9ba678e7a8e573813 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 14bc2c9e77b7db69d03c00314fe55806d2a9e38c..ad3f25362279d889e800cee3fd20240cc6d176a9 100644 +index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7b4f008e1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4587,6 +4587,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4593,6 +4593,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 14bc2c9e77b7db69d03c00314fe55806d2a9e38c..ad3f25362279d889e800cee3fd20240c RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index a636e3c31860f67b01c178fd580df466266481ed..53435224b5e331bbe24119752c1a44a8d58bfa88 100644 +index 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd6afb9e34 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -967,6 +967,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index a636e3c31860f67b01c178fd580df466266481ed..53435224b5e331bbe24119752c1a44a8 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 9ee3b74460c009c92fb811787250270ea13233b3..802d02e825d98f103f48e3134d6b9dd7e99aa2c5 100644 +index af8a777096c1202b3742d328c02e9e957389fc1e..3a3359865bcedecfa946d517dd50b299172958c9 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 9ee3b74460c009c92fb811787250270ea13233b3..802d02e825d98f103f48e3134d6b9dd7 #include "content/public/browser/allow_service_worker_result.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" -@@ -527,6 +528,9 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -533,6 +534,9 @@ class CONTENT_EXPORT WebContentsObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 71fbcccf77efd..9fb935ca29a76 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 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39fe14086e 100644 +index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3b7e5c7a7 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 -@@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -26,10 +26,10 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39 +- (BOOL)shouldIgnoreMouseEvent; +@end + - // These are not documented, so use only after checking -respondsToSelector:. - @interface NSApplication (UndocumentedSpeechMethods) - - (void)speakString:(NSString*)string; -@@ -602,6 +611,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { + // RenderWidgetHostViewCocoa --------------------------------------------------- + + // Private methods: +@@ -597,6 +606,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39 return [self acceptsMouseEventsWhenInactive]; } -@@ -678,6 +690,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -673,6 +685,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -997,6 +1013,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -992,6 +1008,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); @@ -61,7 +61,7 @@ index 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39 // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1778,9 +1798,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1812,9 +1832,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 77b20580138a8b3365e82239e9c2b8af7f0e2c05..5c583a2f85565fb52d9cea21c2d08e39 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1789,7 +1811,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1823,7 +1845,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index c0b985cf6b960..15c40e58c1027 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 f42cc96b606f07f66a9d4dfacbdcd5b8cb157d21..a9e0afc645b8bd543590e80b55a7461381373187 100644 +index 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4328244f8 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) { diff --git a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch new file mode 100644 index 0000000000000..133baa6af9698 --- /dev/null +++ b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch @@ -0,0 +1,112 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Mon, 15 Aug 2022 21:51:18 -0700 +Subject: Revert "[SpellCheck] Fully launch spell check delayed initialization" + +This reverts commit bf1a502a147c3208d7bb9106fb3aa71b4eee3cf6. +Delaying spell check initialization is causing specs for +'custom dictionary word list API' to fail in Electron. This patch +can be reverted when those failures are addressed. It's unlikely +that this patch will be upstreamed. + +diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +index 72f8e9251df63db8ebebad9a5b682add91340e79..89361e9e8ea4e73c571d3960123030c0011a129d 100644 +--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc ++++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +@@ -302,26 +302,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { + } + } + +-class LanguageSettingsPrivateApiGetLanguageListTest +- : public LanguageSettingsPrivateApiTest { +- public: +- LanguageSettingsPrivateApiGetLanguageListTest() = default; +- ~LanguageSettingsPrivateApiGetLanguageListTest() override = default; +- +- protected: +- void InitFeatures() override { +-#if BUILDFLAG(IS_WIN) +- // Force Windows hybrid spellcheck to be enabled, and disable the delayed +- // init feature since that case is tested in +- // LanguageSettingsPrivateApiTestDelayInit below. +- feature_list_.InitWithFeatures( +- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, +- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +-#endif // BUILDFLAG(IS_WIN) +- } +-}; +- +-TEST_F(LanguageSettingsPrivateApiGetLanguageListTest, GetLanguageList) { ++TEST_F(LanguageSettingsPrivateApiTest, GetLanguageListTest) { + translate::TranslateDownloadManager::GetInstance()->ResetForTesting(); + RunGetLanguageListTest(); + } +diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc +index b8fa14fa50d82521845b9f84d62d9de922df9168..1e9c21eca325845bbc8f09a5287a2451f9829e80 100644 +--- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc ++++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc +@@ -341,18 +341,9 @@ const std::vector SpellcheckServiceHybridUnitTestBase:: + // dictionaries. + }; + +-class GetDictionariesHybridUnitTestNoDelayInit ++class SpellcheckServiceHybridUnitTest + : public SpellcheckServiceHybridUnitTestBase, +- public testing::WithParamInterface { +- protected: +- void InitFeatures() override { +- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled +- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit. +- feature_list_.InitWithFeatures( +- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, +- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +- } +-}; ++ public testing::WithParamInterface {}; + + static const TestCase kHybridGetDictionariesParams[] = { + // Galician (gl) has only Windows support, no Hunspell dictionary. Croatian +@@ -407,10 +398,10 @@ static const TestCase kHybridGetDictionariesParams[] = { + }; + + INSTANTIATE_TEST_SUITE_P(TestCases, +- GetDictionariesHybridUnitTestNoDelayInit, ++ SpellcheckServiceHybridUnitTest, + testing::ValuesIn(kHybridGetDictionariesParams)); + +-TEST_P(GetDictionariesHybridUnitTestNoDelayInit, GetDictionaries) { ++TEST_P(SpellcheckServiceHybridUnitTest, GetDictionaries) { + RunGetDictionariesTest(GetParam().accept_languages, + GetParam().spellcheck_dictionaries, + GetParam().expected_dictionaries); +@@ -440,16 +431,7 @@ std::ostream& operator<<(std::ostream& out, + + class SpellcheckServiceWindowsDictionaryMappingUnitTest + : public SpellcheckServiceHybridUnitTestBase, +- public testing::WithParamInterface { +- protected: +- void InitFeatures() override { +- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled +- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit. +- feature_list_.InitWithFeatures( +- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, +- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +- } +-}; ++ public testing::WithParamInterface {}; + + static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = { + DictionaryMappingTestCase({"en-CA", "en-CA", "en-CA", "en", "en"}), +diff --git a/components/spellcheck/common/spellcheck_features.cc b/components/spellcheck/common/spellcheck_features.cc +index 37f2b0e837d8031bee488e9fd7bd4eb456c42204..dcd365a802e0feebbb2bc3839c7a0f47fb113c70 100644 +--- a/components/spellcheck/common/spellcheck_features.cc ++++ b/components/spellcheck/common/spellcheck_features.cc +@@ -32,7 +32,7 @@ const base::Feature kWinUseBrowserSpellChecker{ + "WinUseBrowserSpellChecker", base::FEATURE_ENABLED_BY_DEFAULT}; + + const base::Feature kWinDelaySpellcheckServiceInit{ +- "WinDelaySpellcheckServiceInit", base::FEATURE_ENABLED_BY_DEFAULT}; ++ "WinDelaySpellcheckServiceInit", base::FEATURE_DISABLED_BY_DEFAULT}; + + const base::Feature kWinRetrieveSuggestionsOnlyOnDemand{ + "WinRetrieveSuggestionsOnlyOnDemand", base::FEATURE_ENABLED_BY_DEFAULT}; diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 1047a3423e7df..3b4aba5a4d8b0 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 028c190ad21eb1899c61295695931bd2353518a5..9e74a54266460fc51e6b3492c842cda3c0b88538 100644 +index 14985e39b792e931a9884ae95b8d550776520478..d6c104b05471161901e76051e6ec0d1059aa2dd1 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1255,7 +1255,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1282,7 +1282,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 ee020bad0e1f1..de9a6514f7b84 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ 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 5499f85fa578511d5817ecd9be2f33cf56e2db4b..3f0a3b2133f0d48054f33df28b93a9ee40d7ed78 100644 +index d2fbb44deef7a63cc1f5296d338d518bccab6a7c..7bb696c3ad090828b2a7e3a9a648b75bbf39f844 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1762,9 +1762,15 @@ bool RenderProcessHostImpl::Init() { @@ -42,7 +42,7 @@ index 5499f85fa578511d5817ecd9be2f33cf56e2db4b..3f0a3b2133f0d48054f33df28b93a9ee auto file_data = std::make_unique(); 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 af8173d4203150237387529aa2b974aeec7c5a41..9fadaa80a4547a583484355342c3fd98d53bcd27 100644 +index 71bbf3608a2b112e51b6b178755f06657f657ff9..6f3f2f00f35f5c5b38654cb0388cba070e3cdab2 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -31,6 +31,9 @@ namespace content { @@ -66,7 +66,7 @@ index af8173d4203150237387529aa2b974aeec7c5a41..9fadaa80a4547a583484355342c3fd98 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 3a0e25b38965de5b57fd0be1112cf62dfda846d7..f412080cfb49330d855fdf1cbc13ff8850530401 100644 +index d820cb4ff004194d9c18bfddaf90bf520e8446ff..0dcffcf367b5d08bb31b68e648c1f4ce3aa15600 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 diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index f0a87b75ca482..b89002c3b34f4 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,7 +6,7 @@ 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 6e1d72902ec3e4a479304ff39b8b537d23f5cdf3..b7b198b159d250eca1498206ec29cc0270071f2a 100644 +index f822120af8bf8849609a765d7478fbdba1e50a8b..f928b747d202179636761666ff084a81433a933b 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc @@ -8,6 +8,7 @@ @@ -17,7 +17,7 @@ index 6e1d72902ec3e4a479304ff39b8b537d23f5cdf3..b7b198b159d250eca1498206ec29cc02 #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" -@@ -54,6 +55,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( +@@ -62,6 +63,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index a8d925dde904d..eb23dbf6cc5af 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 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a0b3d2beb 100644 +index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3066,6 +3066,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3073,6 +3073,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3076,6 +3083,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3083,6 +3090,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index 9b532970afe951f7c12629903baa39f2b8de1a5e..6f01f3eb8df96320700448e4583e4a4a CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 5c710ded76711125c8e2de8e2c9bce7569548732..a3ae580ea073024882bd860abf914bbf7c0ed54d 100644 +index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561d689f467 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -94,10 +94,13 @@ class BrowserContext; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 4377c64198a83..8f160ca9f5c99 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 6f963b0a1fcb00a16bcf423a494aad29b4c86b52..004fbb98b212372f7af73b9334ff44fb7a2a5eba 100644 +index 7f60d038fb9c2bc8364c580bc9c7684d97fbbcfb..b1eddf20c22edf974375b8a04d70fca72f7834af 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -901,10 +901,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 2e374e7e83645..24da4c76a0724 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 9c6f51f1667d9bf1b430a83747faebf633a324c7..edc7111e2a61c917ec987264ddfbc4ee55f33730 100644 +index 115dab63efa4b90f37609a9a0a363ad75a0ff582..324232704f0bc0db6c20031cc0a2217b35667c3d 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6565,6 +6565,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6579,6 +6579,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 994967d5e1d8a..a84e0a2e368a3 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,7 +10,7 @@ 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 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df28cf05e4 100644 +index d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa27f7084d 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -26,10 +26,10 @@ index 1dfe162dc69f404b49bae6197fa7b713600eb9bd..dedfb41c933ad7930cbab5aae502e1df // 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 e6ed59bb367c2ec8997867d847d79304b5e78be4..f2401245c4feb507966a47c82c66d956802d5ede 100644 +index 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -873,6 +873,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -869,6 +869,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index e6ed59bb367c2ec8997867d847d79304b5e78be4..f2401245c4feb507966a47c82c66d956 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 62370f36f8b19c409e65c3d19a7536a50c7f3d0c..ad67b32366ee276d4a9917e17ce335c3ec507a48 100644 +index 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df39eb9d82 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -183,6 +183,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -67,10 +67,10 @@ index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768 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 ef06596ca9597496809064a4b5a5388caf2dac5a..aa045c3bebc0653449d99dd6e507ac76952ebf8c 100644 +index 91fd003fe648c8ac854843922714f30434e3663f..f67fbdd1c9eda7feb9f171fa8482c1d5cc29d508 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -735,6 +735,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -744,6 +744,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 33c10c2fd8b05..6bde8843fc9a7 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,7 +19,7 @@ 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 dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7b491b9ba 100644 +index b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04ecd9f05d8 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -35,10 +35,10 @@ index dedfb41c933ad7930cbab5aae502e1df28cf05e4..8ad7306886109e827a8a692fee39f7c7 // 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 f2401245c4feb507966a47c82c66d956802d5ede..916fc0110338224c21bc6cc29536a152659e9569 100644 +index c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c5900fc9aec3 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -885,6 +885,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index f2401245c4feb507966a47c82c66d956802d5ede..916fc0110338224c21bc6cc29536a152 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 ad67b32366ee276d4a9917e17ce335c3ec507a48..62bc2b9122733d397093fdba0b2315cb0993cb48 100644 +index 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f1716318f0d2 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -183,6 +183,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; diff --git a/patches/config.json b/patches/config.json index e142fc9deee0d..c204b2717009d 100644 --- a/patches/config.json +++ b/patches/config.json @@ -21,5 +21,7 @@ "src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle", - "src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC" + "src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC", + + "src/electron/patches/lss": "src/third_party/lss" } diff --git a/patches/lss/.patches b/patches/lss/.patches new file mode 100644 index 0000000000000..773143e264950 --- /dev/null +++ b/patches/lss/.patches @@ -0,0 +1 @@ +fix_cast_pwrite64_arg_to_long_for_arm.patch diff --git a/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch b/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch new file mode 100644 index 0000000000000..3f74555fe0fd9 --- /dev/null +++ b/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 9 Aug 2022 14:05:55 -0700 +Subject: fix: cast pwrite64 arg to long for arm + +This patch cases pwrite64 arg to a long in order to avoid a +compilation error on arm. This patch can be eliminated when the +upstream patch is merged into chromium main: + +https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946 + +diff --git a/linux_syscall_support.h b/linux_syscall_support.h +index e4e816f4bd001a6de7b98972d1cbaec9aaa8f821..5ea1295f8e9bb5312469dbc1aadb67dd620d35d3 100644 +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -4842,7 +4842,7 @@ struct kernel_statfs { + unsigned, o2) + LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f, + const void *, b, size_t, c, unsigned, o1, +- long, o2) ++ unsigned, o2) + LSS_INLINE _syscall4(int, _readahead, int, f, + unsigned, o1, unsigned, o2, size_t, c) + #endif diff --git a/patches/node/.patches b/patches/node/.patches index 9e31afcb3458c..d035735890958 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -46,3 +46,4 @@ json_parse_errors_made_user-friendly.patch support_v8_sandboxed_pointers.patch build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch build_ensure_native_module_compilation_fails_if_not_using_a_new.patch +fix_override_createjob_in_node_platform.patch diff --git a/patches/node/fix_override_createjob_in_node_platform.patch b/patches/node/fix_override_createjob_in_node_platform.patch new file mode 100644 index 0000000000000..252cf947f4bc4 --- /dev/null +++ b/patches/node/fix_override_createjob_in_node_platform.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Keeley Hammond +Date: Tue, 2 Aug 2022 12:52:02 -0700 +Subject: fix: override createjob in node_platform + +This CL changed Platform::CreateJob to an abstract method: +https://chromium-review.googlesource.com/c/v8/v8/+/3779694 +This patch adds an override for NodePlatform::CreateJob, using +the same parameters as PostJob. + +diff --git a/src/node_platform.cc b/src/node_platform.cc +index 5be79694fef65c9290f1b46d2657581dea16f543..e10caa9f6e39ec5b255acd9bc6b7f8efc77221d9 100644 +--- a/src/node_platform.cc ++++ b/src/node_platform.cc +@@ -523,6 +523,12 @@ std::unique_ptr NodePlatform::PostJob(v8::TaskPriority priority, + this, priority, std::move(job_task), NumberOfWorkerThreads()); + } + ++std::unique_ptr NodePlatform::CreateJob(v8::TaskPriority priority, ++ std::unique_ptr job_task) { ++ return v8::platform::NewDefaultJobHandle( ++ this, priority, std::move(job_task), NumberOfWorkerThreads()); ++} ++ + bool NodePlatform::IdleTasksEnabled(Isolate* isolate) { + return ForIsolate(isolate)->IdleTasksEnabled(); + } +diff --git a/src/node_platform.h b/src/node_platform.h +index 4a05f3bba58c8e875d0ab67f292589edbb3b812b..b8a956c286a5ea88b8b520322e04b4e4e16a2591 100644 +--- a/src/node_platform.h ++++ b/src/node_platform.h +@@ -158,6 +158,9 @@ class NodePlatform : public MultiIsolatePlatform { + std::unique_ptr PostJob( + v8::TaskPriority priority, + std::unique_ptr job_task) override; ++ std::unique_ptr CreateJob( ++ v8::TaskPriority priority, ++ std::unique_ptr job_task) override; + + void RegisterIsolate(v8::Isolate* isolate, uv_loop_t* loop) override; + void RegisterIsolate(v8::Isolate* isolate, diff --git a/patches/v8/.patches b/patches/v8/.patches index 0e16c5eabc6fe..890f2f25a5475 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -9,4 +9,3 @@ fix_disable_implies_dcheck_for_node_stream_array_buffers.patch revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch revert_runtime_dhceck_terminating_exception_in_microtasks.patch chore_disable_is_execution_terminating_dcheck.patch -build_remove_legacy_oom_error_callback.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 56bc38317f1db..85b8bf878eb58 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 c918081b31fdf15efd325ae9d688f6c4f59aded1..15d0dcf9f6ea151f4dcacff0f3dc11b318a1e1cd 100644 +index 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944ea566018 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -636,7 +636,7 @@ config("internal_config") { +@@ -650,7 +650,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index c918081b31fdf15efd325ae9d688f6c4f59aded1..15d0dcf9f6ea151f4dcacff0f3dc11b3 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5999,7 +5999,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6124,7 +6124,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] diff --git a/patches/v8/build_remove_legacy_oom_error_callback.patch b/patches/v8/build_remove_legacy_oom_error_callback.patch deleted file mode 100644 index 0fa0b7bbd422d..0000000000000 --- a/patches/v8/build_remove_legacy_oom_error_callback.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 14 Jun 2022 15:12:43 -0700 -Subject: build: remove legacy oom error callback - -Addresses 3646014: [API] Deprecate LegacyOOMErrorCallback: -https://chromium-review.googlesource.com/c/v8/v8/+/3646014 - -This deprecation was added to warn embedders that the legacy method -was being replaced. However, Electron does not use the legacy method. -The deprecation causes build issues on Windows, this patch removes -the unused method entirely to avoid those errors. - -This patch can be removed in v8 10.6, when legacy_oom_error_callback -is removed. - -diff --git a/include/v8-callbacks.h b/include/v8-callbacks.h -index b39921dea0415362d1a30159f3fac0e345e2313e..810fc4edaf69565959148d3c1ec662f0db3e8490 100644 ---- a/include/v8-callbacks.h -+++ b/include/v8-callbacks.h -@@ -217,10 +217,6 @@ using AddHistogramSampleCallback = void (*)(void* histogram, int sample); - - using FatalErrorCallback = void (*)(const char* location, const char* message); - --using LegacyOOMErrorCallback V8_DEPRECATED( -- "Use OOMErrorCallback (https://crbug.com/1323177)") = -- void (*)(const char* location, bool is_heap_oom); -- - struct OOMDetails { - bool is_heap_oom = false; - const char* detail = nullptr; -diff --git a/include/v8-initialization.h b/include/v8-initialization.h -index 66adf98c17998dd81178e515db01ef43daae14d7..224ae0dc6b34b4724192a1b0547be110f796a9b2 100644 ---- a/include/v8-initialization.h -+++ b/include/v8-initialization.h -@@ -284,9 +284,6 @@ class V8_EXPORT V8 { - */ - static void SetFatalMemoryErrorCallback(OOMErrorCallback callback); - -- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)") -- static void SetFatalMemoryErrorCallback(LegacyOOMErrorCallback callback); -- - /** - * Get statistics about the shared memory usage. - */ -diff --git a/include/v8-isolate.h b/include/v8-isolate.h -index b54c7388603b4582356f6741c9a36f2835aa1928..b9533b78046228705e2038396eebf23b1d663df1 100644 ---- a/include/v8-isolate.h -+++ b/include/v8-isolate.h -@@ -288,9 +288,6 @@ class V8_EXPORT Isolate { - FatalErrorCallback fatal_error_callback = nullptr; - OOMErrorCallback oom_error_callback = nullptr; - -- V8_DEPRECATED("Use oom_error_callback (https://crbug.com/1323177)") -- LegacyOOMErrorCallback legacy_oom_error_callback = nullptr; -- - /** - * The following parameter is experimental and may change significantly. - * This is currently for internal testing. -@@ -1468,10 +1465,6 @@ class V8_EXPORT Isolate { - /** Set the callback to invoke in case of fatal errors. */ - void SetFatalErrorHandler(FatalErrorCallback that); - -- /** Set the callback to invoke in case of OOM errors (deprecated). */ -- V8_DEPRECATED("Use OOMErrorCallback (https://crbug.com/1323177)") -- void SetOOMErrorHandler(LegacyOOMErrorCallback that); -- - /** Set the callback to invoke in case of OOM errors. */ - void SetOOMErrorHandler(OOMErrorCallback that); - -diff --git a/src/api/api.cc b/src/api/api.cc -index 9fafa6b0089aabf55984b68cff85e353fe50ce52..9472ad8f4f776f98d398113b22a6a710596b3cde 100644 ---- a/src/api/api.cc -+++ b/src/api/api.cc -@@ -171,13 +171,6 @@ - - namespace v8 { - --// Redefine LegacyOOMErrorCallback here for internal usage. We still need to --// support it but it is deprecated so would trigger warnings. --// TODO(chromium:1323177): Remove this. --using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location, -- bool is_heap_oom); -- --static DeprecatedLegacyOOMErrorCallback g_legacy_oom_error_callback = nullptr; - static OOMErrorCallback g_oom_error_callback = nullptr; - - static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate, -@@ -235,9 +228,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, - // Give the embedder a chance to handle the condition. If it doesn't, - // just crash. - if (g_oom_error_callback) g_oom_error_callback(location, details); -- if (g_legacy_oom_error_callback) { -- g_legacy_oom_error_callback(location, details.is_heap_oom); -- } - FATAL("Fatal process out of memory: %s", location); - UNREACHABLE(); - } -@@ -313,9 +303,6 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, - } - Utils::ReportOOMFailure(i_isolate, location, details); - if (g_oom_error_callback) g_oom_error_callback(location, details); -- if (g_legacy_oom_error_callback) { -- g_legacy_oom_error_callback(location, details.is_heap_oom); -- } - // If the fatal error handler returns, we stop execution. - FATAL("API fatal error handler returned after process out of memory"); - } -@@ -347,8 +334,6 @@ void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location, - const OOMDetails& details) { - if (auto oom_callback = i_isolate->oom_behavior()) { - oom_callback(location, details); -- } else if (auto legacy_oom_callback = i_isolate->legacy_oom_behavior()) { -- legacy_oom_callback(location, details.is_heap_oom); - } else { - // TODO(wfh): Remove this fallback once Blink is setting OOM handler. See - // crbug.com/614440. -@@ -6175,11 +6160,6 @@ void v8::V8::SetFatalMemoryErrorCallback( - g_oom_error_callback = oom_error_callback; - } - --void v8::V8::SetFatalMemoryErrorCallback( -- v8::LegacyOOMErrorCallback legacy_oom_error_callback) { -- g_legacy_oom_error_callback = legacy_oom_error_callback; --} -- - void v8::V8::SetEntropySource(EntropySource entropy_source) { - base::RandomNumberGenerator::SetEntropySource(entropy_source); - } -@@ -8702,8 +8682,6 @@ void Isolate::Initialize(Isolate* v8_isolate, - #endif - if (params.oom_error_callback) { - v8_isolate->SetOOMErrorHandler(params.oom_error_callback); -- } else if (params.legacy_oom_error_callback) { -- v8_isolate->SetOOMErrorHandler(params.legacy_oom_error_callback); - } - #if __clang__ - #pragma clang diagnostic pop -@@ -9445,8 +9423,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) { - - CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior) - CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior) --CALLBACK_SETTER(OOMErrorHandler, DeprecatedLegacyOOMErrorCallback, -- legacy_oom_behavior) - CALLBACK_SETTER(ModifyCodeGenerationFromStringsCallback, - ModifyCodeGenerationFromStringsCallback2, - modify_code_gen_callback2) -diff --git a/src/execution/isolate.h b/src/execution/isolate.h -index 13100146bdc981480a08156b54649b8f995789ae..9a117c4220704ed512b117aa2f50c3791f8e9189 100644 ---- a/src/execution/isolate.h -+++ b/src/execution/isolate.h -@@ -487,16 +487,9 @@ V8_EXPORT_PRIVATE void FreeCurrentEmbeddedBlob(); - - using DebugObjectCache = std::vector>; - --// Redefine LegacyOOMErrorCallback here for internal usage. We still need to --// support it but it is deprecated so would trigger warnings. --// TODO(chromium:1323177): Remove this. --using DeprecatedLegacyOOMErrorCallback = void (*)(const char* location, -- bool is_heap_oom); -- - #define ISOLATE_INIT_LIST(V) \ - /* Assembler state. */ \ - V(FatalErrorCallback, exception_behavior, nullptr) \ -- V(DeprecatedLegacyOOMErrorCallback, legacy_oom_behavior, nullptr) \ - V(OOMErrorCallback, oom_behavior, nullptr) \ - V(LogEventCallback, event_logger, nullptr) \ - V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, nullptr) \ diff --git a/patches/v8/chore_disable_is_execution_terminating_dcheck.patch b/patches/v8/chore_disable_is_execution_terminating_dcheck.patch index dc3e18c332412..01fff8491a630 100644 --- a/patches/v8/chore_disable_is_execution_terminating_dcheck.patch +++ b/patches/v8/chore_disable_is_execution_terminating_dcheck.patch @@ -20,3 +20,16 @@ index 149dd0555a69be576fd1eb97aa79b8aedafcac04..233e6d2ac511c4a7fa45d47bb7448bee DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) #define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ +diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc +index f47228f80b6a2b9e89afd50e6f67eba1185c0dd6..8adf3a9159b947f4fa567317d05cf0b9f204c862 100644 +--- a/src/execution/microtask-queue.cc ++++ b/src/execution/microtask-queue.cc +@@ -179,7 +179,7 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) { + + if (isolate->is_execution_terminating()) { + DCHECK(isolate->has_scheduled_exception()); +- DCHECK(maybe_result.is_null()); ++ // DCHECK(maybe_result.is_null()); + delete[] ring_buffer_; + ring_buffer_ = nullptr; + capacity_ = 0; diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 3dd20921716bf..6871851eab3de 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 bbab4c72ac93fe7a5bba5de531e66be0775244ca..9fafa6b0089aabf55984b68cff85e353fe50ce52 100644 +index 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b84221f3b1 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9194,7 +9194,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9181,7 +9181,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index bbab4c72ac93fe7a5bba5de531e66be0775244ca..9fafa6b0089aabf55984b68cff85e353 i_isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 5ed434303b6be71dc99abd7600f4ef489f763419..7e2952b9b14f915df72573d6be0813401da0cafb 100644 +index 41f2378ba770a96d9722b8d50d28f3562ebf5101..59338d1d293d5325e89052dd226a9ad4f9e8b46a 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6195,9 +6195,9 @@ void Heap::TearDown() { +@@ -6165,9 +6165,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 6762589722f4e..722a2ab2441e6 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 88d775bfe22d6f1ff738120d11cb1123c5ac106c..feab71df47427d6aaebddb581762fa1a2fd16887 100644 +index 09c3dc73292e2778baba3a0f7f1a02d875845d34..cf9dff8346bbe086464391758a5c11f228b3898c 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -636,6 +636,10 @@ config("internal_config") { +@@ -650,6 +650,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 fe13e37d5a64e..d4730296b4dd9 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 647fbb52bf1faaad92ef1b4537d6226344cb27b2..86b1123804058f1ecca5bd7076f5108cd1f28912 100644 +index fbdf5f029f19d8c231e70593e4860f8949e66e45..f98808fa74d79f8492f5a9aac92783b0775bfdf6 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -929,7 +929,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -930,7 +930,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 ba2b64e10fbf9..00ce43c0d6d10 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 15d0dcf9f6ea151f4dcacff0f3dc11b318a1e1cd..88d775bfe22d6f1ff738120d11cb1123c5ac106c 100644 +index f359ea10d6e83f94b698d9d728147944ea566018..09c3dc73292e2778baba3a0f7f1a02d875845d34 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -6011,7 +6011,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6136,7 +6136,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index e39d8853848c3..3bc3ef7c64f34 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,10 +6,10 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb59df80869 100644 +index 85bbfce01dff2b0b499e5c02b80e23b682443582..9cedeff64478d900bc6730537caff16f09dcfd46 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -454,10 +454,13 @@ path. Add it with -I to the command line +@@ -469,10 +469,13 @@ path. Add it with -I to the command line # define V8_NOINLINE /* NOT SUPPORTED */ #endif @@ -25,7 +25,7 @@ index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb5 #else # define V8_DEPRECATED(message) #endif -@@ -465,13 +468,17 @@ path. Add it with -I to the command line +@@ -480,7 +483,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) @@ -38,6 +38,8 @@ index 6213da2ef434fff934b298eada084647d7a6ddc4..754743b0c82e2ccf9a330d18785f8cb5 #else # define V8_DEPRECATE_SOON(message) #endif +@@ -514,7 +521,7 @@ path. Add it with -I to the command line + END_ALLOW_USE_DEPRECATED() -#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6) diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index f4802be8f6e88..7befb3ae7a01e 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index a984d2ce736a2c9a46eb7cc46eb03fc062f508d2..6bda9bc5878b1ee344eac9f9c4420db09a307792 100644 +index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c20982a675 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6123,12 +6123,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6124,12 +6124,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index a984d2ce736a2c9a46eb7cc46eb03fc062f508d2..6bda9bc5878b1ee344eac9f9c4420db0 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index 9633ba5333c4f1c37e706f655fe37c59c4993b86..6022d5d5063bc6c4db1c15e1ffaaf4d5420c0a01 100644 +index c4878044b149ec23f4ac9198f402ccc5114e219e..ba9be792cbcce3cbc85062daa524010dced2cfeb 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2518,7 +2518,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2533,7 +2533,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); @@ -46,16 +46,3 @@ index 9633ba5333c4f1c37e706f655fe37c59c4993b86..6022d5d5063bc6c4db1c15e1ffaaf4d5 // Type checks. // Check whether the map is for an object with special properties, such as a -diff --git a/src/execution/microtask-queue.cc b/src/execution/microtask-queue.cc -index 2bea5d45bb0605877ad430882c914dddeb2c51c5..12a626900d0295be0b250cd6d4692ab4e329c681 100644 ---- a/src/execution/microtask-queue.cc -+++ b/src/execution/microtask-queue.cc -@@ -179,8 +179,6 @@ int MicrotaskQueue::RunMicrotasks(Isolate* isolate) { - processed_microtask_count); - } - -- DCHECK_IMPLIES(isolate->has_scheduled_exception(), -- maybe_result.is_null() && maybe_exception.is_null()); - // If execution is terminating, clean up and propagate that to TryCatch scope. - if (maybe_result.is_null() && maybe_exception.is_null()) { - delete[] ring_buffer_; diff --git a/script/apply_all_patches.py b/script/apply_all_patches.py index c2e83bea7798a..5e35fc686ec7b 100755 --- a/script/apply_all_patches.py +++ b/script/apply_all_patches.py @@ -11,9 +11,10 @@ def apply_patches(dirs): threeway = os.environ.get("ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES") for patch_dir, repo in dirs.items(): - git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir), - threeway=threeway is not None, - committer_name="Electron Scripts", committer_email="scripts@electron") + if os.path.exists(repo): + git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir), + threeway=threeway is not None, + committer_name="Electron Scripts", committer_email="scripts@electron") def parse_args(): diff --git a/script/verify-mksnapshot.py b/script/verify-mksnapshot.py index 47d0a4fa32842..7efbc59dbe5f7 100755 --- a/script/verify-mksnapshot.py +++ b/script/verify-mksnapshot.py @@ -28,6 +28,7 @@ def main(): if args.snapshot_files_dir is None: with open(os.path.join(app_path, 'mksnapshot_args')) as f: mkargs = f.read().splitlines() + print('running: ' + ' '.join(mkargs + [ SNAPSHOT_SOURCE ])) subprocess.check_call(mkargs + [ SNAPSHOT_SOURCE ], cwd=app_path) print('ok mksnapshot successfully created snapshot_blob.bin.') context_snapshot = 'v8_context_snapshot.bin' @@ -41,6 +42,7 @@ def main(): app_path) genargs = [ gen_binary, \ '--output_file={0}'.format(context_snapshot_path) ] + print('running: ' + ' '.join(genargs)) subprocess.check_call(genargs) print('ok v8_context_snapshot_generator successfully created ' \ + context_snapshot) @@ -69,6 +71,7 @@ def main(): else: electron = os.path.join(app_path, PROJECT_NAME) + print('running: ' + ' '.join([electron, test_path])) subprocess.check_call([electron, test_path]) print('ok successfully used custom snapshot.') except subprocess.CalledProcessError as e: diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 897f8a698a4b7..537f74a14d6d9 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -240,7 +240,7 @@ const char* const ElectronMainDelegate::kNonWildcardDomainNonPortSchemes[] = { const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize = std::size(kNonWildcardDomainNonPortSchemes); -bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) { +absl::optional ElectronMainDelegate::BasicStartupComplete() { auto* command_line = base::CommandLine::ForCurrentProcess(); #if BUILDFLAG(IS_WIN) @@ -318,7 +318,7 @@ bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) { content_client_ = std::make_unique(); SetContentClient(content_client_.get()); - return false; + return absl::nullopt; } void ElectronMainDelegate::PreSandboxStartup() { @@ -411,7 +411,7 @@ void ElectronMainDelegate::SandboxInitialized(const std::string& process_type) { #endif } -void ElectronMainDelegate::PreBrowserMain() { +absl::optional ElectronMainDelegate::PreBrowserMain() { // This is initialized early because the service manager reads some feature // flags and we need to make sure the feature list is initialized before the // service manager reads the features. @@ -419,6 +419,7 @@ void ElectronMainDelegate::PreBrowserMain() { #if BUILDFLAG(IS_MAC) RegisterAtomCrApp(); #endif + return absl::nullopt; } content::ContentBrowserClient* diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index dd43875cc5d17..e8e57fad85db6 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -32,10 +32,10 @@ class ElectronMainDelegate : public content::ContentMainDelegate { protected: // content::ContentMainDelegate: - bool BasicStartupComplete(int* exit_code) override; + absl::optional BasicStartupComplete() override; void PreSandboxStartup() override; void SandboxInitialized(const std::string& process_type) override; - void PreBrowserMain() override; + absl::optional PreBrowserMain() override; content::ContentBrowserClient* CreateContentBrowserClient() override; content::ContentGpuClient* CreateContentGpuClient() override; content::ContentRendererClient* CreateContentRendererClient() override; diff --git a/shell/browser/api/electron_api_menu.cc b/shell/browser/api/electron_api_menu.cc index 3bea4fcca49a8..1208144c96798 100644 --- a/shell/browser/api/electron_api_menu.cc +++ b/shell/browser/api/electron_api_menu.cc @@ -210,7 +210,7 @@ void Menu::Clear() { } int Menu::GetIndexOfCommandId(int command_id) const { - return model_->GetIndexOfCommandId(command_id); + return model_->GetIndexOfCommandId(command_id).value_or(-1); } int Menu::GetItemCount() const { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index b7a03e906e2a1..21b96159fb493 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2859,7 +2859,7 @@ void WebContents::OnPDFCreated( gin_helper::Promise> promise, PrintViewManagerElectron::PrintResult print_result, scoped_refptr data) { - if (print_result != PrintViewManagerElectron::PrintResult::PRINT_SUCCESS) { + if (print_result != PrintViewManagerElectron::PrintResult::kPrintSuccess) { promise.RejectWithErrorMessage( "Failed to generate PDF: " + PrintViewManagerElectron::PrintResultToString(print_result)); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index 98330a4787bc7..340cb5a4a35f2 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -134,7 +134,8 @@ void ElectronBluetoothDelegate::ShowDevicePairPrompt( content::RenderFrameHost* frame, const std::u16string& device_identifier, PairPromptCallback callback, - PairingKind pairing_kind) { + PairingKind pairing_kind, + const absl::optional& pin) { NOTIMPLEMENTED(); std::move(callback).Run(BluetoothDelegate::PairPromptResult( BluetoothDelegate::PairPromptStatus::kCancelled)); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 48d07dfb6f8b7..df4f07703e815 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -55,7 +55,8 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { void ShowDevicePairPrompt(content::RenderFrameHost* frame, const std::u16string& device_identifier, PairPromptCallback callback, - PairingKind pairing_kind) override; + PairingKind pairing_kind, + const absl::optional& pin) override; blink::WebBluetoothDeviceId GetWebBluetoothDeviceId( content::RenderFrameHost* frame, const std::string& device_address) override; diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 8e1b6833470ff..546dc7e6fdcb4 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1536,8 +1536,7 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams( 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::ResultCode result = policy->GetConfig()->AddRule( sandbox::SubSystem::kFiles, sandbox::Semantics::kFilesAllowAny, L"\\??\\pipe\\crashpad_*"); if (result != sandbox::SBOX_ALL_OK) diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 59d09e8730652..046752918d45c 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -83,6 +83,7 @@ #endif #if BUILDFLAG(IS_WIN) +#include "base/win/dark_mode_support.h" #include "ui/base/l10n/l10n_util_win.h" #include "ui/display/win/dpi.h" #include "ui/gfx/system_fonts_win.h" @@ -374,7 +375,6 @@ void ElectronBrowserMainParts::PostDestroyThreads() { void ElectronBrowserMainParts::ToolkitInitialized() { #if BUILDFLAG(IS_LINUX) auto linux_ui = ui::CreateLinuxUi(); - DCHECK(ui::LinuxInputMethodContextFactory::instance()); // Try loading gtk symbols used by Electron. electron::InitializeElectron_gtk(gtk::GetLibGtk()); @@ -444,6 +444,11 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { SpellcheckServiceFactory::GetInstance(); #endif +#if BUILDFLAG(IS_WIN) + // access ui native theme here to prevent blocking calls later + base::win::AllowDarkModeForApp(true); +#endif + content::WebUIControllerFactory::RegisterFactory( ElectronWebUIControllerFactory::GetInstance()); diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 6c67490e75893..0fef6977e96aa 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -8,6 +8,7 @@ #include #include "base/command_line.h" +#include "base/containers/contains.h" #include "chrome/common/chrome_features.h" #include "content/public/browser/web_contents.h" #include "services/device/public/cpp/hid/hid_switches.h" @@ -106,6 +107,7 @@ void ElectronHidDelegate::AddObserver(content::BrowserContext* browser_context, } void ElectronHidDelegate::RemoveObserver( + content::BrowserContext* browser_context, content::HidDelegate::Observer* observer) { observer_list_.RemoveObserver(observer); } diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index 91c1dccfcde2c..2b09fa84f92bc 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/shell/browser/hid/electron_hid_delegate.h @@ -46,7 +46,8 @@ class ElectronHidDelegate : public content::HidDelegate, content::BrowserContext* browser_context) override; void AddObserver(content::BrowserContext* browser_context, content::HidDelegate::Observer* observer) override; - void RemoveObserver(content::HidDelegate::Observer* observer) override; + void RemoveObserver(content::BrowserContext* browser_context, + content::HidDelegate::Observer* observer) override; const device::mojom::HidDeviceInfo* GetDeviceInfo( content::BrowserContext* browser_context, const std::string& guid) override; diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index ccfb4d0f44ffe..9d33db221eb7b 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -63,27 +63,27 @@ void PrintViewManagerElectron::BindPrintManagerHost( // static std::string PrintViewManagerElectron::PrintResultToString(PrintResult result) { switch (result) { - case PRINT_SUCCESS: + case kPrintSuccess: return std::string(); // no error message - case PRINTING_FAILED: + case kPrintFailure: return "Printing failed"; - case INVALID_PRINTER_SETTINGS: + case kInvalidPrinterSettings: return "Show invalid printer settings error"; - case INVALID_MEMORY_HANDLE: + case kInvalidMemoryHandle: return "Invalid memory handle"; - case METAFILE_MAP_ERROR: + case kMetafileMapError: return "Map to shared memory error"; - case METAFILE_INVALID_HEADER: + case kMetafileInvalidHeader: return "Invalid metafile header"; - case METAFILE_GET_DATA_ERROR: + case kMetafileGetDataError: return "Get data from metafile error"; - case SIMULTANEOUS_PRINT_ACTIVE: + case kSimultaneousPrintActive: return "The previous printing job hasn't finished"; - case PAGE_RANGE_SYNTAX_ERROR: + case kPageRangeSyntaxError: return "Page range syntax error"; - case PAGE_RANGE_INVALID_RANGE: + case kPageRangeInvalidRange: return "Page range is invalid (start > end)"; - case PAGE_COUNT_EXCEEDED: + case kPageCountExceeded: return "Page range exceeds page count"; default: NOTREACHED(); @@ -99,39 +99,31 @@ void PrintViewManagerElectron::PrintToPdf( DCHECK(callback); if (callback_) { - std::move(callback).Run(SIMULTANEOUS_PRINT_ACTIVE, + std::move(callback).Run(kSimultaneousPrintActive, base::MakeRefCounted()); return; } if (!rfh->IsRenderFrameLive()) { - std::move(callback).Run(PRINTING_FAILED, + std::move(callback).Run(kPrintFailure, base::MakeRefCounted()); return; } - absl::variant + absl::variant parsed_ranges = print_to_pdf::TextPageRangesToPageRanges(page_ranges); - if (absl::holds_alternative(parsed_ranges)) { - PrintResult print_result; - switch (absl::get(parsed_ranges)) { - case print_to_pdf::PageRangeError::kSyntaxError: - print_result = PAGE_RANGE_SYNTAX_ERROR; - break; - case print_to_pdf::PageRangeError::kInvalidRange: - print_result = PAGE_RANGE_INVALID_RANGE; - break; - } - std::move(callback).Run(print_result, - base::MakeRefCounted()); + if (absl::holds_alternative(parsed_ranges)) { + DCHECK_NE(absl::get(parsed_ranges), + print_to_pdf::PdfPrintResult::kPrintSuccess); + std::move(callback).Run( + static_cast( + absl::get(parsed_ranges)), + base::MakeRefCounted()); return; } printing_rfh_ = rfh; print_pages_params->pages = absl::get(parsed_ranges); - auto cookie = print_pages_params->params->document_cookie; - set_cookie(cookie); - headless_jobs_.emplace_back(cookie); callback_ = std::move(callback); // There is no need for a weak pointer here since the mojo proxy is held @@ -147,26 +139,32 @@ void PrintViewManagerElectron::OnDidPrintWithParams( if (result->is_failure_reason()) { switch (result->get_failure_reason()) { case printing::mojom::PrintFailureReason::kGeneralFailure: - ReleaseJob(PRINTING_FAILED); + FailJob(kPrintFailure); return; case printing::mojom::PrintFailureReason::kInvalidPageRange: - ReleaseJob(PAGE_COUNT_EXCEEDED); + FailJob(kPageCountExceeded); return; } } auto& content = *result->get_params()->content; if (!content.metafile_data_region.IsValid()) { - ReleaseJob(INVALID_MEMORY_HANDLE); + FailJob(kInvalidMemoryHandle); return; } + base::ReadOnlySharedMemoryMapping map = content.metafile_data_region.Map(); if (!map.IsValid()) { - ReleaseJob(METAFILE_MAP_ERROR); + FailJob(kMetafileMapError); return; } - data_ = std::string(static_cast(map.memory()), map.size()); - ReleaseJob(PRINT_SUCCESS); + + std::string data = + std::string(static_cast(map.memory()), map.size()); + std::move(callback_).Run(kPrintSuccess, + base::RefCountedString::TakeString(&data)); + + Reset(); } void PrintViewManagerElectron::GetDefaultPrintSettings( @@ -201,7 +199,7 @@ void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() { return; } - ReleaseJob(INVALID_PRINTER_SETTINGS); + FailJob(kInvalidPrinterSettings); } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -248,12 +246,7 @@ void PrintViewManagerElectron::RenderFrameDeleted( if (printing_rfh_ != render_frame_host) return; - if (callback_) { - std::move(callback_).Run(PRINTING_FAILED, - base::MakeRefCounted()); - } - - Reset(); + FailJob(kPrintFailure); } void PrintViewManagerElectron::DidGetPrintedPagesCount(int32_t cookie, @@ -270,17 +263,14 @@ void PrintViewManagerElectron::Reset() { data_.clear(); } -void PrintViewManagerElectron::ReleaseJob(PrintResult result) { +void PrintViewManagerElectron::FailJob(PrintResult result) { + DCHECK_NE(result, kPrintSuccess); if (callback_) { - DCHECK(result == PRINT_SUCCESS || data_.empty()); std::move(callback_).Run(result, - base::RefCountedString::TakeString(&data_)); - if (printing_rfh_ && printing_rfh_->IsRenderFrameLive()) { - GetPrintRenderFrame(printing_rfh_)->PrintingDone(result == PRINT_SUCCESS); - } - - Reset(); + base::MakeRefCounted()); } + + Reset(); } WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintViewManagerElectron); diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index bf244a522ac2b..733e41ac4d748 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -26,17 +26,17 @@ class PrintViewManagerElectron public content::WebContentsUserData { public: enum PrintResult { - PRINT_SUCCESS, - PRINTING_FAILED, - INVALID_PRINTER_SETTINGS, - INVALID_MEMORY_HANDLE, - METAFILE_MAP_ERROR, - METAFILE_INVALID_HEADER, - METAFILE_GET_DATA_ERROR, - SIMULTANEOUS_PRINT_ACTIVE, - PAGE_RANGE_SYNTAX_ERROR, - PAGE_RANGE_INVALID_RANGE, - PAGE_COUNT_EXCEEDED, + kPrintSuccess, + kPrintFailure, + kInvalidPrinterSettings, + kInvalidMemoryHandle, + kMetafileMapError, + kMetafileInvalidHeader, + kMetafileGetDataError, + kSimultaneousPrintActive, + kPageRangeSyntaxError, + kPageRangeInvalidRange, + kPageCountExceeded, }; using PrintToPDFCallback = @@ -91,8 +91,8 @@ class PrintViewManagerElectron CheckForCancelCallback callback) override; #endif + void FailJob(PrintResult result); void Reset(); - void ReleaseJob(PrintResult result); raw_ptr printing_rfh_ = nullptr; PrintToPDFCallback callback_; diff --git a/shell/browser/special_storage_policy.cc b/shell/browser/special_storage_policy.cc index 37ab036c7969a..351e831bef995 100644 --- a/shell/browser/special_storage_policy.cc +++ b/shell/browser/special_storage_policy.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback.h" +#include "services/network/public/cpp/session_cookie_delete_predicate.h" namespace electron { @@ -37,9 +38,4 @@ bool SpecialStoragePolicy::HasSessionOnlyOrigins() { return false; } -network::DeleteCookiePredicate -SpecialStoragePolicy::CreateDeleteCookieOnExitPredicate() { - return network::DeleteCookiePredicate(); -} - } // namespace electron diff --git a/shell/browser/special_storage_policy.h b/shell/browser/special_storage_policy.h index aa0ac9cca583d..30aa4bd54fb5a 100644 --- a/shell/browser/special_storage_policy.h +++ b/shell/browser/special_storage_policy.h @@ -20,7 +20,6 @@ class SpecialStoragePolicy : public storage::SpecialStoragePolicy { bool HasIsolatedStorage(const GURL& origin) override; bool IsStorageSessionOnly(const GURL& origin) override; bool HasSessionOnlyOrigins() override; - network::DeleteCookiePredicate CreateDeleteCookieOnExitPredicate() override; protected: ~SpecialStoragePolicy() override; diff --git a/shell/browser/ui/accelerator_util.cc b/shell/browser/ui/accelerator_util.cc index c9c5fb511e824..c40f10bead1e5 100644 --- a/shell/browser/ui/accelerator_util.cc +++ b/shell/browser/ui/accelerator_util.cc @@ -71,8 +71,8 @@ bool StringToAccelerator(const std::string& shortcut, void GenerateAcceleratorTable(AcceleratorTable* table, electron::ElectronMenuModel* model) { - int count = model->GetItemCount(); - for (int i = 0; i < count; ++i) { + size_t count = model->GetItemCount(); + for (size_t i = 0; i < count; ++i) { electron::ElectronMenuModel::ItemType type = model->GetTypeAt(i); if (type == electron::ElectronMenuModel::TYPE_SUBMENU) { auto* submodel = model->GetSubmenuModelAt(i); diff --git a/shell/browser/ui/accelerator_util.h b/shell/browser/ui/accelerator_util.h index c573aeaab2260..35c44869aa6b6 100644 --- a/shell/browser/ui/accelerator_util.h +++ b/shell/browser/ui/accelerator_util.h @@ -14,7 +14,7 @@ namespace accelerator_util { typedef struct { - int position; + size_t position; electron::ElectronMenuModel* model; } MenuItem; typedef std::map AcceleratorTable; diff --git a/shell/browser/ui/electron_menu_model.cc b/shell/browser/ui/electron_menu_model.cc index 23e0dd079327f..3f305cb515ed3 100644 --- a/shell/browser/ui/electron_menu_model.cc +++ b/shell/browser/ui/electron_menu_model.cc @@ -27,42 +27,43 @@ ElectronMenuModel::ElectronMenuModel(Delegate* delegate) ElectronMenuModel::~ElectronMenuModel() = default; -void ElectronMenuModel::SetToolTip(int index, const std::u16string& toolTip) { +void ElectronMenuModel::SetToolTip(size_t index, + const std::u16string& toolTip) { int command_id = GetCommandIdAt(index); toolTips_[command_id] = toolTip; } -std::u16string ElectronMenuModel::GetToolTipAt(int index) { +std::u16string ElectronMenuModel::GetToolTipAt(size_t index) { const int command_id = GetCommandIdAt(index); const auto iter = toolTips_.find(command_id); return iter == std::end(toolTips_) ? std::u16string() : iter->second; } -void ElectronMenuModel::SetRole(int index, const std::u16string& role) { +void ElectronMenuModel::SetRole(size_t index, const std::u16string& role) { int command_id = GetCommandIdAt(index); roles_[command_id] = role; } -std::u16string ElectronMenuModel::GetRoleAt(int index) { +std::u16string ElectronMenuModel::GetRoleAt(size_t index) { const int command_id = GetCommandIdAt(index); const auto iter = roles_.find(command_id); return iter == std::end(roles_) ? std::u16string() : iter->second; } -void ElectronMenuModel::SetSecondaryLabel(int index, +void ElectronMenuModel::SetSecondaryLabel(size_t index, const std::u16string& sublabel) { int command_id = GetCommandIdAt(index); sublabels_[command_id] = sublabel; } -std::u16string ElectronMenuModel::GetSecondaryLabelAt(int index) const { +std::u16string ElectronMenuModel::GetSecondaryLabelAt(size_t index) const { int command_id = GetCommandIdAt(index); const auto iter = sublabels_.find(command_id); return iter == std::end(sublabels_) ? std::u16string() : iter->second; } bool ElectronMenuModel::GetAcceleratorAtWithParams( - int index, + size_t index, bool use_default_accelerator, ui::Accelerator* accelerator) const { if (delegate_) { @@ -72,7 +73,7 @@ bool ElectronMenuModel::GetAcceleratorAtWithParams( return false; } -bool ElectronMenuModel::ShouldRegisterAcceleratorAt(int index) const { +bool ElectronMenuModel::ShouldRegisterAcceleratorAt(size_t index) const { if (delegate_) { return delegate_->ShouldRegisterAcceleratorForCommandId( GetCommandIdAt(index)); @@ -80,7 +81,7 @@ bool ElectronMenuModel::ShouldRegisterAcceleratorAt(int index) const { return true; } -bool ElectronMenuModel::WorksWhenHiddenAt(int index) const { +bool ElectronMenuModel::WorksWhenHiddenAt(size_t index) const { if (delegate_) { return delegate_->ShouldCommandIdWorkWhenHidden(GetCommandIdAt(index)); } @@ -88,7 +89,8 @@ bool ElectronMenuModel::WorksWhenHiddenAt(int index) const { } #if BUILDFLAG(IS_MAC) -bool ElectronMenuModel::GetSharingItemAt(int index, SharingItem* item) const { +bool ElectronMenuModel::GetSharingItemAt(size_t index, + SharingItem* item) const { if (delegate_) return delegate_->GetSharingItemForCommandId(GetCommandIdAt(index), item); return false; @@ -118,7 +120,7 @@ void ElectronMenuModel::MenuWillShow() { } } -ElectronMenuModel* ElectronMenuModel::GetSubmenuModelAt(int index) { +ElectronMenuModel* ElectronMenuModel::GetSubmenuModelAt(size_t index) { return static_cast( ui::SimpleMenuModel::GetSubmenuModelAt(index)); } diff --git a/shell/browser/ui/electron_menu_model.h b/shell/browser/ui/electron_menu_model.h index 355a3f7040927..63999ad1614ba 100644 --- a/shell/browser/ui/electron_menu_model.h +++ b/shell/browser/ui/electron_menu_model.h @@ -81,20 +81,20 @@ class ElectronMenuModel : public ui::SimpleMenuModel { void AddObserver(Observer* obs) { observers_.AddObserver(obs); } void RemoveObserver(Observer* obs) { observers_.RemoveObserver(obs); } - void SetToolTip(int index, const std::u16string& toolTip); - std::u16string GetToolTipAt(int index); - void SetRole(int index, const std::u16string& role); - std::u16string GetRoleAt(int index); - void SetSecondaryLabel(int index, const std::u16string& sublabel); - std::u16string GetSecondaryLabelAt(int index) const override; - bool GetAcceleratorAtWithParams(int index, + void SetToolTip(size_t index, const std::u16string& toolTip); + std::u16string GetToolTipAt(size_t index); + void SetRole(size_t index, const std::u16string& role); + std::u16string GetRoleAt(size_t index); + void SetSecondaryLabel(size_t index, const std::u16string& sublabel); + std::u16string GetSecondaryLabelAt(size_t index) const override; + bool GetAcceleratorAtWithParams(size_t index, bool use_default_accelerator, ui::Accelerator* accelerator) const; - bool ShouldRegisterAcceleratorAt(int index) const; - bool WorksWhenHiddenAt(int index) const; + bool ShouldRegisterAcceleratorAt(size_t index) const; + bool WorksWhenHiddenAt(size_t index) const; #if BUILDFLAG(IS_MAC) // Return the SharingItem of menu item. - bool GetSharingItemAt(int index, SharingItem* item) const; + bool GetSharingItemAt(size_t index, SharingItem* item) const; // Set/Get the SharingItem of this menu. void SetSharingItem(SharingItem item); const absl::optional& GetSharingItem() const; @@ -109,7 +109,7 @@ class ElectronMenuModel : public ui::SimpleMenuModel { } using SimpleMenuModel::GetSubmenuModelAt; - ElectronMenuModel* GetSubmenuModelAt(int index); + ElectronMenuModel* GetSubmenuModelAt(size_t index); private: Delegate* delegate_; // weak ref. diff --git a/shell/browser/ui/gtk/menu_util.cc b/shell/browser/ui/gtk/menu_util.cc index 964099d690735..08f16d2e754ee 100644 --- a/shell/browser/ui/gtk/menu_util.cc +++ b/shell/browser/ui/gtk/menu_util.cc @@ -150,7 +150,7 @@ void ExecuteCommand(ui::MenuModel* model, int id) { if (event && event->type == GDK_BUTTON_RELEASE) event_flags = EventFlagsFromGdkState(event->button.state); - model->ActivatedAt(id, event_flags); + model->ActivatedAt(static_cast(id), event_flags); if (event) gdk_event_free(event); @@ -163,7 +163,7 @@ void BuildSubmenuFromModel(ui::MenuModel* model, void* this_ptr) { std::map radio_groups; GtkWidget* menu_item = nullptr; - for (int i = 0; i < model->GetItemCount(); ++i) { + for (size_t i = 0; i < model->GetItemCount(); ++i) { std::string label = ui::ConvertAcceleratorsFromWindowsStyle( base::UTF16ToUTF8(model->GetLabelAt(i))); diff --git a/shell/browser/ui/views/global_menu_bar_x11.cc b/shell/browser/ui/views/global_menu_bar_x11.cc index 27f90b94b46cf..785a59866faf2 100644 --- a/shell/browser/ui/views/global_menu_bar_x11.cc +++ b/shell/browser/ui/views/global_menu_bar_x11.cc @@ -143,7 +143,7 @@ ElectronMenuModel* ModelForMenuItem(DbusmenuMenuitem* item) { g_object_get_data(G_OBJECT(item), "model")); } -bool GetMenuItemID(DbusmenuMenuitem* item, int* id) { +bool GetMenuItemID(DbusmenuMenuitem* item, size_t* id) { gpointer id_ptr = g_object_get_data(G_OBJECT(item), "menu-id"); if (id_ptr != nullptr) { *id = GPOINTER_TO_INT(id_ptr) - 1; @@ -162,7 +162,7 @@ void SetMenuItemID(DbusmenuMenuitem* item, int id) { std::string GetMenuModelStatus(ElectronMenuModel* model) { std::string ret; - for (int i = 0; i < model->GetItemCount(); ++i) { + for (size_t i = 0; i < model->GetItemCount(); ++i) { int status = model->GetTypeAt(i) | (model->IsVisibleAt(i) << 3) | (model->IsEnabledAt(i) << 4) | (model->IsItemCheckedAt(i) << 5); @@ -231,7 +231,7 @@ void GlobalMenuBarX11::OnWindowUnmapped() { void GlobalMenuBarX11::BuildMenuFromModel(ElectronMenuModel* model, DbusmenuMenuitem* parent) { - for (int i = 0; i < model->GetItemCount(); ++i) { + for (size_t i = 0; i < model->GetItemCount(); ++i) { DbusmenuMenuitem* item = menuitem_new(); menuitem_property_set_bool(item, kPropertyVisible, model->IsVisibleAt(i)); @@ -309,14 +309,14 @@ void GlobalMenuBarX11::RegisterAccelerator(DbusmenuMenuitem* item, void GlobalMenuBarX11::OnItemActivated(DbusmenuMenuitem* item, unsigned int timestamp) { - int id; + size_t id; ElectronMenuModel* model = ModelForMenuItem(item); if (model && GetMenuItemID(item, &id)) model->ActivatedAt(id, 0); } void GlobalMenuBarX11::OnSubMenuShow(DbusmenuMenuitem* item) { - int id; + size_t id; ElectronMenuModel* model = ModelForMenuItem(item); if (!model || !GetMenuItemID(item, &id)) return; diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index b8d254ee665a6..7a0ba8139e1f0 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -81,7 +81,7 @@ void MenuBar::ActivateAccelerator(char16_t key) { static_cast(child)->Activate(nullptr); } -int MenuBar::GetItemCount() const { +size_t MenuBar::GetItemCount() const { return menu_model_ ? menu_model_->GetItemCount() : 0; } @@ -92,7 +92,7 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint, return false; auto children = GetChildrenInZOrder(); - for (int i = 0, n = children.size(); i < n; ++i) { + for (size_t i = 0, n = children.size(); i < n; ++i) { if (children[i]->GetBoundsInScreen().Contains(screenPoint) && (menu_model_->GetTypeAt(i) == ElectronMenuModel::TYPE_SUBMENU)) { *menu_model = menu_model_->GetSubmenuModelAt(i); @@ -174,7 +174,7 @@ const char* MenuBar::GetClassName() const { return kViewClassName; } -void MenuBar::ButtonPressed(int id, const ui::Event& event) { +void MenuBar::ButtonPressed(size_t id, const ui::Event& event) { // Hide the accelerator when a submenu is activated. SetAcceleratorVisibility(pane_has_focus()); @@ -193,7 +193,8 @@ void MenuBar::ButtonPressed(int id, const ui::Event& event) { SubmenuButton* source = nullptr; for (auto* child : children()) { auto* button = static_cast(child); - if (button->GetID() == id) { + int button_id = button->GetID(); + if (button_id >= 0 && static_cast(button_id) == id) { source = button; break; } @@ -222,7 +223,7 @@ void MenuBar::RefreshColorCache(const ui::NativeTheme* theme) { void MenuBar::RebuildChildren() { RemoveAllChildViews(); - for (int i = 0, n = GetItemCount(); i < n; ++i) { + for (size_t i = 0, n = GetItemCount(); i < n; ++i) { auto* button = new SubmenuButton( base::BindRepeating(&MenuBar::ButtonPressed, base::Unretained(this), i), menu_model_->GetLabelAt(i), background_color_); diff --git a/shell/browser/ui/views/menu_bar.h b/shell/browser/ui/views/menu_bar.h index 4ef178538a6ca..91546fb33cc55 100644 --- a/shell/browser/ui/views/menu_bar.h +++ b/shell/browser/ui/views/menu_bar.h @@ -43,7 +43,7 @@ class MenuBar : public views::AccessiblePaneView, void ActivateAccelerator(char16_t key); // Returns there are how many items in the root menu. - int GetItemCount() const; + size_t GetItemCount() const; // Get the menu under specified screen point. bool GetMenuButtonFromScreenPoint(const gfx::Point& point, @@ -71,7 +71,7 @@ class MenuBar : public views::AccessiblePaneView, const char* GetClassName() const override; void GetAccessibleNodeData(ui::AXNodeData* node_data) override; - void ButtonPressed(int id, const ui::Event& event); + void ButtonPressed(size_t id, const ui::Event& event); void RebuildChildren(); void UpdateViewColors(); diff --git a/shell/browser/ui/views/menu_model_adapter.cc b/shell/browser/ui/views/menu_model_adapter.cc index be8083833d01d..99958ffaaa793 100644 --- a/shell/browser/ui/views/menu_model_adapter.cc +++ b/shell/browser/ui/views/menu_model_adapter.cc @@ -14,7 +14,7 @@ MenuModelAdapter::~MenuModelAdapter() = default; bool MenuModelAdapter::GetAccelerator(int id, ui::Accelerator* accelerator) const { ui::MenuModel* model = menu_model_; - int index = 0; + size_t index = 0; if (ui::MenuModel::GetModelAndIndexForCommandId(id, &model, &index)) { return static_cast(model)->GetAcceleratorAtWithParams( index, true, accelerator); diff --git a/shell/renderer/browser_exposed_renderer_interfaces.cc b/shell/renderer/browser_exposed_renderer_interfaces.cc index 55781e58edd5d..04e82d7daa2b9 100644 --- a/shell/renderer/browser_exposed_renderer_interfaces.cc +++ b/shell/renderer/browser_exposed_renderer_interfaces.cc @@ -33,7 +33,8 @@ void ExposeElectronRendererInterfacesToBrowser( electron::RendererClientBase* client, mojo::BinderMap* binders) { #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) - binders->Add(base::BindRepeating(&BindSpellChecker, client), - base::SequencedTaskRunnerHandle::Get()); + binders->Add( + base::BindRepeating(&BindSpellChecker, client), + base::SequencedTaskRunnerHandle::Get()); #endif } diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index 5c4f0d248fcdd..3fbdf4e5bbb50 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -8,6 +8,7 @@ #include #include "base/command_line.h" +#include "base/memory/ref_counted_memory.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" #include "content/public/renderer/render_frame.h" diff --git a/shell/utility/electron_content_utility_client.cc b/shell/utility/electron_content_utility_client.cc index c53e537dad067..0a711e13e8497 100644 --- a/shell/utility/electron_content_utility_client.cc +++ b/shell/utility/electron_content_utility_client.cc @@ -94,7 +94,7 @@ void ElectronContentUtilityClient::ExposeInterfacesToBrowser( // interfaces to the BinderMap. if (!utility_process_running_elevated_) { #if BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(IS_WIN) - binders->Add( + binders->Add( base::BindRepeating(printing::PdfToEmfConverterFactory::Create), base::ThreadTaskRunnerHandle::Get()); #endif From 63fe34c703e903eff273beb832b896258a3be991 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:18:11 +0900 Subject: [PATCH 689/811] build: fix export patches to work when source directory does not exist (#35437) Co-authored-by: John Kleinschmidt --- script/lib/git.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/lib/git.py b/script/lib/git.py index aa3adb16158c1..93e61e6757ad4 100644 --- a/script/lib/git.py +++ b/script/lib/git.py @@ -238,6 +238,11 @@ def to_utf8(patch): def export_patches(repo, out_dir, patch_range=None, dry_run=False): + if not os.path.exists(repo): + sys.stderr.write( + "Skipping patches in {} because it does not exist.\n".format(repo) + ) + return if patch_range is None: patch_range, num_patches = guess_base_commit(repo) sys.stderr.write("Exporting {} patches in {} since {}\n".format( From a3cfd1a206934b3c5f0ee0be8c2e1457861ba5f7 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:08:20 +0200 Subject: [PATCH 690/811] fix: Node.js `atob` input validation (#35443) fix: Node.js atob input validation Co-authored-by: Shelley Vohr --- patches/node/.patches | 1 + .../buffer_fix_atob_input_validation.patch | 89 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 patches/node/buffer_fix_atob_input_validation.patch diff --git a/patches/node/.patches b/patches/node/.patches index d035735890958..0f1d131df59fa 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -47,3 +47,4 @@ support_v8_sandboxed_pointers.patch build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch build_ensure_native_module_compilation_fails_if_not_using_a_new.patch fix_override_createjob_in_node_platform.patch +buffer_fix_atob_input_validation.patch diff --git a/patches/node/buffer_fix_atob_input_validation.patch b/patches/node/buffer_fix_atob_input_validation.patch new file mode 100644 index 0000000000000..a4285f7b7223e --- /dev/null +++ b/patches/node/buffer_fix_atob_input_validation.patch @@ -0,0 +1,89 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Tue, 23 Aug 2022 11:13:45 +0200 +Subject: buffer: fix `atob` input validation + +This patch combines: + +* https://github.com/nodejs/node/pull/42539 +* https://github.com/nodejs/node/pull/42662 + +To bring the Node.js implementation of atob into alignment with the +WHATWG spec. + +diff --git a/lib/buffer.js b/lib/buffer.js +index 57d6cddbaa2e6bdd846a667897588dea18daeb42..7602d4049e9bb1c09440bc3af09ad5ad9c768308 100644 +--- a/lib/buffer.js ++++ b/lib/buffer.js +@@ -23,8 +23,10 @@ + + const { + Array, ++ ArrayFrom, + ArrayIsArray, + ArrayPrototypeForEach, ++ ArrayPrototypeIndexOf, + MathFloor, + MathMin, + MathTrunc, +@@ -1231,8 +1233,25 @@ function btoa(input) { + return buf.toString('base64'); + } + +-const kBase64Digits = +- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; ++// Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode ++const kForgivingBase64AllowedChars = [ ++ // ASCII whitespace ++ // Refs: https://infra.spec.whatwg.org/#ascii-whitespace ++ 0x09, 0x0A, 0x0C, 0x0D, 0x20, ++ ++ // Uppercase letters ++ ...ArrayFrom({ length: 26 }, (_, i) => StringPrototypeCharCodeAt('A') + i), ++ ++ // Lowercase letters ++ ...ArrayFrom({ length: 26 }, (_, i) => StringPrototypeCharCodeAt('a') + i), ++ ++ // Decimal digits ++ ...ArrayFrom({ length: 10 }, (_, i) => StringPrototypeCharCodeAt('0') + i), ++ ++ 0x2B, // + ++ 0x2F, // / ++ 0x3D, // = ++]; + + function atob(input) { + // The implementation here has not been performance optimized in any way and +@@ -1241,11 +1260,31 @@ function atob(input) { + if (arguments.length === 0) { + throw new ERR_MISSING_ARGS('input'); + } ++ + input = `${input}`; ++ let nonAsciiWhitespaceCharCount = 0; ++ + for (let n = 0; n < input.length; n++) { +- if (!kBase64Digits.includes(input[n])) ++ const index = ArrayPrototypeIndexOf( ++ kForgivingBase64AllowedChars, ++ StringPrototypeCharCodeAt(input, n)); ++ ++ if (index > 4) { ++ // The first 5 elements of `kForgivingBase64AllowedChars` are ++ // ASCII whitespace char codes. ++ nonAsciiWhitespaceCharCount++; ++ } else if (index === -1) { + throw lazyDOMException('Invalid character', 'InvalidCharacterError'); ++ } + } ++ ++ // See #3 - https://infra.spec.whatwg.org/#forgiving-base64 ++ if (nonAsciiWhitespaceCharCount % 4 === 1) { ++ throw lazyDOMException( ++ 'The string to be decoded is not correctly encoded.', ++ 'InvalidCharacterError'); ++ } ++ + return Buffer.from(input, 'base64').toString('latin1'); + } + From 0ad176fd13d8de3b0d08c3587469256bd6d01278 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:52:24 +0200 Subject: [PATCH 691/811] fix: fullscreen crashing with `roundedCorners: false` (#35454) fix: fullscreen crashing with roundedCorners Co-authored-by: Shelley Vohr --- docs/api/browser-window.md | 3 ++- shell/browser/native_window_mac.mm | 5 ++++- spec-main/api-browser-window-spec.ts | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index e5fd4045803a2..16a005cd35706 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -246,7 +246,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `trafficLightPosition` [Point](structures/point.md) (optional) _macOS_ - Set a custom position for the traffic light buttons in frameless windows. * `roundedCorners` boolean (optional) _macOS_ - Whether frameless window - should have rounded corners on macOS. Default is `true`. + should have rounded corners on macOS. Default is `true`. Setting this property + to `false` will prevent the window from being fullscreenable. * `fullscreenWindowTitle` boolean (optional) _macOS_ _Deprecated_ - Shows the title in the title bar in full screen mode on macOS for `hiddenInset` titleBarStyle. Default is `false`. diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index f535844af4712..2bb5e3a4c5064 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -299,7 +299,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { bool rounded_corner = true; options.Get(options::kRoundedCorners, &rounded_corner); if (!rounded_corner && !has_frame()) - styleMask = 0; + styleMask = NSWindowStyleMaskBorderless; if (minimizable) styleMask |= NSWindowStyleMaskMiniaturizable; @@ -691,6 +691,9 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { } void NativeWindowMac::SetFullScreen(bool fullscreen) { + if (!has_frame() && !HasStyleMask(NSWindowStyleMaskTitled)) + return; + // [NSWindow -toggleFullScreen] is an asynchronous operation, which means // that it's possible to call it while a fullscreen transition is currently // in process. This can create weird behavior (incl. phantom windows), diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 6be93a0fea768..a55316e21d31d 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1450,6 +1450,11 @@ describe('BrowserWindow module', () => { expect(w.fullScreen).to.be.true(); }); + it('does not go fullscreen if roundedCorners are enabled', async () => { + w = new BrowserWindow({ frame: false, roundedCorners: false, fullscreen: true }); + expect(w.fullScreen).to.be.false(); + }); + it('can be changed', () => { w.fullScreen = false; expect(w.fullScreen).to.be.false(); From 38d408a26b5326bb69f96c65746829dce67655b8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:52:53 +0200 Subject: [PATCH 692/811] fix: pass rfh instances through to the permission helper (#35467) * fix: pass rfh instances through to the permission helper * refactor: use WeakDocumentPtr instead of frame node id * fix: handle missing initiator document * fix: dispatch openExternal event for top level webview navs still Co-authored-by: Samuel Attard --- docs/api/session.md | 2 +- shell/browser/api/electron_api_web_contents.cc | 2 +- shell/browser/electron_browser_client.cc | 18 ++++++++++++++++-- .../browser/web_contents_permission_helper.cc | 17 +++++++++++++---- shell/browser/web_contents_permission_helper.h | 10 +++++++--- 5 files changed, 38 insertions(+), 11 deletions(-) diff --git a/docs/api/session.md b/docs/api/session.md index f405d133ba523..93f11522be042 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -635,7 +635,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => { * `notifications` - Request notification creation and the ability to display them in the user's system tray. * `midi` - Request MIDI access in the `webmidi` API. * `midiSysex` - Request the use of system exclusive messages in the `webmidi` API. - * `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. + * `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. These requests always appear to originate from the main frame. * `fullscreen` - Request for the app to enter fullscreen mode. * `openExternal` - Request to open links in external applications. * `unknown` - An unrecognized permission request diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 21b96159fb493..7415e0c5d00f9 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1311,7 +1311,7 @@ void WebContents::EnterFullscreenModeForTab( auto callback = base::BindRepeating(&WebContents::OnEnterFullscreenModeForTab, base::Unretained(this), requesting_frame, options); - permission_helper->RequestFullscreenPermission(callback); + permission_helper->RequestFullscreenPermission(requesting_frame, callback); } void WebContents::OnEnterFullscreenModeForTab( diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 546dc7e6fdcb4..141f04da18110 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -49,6 +49,7 @@ #include "content/public/browser/tts_controller.h" #include "content/public/browser/tts_platform.h" #include "content/public/browser/url_loader_request_interceptor.h" +#include "content/public/browser/weak_document_ptr.h" #include "content/public/common/content_descriptors.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" @@ -987,7 +988,7 @@ void ElectronBrowserClient::WebNotificationAllowed( return; } permission_helper->RequestWebNotificationPermission( - base::BindOnce(std::move(callback), web_contents->IsAudioMuted())); + rfh, base::BindOnce(std::move(callback), web_contents->IsAudioMuted())); } void ElectronBrowserClient::RenderProcessHostDestroyed( @@ -1022,6 +1023,7 @@ void OnOpenExternal(const GURL& escaped_url, bool allowed) { void HandleExternalProtocolInUI( const GURL& url, + content::WeakDocumentPtr document_ptr, content::WebContents::OnceGetter web_contents_getter, bool has_user_gesture) { content::WebContents* web_contents = std::move(web_contents_getter).Run(); @@ -1033,9 +1035,18 @@ void HandleExternalProtocolInUI( if (!permission_helper) return; + content::RenderFrameHost* rfh = document_ptr.AsRenderFrameHostIfValid(); + if (!rfh) { + // If the render frame host is not valid it means it was a top level + // navigation and the frame has already been disposed of. In this case we + // take the current main frame and declare it responsible for the + // transition. + rfh = web_contents->GetPrimaryMainFrame(); + } + GURL escaped_url(base::EscapeExternalHandlerValue(url.spec())); auto callback = base::BindOnce(&OnOpenExternal, escaped_url); - permission_helper->RequestOpenExternalPermission(std::move(callback), + permission_helper->RequestOpenExternalPermission(rfh, std::move(callback), has_user_gesture, url); } @@ -1055,6 +1066,9 @@ bool ElectronBrowserClient::HandleExternalProtocol( content::GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(&HandleExternalProtocolInUI, url, + initiator_document + ? initiator_document->GetWeakDocumentPtr() + : content::WeakDocumentPtr(), std::move(web_contents_getter), has_user_gesture)); return true; } diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 49dcfc1a1c6cd..31d32cf53ddb4 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -149,16 +149,16 @@ WebContentsPermissionHelper::WebContentsPermissionHelper( WebContentsPermissionHelper::~WebContentsPermissionHelper() = default; void WebContentsPermissionHelper::RequestPermission( + content::RenderFrameHost* requesting_frame, blink::PermissionType permission, base::OnceCallback callback, bool user_gesture, base::Value::Dict details) { - auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); permission_manager->RequestPermissionWithDetails( - permission, rfh, origin, false, std::move(details), + permission, requesting_frame, origin, false, std::move(details), base::BindOnce(&OnPermissionResponse, std::move(callback))); } @@ -174,8 +174,10 @@ bool WebContentsPermissionHelper::CheckPermission( } void WebContentsPermissionHelper::RequestFullscreenPermission( + content::RenderFrameHost* requesting_frame, base::OnceCallback callback) { RequestPermission( + requesting_frame, static_cast(PermissionType::FULLSCREEN), std::move(callback)); } @@ -201,13 +203,17 @@ void WebContentsPermissionHelper::RequestMediaAccessPermission( // The permission type doesn't matter here, AUDIO_CAPTURE/VIDEO_CAPTURE // are presented as same type in content_converter.h. - RequestPermission(blink::PermissionType::AUDIO_CAPTURE, std::move(callback), + RequestPermission(content::RenderFrameHost::FromID(request.render_process_id, + request.render_frame_id), + blink::PermissionType::AUDIO_CAPTURE, std::move(callback), false, std::move(details)); } void WebContentsPermissionHelper::RequestWebNotificationPermission( + content::RenderFrameHost* requesting_frame, base::OnceCallback callback) { - RequestPermission(blink::PermissionType::NOTIFICATIONS, std::move(callback)); + RequestPermission(requesting_frame, blink::PermissionType::NOTIFICATIONS, + std::move(callback)); } void WebContentsPermissionHelper::RequestPointerLockPermission( @@ -216,6 +222,7 @@ void WebContentsPermissionHelper::RequestPointerLockPermission( base::OnceCallback callback) { RequestPermission( + web_contents_->GetPrimaryMainFrame(), static_cast(PermissionType::POINTER_LOCK), base::BindOnce(std::move(callback), web_contents_, user_gesture, last_unlocked_by_target), @@ -223,12 +230,14 @@ void WebContentsPermissionHelper::RequestPointerLockPermission( } void WebContentsPermissionHelper::RequestOpenExternalPermission( + content::RenderFrameHost* requesting_frame, base::OnceCallback callback, bool user_gesture, const GURL& url) { base::Value::Dict details; details.Set("externalURL", url.spec()); RequestPermission( + requesting_frame, static_cast(PermissionType::OPEN_EXTERNAL), std::move(callback), user_gesture, std::move(details)); } diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 2f0012837ffd5..43a5ca63ec307 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -33,7 +33,8 @@ class WebContentsPermissionHelper }; // Asynchronous Requests - void RequestFullscreenPermission(base::OnceCallback callback); + void RequestFullscreenPermission(content::RenderFrameHost* requesting_frame, + base::OnceCallback callback); void RequestMediaAccessPermission(const content::MediaStreamRequest& request, content::MediaResponseCallback callback); void RequestPointerLockPermission( @@ -42,8 +43,10 @@ class WebContentsPermissionHelper base::OnceCallback callback); void RequestWebNotificationPermission( + content::RenderFrameHost* requesting_frame, base::OnceCallback callback); - void RequestOpenExternalPermission(base::OnceCallback callback, + void RequestOpenExternalPermission(content::RenderFrameHost* requesting_frame, + base::OnceCallback callback, bool user_gesture, const GURL& url); @@ -56,7 +59,8 @@ class WebContentsPermissionHelper explicit WebContentsPermissionHelper(content::WebContents* web_contents); friend class content::WebContentsUserData; - void RequestPermission(blink::PermissionType permission, + void RequestPermission(content::RenderFrameHost* requesting_frame, + blink::PermissionType permission, base::OnceCallback callback, bool user_gesture = false, base::Value::Dict details = {}); From 0e7973340435bd953f6d1f69f42e3493fa825fe3 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 12:28:21 +0200 Subject: [PATCH 693/811] docs: update docs description to match sidebar (#35482) Update introduction.md Co-authored-by: Nik K --- 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 7d669ecb9f5a3..581435524079c 100644 --- a/docs/tutorial/introduction.md +++ b/docs/tutorial/introduction.md @@ -47,7 +47,7 @@ are the different categories and what you can expect on each one: - **Examples**: Quick references to add features to your Electron app. - **Development**: Miscellaneous development guides. - **Distribution**: Learn how to distribute your app to end users. -- **Testing and debugging**: How to debug JavaScript, write tests, and other tools used +- **Testing And Debugging**: How to debug JavaScript, write tests, and other tools used to create quality Electron applications. - **References**: Useful links to better understand how the Electron project works and is organized. From 4ab9295e62dca5afd006fa052907bce9775ae01c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:25:38 +0200 Subject: [PATCH 694/811] chore: delete implicit fallthrough patch (#35469) Co-authored-by: Shelley Vohr --- patches/node/.patches | 1 - .../chore_fix_-wimplicit-fallthrough.patch | 76 ------------------- 2 files changed, 77 deletions(-) delete mode 100644 patches/node/chore_fix_-wimplicit-fallthrough.patch diff --git a/patches/node/.patches b/patches/node/.patches index 0f1d131df59fa..72c5a5b2d6a7d 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -16,7 +16,6 @@ fix_crypto_tests_to_run_with_bssl.patch fix_account_for_debugger_agent_race_condition.patch repl_fix_crash_when_sharedarraybuffer_disabled.patch fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch -chore_fix_-wimplicit-fallthrough.patch fix_crash_caused_by_gethostnamew_on_windows_7.patch fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch fix_serdes_test.patch diff --git a/patches/node/chore_fix_-wimplicit-fallthrough.patch b/patches/node/chore_fix_-wimplicit-fallthrough.patch deleted file mode 100644 index 41f961ad0e5c9..0000000000000 --- a/patches/node/chore_fix_-wimplicit-fallthrough.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Mon, 11 Oct 2021 13:46:24 +0200 -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 8bfecba74d4d90e9fbf0e2cd301118e4adc6cba8..63e1149f0c4a39cb944114e5824d6074343301e8 100644 ---- a/deps/nghttp2/BUILD.gn -+++ b/deps/nghttp2/BUILD.gn -@@ -16,7 +16,6 @@ static_library("nghttp2") { - - cflags_c = [ - "-Wno-implicit-function-declaration", -- "-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 30ee9b88920c0a0bb8f8b714e3deabe0207cac40..010edf48f614c23e971df0f37716275cc1656469 100644 ---- a/deps/nghttp2/lib/nghttp2_hd.c -+++ b/deps/nghttp2/lib/nghttp2_hd.c -@@ -1892,7 +1892,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, - rv = NGHTTP2_ERR_HEADER_COMP; - goto fail; - } -- /* fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_HD_STATE_INFLATE_START: - case NGHTTP2_HD_STATE_OPCODE: - if ((*in & 0xe0u) == 0x20u) { -@@ -2002,7 +2002,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, - inflater->left = 0; - inflater->shift = 0; - DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); -- /* Fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN: - rfin = 0; - rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); -@@ -2086,7 +2086,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, - inflater->left = 0; - inflater->shift = 0; - DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); -- /* Fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_HD_STATE_READ_VALUELEN: - rfin = 0; - rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); -diff --git a/deps/nghttp2/lib/nghttp2_session.c b/deps/nghttp2/lib/nghttp2_session.c -index 380a47c1b1e82b015c271e2818aed0baf982aa2d..2f3997709cd07f6f8294f985f60b2e1e4b85a2cf 100644 ---- a/deps/nghttp2/lib/nghttp2_session.c -+++ b/deps/nghttp2/lib/nghttp2_session.c -@@ -2644,10 +2644,10 @@ static int session_after_frame_sent1(nghttp2_session *session) { - case NGHTTP2_HCAT_PUSH_RESPONSE: - stream->flags = (uint8_t)(stream->flags & ~NGHTTP2_STREAM_FLAG_PUSH); - ++session->num_outgoing_streams; -- /* Fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_HCAT_RESPONSE: - stream->state = NGHTTP2_STREAM_OPENED; -- /* Fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_HCAT_HEADERS: - if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { - nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR); -@@ -5456,7 +5456,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in, - - iframe->state = NGHTTP2_IB_READ_HEAD; - -- /* Fall through */ -+ __attribute__((fallthrough)); - case NGHTTP2_IB_READ_HEAD: { - int on_begin_frame_called = 0; - From c8b3e23f31b72d2fa91607f86b121b407cbed157 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:19:34 -0700 Subject: [PATCH 695/811] Bump v21.0.0-alpha.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 e17bf8f6e1427..6e35d6e99ba3b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-alpha.5 \ No newline at end of file +21.0.0-alpha.6 \ No newline at end of file diff --git a/package.json b/package.json index f3cb2326d05b6..5ab1d2b8dd38d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-alpha.5", + "version": "21.0.0-alpha.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 b2beab41c0377..4bfcbdf9c74ce 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 21,0,0,5 - PRODUCTVERSION 21,0,0,5 + FILEVERSION 21,0,0,6 + PRODUCTVERSION 21,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 65a2c18560eedec519ae85f424a3beeb7770f133 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 10:36:52 -0700 Subject: [PATCH 696/811] Revert "Bump v21.0.0-alpha.6" This reverts commit c8b3e23f31b72d2fa91607f86b121b407cbed157. --- 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 6e35d6e99ba3b..e17bf8f6e1427 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-alpha.6 \ No newline at end of file +21.0.0-alpha.5 \ No newline at end of file diff --git a/package.json b/package.json index 5ab1d2b8dd38d..f3cb2326d05b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-alpha.6", + "version": "21.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 4bfcbdf9c74ce..b2beab41c0377 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 21,0,0,6 - PRODUCTVERSION 21,0,0,6 + FILEVERSION 21,0,0,5 + PRODUCTVERSION 21,0,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 23aa6e50844dd64e3f7bcf9bfff93218eabcdce8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:50:06 -0700 Subject: [PATCH 697/811] build: update libcxx filenames (#35497) * build: update libcxx filenames * build: change upload_to_storage variable Co-authored-by: VerteDinde Co-authored-by: Keeley Hammond --- .circleci/config/base.yml | 2 +- filenames.libcxx.gni | 233 +++++++++++++++++++++++++++++++++++++- 2 files changed, 229 insertions(+), 6 deletions(-) diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 95094dec8728f..1092fced82811 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -635,7 +635,7 @@ step-electron-publish: &step-electron-publish cd src/electron if [ "$UPLOAD_TO_STORAGE" == "1" ]; then echo 'Uploading Electron release distribution to Azure' - script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE + script/release/uploaders/upload.py --verbose --upload_to_storage else echo 'Uploading Electron release distribution to GitHub releases' script/release/uploaders/upload.py --verbose diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 56021a48dd9e4..4d45f286950a0 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -1,6 +1,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/CMakeLists.txt", "//buildtools/third_party/libc++/trunk/include/__algorithm/adjacent_find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/algorithm_family.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/all_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/any_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/binary_search.h", @@ -42,9 +43,11 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted_until.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/iter_swap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/iterator_operations.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/lexicographical_compare.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/lower_bound.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/make_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/make_projected.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/max.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/max_element.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/merge.h", @@ -67,14 +70,86 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/pop_heap.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/prev_permutation.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/push_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_adjacent_find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_all_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_any_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_binary_search.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_backward.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal_range.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill_n.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_end.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_first_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if_not.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_includes.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_inplace_merge.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap_until.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_partitioned.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted_until.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_iterator_concept.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lexicographical_compare.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lower_bound.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_make_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_merge.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax_element.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move_backward.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_none_of.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_nth_element.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_point.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_pop_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_push_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search_n.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_difference.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_intersection.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_symmetric_difference.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_union.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_shuffle.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_partition.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_sort.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_swap_ranges.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_transform.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_upper_bound.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/remove.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy_if.h", @@ -107,6 +182,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_range.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/upper_bound.h", "//buildtools/third_party/libc++/trunk/include/__assert", "//buildtools/third_party/libc++/trunk/include/__availability", @@ -118,15 +194,28 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h", "//buildtools/third_party/libc++/trunk/include/__charconv/chars_format.h", "//buildtools/third_party/libc++/trunk/include/__charconv/from_chars_result.h", + "//buildtools/third_party/libc++/trunk/include/__charconv/tables.h", + "//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_base_10.h", "//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_result.h", "//buildtools/third_party/libc++/trunk/include/__chrono/calendar.h", "//buildtools/third_party/libc++/trunk/include/__chrono/convert_to_timespec.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/day.h", "//buildtools/third_party/libc++/trunk/include/__chrono/duration.h", "//buildtools/third_party/libc++/trunk/include/__chrono/file_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/hh_mm_ss.h", "//buildtools/third_party/libc++/trunk/include/__chrono/high_resolution_clock.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/literals.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/month.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/month_weekday.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/monthday.h", "//buildtools/third_party/libc++/trunk/include/__chrono/steady_clock.h", "//buildtools/third_party/libc++/trunk/include/__chrono/system_clock.h", "//buildtools/third_party/libc++/trunk/include/__chrono/time_point.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/weekday.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/year.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/year_month.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/year_month_day.h", + "//buildtools/third_party/libc++/trunk/include/__chrono/year_month_weekday.h", "//buildtools/third_party/libc++/trunk/include/__compare/common_comparison_category.h", "//buildtools/third_party/libc++/trunk/include/__compare/compare_partial_order_fallback.h", "//buildtools/third_party/libc++/trunk/include/__compare/compare_strong_order_fallback.h", @@ -169,6 +258,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__coroutine/noop_coroutine_handle.h", "//buildtools/third_party/libc++/trunk/include/__coroutine/trivial_awaitables.h", "//buildtools/third_party/libc++/trunk/include/__debug", + "//buildtools/third_party/libc++/trunk/include/__debug_utils/randomize_range.h", "//buildtools/third_party/libc++/trunk/include/__errc", "//buildtools/third_party/libc++/trunk/include/__filesystem/copy_options.h", "//buildtools/third_party/libc++/trunk/include/__filesystem/directory_entry.h", @@ -186,7 +276,12 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__filesystem/recursive_directory_iterator.h", "//buildtools/third_party/libc++/trunk/include/__filesystem/space_info.h", "//buildtools/third_party/libc++/trunk/include/__filesystem/u8path.h", + "//buildtools/third_party/libc++/trunk/include/__format/buffer.h", + "//buildtools/third_party/libc++/trunk/include/__format/concepts.h", + "//buildtools/third_party/libc++/trunk/include/__format/enable_insertable.h", + "//buildtools/third_party/libc++/trunk/include/__format/extended_grapheme_cluster_table.h", "//buildtools/third_party/libc++/trunk/include/__format/format_arg.h", + "//buildtools/third_party/libc++/trunk/include/__format/format_arg_store.h", "//buildtools/third_party/libc++/trunk/include/__format/format_args.h", "//buildtools/third_party/libc++/trunk/include/__format/format_context.h", "//buildtools/third_party/libc++/trunk/include/__format/format_error.h", @@ -200,9 +295,11 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__format/formatter_floating_point.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_integer.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_integral.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_output.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_pointer.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_string.h", "//buildtools/third_party/libc++/trunk/include/__format/parser_std_format_spec.h", + "//buildtools/third_party/libc++/trunk/include/__format/unicode.h", "//buildtools/third_party/libc++/trunk/include/__functional/binary_function.h", "//buildtools/third_party/libc++/trunk/include/__functional/binary_negate.h", "//buildtools/third_party/libc++/trunk/include/__functional/bind.h", @@ -210,6 +307,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__functional/bind_front.h", "//buildtools/third_party/libc++/trunk/include/__functional/binder1st.h", "//buildtools/third_party/libc++/trunk/include/__functional/binder2nd.h", + "//buildtools/third_party/libc++/trunk/include/__functional/boyer_moore_searcher.h", "//buildtools/third_party/libc++/trunk/include/__functional/compose.h", "//buildtools/third_party/libc++/trunk/include/__functional/default_searcher.h", "//buildtools/third_party/libc++/trunk/include/__functional/function.h", @@ -230,11 +328,14 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h", "//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h", "//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h", + "//buildtools/third_party/libc++/trunk/include/__fwd/span.h", + "//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h", "//buildtools/third_party/libc++/trunk/include/__hash_table", "//buildtools/third_party/libc++/trunk/include/__ios/fpos.h", "//buildtools/third_party/libc++/trunk/include/__iterator/access.h", "//buildtools/third_party/libc++/trunk/include/__iterator/advance.h", "//buildtools/third_party/libc++/trunk/include/__iterator/back_insert_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/bounded_iter.h", "//buildtools/third_party/libc++/trunk/include/__iterator/common_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h", "//buildtools/third_party/libc++/trunk/include/__iterator/counted_iterator.h", @@ -255,6 +356,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h", "//buildtools/third_party/libc++/trunk/include/__iterator/mergeable.h", "//buildtools/third_party/libc++/trunk/include/__iterator/move_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/move_sentinel.h", "//buildtools/third_party/libc++/trunk/include/__iterator/next.h", "//buildtools/third_party/libc++/trunk/include/__iterator/ostream_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/ostreambuf_iterator.h", @@ -268,14 +370,15 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__iterator/sortable.h", "//buildtools/third_party/libc++/trunk/include/__iterator/unreachable_sentinel.h", "//buildtools/third_party/libc++/trunk/include/__iterator/wrap_iter.h", - "//buildtools/third_party/libc++/trunk/include/__libcpp_version", "//buildtools/third_party/libc++/trunk/include/__locale", "//buildtools/third_party/libc++/trunk/include/__mbstate_t.h", "//buildtools/third_party/libc++/trunk/include/__memory/addressof.h", + "//buildtools/third_party/libc++/trunk/include/__memory/allocate_at_least.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocator.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocator_arg_t.h", "//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h", + "//buildtools/third_party/libc++/trunk/include/__memory/assume_aligned.h", "//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h", "//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h", "//buildtools/third_party/libc++/trunk/include/__memory/concepts.h", @@ -285,6 +388,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__memory/ranges_uninitialized_algorithms.h", "//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h", "//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h", + "//buildtools/third_party/libc++/trunk/include/__memory/swap_allocator.h", "//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h", "//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h", "//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h", @@ -355,8 +459,10 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__ranges/empty_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h", "//buildtools/third_party/libc++/trunk/include/__ranges/enable_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/filter_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/iota_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/join_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/lazy_split_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/non_propagating_cache.h", "//buildtools/third_party/libc++/trunk/include/__ranges/owning_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/range_adaptor.h", @@ -371,16 +477,16 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__ranges/transform_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/view_interface.h", "//buildtools/third_party/libc++/trunk/include/__ranges/views.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/zip_view.h", "//buildtools/third_party/libc++/trunk/include/__split_buffer", "//buildtools/third_party/libc++/trunk/include/__std_stream", - "//buildtools/third_party/libc++/trunk/include/__string", + "//buildtools/third_party/libc++/trunk/include/__string/char_traits.h", + "//buildtools/third_party/libc++/trunk/include/__string/extern_template_lists.h", "//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h", "//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h", - "//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h", - "//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h", "//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/musl/xlocale.h", "//buildtools/third_party/libc++/trunk/include/__support/newlib/xlocale.h", @@ -398,6 +504,122 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__threading_support", "//buildtools/third_party/libc++/trunk/include/__tree", "//buildtools/third_party/libc++/trunk/include/__tuple", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_const.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_cv.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_lvalue_reference.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_rvalue_reference.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/add_volatile.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_storage.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_union.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/alignment_of.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/apply_cv.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/common_reference.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/common_type.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/conditional.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/conjunction.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cv.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cvref.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/decay.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/disjunction.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/enable_if.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/extent.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/has_unique_object_representation.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/has_virtual_destructor.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/integral_constant.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_abstract.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_aggregate.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_arithmetic.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_array.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_base_of.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_bounded_array.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_callable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_class.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_compound.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_const.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_constant_evaluated.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_convertible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_core_convertible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_default_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_destructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_empty.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_enum.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_final.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_floating_point.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_function.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_fundamental.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_integral.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_literal_type.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_function_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_object_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_convertible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_default_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_destructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_null_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_object.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_pod.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_polymorphic.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_primary_template.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference_wrapper.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_referenceable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_same.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_scalar.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_scoped_enum.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed_integer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_standard_layout.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivial.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copyable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_default_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_destructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_assignable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_constructible.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_unbounded_array.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_union.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned_integer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_valid_expansion.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_void.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_volatile.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/lazy.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/make_32_64_or_128_bit.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/make_signed.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/make_unsigned.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/nat.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/negation.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/promote.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/rank.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_all_extents.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cv.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cvref.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_extent.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_pointer.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_reference.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_volatile.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/type_identity.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/type_list.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/underlying_type.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/void_t.h", "//buildtools/third_party/libc++/trunk/include/__undef_macros", "//buildtools/third_party/libc++/trunk/include/__utility/as_const.h", "//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h", @@ -512,7 +734,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/map", "//buildtools/third_party/libc++/trunk/include/math.h", "//buildtools/third_party/libc++/trunk/include/memory", - "//buildtools/third_party/libc++/trunk/include/module.modulemap", + "//buildtools/third_party/libc++/trunk/include/module.modulemap.in", "//buildtools/third_party/libc++/trunk/include/mutex", "//buildtools/third_party/libc++/trunk/include/new", "//buildtools/third_party/libc++/trunk/include/numbers", @@ -532,6 +754,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/span", "//buildtools/third_party/libc++/trunk/include/sstream", "//buildtools/third_party/libc++/trunk/include/stack", + "//buildtools/third_party/libc++/trunk/include/stdatomic.h", "//buildtools/third_party/libc++/trunk/include/stdbool.h", "//buildtools/third_party/libc++/trunk/include/stddef.h", "//buildtools/third_party/libc++/trunk/include/stdexcept", From f9b02358c66a1c404f665ff47568ab75024464ad Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:51:14 -0700 Subject: [PATCH 698/811] Bump v21.0.0-alpha.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 e17bf8f6e1427..6e35d6e99ba3b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-alpha.5 \ No newline at end of file +21.0.0-alpha.6 \ No newline at end of file diff --git a/package.json b/package.json index f3cb2326d05b6..5ab1d2b8dd38d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-alpha.5", + "version": "21.0.0-alpha.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 b2beab41c0377..4bfcbdf9c74ce 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 21,0,0,5 - PRODUCTVERSION 21,0,0,5 + FILEVERSION 21,0,0,6 + PRODUCTVERSION 21,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 018bc0993e3cdf9c5e2eece06f8007efae89ee4b Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 10:57:32 +0200 Subject: [PATCH 699/811] chore: use nghttp2's config.h on all platforms (#35487) https://github.com/nodejs/node/pull/27283 Co-authored-by: Shelley Vohr --- patches/node/build_add_gn_build_files.patch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 61e2003bd275c..8b8ed6a9e3d63 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -672,10 +672,10 @@ index 0000000000000000000000000000000000000000..fb000f8ee7647c375bc190d1729d67bb +} diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..8bfecba74d4d90e9fbf0e2cd301118e4adc6cba8 +index 0000000000000000000000000000000000000000..9abde472d88923db835b12982b7f2ccb1f260196 --- /dev/null +++ b/deps/nghttp2/BUILD.gn -@@ -0,0 +1,49 @@ +@@ -0,0 +1,47 @@ +config("nghttp2_config") { + defines = [ "NGHTTP2_STATICLIB" ] + include_dirs = [ "lib/includes" ] @@ -686,11 +686,9 @@ index 0000000000000000000000000000000000000000..8bfecba74d4d90e9fbf0e2cd301118e4 + "_U_", + "BUILDING_NGHTTP2", + "NGHTTP2_STATICLIB", ++ "HAVE_CONFIG_H", + ] + include_dirs = [ "lib/includes" ] -+ if (is_win) { -+ defines += [ "HAVE_CONFIG_H" ] -+ } + + cflags_c = [ + "-Wno-implicit-function-declaration", From 7b623862961446071773f917ba4b96fecce6bed6 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:58:28 +0200 Subject: [PATCH 700/811] fix: crash on WebWorker destruction (#35492) Co-authored-by: Shelley Vohr --- ...nterrupt_on_io_change_option_to_uv_loop_configure.patch | 7 +++++-- shell/common/node_bindings.cc | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch b/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch index df4c22dbe6633..a568f9f86ab4a 100644 --- a/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch +++ b/patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch @@ -136,7 +136,7 @@ index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c -index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb7c43bb0b 100644 +index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..46fc03264b6cc1a3a4d8faf5ec5a754fc07c9b6d 100644 --- a/deps/uv/src/unix/loop.c +++ b/deps/uv/src/unix/loop.c @@ -217,6 +217,11 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { @@ -151,7 +151,7 @@ index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb if (option != UV_LOOP_BLOCK_SIGNAL) return UV_ENOSYS; -@@ -226,3 +231,37 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { +@@ -226,3 +231,40 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { loop->flags |= UV_LOOP_BLOCK_SIGPROF; return 0; } @@ -183,6 +183,9 @@ index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb + if (r == len) + return; + ++ if (!uv_loop_alive(loop)) ++ return; ++ + if (r == -1) + if (errno == EAGAIN || errno == EWOULDBLOCK) + return; diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index c350720a67766..ce03319e87d26 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -37,6 +37,7 @@ #include "shell/common/mac/main_application_bundle.h" #include "shell/common/node_includes.h" #include "third_party/blink/renderer/bindings/core/v8/v8_initializer.h" // nogncheck +#include "third_party/electron_node/src/debug_utils.h" #if !defined(MAS_BUILD) #include "shell/common/crash_keys.h" @@ -136,7 +137,7 @@ void stop_and_close_uv_loop(uv_loop_t* loop) { break; DCHECK_EQ(0, uv_loop_alive(loop)); - uv_loop_close(loop); + node::CheckedUvLoopClose(loop); } bool g_is_initialized = false; From da47103ad701527174eea10a396c5574b07f5e9b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 10:11:56 -0700 Subject: [PATCH 701/811] Bump v21.0.0-beta.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 6e35d6e99ba3b..ba444125b88fa 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-alpha.6 \ No newline at end of file +21.0.0-beta.1 \ No newline at end of file diff --git a/package.json b/package.json index 5ab1d2b8dd38d..349b1d7c300d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-alpha.6", + "version": "21.0.0-beta.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 4bfcbdf9c74ce..96f0b227b5475 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 21,0,0,6 - PRODUCTVERSION 21,0,0,6 + FILEVERSION 21,0,0,1 + PRODUCTVERSION 21,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 5e8b4bd86ffa5eae1a26f119a1d78ba7922457b0 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 11:20:10 +0900 Subject: [PATCH 702/811] fix: crash when switching origins with emulation settings set (#35488) Co-authored-by: Shelley Vohr --- patches/chromium/.patches | 1 + ...ler_update_functions_to_early_return.patch | 45 +++++++++++++++++++ spec-main/api-web-contents-spec.ts | 30 +++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 485f18915fba5..d53c82faf37f4 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -117,3 +117,4 @@ add_maximized_parameter_to_linuxui_getwindowframeprovider.patch revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch add_electron_deps_to_license_credits_file.patch feat_add_set_can_resize_mutator.patch +fix_revert_emulationhandler_update_functions_to_early_return.patch diff --git a/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch b/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch new file mode 100644 index 0000000000000..7a34a68504653 --- /dev/null +++ b/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Fri, 26 Aug 2022 11:24:27 +0200 +Subject: fix: revert EmulationHandler update functions to early return + +Our debugger class (a subclass of ontent::DevToolsAgentHostClient) isn't +aware of those changes unless we hook RenderFrameHostChanged. If we +don't do this, some navigation lifecycle events +{loadingFinished, dataReceived} emitted by the renderer are lost. We +disconnect and reconnect the webcontents to the DevToolsAgentHost to +prevent this from happening. + +As of https://chromium-review.googlesource.com/c/chromium/src/+/3758294 +this results in a DCHECK, since DevToolsAgentHost::DisconnectWebContents +results in a call to UpdateDeviceEmulationState and host_ is nullptr. To +fix this, we revert those state update calls to early returns. + +Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856525 + +diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc +index 84736afeb21d1deec0f4032ef6f3304075d8fffb..d023bb7b5a34c5c055d3d7cc5dc3e04ef43bcc3b 100644 +--- a/content/browser/devtools/protocol/emulation_handler.cc ++++ b/content/browser/devtools/protocol/emulation_handler.cc +@@ -565,7 +565,9 @@ WebContentsImpl* EmulationHandler::GetWebContents() { + } + + void EmulationHandler::UpdateTouchEventEmulationState() { +- DCHECK(host_); ++ if (!host_) ++ return; ++ + // We only have a single TouchEmulator for all frames, so let the main frame's + // EmulationHandler enable/disable it. + DCHECK(!host_->GetParentOrOuterDocument()); +@@ -585,7 +587,9 @@ void EmulationHandler::UpdateTouchEventEmulationState() { + } + + void EmulationHandler::UpdateDeviceEmulationState() { +- DCHECK(host_); ++ if (!host_) ++ return; ++ + // Device emulation only happens on the outermost main frame. + DCHECK(!host_->GetParentOrOuterDocument()); + diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 3050b926988a6..6b326e8008e64 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -326,6 +326,7 @@ describe('webContents module', () => { describe('loadURL() promise API', () => { let w: BrowserWindow; + beforeEach(async () => { w = new BrowserWindow({ show: false }); }); @@ -357,6 +358,35 @@ describe('webContents module', () => { .and.have.property('code', 'ERR_FAILED'); }); + it('does not crash when loading a new URL with emulation settings set', async () => { + const setEmulation = async () => { + if (w.webContents) { + w.webContents.debugger.attach('1.3'); + + const deviceMetrics = { + width: 700, + height: 600, + deviceScaleFactor: 2, + mobile: true, + dontSetVisibleSize: true + }; + await w.webContents.debugger.sendCommand( + 'Emulation.setDeviceMetricsOverride', + deviceMetrics + ); + } + }; + + try { + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + await setEmulation(); + await w.loadURL('data:text/html,

HELLO

'); + await setEmulation(); + } catch (e) { + expect((e as Error).message).to.match(/Debugger is already attached to the target/); + } + }); + it('sets appropriate error information on rejection', async () => { let err: any; try { From fb0bbf0100528c2d00bae2e20a9c19e99b325655 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 06:31:01 -0700 Subject: [PATCH 703/811] Bump v21.0.0-beta.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 ba444125b88fa..7a05c6935a16e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.1 \ No newline at end of file +21.0.0-beta.2 \ No newline at end of file diff --git a/package.json b/package.json index 349b1d7c300d5..0021bf5283ec7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.1", + "version": "21.0.0-beta.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 96f0b227b5475..ec408c224f83c 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 21,0,0,1 - PRODUCTVERSION 21,0,0,1 + FILEVERSION 21,0,0,2 + PRODUCTVERSION 21,0,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e78aa6af167870a6f5bfcfd4844f50f91ca71cef Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 12:18:03 -0400 Subject: [PATCH 704/811] fix: `screen.getCursorScreenPoint()` crash on Wayland (#35575) fix: screen.getCursorScreenPoint() crash on Wayland Co-authored-by: Shelley Vohr --- shell/browser/api/electron_api_screen.cc | 17 ++++++++++++++++- shell/browser/api/electron_api_screen.h | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_screen.cc b/shell/browser/api/electron_api_screen.cc index 53ae9f6b378d4..592d0017aeac6 100644 --- a/shell/browser/api/electron_api_screen.cc +++ b/shell/browser/api/electron_api_screen.cc @@ -24,6 +24,10 @@ #include "ui/display/win/screen_win.h" #endif +#if defined(USE_OZONE) +#include "ui/ozone/public/ozone_platform.h" +#endif + namespace electron::api { gin::WrapperInfo Screen::kWrapperInfo = {gin::kEmbedderNativeGin}; @@ -68,7 +72,18 @@ Screen::~Screen() { screen_->RemoveObserver(this); } -gfx::Point Screen::GetCursorScreenPoint() { +gfx::Point Screen::GetCursorScreenPoint(v8::Isolate* isolate) { +#if defined(USE_OZONE) + // Wayland will crash unless a window is created prior to calling + // GetCursorScreenPoint. + if (!ui::OzonePlatform::IsInitialized()) { + gin_helper::ErrorThrower thrower(isolate); + thrower.ThrowError( + "screen.getCursorScreenPoint() cannot be called before a window has " + "been created."); + return gfx::Point(); + } +#endif return screen_->GetCursorScreenPoint(); } diff --git a/shell/browser/api/electron_api_screen.h b/shell/browser/api/electron_api_screen.h index 67c8fa7226dbe..ef203cd7b1076 100644 --- a/shell/browser/api/electron_api_screen.h +++ b/shell/browser/api/electron_api_screen.h @@ -40,7 +40,7 @@ class Screen : public gin::Wrappable, Screen(v8::Isolate* isolate, display::Screen* screen); ~Screen() override; - gfx::Point GetCursorScreenPoint(); + gfx::Point GetCursorScreenPoint(v8::Isolate* isolate); display::Display GetPrimaryDisplay(); std::vector GetAllDisplays(); display::Display GetDisplayNearestPoint(const gfx::Point& point); From e48878ea63fef7c947dc7cf0c6811bb289c62164 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 6 Sep 2022 10:27:46 -0700 Subject: [PATCH 705/811] chore: cherry-pick 9b5207569882 from chromium (#35543) * chore: cherry-pick 9b5207569882 from chromium * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/.patches | 1 + .../chromium/cherry-pick-9b5207569882.patch | 179 ++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 patches/chromium/cherry-pick-9b5207569882.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index d53c82faf37f4..4a5283fa144b0 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -118,3 +118,4 @@ revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch add_electron_deps_to_license_credits_file.patch feat_add_set_can_resize_mutator.patch fix_revert_emulationhandler_update_functions_to_early_return.patch +cherry-pick-9b5207569882.patch diff --git a/patches/chromium/cherry-pick-9b5207569882.patch b/patches/chromium/cherry-pick-9b5207569882.patch new file mode 100644 index 0000000000000..a327b22364d20 --- /dev/null +++ b/patches/chromium/cherry-pick-9b5207569882.patch @@ -0,0 +1,179 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ken Rockot +Date: Wed, 31 Aug 2022 15:39:45 +0000 +Subject: Mojo: Validate response message type + +Ensures that a response message is actually the type expected by the +original request. + +Fixed: 1358134 +Change-Id: I8f8f58168764477fbf7a6d2e8aeb040f07793d45 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3864274 +Reviewed-by: Robert Sesek +Commit-Queue: Ken Rockot +Cr-Commit-Position: refs/heads/main@{#1041553} + +diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h +index 0ebbc94ad51cca74fcebc357b5262229ae5c9d0e..cd79a5edb3f939623b874db36542ee651113c164 100644 +--- a/mojo/public/cpp/bindings/interface_endpoint_client.h ++++ b/mojo/public/cpp/bindings/interface_endpoint_client.h +@@ -221,20 +221,32 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient + void ForgetAsyncRequest(uint64_t request_id); + + private: +- // Maps from the id of a response to the MessageReceiver that handles the +- // response. +- using AsyncResponderMap = +- std::map>; ++ struct PendingAsyncResponse { ++ public: ++ PendingAsyncResponse(uint32_t request_message_name, ++ std::unique_ptr responder); ++ PendingAsyncResponse(PendingAsyncResponse&&); ++ PendingAsyncResponse(const PendingAsyncResponse&) = delete; ++ PendingAsyncResponse& operator=(PendingAsyncResponse&&); ++ PendingAsyncResponse& operator=(const PendingAsyncResponse&) = delete; ++ ~PendingAsyncResponse(); ++ ++ uint32_t request_message_name; ++ std::unique_ptr responder; ++ }; ++ ++ using AsyncResponderMap = std::map; + + struct SyncResponseInfo { + public: +- explicit SyncResponseInfo(bool* in_response_received); ++ SyncResponseInfo(uint32_t request_message_name, bool* in_response_received); + + SyncResponseInfo(const SyncResponseInfo&) = delete; + SyncResponseInfo& operator=(const SyncResponseInfo&) = delete; + + ~SyncResponseInfo(); + ++ uint32_t request_message_name; + Message response; + + // Points to a stack-allocated variable. +diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc +index ded0d20ab193cfdaf36bd44c25719d7073c989fb..a6f41414b8918989662eb0a1dea773932631c8cc 100644 +--- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc ++++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc +@@ -30,6 +30,7 @@ + #include "mojo/public/cpp/bindings/sync_call_restrictions.h" + #include "mojo/public/cpp/bindings/sync_event_watcher.h" + #include "mojo/public/cpp/bindings/thread_safe_proxy.h" ++#include "third_party/abseil-cpp/absl/types/optional.h" + #include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_mojo_event_info.pbzero.h" + + namespace mojo { +@@ -316,9 +317,27 @@ class ResponderThunk : public MessageReceiverWithStatus { + + // ---------------------------------------------------------------------------- + ++InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse( ++ uint32_t request_message_name, ++ std::unique_ptr responder) ++ : request_message_name(request_message_name), ++ responder(std::move(responder)) {} ++ ++InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse( ++ PendingAsyncResponse&&) = default; ++ ++InterfaceEndpointClient::PendingAsyncResponse& ++InterfaceEndpointClient::PendingAsyncResponse::operator=( ++ PendingAsyncResponse&&) = default; ++ ++InterfaceEndpointClient::PendingAsyncResponse::~PendingAsyncResponse() = ++ default; ++ + InterfaceEndpointClient::SyncResponseInfo::SyncResponseInfo( ++ uint32_t request_message_name, + bool* in_response_received) +- : response_received(in_response_received) {} ++ : request_message_name(request_message_name), ++ response_received(in_response_received) {} + + InterfaceEndpointClient::SyncResponseInfo::~SyncResponseInfo() {} + +@@ -606,6 +625,7 @@ bool InterfaceEndpointClient::SendMessageWithResponder( + // message before calling |SendMessage()| below. + #endif + ++ const uint32_t message_name = message->name(); + const bool is_sync = message->has_flag(Message::kFlagIsSync); + const bool exclusive_wait = message->has_flag(Message::kFlagNoInterrupt); + if (!controller_->SendMessage(message)) +@@ -622,7 +642,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder( + controller_->RegisterExternalSyncWaiter(request_id); + } + base::AutoLock lock(async_responders_lock_); +- async_responders_[request_id] = std::move(responder); ++ async_responders_.emplace( ++ request_id, PendingAsyncResponse{message_name, std::move(responder)}); + return true; + } + +@@ -630,7 +651,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder( + + bool response_received = false; + sync_responses_.insert(std::make_pair( +- request_id, std::make_unique(&response_received))); ++ request_id, ++ std::make_unique(message_name, &response_received))); + + base::WeakPtr weak_self = + weak_ptr_factory_.GetWeakPtr(); +@@ -808,13 +830,13 @@ void InterfaceEndpointClient::ResetFromAnotherSequenceUnsafe() { + } + + void InterfaceEndpointClient::ForgetAsyncRequest(uint64_t request_id) { +- std::unique_ptr responder; ++ absl::optional response; + { + base::AutoLock lock(async_responders_lock_); + auto it = async_responders_.find(request_id); + if (it == async_responders_.end()) + return; +- responder = std::move(it->second); ++ response = std::move(it->second); + async_responders_.erase(it); + } + } +@@ -906,6 +928,10 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { + return false; + + if (it->second) { ++ if (message->name() != it->second->request_message_name) { ++ return false; ++ } ++ + it->second->response = std::move(*message); + *it->second->response_received = true; + return true; +@@ -916,18 +942,22 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { + sync_responses_.erase(it); + } + +- std::unique_ptr responder; ++ absl::optional pending_response; + { + base::AutoLock lock(async_responders_lock_); + auto it = async_responders_.find(request_id); + if (it == async_responders_.end()) + return false; +- responder = std::move(it->second); ++ pending_response = std::move(it->second); + async_responders_.erase(it); + } + ++ if (message->name() != pending_response->request_message_name) { ++ return false; ++ } ++ + internal::MessageDispatchContext dispatch_context(message); +- return responder->Accept(message); ++ return pending_response->responder->Accept(message); + } else { + if (mojo::internal::ControlMessageHandler::IsControlMessage(message)) + return control_message_handler_.Accept(message); From 605ee9e28a65ea8237dd73cc3b39b6e036fd4296 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 15:03:08 -0700 Subject: [PATCH 706/811] Bump v21.0.0-beta.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 7a05c6935a16e..27cb877ac6eab 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.2 \ No newline at end of file +21.0.0-beta.3 \ No newline at end of file diff --git a/package.json b/package.json index 0021bf5283ec7..475732894d7e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.2", + "version": "21.0.0-beta.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 ec408c224f83c..2af8b533d1f3e 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 21,0,0,2 - PRODUCTVERSION 21,0,0,2 + FILEVERSION 21,0,0,3 + PRODUCTVERSION 21,0,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 85f93bc5bf04a25f3b34e8689553499ce7202c29 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 14:07:58 -0400 Subject: [PATCH 707/811] docs: add fuses and asar integrity docs (#35596) Co-authored-by: Samuel Attard --- docs/tutorial/asar-integrity.md | 53 +++++++++++++++++++++++++++++++ docs/tutorial/fuses.md | 55 ++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 docs/tutorial/asar-integrity.md diff --git a/docs/tutorial/asar-integrity.md b/docs/tutorial/asar-integrity.md new file mode 100644 index 0000000000000..63320cea31336 --- /dev/null +++ b/docs/tutorial/asar-integrity.md @@ -0,0 +1,53 @@ +--- +title: 'ASAR Integrity' +description: 'An experimental feature that ensures the validity of ASAR contents at runtime.' +slug: asar-integrity +hide_title: false +--- + +## Platform Support + +Currently ASAR integrity checking is only supported on macOS. + +## Requirements + +### Electron Forge / Electron Packager + +If you are using `>= electron-packager@15.4.0` or `>= @electron-forge/core@6.0.0-beta.61` then all these requirements are met for you automatically and you can skip to [Toggling the Fuse](#toggling-the-fuse). + +### Other build systems + +In order to enable ASAR integrity checking you need to ensure that your `app.asar` file was generated by a version of the `asar` npm package that supports asar integrity. Support was introduced in version `3.1.0`. + +Your must then populate a valid `ElectronAsarIntegrity` dictionary block in your packaged apps `Info.plist`. An example is included below. + +```plist +ElectronAsarIntegrity + + Resources/app.asar + + algorithm + SHA256 + hash + 9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac + + +``` + +Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of the ASAR header using the given algorithm. The `asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value. + +## Toggling the Fuse + +ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path. + +```js +require('@electron/fuses').flipFuses( + // E.g. /a/b/Foo.app + pathToPackagedApp, + { + version: FuseVersion.V1, + [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, + [FuseV1Options.OnlyLoadAppFromAsar]: true + } +) +``` diff --git a/docs/tutorial/fuses.md b/docs/tutorial/fuses.md index 099c8d0bcd0ef..a3beb86a24b06 100644 --- a/docs/tutorial/fuses.md +++ b/docs/tutorial/fuses.md @@ -8,6 +8,52 @@ For a subset of Electron functionality it makes sense to disable certain feature Fuses are the solution to this problem, at a high level they are "magic bits" in the Electron binary that can be flipped when packaging your Electron app to enable / disable certain features / restrictions. Because they are flipped at package time before you code sign your app the OS becomes responsible for ensuring those bits aren't flipped back via OS level code signing validation (Gatekeeper / App Locker). +## Current Fuses + +### `runAsNode` + +**Default:** Enabled +**@electron/fuses:** `FuseV1Options.RunAsNode` + +The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. + +### `cookieEncryption` + +**Default:** Disabled +**@electron/fuses:** `FuseV1Options.EnableCookieEncryption` + +The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse. + +### `nodeOptions` + +**Default:** Enabled +**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable` + +The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) environment variable is respected or not. This environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse. + +### `nodeCliInspect` + +**Default:** Enabled +**@electron/fuses:** `FuseV1Options.EnableNodeCliInspectArguments` + +The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse. + +### `embeddedAsarIntegrityValidation` + +**Default:** Disabled +**@electron/fuses:** `FuseV1Options.EnableEmbeddedAsarIntegrityValidation` + +The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive. + +For more information on how to use asar integrity validation please read the [Asar Integrity](asar-integrity.md) documentation. + +### `onlyLoadAppFromAsar` + +**Default:** Disabled +**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar` + +The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asasr`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code. + ## How do I flip the fuses? ### The easy way @@ -20,11 +66,18 @@ require('@electron/fuses').flipFuses( require('electron'), // Fuses to flip { - runAsNode: false + version: FuseVersion.V1, + [FuseV1Options.RunAsNode]: false } ) ``` +You can validate the fuses have been flipped or check the fuse status of an arbitrary Electron app using the fuses CLI. + +```bash + npx @electron/fuses read --app /Applications/Foo.app +``` + ### The hard way #### Quick Glossary From a5db8a3d53b21293a06a5cc1779f57148be65e9f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 06:46:39 -0400 Subject: [PATCH 708/811] fix: session.getBlobData never resolves with blob sizes > 65536 (#35602) fix: session.getBlobData never resolves with blob sizes > 65536 (#35277) * fix: session.getBlobData never resolves with blob sizes > 65536 (#34398) * Add unit test case for session.getBlobData Co-authored-by: John Kleinschmidt Co-authored-by: Frank Pian Co-authored-by: John Kleinschmidt --- .../api/electron_api_data_pipe_holder.cc | 5 ++- spec-main/api-session-spec.ts | 44 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index f33f1d9b85b99..67fe81959a12f 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -86,8 +86,11 @@ class DataPipeReader { if (result == MOJO_RESULT_OK) { // success remaining_size_ -= length; head_ += length; - if (remaining_size_ == 0) + if (remaining_size_ == 0) { OnSuccess(); + } else { + handle_watcher_.ArmOrNotify(); + } } else if (result == MOJO_RESULT_SHOULD_WAIT) { // IO pending handle_watcher_.ArmOrNotify(); } else { // error diff --git a/spec-main/api-session-spec.ts b/spec-main/api-session-spec.ts index a1be9cf2db7a7..f7817c7e03376 100644 --- a/spec-main/api-session-spec.ts +++ b/spec-main/api-session-spec.ts @@ -529,6 +529,50 @@ describe('session module', () => { }); }); + describe('ses.getBlobData2()', () => { + const scheme = 'cors-blob'; + const protocol = session.defaultSession.protocol; + const url = `${scheme}://host`; + after(async () => { + await protocol.unregisterProtocol(scheme); + }); + afterEach(closeAllWindows); + + it('returns blob data for uuid', (done) => { + const content = ` + + `; + + protocol.registerStringProtocol(scheme, (request, callback) => { + try { + if (request.method === 'GET') { + callback({ data: content, mimeType: 'text/html' }); + } else if (request.method === 'POST') { + const uuid = request.uploadData![1].blobUUID; + expect(uuid).to.be.a('string'); + session.defaultSession.getBlobData(uuid!).then(result => { + try { + const data = new Array(65_537).fill('a'); + expect(result.toString()).to.equal(data.join('')); + done(); + } catch (e) { + done(e); + } + }); + } + } catch (e) { + done(e); + } + }); + const w = new BrowserWindow({ show: false }); + w.loadURL(url); + }); + }); + describe('ses.setCertificateVerifyProc(callback)', () => { let server: http.Server; From 62b64e6e604d6d683c887afc5d81ac3eb91411a7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 06:31:18 -0700 Subject: [PATCH 709/811] Bump v21.0.0-beta.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 27cb877ac6eab..b904bee955b55 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.3 \ No newline at end of file +21.0.0-beta.4 \ No newline at end of file diff --git a/package.json b/package.json index 475732894d7e5..26d61b20e07ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.3", + "version": "21.0.0-beta.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 2af8b533d1f3e..738c74779428e 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 21,0,0,3 - PRODUCTVERSION 21,0,0,3 + FILEVERSION 21,0,0,4 + PRODUCTVERSION 21,0,0,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 686a554c6a16dbf2e8cdf261fef07002e757494f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 09:59:16 -0700 Subject: [PATCH 710/811] fix: Set background for WCO container (#35612) * fix: Set background for WCO container * Add background when invalidating as well Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> --- shell/browser/ui/views/win_caption_button_container.cc | 3 +++ shell/browser/ui/views/win_frame_view.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/shell/browser/ui/views/win_caption_button_container.cc b/shell/browser/ui/views/win_caption_button_container.cc index 62ce6d9e5b880..92c0fca690cbd 100644 --- a/shell/browser/ui/views/win_caption_button_container.cc +++ b/shell/browser/ui/views/win_caption_button_container.cc @@ -14,6 +14,7 @@ #include "shell/browser/ui/views/win_frame_view.h" #include "ui/base/l10n/l10n_util.h" #include "ui/strings/grit/ui_strings.h" +#include "ui/views/background.h" #include "ui/views/layout/flex_layout.h" #include "ui/views/view_class_properties.h" @@ -128,6 +129,8 @@ void WinCaptionButtonContainer::AddedToWidget() { UpdateButtons(); if (frame_view_->window()->IsWindowControlsOverlayEnabled()) { + SetBackground(views::CreateSolidBackground( + frame_view_->window()->overlay_button_color())); SetPaintToLayer(); } } diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index cea0b2937c92a..ad01b0cbac91e 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -19,6 +19,7 @@ #include "ui/display/win/dpi.h" #include "ui/display/win/screen_win.h" #include "ui/gfx/geometry/dip_util.h" +#include "ui/views/background.h" #include "ui/views/widget/widget.h" #include "ui/views/win/hwnd_util.h" @@ -58,6 +59,8 @@ void WinFrameView::InvalidateCaptionButtons() { if (!caption_button_container_) return; + caption_button_container_->SetBackground( + views::CreateSolidBackground(window()->overlay_button_color())); caption_button_container_->InvalidateLayout(); caption_button_container_->SchedulePaint(); } From 91969330dddfb1ea9026028089662283fd1ad556 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 06:31:02 -0700 Subject: [PATCH 711/811] Bump v21.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 b904bee955b55..c8bf94a544abf 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.4 \ No newline at end of file +21.0.0-beta.5 \ No newline at end of file diff --git a/package.json b/package.json index 26d61b20e07ca..2b7bacaa6deb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.4", + "version": "21.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 738c74779428e..b2beab41c0377 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 21,0,0,4 - PRODUCTVERSION 21,0,0,4 + FILEVERSION 21,0,0,5 + PRODUCTVERSION 21,0,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a1e792f48a4ca98fb014b645e36b7e027abe548e Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:04:49 -0700 Subject: [PATCH 712/811] docs: Use inline image link in faq.md (#35648) * Use absolute URL in faq.md image link The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do Using an absolute URL here should fix the issue on the main site. * Use inline image reference for subpixel rendering example As suggested by @dsanders11 Co-authored-by: Adrian Petrescu --- docs/faq.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 174104aee9b0c..84b3b5cf6e201 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -135,7 +135,7 @@ is only available in renderer processes. If [sub-pixel anti-aliasing](https://alienryderflex.com/sub_pixel/) is deactivated, then fonts on LCD screens can look blurry. Example: -![subpixel rendering example] +![Subpixel rendering example](images/subpixel-rendering-screenshot.gif) Sub-pixel anti-aliasing needs a non-transparent background of the layer containing the font glyphs. (See [this issue](https://github.com/electron/electron/issues/6344#issuecomment-420371918) for more info). @@ -161,4 +161,3 @@ Notice that just setting the background in the CSS does not have the desired eff [indexed-db]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API [message-port]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort [browser-window]: api/browser-window.md -[subpixel rendering example]: images/subpixel-rendering-screenshot.gif From 8ce7209b9ba170fa45dc81acdf7b442daed446f1 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:06:19 -0700 Subject: [PATCH 713/811] fix: potential "Object has been destroyed" error in BrowserWindow.getFocusedWindow (#35646) Co-authored-by: Milan Burda --- lib/browser/api/browser-window.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/browser/api/browser-window.ts b/lib/browser/api/browser-window.ts index d20ea0bda5571..053e09ab63690 100644 --- a/lib/browser/api/browser-window.ts +++ b/lib/browser/api/browser-window.ts @@ -72,9 +72,8 @@ BrowserWindow.getAllWindows = () => { BrowserWindow.getFocusedWindow = () => { for (const window of BrowserWindow.getAllWindows()) { - const hasWC = window.webContents && !window.webContents.isDestroyed(); - if (!window.isDestroyed() && hasWC) { - if (window.isFocused() || window.isDevToolsFocused()) return window; + if (!window.isDestroyed() && window.webContents && !window.webContents.isDestroyed()) { + if (window.isFocused() || window.webContents.isDevToolsFocused()) return window; } } return null; From fb4990a537ca2ccb1d1839dd89263937326fd846 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:12:05 -0700 Subject: [PATCH 714/811] docs: fix misspelling in fuses (#35620) Co-authored-by: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com> --- docs/tutorial/fuses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/fuses.md b/docs/tutorial/fuses.md index a3beb86a24b06..bb0c61b475136 100644 --- a/docs/tutorial/fuses.md +++ b/docs/tutorial/fuses.md @@ -52,7 +52,7 @@ For more information on how to use asar integrity validation please read the [As **Default:** Disabled **@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar` -The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asasr`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code. +The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code. ## How do I flip the fuses? From 135c8c34ece0fa1fa04bad6e99af4bca5f788343 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:14:46 -0700 Subject: [PATCH 715/811] fix: ensure history navigations are sandboxed-iframe-aware (#35623) Co-authored-by: Jeremy Spiegel --- .../browser/api/electron_api_web_contents.cc | 5 ---- shell/browser/api/electron_api_web_contents.h | 1 - spec-main/chromium-spec.ts | 28 +++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 7415e0c5d00f9..030ccee6f0f7e 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1380,11 +1380,6 @@ bool WebContents::HandleContextMenu(content::RenderFrameHost& render_frame_host, return true; } -bool WebContents::OnGoToEntryOffset(int offset) { - GoToOffset(offset); - return false; -} - void WebContents::FindReply(content::WebContents* web_contents, int request_id, int number_of_matches, diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 7ccc525f56096..45b4846d2f9b4 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -534,7 +534,6 @@ class WebContents : public ExclusiveAccessContext, content::RenderWidgetHost* render_widget_host) override; bool HandleContextMenu(content::RenderFrameHost& render_frame_host, const content::ContextMenuParams& params) override; - bool OnGoToEntryOffset(int offset) override; void FindReply(content::WebContents* web_contents, int request_id, int number_of_matches, diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index cf241bccbc719..957fab8b67ccf 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -1571,6 +1571,34 @@ describe('chromium features', () => { expect((w.webContents as any).length()).to.equal(2); }); }); + + describe('window.history.back', () => { + it('should not allow sandboxed iframe to modify main frame state', async () => { + const w = new BrowserWindow({ show: false }); + w.loadURL('data:text/html,'); + await Promise.all([ + emittedOnce(w.webContents, 'navigation-entry-committed'), + emittedOnce(w.webContents, 'did-frame-navigate'), + emittedOnce(w.webContents, 'did-navigate') + ]); + + w.webContents.executeJavaScript('window.history.pushState(1, "")'); + await Promise.all([ + emittedOnce(w.webContents, 'navigation-entry-committed'), + emittedOnce(w.webContents, 'did-navigate-in-page') + ]); + + (w.webContents as any).once('navigation-entry-committed', () => { + expect.fail('Unexpected navigation-entry-committed'); + }); + w.webContents.once('did-navigate-in-page', () => { + expect.fail('Unexpected did-navigate-in-page'); + }); + await w.webContents.mainFrame.frames[0].executeJavaScript('window.history.back()'); + expect(await w.webContents.executeJavaScript('window.history.state')).to.equal(1); + expect((w.webContents as any).getActiveIndex()).to.equal(1); + }); + }); }); describe('chrome://media-internals', () => { From f9b2608f2c48f89f4c7087920fe3cb3fef89ed2e Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:33:40 -0700 Subject: [PATCH 716/811] docs: update sandbox renderer defaults for Electron 20 (#35615) docs: update sandbox renderer defaults for Electron 20 (#35379) * docs: update E20 sandbox rendering defaults * docs: update tutorial * simplify paragraph * dont mention context isolation Co-authored-by: Erick Zhao --- docs/tutorial/sandbox.md | 74 +++++++++++++++-------------- docs/tutorial/tutorial-3-preload.md | 20 +++++++- 2 files changed, 58 insertions(+), 36 deletions(-) diff --git a/docs/tutorial/sandbox.md b/docs/tutorial/sandbox.md index db71727efb6cc..5081d557ba0db 100644 --- a/docs/tutorial/sandbox.md +++ b/docs/tutorial/sandbox.md @@ -12,28 +12,10 @@ the GPU service and the network service. See Chromium's [Sandbox design document][sandbox] for more information. -## Electron's sandboxing policies - -Electron comes with a mixed sandbox environment, meaning sandboxed processes can run -alongside privileged ones. By default, renderer processes are not sandboxed, but -utility processes are. Note that as in Chromium, the main (browser) process is -privileged and cannot be sandboxed. - -Historically, this mixed sandbox approach was established because having Node.js available -in the renderer is an extremely powerful tool for app developers. Unfortunately, this -feature is also an equally massive security vulnerability. - -Theoretically, unsandboxed renderers are not a problem for desktop applications that -only display trusted code, but they make Electron less secure than Chromium for -displaying untrusted web content. However, even purportedly trusted code may be -dangerous — there are countless attack vectors that malicious actors can use, from -cross-site scripting to content injection to man-in-the-middle attacks on remotely loaded -websites, just to name a few. For this reason, we recommend enabling renderer sandboxing -for the vast majority of cases under an abundance of caution. - - -Note that there is an active discussion in the issue tracker to enable renderer sandboxing -by default. See [#28466][issue-28466]) for details. +Starting from Electron 20, the sandbox is enabled for renderer processes without any +further configuration. If you want to disable the sandbox for a process, see the +[Disabling the sandbox for a single process](#disabling-the-sandbox-for-a-single-process) +section. ## Sandbox behaviour in Electron @@ -46,12 +28,17 @@ When renderer processes in Electron are sandboxed, they behave in the same way a regular Chrome renderer would. A sandboxed renderer won't have a Node.js environment initialized. - Therefore, when the sandbox is enabled, renderer processes can only perform privileged tasks (such as interacting with the filesystem, making changes to the system, or spawning subprocesses) by delegating these tasks to the main process via inter-process communication (IPC). +:::note + +For more info on inter-process communication, check out our [IPC guide](./ipc.md). + +::: + ### Preload scripts In order to allow renderer processes to communicate with the main process, preload @@ -66,7 +53,7 @@ but can only import a subset of Electron and Node's built-in modules: In addition, the preload script also polyfills certain Node.js primitives as globals: -* [`Buffer`](https://nodejs.org/api/Buffer.html) +* [`Buffer`](https://nodejs.org/api/buffer.html) * [`process`](../api/process.md) * [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate) * [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args) @@ -83,13 +70,17 @@ privileged APIs to untrusted code running in the renderer process unless ## Configuring the sandbox -### Enabling the sandbox for a single process +For most apps, sandboxing is the best choice. In certain use cases that are incompatible with +the sandbox (for instance, when using native node modules in the renderer), +it is possible to disable the sandbox for specific processes. This comes with security +risks, especially if any untrusted code or content is present in the unsandboxed process. -In Electron, renderer sandboxing can be enabled on a per-process basis with -the `sandbox: true` preference in the [`BrowserWindow`][browser-window] constructor. +### Disabling the sandbox for a single process -```js -// main.js +In Electron, renderer sandboxing can be disabled on a per-process basis with +the `sandbox: false` preference in the [`BrowserWindow`][browser-window] constructor. + +```js title='main.js' app.whenReady().then(() => { const win = new BrowserWindow({ webPreferences: { @@ -100,17 +91,30 @@ app.whenReady().then(() => { }) ``` +Sandboxing is also disabled whenever Node.js integration is enabled in the renderer. +This can be done through the BrowserWindow constructor with the `nodeIntegration: true` flag. + +```js title='main.js' +app.whenReady().then(() => { + const win = new BrowserWindow({ + webPreferences: { + nodeIntegration: true + } + }) + win.loadURL('https://google.com') +}) +``` + ### Enabling the sandbox globally If you want to force sandboxing for all renderers, you can also use the [`app.enableSandbox`][enable-sandbox] API. Note that this API has to be called before the app's `ready` event. -```js -// main.js +```js title='main.js' app.enableSandbox() app.whenReady().then(() => { - // no need to pass `sandbox: true` since `app.enableSandbox()` was called. + // any sandbox:false calls are overridden since `app.enableSandbox()` was called. const win = new BrowserWindow() win.loadURL('https://google.com') }) @@ -139,16 +143,16 @@ issues: have, to inherit everything we can from Chromium, and to respond quickly to security issues, but Electron cannot be as secure as Chromium without the resources that Chromium is able to dedicate. -2. Some security features in Chrome (such as Safe Browsing and Certificate +1. Some security features in Chrome (such as Safe Browsing and Certificate Transparency) require a centralized authority and dedicated servers, both of which run counter to the goals of the Electron project. As such, we disable those features in Electron, at the cost of the associated security they would otherwise bring. -3. There is only one Chromium, whereas there are many thousands of apps built +1. There is only one Chromium, whereas there are many thousands of apps built on Electron, all of which behave slightly differently. Accounting for those differences can yield a huge possibility space, and make it challenging to ensure the security of the platform in unusual use cases. -4. We can't push security updates to users directly, so we rely on app vendors +1. We can't push security updates to users directly, so we rely on app vendors to upgrade the version of Electron underlying their app in order for security updates to reach users. diff --git a/docs/tutorial/tutorial-3-preload.md b/docs/tutorial/tutorial-3-preload.md index 6f84cfe421909..80e12ef0e82d7 100644 --- a/docs/tutorial/tutorial-3-preload.md +++ b/docs/tutorial/tutorial-3-preload.md @@ -38,7 +38,25 @@ called a **preload**. ## Augmenting the renderer with a preload script A BrowserWindow's preload script runs in a context that has access to both the HTML DOM -and a Node.js environment. Preload scripts are injected before a web page loads in the renderer, +and a limited subset of Node.js and Electron APIs. + +:::info Preload script sandboxing + +From Electron 20 onwards, preload scripts are **sandboxed** by default and no longer have access +to a full Node.js environment. Practically, this means that you have a polyfilled `require` +function that only has access to a limited set of APIs. + +| Available API | Details | +| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Electron modules | Renderer process modules | +| Node.js modules | [`events`](https://nodejs.org/api/events.html), [`timers`](https://nodejs.org/api/timers.html), [`url`](https://nodejs.org/api/url.html) | +| Polyfilled globals | [`Buffer`](https://nodejs.org/api/buffer.html), [`process`](../api/process.md), [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate), [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args) | + +For more information, check out the [Process Sandboxing](./sandbox.md) guide. + +::: + +Preload scripts are injected before a web page loads in the renderer, similar to a Chrome extension's [content scripts][content-script]. To add features to your renderer that require privileged access, you can define [global] objects through the [contextBridge][contextbridge] API. From aaf560817b5173ac7288b382a4e6d6eb3ff25a3d Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:36:58 -0700 Subject: [PATCH 717/811] chore: bump chromium to 106.0.5249.30 (21-x-y) (#35423) --- DEPS | 2 +- chromium_src/BUILD.gn | 7 +- patches/chromium/.patches | 4 +- patches/chromium/accelerator.patch | 6 +- ...client_precreatemessageloop_callback.patch | 16 +- .../add_didinstallconditionalfeatures.patch | 20 +- ...pedcliboardwriter_writeunsaferawdata.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 45 ++-- ..._windows_to_have_different_web_prefs.patch | 14 +- ..._secondary_label_via_simplemenumodel.patch | 6 +- patches/chromium/blink_local_frame.patch | 12 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ...build_disable_print_content_analysis.patch | 9 +- ..._depend_on_packed_resource_integrity.patch | 20 +- .../build_libc_as_static_library.patch | 2 +- patches/chromium/can_create_window.patch | 48 ++--- .../chromium/cherry-pick-9b5207569882.patch | 179 ---------------- ...hore_add_electron_deps_to_gitignores.patch | 2 +- ...dle_synthetic_mouse_events_for_touch.patch | 4 +- ...screationoverridden_with_full_params.patch | 16 +- patches/chromium/chrome_key_systems.patch | 2 +- .../crash_allow_setting_more_options.patch | 4 +- patches/chromium/disable-redraw-lock.patch | 4 +- .../disable_color_correct_rendering.patch | 14 +- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 12 +- ...ization_guide_for_preconnect_feature.patch | 59 ++++++ ...ythreadcreated_if_pcscan_is_disabled.patch | 2 +- .../chromium/enable_reset_aspect_ratio.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- .../extend_apply_webpreferences.patch | 6 +- ..._registry_to_multibuffer_data_source.patch | 10 +- ...to_add_observers_on_created_hunspell.patch | 2 +- ...screen_rendering_with_viz_compositor.patch | 4 +- ..._raw_response_headers_from_urlloader.patch | 4 +- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- ...out_profile_refs_in_accessibility_ui.patch | 63 +++--- ...from_localframe_requestexecutescript.patch | 198 ++++++++++++++++++ ...ler_update_functions_to_early_return.patch | 6 +- ...for_components_segmentation_platform.patch | 47 +++++ patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 6 +- ...gpu_notify_when_dxdiag_request_fails.patch | 10 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 4 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- .../mas_disable_custom_window_frame.patch | 14 +- .../mas_disable_remote_accessibility.patch | 34 +-- patches/chromium/mas_no_private_api.patch | 2 +- ...emote_certificate_verification_logic.patch | 14 +- .../chromium/notification_provenance.patch | 12 +- patches/chromium/picture-in-picture.patch | 6 +- ...utofill_colors_to_the_color_pipeline.patch | 2 +- patches/chromium/printing.patch | 118 +++++------ patches/chromium/process_singleton.patch | 4 +- ...r_changes_to_the_webcontentsobserver.patch | 14 +- .../render_widget_host_view_base.patch | 12 +- .../render_widget_host_view_mac.patch | 12 +- patches/chromium/resource_file_conflict.patch | 6 +- ...h_spell_check_delayed_initialization.patch | 4 +- patches/chromium/scroll_bounce_flag.patch | 4 +- ...ecks_in_mediastreamdevicescontroller.patch | 57 +++-- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/sysroot.patch | 2 +- patches/chromium/web_contents.patch | 10 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 18 +- ...feat_add_hook_to_notify_script_ready.patch | 16 +- patches/config.json | 4 +- patches/lss/.patches | 1 - ...ix_cast_pwrite64_arg_to_long_for_arm.patch | 24 --- patches/node/.patches | 2 + .../enable_-wunqualified-std-cast-call.patch | 21 ++ .../node/v8_api_advance_api_deprecation.patch | 22 ++ patches/v8/build_gn.patch | 6 +- patches/v8/dcheck.patch | 21 +- ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ..._terminating_exception_in_microtasks.patch | 8 +- ...workaround_an_undefined_symbol_error.patch | 6 +- .../browser/api/electron_api_web_contents.cc | 1 + shell/browser/api/electron_api_web_contents.h | 1 + shell/browser/electron_browser_client.cc | 92 ++++---- shell/browser/electron_browser_context.cc | 7 + shell/browser/electron_browser_context.h | 2 + shell/browser/electron_permission_manager.cc | 10 + shell/browser/electron_permission_manager.h | 11 +- .../desktop_notification_controller.cc | 14 +- shell/browser/ui/devtools_ui.cc | 8 +- shell/browser/zoom_level_delegate.cc | 62 +++--- shell/browser/zoom_level_delegate.h | 5 +- .../extensions/electron_extensions_client.cc | 5 + .../extensions/electron_extensions_client.h | 2 + shell/renderer/api/electron_api_web_frame.cc | 76 +++---- shell/renderer/electron_api_service_impl.cc | 4 +- shell/renderer/electron_autofill_agent.cc | 4 +- shell/renderer/renderer_client_base.cc | 11 +- 102 files changed, 944 insertions(+), 804 deletions(-) delete mode 100644 patches/chromium/cherry-pick-9b5207569882.patch create mode 100644 patches/chromium/disable_optimization_guide_for_preconnect_feature.patch create mode 100644 patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch create mode 100644 patches/chromium/fix_the_gn_gen_for_components_segmentation_platform.patch delete mode 100644 patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch create mode 100644 patches/node/enable_-wunqualified-std-cast-call.patch create mode 100644 patches/node/v8_api_advance_api_deprecation.patch diff --git a/DEPS b/DEPS index 63e9d857212b9..dfd7929b7e30a 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5216.0', + '106.0.5249.30', 'node_version': 'v16.16.0', 'nan_version': diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 2ec068f21e809..c07fb721a8484 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -156,10 +156,7 @@ static_library("chrome") { "//services/strings", ] - deps = [ - "//chrome/browser:resource_prefetch_predictor_proto", - "//components/optimization_guide/proto:optimization_guide_proto", - ] + deps = [ "//chrome/browser:resource_prefetch_predictor_proto" ] if (is_linux) { sources += [ "//chrome/browser/icon_loader_auralinux.cc" ] @@ -232,6 +229,8 @@ static_library("chrome") { "//chrome/browser/printing/printer_query.h", "//chrome/browser/printing/printing_service.cc", "//chrome/browser/printing/printing_service.h", + "//components/printing/browser/print_to_pdf/pdf_print_job.cc", + "//components/printing/browser/print_to_pdf/pdf_print_job.h", "//components/printing/browser/print_to_pdf/pdf_print_utils.cc", "//components/printing/browser/print_to_pdf/pdf_print_utils.h", ] diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 4a5283fa144b0..e575ac484e854 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -118,4 +118,6 @@ revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch add_electron_deps_to_license_credits_file.patch feat_add_set_can_resize_mutator.patch fix_revert_emulationhandler_update_functions_to_early_return.patch -cherry-pick-9b5207569882.patch +fix_return_v8_value_from_localframe_requestexecutescript.patch +disable_optimization_guide_for_preconnect_feature.patch +fix_the_gn_gen_for_components_segmentation_platform.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 2582196629449..4786fa2f37a82 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 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a1f702d8b 100644 +index e032433d7096a941132c25528781ecbf375eb9af..33d88f947bc9a0a4795f1584e114952f942b277b 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -44,7 +44,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a } #if BUILDFLAG(IS_MAC) -@@ -447,7 +457,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -445,7 +455,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( const std::u16string& shortcut) const { std::u16string result = shortcut; @@ -53,7 +53,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY); // Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut. -@@ -455,7 +465,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -453,7 +463,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( // more information. if (IsCtrlDown()) result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY); diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 1b789c2492f9b..78b99613ad424 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf46257123 100644 +index d435206f773dd30086ae81868412bc28029935d8..a0856c214d962199a2e51c7bd14f0f676d35507e 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { @@ -24,16 +24,16 @@ index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf // 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 -@@ -337,7 +341,6 @@ int GpuMain(MainFunctionParams parameters) { - ChildProcess gpu_process(io_thread_type); - DCHECK(base::ThreadPoolInstance::Get()->WasStarted()); +@@ -323,7 +327,6 @@ int GpuMain(MainFunctionParams parameters) { + const_cast(&command_line), gpu_preferences); + const bool dead_on_arrival = !init_success; - auto* client = GetContentClient()->gpu(); - if (client) - client->PostIOThreadCreated(gpu_process.io_task_runner()); - + if (client) { + client->PostSandboxInitialized(); + } diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h -index 04274b751b498456fc4b269bfbc6399b4f27d3ed..2fb98baf0df4e191e5e18fd7055cc2d92a2156df 100644 +index a5d868b9e409c986bc85dfd71bb0363b5fa22145..9abe1cf5b2cc8ce60387ddf81b7c13aff9c178c4 100644 --- a/content/public/gpu/content_gpu_client.h +++ b/content/public/gpu/content_gpu_client.h @@ -29,6 +29,10 @@ class CONTENT_EXPORT ContentGpuClient { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index bb65405ceecdc..71ebf42a19af7 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 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ede21d73be 100644 +index 7d169540590b83924766b1d423dc1bc46ab35250..f5bbb6ab26bd714d667236071a2eb0a5794a5631 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c275ff0dc6 100644 +index 8199122b2d759aa8b27affabe67b108fb9a16c38..97cf24ad5f4a64322f242b0c339a807e3edb23fc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4294,6 +4294,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4345,6 +4345,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c2 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21760ac96d 100644 +index c8e822502d1b18c701a303024c3cba7e434d7829..89a048fbdaec8a8ea184790b78b0c63cfda7d171 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -585,6 +585,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -588,6 +588,8 @@ class CONTENT_EXPORT RenderFrameImpl uint32_t ng_call_count) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21 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 544ea3f5cd705d61dd0b99f2e0f541d98ca75c53..d863681a4297cbf2844469a1baae2a81cb0d1238 100644 +index 4ef7353157272a623cea6b086b84da72ca795fca..548f6afd429695088bd83743fa6f6c1cd4197276 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -579,6 +579,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -584,6 +584,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -92,7 +92,7 @@ index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614 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 f40f022ff8ff88f1f128d4996f4460b8fdea1d95..480503e245dbb28dffc8ac9d2843d541793db534 100644 +index 2ac22a0410eea7f67cc7eb066879da649f7c6a0e..53ec3d177afbd75b4e67c6ab847094994c291dcb 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( @@ -123,10 +123,10 @@ index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8 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 d44adfd65bd9a71996cdd323a5220d2dcaa09de2..1011a318a7d79186abe556d03f78badc725c802a 100644 +index a2d7e97958d378dc5d37524f2f5516205c010749..e3f605938b3eea7f1c4dfac8e3c25014ebd15476 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -367,6 +367,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 89a42e0df8307..d269e9a1c9409 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -29,7 +29,7 @@ index 1eb1d0fe4696f26e7de43fc8797c283e9e6db042..766f8d8df866ce7fbc337cecceb715cc objects_.clear(); platform_representations_.clear(); diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h -index c47909313da0d7cd8a2b3cd670327011af66e3fb..0d259c21507f38124dfa46aceeacfda76cfd4a38 100644 +index 96f5bf8b6b5f3ed5ab25e15845f0de455eb68e0b..e6718a893e1bc5c970245c8265c95dda5d5fa2ff 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.h +++ b/ui/base/clipboard/scoped_clipboard_writer.h @@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { 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 b49de0ad61135..7b9ff9388c669 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 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a162891935d5c4b7 100644 +index 5c03f1194643c6f7302131404f7d869502f1e18b..fa990e6a444d5321213d956b01ba89ef21d57bd2 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -658,6 +658,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -659,6 +659,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a1628919 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 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d10b35bf4 100644 +index dfefe47c77c723c1cfdc6abe0e8ff96bc5ec6ddd..8d195ec46b9a6ea830c1ff36ee740b3b8be2b341 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h -@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl +@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl void EnablePreferredSizeMode() override; void WriteIntoTrace(perfetto::TracedProto context) const override; @@ -34,7 +34,7 @@ index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d 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 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da4689b7a2 100644 +index 2e4af843d7d0bbef5b7e6357de73355068b38948..77c69de4a541c56389ae11330f67c5fb6bbc4d2a 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h @@ -77,6 +77,9 @@ class CONTENT_EXPORT RenderViewHost { @@ -47,27 +47,14 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da private: // 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 f55211fdb346c8659c93d077ec04ccebdae5b450..19b846f6ccf99423b712f0b589c20c1ab35bdfcf 100644 ---- a/content/renderer/render_view_impl.h -+++ b/content/renderer/render_view_impl.h -@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient { - bool was_created_by_renderer, - scoped_refptr task_runner); - -+ void OnSetSchedulerThrottling(bool allowed); -+ - static WindowOpenDisposition NavigationPolicyToDisposition( - blink::WebNavigationPolicy policy); - diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319b1a5ec28 100644 +index 6ff7c34463f3ce5011ea8711d23f9cd11da38d8b..2b8e313dfac2ea9fad0583bb5e98d0c385e8584a 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom -@@ -108,4 +108,7 @@ interface PageBroadcast { - - // Sent to whole page, but should only be used by the main frame. - SetPageBaseBackgroundColor(skia.mojom.SkColor? color); +@@ -137,4 +137,7 @@ interface PageBroadcast { + mojo_base.mojom.UnguessableToken devtools_frame_token, + RemoteFrameInterfacesFromBrowser remote_frame_interfaces, + RemoteMainFrameInterfaces remote_main_frame_interfaces); + + // Whether to enable the Renderer scheduler background throttling. + SetSchedulerThrottling(bool allowed); @@ -85,10 +72,10 @@ index 3af33a4d699b5bbfb0a1abac9408ad322a47a5ac..30bc8aa73fb46a0306ccc837a99cc4d5 // 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 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b7183233b4bc 100644 +index 231f76d07d8a0d3d060b30e0ff6eabe4aa33d755..40aa3b1a5c569e66b6f5d1630afe248c40d5715b 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3758,6 +3758,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3787,6 +3787,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +89,7 @@ index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b718 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3769,7 +3776,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3798,7 +3805,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +100,10 @@ index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b718 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 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc99099e16b 100644 +index 08cc81481cbe4fe40a7df6316db765fa2eac7fda..c5dfefd84b44de5a2c28afb2b9bd8035647da12b 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -416,6 +416,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -425,6 +425,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +111,7 @@ index 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc9 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -866,6 +867,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -875,6 +876,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 d6f96237169cf..5bf9d19e0f1d6 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 @@ -32,7 +32,7 @@ index e5c9ebda8156c1a7c32f7eb0661dff40f022c264..8840d4be4b49b27dfb257866f6a074ef 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 a910d7b53a1346797f0e2bd030dff7ff84a834b8..4847c7587484eb02b8d7f532be53e499517a95fb 100644 +index cfd107cf7257b5c0c2482baba8964e1d2508fc8b..6a2e25a3d7700df9c59952ff19c9ce62d391005c 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 @@ -149,6 +149,19 @@ bool StructTraitsaccelerated_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 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eeac87b0cca 100644 +index adbb4f0de4d787ac7710de06de2bf3b32dc6491f..c68a71ca2e272874420d309f2154cf89cf99b7ec 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 @@ @@ -67,7 +67,7 @@ index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eea #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" -@@ -157,6 +158,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -159,6 +160,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { // If true, stylus handwriting recognition to text input will be available in // editable input fields which are non-password type. bool stylus_handwriting_enabled; @@ -88,7 +88,7 @@ index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eea // This flags corresponds to a Page's Settings' setCookieEnabled state. It // only controls whether or not the "document.cookie" field is properly 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 d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a4afe8e4f 100644 +index fa2db0ccc2d9f72aa4976816548df31f83c2ef54..ab896b217be1f8695c6d05414252a37c8086369d 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 @@ @@ -99,7 +99,7 @@ index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -433,6 +434,52 @@ struct BLINK_COMMON_EXPORT StructTraitsDetach(FrameDetachType::kRemove); -@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -155,6 +147,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43b // 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 dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee2139648501d377dfb 100644 +index 90cf3971e573aaec7a85ccf4b6fff9f931924bdc..bb4e80de2930b2e3213cc7c4469bb2875760ebee 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -547,10 +547,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee213964850 if (!Client()) return false; -@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -596,6 +592,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index f0253548ac409..c3a8068824ee9 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 605a2d455a8affffb3e864d872ffa767fdbc988f..ab4da059149f51724c057cdff7e04e9f6bc85270 100644 +index 674def40cfdc83432d0f3ced8ab3f570dc9e8b1b..96e5e5e145715218724f93041060df60d709839a 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_disable_print_content_analysis.patch b/patches/chromium/build_disable_print_content_analysis.patch index dd26dbc9c487a..ae1dfdc82ce17 100644 --- a/patches/chromium/build_disable_print_content_analysis.patch +++ b/patches/chromium/build_disable_print_content_analysis.patch @@ -13,16 +13,15 @@ This patch can be removed when enable_print_content_analysis can be more easily enabled or disabled by default with buildflags. diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni -index 1d2b24adbb39215531bbe189d6191dba026d4f68..88b7962836cfe93a59d1569245f4815f22be355e 100644 +index e57b8edde3b3e8f7a9cd580e2bcd039f1beebdff..f49cbaa980674444ccaee4a615dc99e9c630f7b8 100644 --- a/printing/buildflags/buildflags.gni +++ b/printing/buildflags/buildflags.gni -@@ -36,8 +36,7 @@ declare_args() { +@@ -36,7 +36,7 @@ declare_args() { # Enable snapshotting a page when printing for its content to be analyzed for # sensitive content by enterprise users. -- enable_print_content_analysis = -- is_chromeos_ash || is_chromeos_lacros || is_win || is_linux || is_mac -+ enable_print_content_analysis = is_chromeos_ash || is_chromeos_lacros +- enable_print_content_analysis = is_chromeos || is_win || is_linux || is_mac ++ enable_print_content_analysis = is_chromeos } declare_args() { 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 e4d390ca6ea25..66ec8aaf66484 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,10 +11,10 @@ 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 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfefb578981 100644 +index 0223183c4e869e835429a52ad7d9eb381a2d21f5..47162ccaa75ea637b7ce5ed0fed976862b14c427 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -175,11 +175,16 @@ if (!is_android && !is_mac) { +@@ -176,11 +176,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfe "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c7fbdcf50 100644 +index bb193ea0cb1df492e52a5023bd84852bfc3985ce..f89c54a1f73f26ca142a2764fd235111e6cbeff0 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4614,7 +4614,7 @@ static_library("browser") { +@@ -4623,7 +4623,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 db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34e9a0c579 100644 +index ade95f3592fc54e69ec8717c7542ef2eae645056..c339589fc723be5ad49cca88bddbd9ae8a649644 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6011,7 +6011,6 @@ test("unit_tests") { +@@ -6038,7 +6038,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:crash_reporter_client_win_unit_tests", -@@ -6036,6 +6035,10 @@ test("unit_tests") { +@@ -6063,6 +6062,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,16 +68,16 @@ index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6933,7 +6936,7 @@ test("unit_tests") { +@@ -6964,7 +6967,7 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", + # "//chrome:packed_resources_integrity_hash", + "//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons", "//chrome/browser/enterprise/connectors/analysis:features", "//chrome/browser/media/router:test_support", - "//chrome/browser/media/router/discovery:discovery", -@@ -7051,6 +7054,10 @@ test("unit_tests") { +@@ -7083,6 +7086,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 14af10cde5c1f..1724d3fa2ba8a 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 4fec8db3c0431294f65e2a7f0046b6ac5ba78c47..2a4ad0955b3c01b2f1d1665fb65e6d9bb16f5fc2 100644 +index 01f5a1713c28f077e624fe1ea1c84fa3b514d660..3837b9ccf00b2d9f0b655a2c08e96d5020b0afbf 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -44,7 +44,11 @@ config("winver") { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 005caa9f6af02..55d8906d9432c 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 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad75a0ff582 100644 +index abfe94dc8c31fc928eb554ec3f2ec095aa6a970b..e815010dcb9437727f32b12f0d47a31384e24677 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7298,6 +7298,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7313,6 +7313,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 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad7 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d06dd4436 100644 +index 8e1c0feede6dc599c0bc78d6278726b16c7931df..2b393e7e7089d17a0906610c3c8979c20928a5f6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3996,6 +3996,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4012,6 +4012,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -4040,12 +4048,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4056,12 +4064,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d 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 fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bdcd7b8f01 100644 +index 4eee5f6c069c83039bf0acee71056d8ed4ea92eb..9212926fba9d06296c9c46a95519b6ed777569ee 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -571,6 +571,10 @@ struct CreateNewWindowParams { +@@ -574,6 +574,10 @@ struct CreateNewWindowParams { // Additional parameters for creating picture-in-picture windows. blink.mojom.PictureInPictureWindowOptions? pip_options; @@ -68,10 +68,10 @@ index fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bd // 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 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f14902e6f 100644 +index a9c96d4b463929143c7de0ec29d4afee5315fd92..2750d9f6c377b36fd1684077d9eec1cde78c856c 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -610,6 +610,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f 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 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a029c40ea 100644 +index bac29d867e465c87f69ea4f28eac118718db0992..7eb47e0c73c7f0d8a0cadcf5b8163f8a5154faea 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -164,6 +164,7 @@ class NetworkService; +@@ -163,6 +163,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a } // namespace network namespace sandbox { -@@ -991,6 +992,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -999,6 +1000,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -149,13 +149,13 @@ index 0274e3bb5cc62ce2c52be68a50b57c339fc5bba7..1ea3e1fdf067ea54ce54d31f494ac2bf // Notifies the delegate about the creation of a new WebContents. This // 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 f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a0d1d2016 100644 ---- a/content/renderer/render_view_impl.cc -+++ b/content/renderer/render_view_impl.cc -@@ -297,6 +297,10 @@ WebView* RenderViewImpl::CreateView( - /*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(), - creator->IsAdFrame()); +diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc +index d70f6df69aa604972755d1cfe0cfcd2b0369f68c..8199122b2d759aa8b27affabe67b108fb9a16c38 100644 +--- a/content/renderer/render_frame_impl.cc ++++ b/content/renderer/render_frame_impl.cc +@@ -6196,6 +6196,10 @@ WebView* RenderFrameImpl::CreateNewWindow( + /*openee_can_access_opener_origin=*/true, + !GetWebFrame()->IsAllowedToDownload(), GetWebFrame()->IsAdFrame()); + params->raw_features = features.raw_features.Utf8( + WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD); @@ -165,10 +165,10 @@ index f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index 6abdcf70bdeeb3a34d01c3b00e5f629373eef76b..537f71cbf3cc1112100a199a15b77a535efd8a4e 100644 +index 40b82385697d8721ef6da3d0c77544d6d0ca400c..3a2d5207fb2eeea4b016012b09c3668af8dc35b4 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -482,6 +482,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -212,12 +212,12 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 cc39235616f0249c8a979a870885aec2d0e04cc4..77e6bbe18556279a98b5453d4ba1c3eb5b850287 100644 +index 5bf3339038b6a8498221d1bd222ec340d78d1b92..c4be7a96144ac53be856fbf52dff8e990aa736aa 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2090,6 +2090,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2091,6 +2091,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = - GetWindowFeaturesFromString(features, entered_window); + GetWindowFeaturesFromString(features, entered_window, completed_url); + window_features.raw_features = features; + diff --git a/patches/chromium/cherry-pick-9b5207569882.patch b/patches/chromium/cherry-pick-9b5207569882.patch deleted file mode 100644 index a327b22364d20..0000000000000 --- a/patches/chromium/cherry-pick-9b5207569882.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ken Rockot -Date: Wed, 31 Aug 2022 15:39:45 +0000 -Subject: Mojo: Validate response message type - -Ensures that a response message is actually the type expected by the -original request. - -Fixed: 1358134 -Change-Id: I8f8f58168764477fbf7a6d2e8aeb040f07793d45 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3864274 -Reviewed-by: Robert Sesek -Commit-Queue: Ken Rockot -Cr-Commit-Position: refs/heads/main@{#1041553} - -diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h -index 0ebbc94ad51cca74fcebc357b5262229ae5c9d0e..cd79a5edb3f939623b874db36542ee651113c164 100644 ---- a/mojo/public/cpp/bindings/interface_endpoint_client.h -+++ b/mojo/public/cpp/bindings/interface_endpoint_client.h -@@ -221,20 +221,32 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient - void ForgetAsyncRequest(uint64_t request_id); - - private: -- // Maps from the id of a response to the MessageReceiver that handles the -- // response. -- using AsyncResponderMap = -- std::map>; -+ struct PendingAsyncResponse { -+ public: -+ PendingAsyncResponse(uint32_t request_message_name, -+ std::unique_ptr responder); -+ PendingAsyncResponse(PendingAsyncResponse&&); -+ PendingAsyncResponse(const PendingAsyncResponse&) = delete; -+ PendingAsyncResponse& operator=(PendingAsyncResponse&&); -+ PendingAsyncResponse& operator=(const PendingAsyncResponse&) = delete; -+ ~PendingAsyncResponse(); -+ -+ uint32_t request_message_name; -+ std::unique_ptr responder; -+ }; -+ -+ using AsyncResponderMap = std::map; - - struct SyncResponseInfo { - public: -- explicit SyncResponseInfo(bool* in_response_received); -+ SyncResponseInfo(uint32_t request_message_name, bool* in_response_received); - - SyncResponseInfo(const SyncResponseInfo&) = delete; - SyncResponseInfo& operator=(const SyncResponseInfo&) = delete; - - ~SyncResponseInfo(); - -+ uint32_t request_message_name; - Message response; - - // Points to a stack-allocated variable. -diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc -index ded0d20ab193cfdaf36bd44c25719d7073c989fb..a6f41414b8918989662eb0a1dea773932631c8cc 100644 ---- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc -+++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc -@@ -30,6 +30,7 @@ - #include "mojo/public/cpp/bindings/sync_call_restrictions.h" - #include "mojo/public/cpp/bindings/sync_event_watcher.h" - #include "mojo/public/cpp/bindings/thread_safe_proxy.h" -+#include "third_party/abseil-cpp/absl/types/optional.h" - #include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_mojo_event_info.pbzero.h" - - namespace mojo { -@@ -316,9 +317,27 @@ class ResponderThunk : public MessageReceiverWithStatus { - - // ---------------------------------------------------------------------------- - -+InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse( -+ uint32_t request_message_name, -+ std::unique_ptr responder) -+ : request_message_name(request_message_name), -+ responder(std::move(responder)) {} -+ -+InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse( -+ PendingAsyncResponse&&) = default; -+ -+InterfaceEndpointClient::PendingAsyncResponse& -+InterfaceEndpointClient::PendingAsyncResponse::operator=( -+ PendingAsyncResponse&&) = default; -+ -+InterfaceEndpointClient::PendingAsyncResponse::~PendingAsyncResponse() = -+ default; -+ - InterfaceEndpointClient::SyncResponseInfo::SyncResponseInfo( -+ uint32_t request_message_name, - bool* in_response_received) -- : response_received(in_response_received) {} -+ : request_message_name(request_message_name), -+ response_received(in_response_received) {} - - InterfaceEndpointClient::SyncResponseInfo::~SyncResponseInfo() {} - -@@ -606,6 +625,7 @@ bool InterfaceEndpointClient::SendMessageWithResponder( - // message before calling |SendMessage()| below. - #endif - -+ const uint32_t message_name = message->name(); - const bool is_sync = message->has_flag(Message::kFlagIsSync); - const bool exclusive_wait = message->has_flag(Message::kFlagNoInterrupt); - if (!controller_->SendMessage(message)) -@@ -622,7 +642,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder( - controller_->RegisterExternalSyncWaiter(request_id); - } - base::AutoLock lock(async_responders_lock_); -- async_responders_[request_id] = std::move(responder); -+ async_responders_.emplace( -+ request_id, PendingAsyncResponse{message_name, std::move(responder)}); - return true; - } - -@@ -630,7 +651,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder( - - bool response_received = false; - sync_responses_.insert(std::make_pair( -- request_id, std::make_unique(&response_received))); -+ request_id, -+ std::make_unique(message_name, &response_received))); - - base::WeakPtr weak_self = - weak_ptr_factory_.GetWeakPtr(); -@@ -808,13 +830,13 @@ void InterfaceEndpointClient::ResetFromAnotherSequenceUnsafe() { - } - - void InterfaceEndpointClient::ForgetAsyncRequest(uint64_t request_id) { -- std::unique_ptr responder; -+ absl::optional response; - { - base::AutoLock lock(async_responders_lock_); - auto it = async_responders_.find(request_id); - if (it == async_responders_.end()) - return; -- responder = std::move(it->second); -+ response = std::move(it->second); - async_responders_.erase(it); - } - } -@@ -906,6 +928,10 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { - return false; - - if (it->second) { -+ if (message->name() != it->second->request_message_name) { -+ return false; -+ } -+ - it->second->response = std::move(*message); - *it->second->response_received = true; - return true; -@@ -916,18 +942,22 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { - sync_responses_.erase(it); - } - -- std::unique_ptr responder; -+ absl::optional pending_response; - { - base::AutoLock lock(async_responders_lock_); - auto it = async_responders_.find(request_id); - if (it == async_responders_.end()) - return false; -- responder = std::move(it->second); -+ pending_response = std::move(it->second); - async_responders_.erase(it); - } - -+ if (message->name() != pending_response->request_message_name) { -+ return false; -+ } -+ - internal::MessageDispatchContext dispatch_context(message); -- return responder->Accept(message); -+ return pending_response->responder->Accept(message); - } else { - if (mojo::internal::ControlMessageHandler::IsControlMessage(message)) - return control_message_handler_.Accept(message); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index 0808a245ec7e3..f17521282d3c7 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index baf86ec0cde417fa4287f794de10b78d19439930..29d7b595fbfd6e211864e3baa8e2d3014b2e7a5b 100644 +index 651d8ec7d8e98e7588f8f182018188ab234d5c5a..1fc645a7f748d3cad8ca2f4fa9897454cb937a4c 100644 --- a/.gitignore +++ b/.gitignore @@ -230,6 +230,7 @@ vs-chromium-project.txt diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index 8c6aeac216019..5274875a7f85e 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -34,10 +34,10 @@ index 0aae49ec83b88057434af5bbfb54b10e53469918..058e5dc978e76a71fa02dc9e275592f3 Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 67871eec9821cf100acc719a1765be489dfbe7d8..1f883dc7d46d5cc3fddffe75c55e6b96fb0fc5f2 100644 +index 2dbe61a4bdf6556f6db101e47d81d37417736bd1..dec439f15a7995b14ccf4ef95651413911b5fc4f 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3136,15 +3136,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3137,15 +3137,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, SetMsgHandled(FALSE); // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index e0a059103b137..6a20c695f0e15 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -63,10 +63,10 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc -index 268355f22577cf21926e209a9fcdb3f52314f2ac..80f998cdb10d9955e438ba5ef4599b35c448fae2 100644 +index a3083a16b1317cc58b87e13f30498bcf3e475eaf..50deda6f7ee9b2cbf57288d54a30a44022be808a 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc -@@ -84,10 +84,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( +@@ -96,10 +96,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -108,10 +108,10 @@ index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4ca6b3b66e 100644 +index 244584b4df1fb85241212c44cca7da3e87c174f3..1e6239c111b0ea765388f384385789537f473237 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1821,12 +1821,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1811,12 +1811,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4c WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index b0f70cfaa60d28547f74b199d41ce81a5cdc8891..74efdc0a0ba5e5b862e12180dbfdb9534e9e0a5d 100644 +index 38ee0d848089a4abefa357e47169da871753df6e..53332516617dc196ce21d674ab6987c6de8438e0 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -855,8 +855,7 @@ class Browser : public TabStripModelObserver, +@@ -852,8 +852,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -246,10 +246,10 @@ 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 a2f1f72a30f694d53f28d38d823341e7b4f008e1..7ff6febe70e9ec82becfbe036883fbc7572b5b01 100644 +index 47b85a2bd890485dec96e23fb2cb8f8553f5c4e2..7f04a05eec8780e735e0458c75103d9f2e9b858b 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3922,8 +3922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3938,8 +3938,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 3e7651e9250b7..9dd19626a1871 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 732260f0da15c50f660348e0c66e0b3098aa418f..0a0394a3607e9b955f9fc517e0814ac07b3ba67e 100644 +index 30da015cffeb945973d0045ce297467ab16d7db6..53e7bd0f7dbff8c620a5827abb3ba871703a4f06 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index f4516dfd22cd5..0d5a296c8366a 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -75,7 +75,7 @@ index 2532e99f00b39777cd9640c76704f7430d39502e..323e039e4591a4099b187f7a0097b4ee // 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 7159bea91a25700f0cb36c48cab62fe2d616b3bd..9bcc5ae7e870c27c3533534c06daa890de5a4816 100644 +index a80a792f1cb2c996b77443a3383663b4687ae044..2b1453353ce93632b378d4b25295b5cb14df9b2c 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc @@ -170,6 +170,7 @@ bool PlatformCrashpadInitialization( @@ -128,7 +128,7 @@ index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index ad401a7711ceff58abacb99a03fda258fccd12a0..de04f4df602e3a0b20af045111faf8a7bf8e9e28 100644 +index ae8801a7fc877241313de84a6ae0698d4f2adf69..9ae249bfe41da9743adc7f60d69be0f003ca31e2 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc @@ -91,6 +91,7 @@ bool PlatformCrashpadInitialization( diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 39f1919a402ef..86f7dcc317504 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 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7cccaee61d61 100644 +index 29e812d41d5c8b1384db2231c625a39579fed6dc..b0d12e9b64cc7aa5448e88f540e7a594fca3c80e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -39,7 +39,7 @@ index 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7ccc (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -1052,6 +1057,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -1053,6 +1058,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 31116543398e5..e0ce3e006d1cb 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 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c5130e93e74d 100644 +index 5542037a338e34800d86c3ca9cbaf0511fa60570..e5011a2b9d2127c1e17730db54f9574f1ed1d287 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1866,6 +1866,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1873,6 +1873,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -35,7 +35,7 @@ index 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c513 // 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 5eaf2d9cab94def423be78b414179e6ccc596437..1ca8b5968350e88761d9ebc073fe8c573d0f3b5d 100644 +index 809fb46cc34db308e0ec73197859045ba639407c..9360695cd920de372529206212f795f299405fcf 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 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363b1203c58 100644 +index 3f413731440ea6597001c8da03c1ac3c49bb60b2..fe1f2373f0b5f5e8eed2e0966910a6454db776d4 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -93,7 +93,7 @@ index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363 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 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf26423d0e 100644 +index 368d47247ced2320e0627e9cce3cf05e59ea9f39..c675f0f37fa75dd0a39d503564c7ac265614d4e9 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -199,6 +199,7 @@ @@ -104,7 +104,7 @@ index 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3195,6 +3196,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3205,6 +3206,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[] = { @@ -156,7 +156,7 @@ index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..35b0bb908245330fbdc5205caa3299bf } 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 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937c56f6ffd 100644 +index ba6ab6961dec25a3f9c572341d24f341c8f58358..ba8cfd2a2572368fc14073a53f8544f269089894 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 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 47a43cc533925..cd20c93d4784f 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 54681d4aaaa52ee07fba0055a8411b8e19b4cc8c..8109976614a9ae39dd802d433517bbf29a51349e 100644 +index f28dcfe0721239ca9341a0db80e8626a515c34d8..ed10d28ed53a9debdfd26723e17b325b26249ab9 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -516,7 +516,11 @@ +@@ -517,7 +517,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 9c55c0da75f4a..f86b8471da647 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 cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468cef6e56d 100644 +index 311dd906e497f5ba8a19037e629aa58c44773e67..457ba67603442e8ae9ea75be1cb3b4bf32ed4c4f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -810,6 +810,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468 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 db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545cade0e23 100644 +index 527463920c3d259ca0f30c70a5a860394d0cf4e9..2b50994469ee8ede3b4417650386e26553436e6e 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -883,6 +883,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl SiteInstanceGroup* GetSiteInstanceGroup(); @@ -34,10 +34,10 @@ index db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545 // |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 ea62c4a966dd76c1964b6d7f9053cb4fb73376f5..79253c9d5c8f4e71e5c0d0d87dd641feab901e51 100644 +index 9d1301a55acdc5f70550c7222cd31f8338f0e7f4..82e9c9ba7c7cade143aeffdd1e123131d7568698 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -594,7 +594,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch b/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch new file mode 100644 index 0000000000000..725c9f03956a6 --- /dev/null +++ b/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch @@ -0,0 +1,59 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 1 Sep 2022 11:31:24 -0400 +Subject: disable optimization guide for preconnect feature + +The optimization guide component +(https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/) +is not enabled for Electron, but the preconnect feature uses the resource prefetch +predictor code which includes this component. This patch disables the optimization guide +component code in the resource prefetch predictor code since it is unused and including +it causes compilation problems on Windows. + +diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc +index c4b64a7812bac4534371887eb7e0a07ec9cab8ff..b827d69964d824540ea70f66c467e91be8391e6c 100644 +--- a/chrome/browser/predictors/resource_prefetch_predictor.cc ++++ b/chrome/browser/predictors/resource_prefetch_predictor.cc +@@ -100,10 +100,12 @@ PreconnectPrediction& PreconnectPrediction::operator=( + PreconnectPrediction& PreconnectPrediction::operator=( + PreconnectPrediction&& other) = default; + ++#if 0 + OptimizationGuidePrediction::OptimizationGuidePrediction() = default; + OptimizationGuidePrediction::OptimizationGuidePrediction( + const OptimizationGuidePrediction& prediction) = default; + OptimizationGuidePrediction::~OptimizationGuidePrediction() = default; ++#endif + + //////////////////////////////////////////////////////////////////////////////// + // ResourcePrefetchPredictor static functions. +diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h +index 53a23990019accc0504a25dae935c53348c7eaa7..ef6667ce8bbc062dbfb8d2e2cdb6886b3e994b76 100644 +--- a/chrome/browser/predictors/resource_prefetch_predictor.h ++++ b/chrome/browser/predictors/resource_prefetch_predictor.h +@@ -26,7 +26,9 @@ + #include "components/history/core/browser/history_service_observer.h" + #include "components/history/core/browser/history_types.h" + #include "components/keyed_service/core/keyed_service.h" ++#if 0 + #include "components/optimization_guide/content/browser/optimization_guide_decider.h" ++#endif + #include "components/sqlite_proto/key_value_data.h" + #include "net/base/network_isolation_key.h" + #include "services/network/public/mojom/fetch_api.mojom-forward.h" +@@ -110,6 +112,7 @@ struct PreconnectPrediction { + std::vector prefetch_requests; + }; + ++#if 0 + // Stores a result of a prediction from the optimization guide. + struct OptimizationGuidePrediction { + OptimizationGuidePrediction(); +@@ -121,6 +124,7 @@ struct OptimizationGuidePrediction { + std::vector predicted_subresources; + absl::optional optimization_guide_prediction_arrived; + }; ++#endif + + // Contains logic for learning what can be prefetched and for kicking off + // speculative prefetching. 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 d800d93049955..21ba62c9fe028 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 @@ -50,7 +50,7 @@ index 714232b0c2707d6c256e634ff784c18322bf0a85..48c8d0051c427954fe7265fee9cd0c6b #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 3327d353cd887d027cf1d9b483ebf6e6aaaef169..dab0d2cf3e87fc082f72f40d1d622efd390885d1 100644 +index 960d0100e1857592ee24b2da22e0253ab06098c1..dca9fb72fb69386ffb0910e13f841fa698250b66 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -30,6 +30,7 @@ diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index aa0b4d98274fc..cc467f7b1764c 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -19,10 +19,10 @@ index b6d243983474cfc2c314b555ccc1de4d833a7f00..2b1fa6a345247fdbb17bd2381ab9e74a aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index fe882b31026b527df28d384e6e7e7cccaee61d61..82616ebcb1f56de12cbd932a4614bb3858e9bad9 100644 +index b0d12e9b64cc7aa5448e88f540e7a594fca3c80e..91e45df23e659d705839fa3798ad3452bac012e5 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1002,8 +1002,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -1003,8 +1003,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index b94ce7ad7c34b..561fd2959781f 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 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f84811dde 100644 +index f25c1baa5142d53a882b864a67d94e9e0911f0bf..4dbbc74ddb359047f1dd9e158b8dcaf63bde3790 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1412,6 +1412,13 @@ void NetworkContext::SetNetworkConditions( @@ -51,22 +51,22 @@ index 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f // 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 07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9..d4dd2699fa0876d374750135851e1e5325bf4e0d 100644 +index a9a1beed6c8e59abb9065701f34f155905781a2a..5ced53f2e875091cdaf6a38384de4f7890cd71e9 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -296,6 +296,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -300,6 +300,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) + void SetEnablePreconnect(bool enable_preconnect) override; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529d3f603b3 100644 +index e47bbfac56cd6c787ba3e7c0518a5326386a19b6..105011c25861fe00cc8e72fe8f310ee5118725c3 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1103,6 +1103,9 @@ interface NetworkContext { +@@ -1106,6 +1106,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e6ee7916d 100644 +index 52f08526b9988beae7ec5b0fa44ced84d38f73ce..3f55bfcf0ed5dd83e73984cb3ba16cfa1fb7b685 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 { @@ -87,4 +87,4 @@ index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e + 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) + void SetEnablePreconnect(bool enable_preconnect) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index ce7e8f62fcf44..95c55e850c28a 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 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502b5d47996 100644 +index 40aa3b1a5c569e66b6f5d1630afe248c40d5715b..d61f63d5c16f3d93b301f1a338ae329b6f034753 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -161,6 +161,7 @@ +@@ -164,6 +164,7 @@ #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" @@ -23,7 +23,7 @@ index 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502 #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" -@@ -1797,6 +1798,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1807,6 +1808,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 6df94a6111ad2..bde6d8fe143bc 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,11 +13,11 @@ 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/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0ad1c2cd0 100644 +index c881e7951d10c48faac556661018423dff12b102..0f5408f3ddc65b856e62a05d3fe48a4397827cba 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 @@ - #include "base/callback_helpers.h" +@@ -11,8 +11,10 @@ + #include "base/containers/adapters.h" #include "base/cxx17_backports.h" #include "base/location.h" +#include "base/no_destructor.h" @@ -27,7 +27,7 @@ index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0 #include "media/base/media_log.h" #include "net/base/net_errors.h" #include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h" -@@ -60,8 +62,20 @@ const int kUpdateBufferSizeFrequency = 32; +@@ -61,8 +63,20 @@ const int kUpdateBufferSizeFrequency = 32; // How long to we delay a seek after a read? constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20); @@ -48,7 +48,7 @@ index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0 class MultiBufferDataSource::ReadOperation { public: ReadOperation() = delete; -@@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const { +@@ -154,7 +168,14 @@ bool MultiBufferDataSource::media_has_played() const { bool MultiBufferDataSource::AssumeFullyBuffered() const { DCHECK(url_data_); 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 d191cb136ea35..f1d733bd953da 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,7 +7,7 @@ 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 db3c802746235c0dcfe7fe19ca4315ee77c96743..e9a7dfb8f3a4271d35ef1d33d2dd346c23d65b47 100644 +index bbc3ea681bfe0db0e122635db5442c447a30d387..26bc4ccfcc7583fd76cd290132b0729c1f01bae3 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() { 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 6d34964ea3bf5..bf7eab53b1692 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -81,10 +81,10 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 90e1c4adeab61374adf9da5708497ea32a46c7f5..b812a22802c7c425ab259dfe5681cafe6ad758c8 100644 +index e3056ad83f954787f50c2507cb63659605c3dd3b..358eceadb8a3c2a6782f5fcd4b57630f87689c8b 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -134,6 +134,8 @@ viz_component("service") { +@@ -136,6 +136,8 @@ viz_component("service") { "display_embedder/skia_output_surface_impl_on_gpu.h", "display_embedder/skia_render_copy_results.cc", "display_embedder/skia_render_copy_results.h", 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 b2f1ce41117e1..3b31f510cf4c4 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -103,7 +103,7 @@ index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6aeacaf22f2 100644 +index 2e8a874bf93e03e7c194dc13555eead6fe1fcafa..5b28db971f8feebd36965ccafe8b1b957b3f1ede 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -606,6 +606,7 @@ URLLoader::URLLoader( @@ -123,7 +123,7 @@ index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6ae url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1545,6 +1546,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1555,6 +1556,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index a66d7be8c24c1..7786b2fb77fe4 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4..fd6477ee04aee6a87dd33ea0e573eec3d7bba175 100644 +index 2aa24b773a974e7789c661a0ffa5e01715c6e229..74993d461cbd0885a709cf8b663b9c69650aa3cf 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3453,7 +3453,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3469,7 +3469,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 3d0218f166189..1f2b4db050994 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 82616ebcb1f56de12cbd932a4614bb3858e9bad9..67871eec9821cf100acc719a1765be489dfbe7d8 100644 +index 91e45df23e659d705839fa3798ad3452bac012e5..2dbe61a4bdf6556f6db101e47d81d37417736bd1 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3702,6 +3702,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3703,6 +3703,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_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index c0a55bfbbaaf3..4ad225cdb9e3c 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 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c6935c90a 100644 +index 892efd5009b0a0ef00081bd765d20c46d68b2324..f40238dc39a017a07972c8fec48a802da8a2cad0 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1837,7 +1837,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1858,7 +1858,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,10 +21,10 @@ index 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c // 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 f92bcc8f2a212e6cda464d9b6060a561d689f467..f9cb0eea11665148a4be669acaf5703cf9c0ea09 100644 +index a389a9c41f96ec3231b62510cde140c52dcdbe9e..25f7919970139baf58531a257f7a8c7184fef85a 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -669,6 +669,10 @@ class WebContents : public PageNavigator, +@@ -670,6 +670,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; 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 e10ef4f219dd3..079a862e35e77 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,11 +7,11 @@ 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 a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f21e88f30 100644 +index 28366584e6a3cc2655e5bc7417c4e52b9d0f4163..46894c02ca15f7091f280b2960f2ec628c500e53 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc -@@ -22,7 +22,10 @@ - #include "base/values.h" +@@ -21,7 +21,10 @@ + #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#if 0 @@ -21,7 +21,7 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" #include "chrome/grit/dev_ui_browser_resources.h" -@@ -50,9 +53,11 @@ +@@ -49,9 +52,11 @@ #include "ui/views/accessibility/view_accessibility.h" #if !BUILDFLAG(IS_ANDROID) @@ -33,50 +33,49 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f #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( +@@ -162,7 +167,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { accessibility_mode); } -#if !BUILDFLAG(IS_ANDROID) +#if 0 - std::unique_ptr BuildTargetDescriptor(Browser* browser) { - std::unique_ptr target_data( - new base::DictionaryValue()); -@@ -203,7 +208,9 @@ void HandleAccessibilityRequestCallback( + base::Value::Dict BuildTargetDescriptor(Browser* browser) { + base::Value::Dict target_data; + target_data.Set(kSessionIdField, browser->session_id().id()); +@@ -196,7 +201,9 @@ void HandleAccessibilityRequestCallback( DCHECK(ShouldHandleAccessibilityRequestCallback(path)); - base::DictionaryValue data; + base::Value::Dict data; +#if 0 PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs(); +#endif ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() -@@ -237,7 +244,7 @@ void HandleAccessibilityRequestCallback( - data.SetBoolKey(kViewsAccessibility, - features::IsAccessibilityTreeForViewsEnabled()); +@@ -228,7 +235,7 @@ void HandleAccessibilityRequestCallback( + // enabled. + data.Set(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled()); - bool show_internal = pref->GetBoolean(prefs::kShowInternalAccessibilityTree); + bool show_internal = true; - data.SetStringKey(kInternal, show_internal ? kOn : kOff); + data.Set(kInternal, show_internal ? kOn : kOff); - std::unique_ptr page_list(new base::ListValue()); -@@ -274,12 +281,12 @@ void HandleAccessibilityRequestCallback( + base::Value::List page_list; +@@ -264,11 +271,11 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(page_list)); - std::unique_ptr browser_list(new base::ListValue()); + base::Value::List browser_list; -#if !BUILDFLAG(IS_ANDROID) +#if 0 for (Browser* browser : *BrowserList::GetInstance()) { - browser_list->Append( - base::Value::FromUniquePtrValue(BuildTargetDescriptor(browser))); + browser_list.Append(BuildTargetDescriptor(browser)); } -#endif // !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_ANDROID) data.Set(kBrowsersField, std::move(browser_list)); - std::unique_ptr widgets_list(new base::ListValue()); -@@ -497,8 +504,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag( + base::Value::List widgets_list; +@@ -483,8 +490,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag( AllowJavascript(); if (flag_name_str == kInternal) { @@ -87,7 +86,7 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f return; } -@@ -605,10 +614,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -588,10 +597,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -98,26 +97,26 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f std::string accessibility_contents = - web_contents->DumpAccessibilityTree(internal, property_filters); + web_contents->DumpAccessibilityTree(true, property_filters); - result->SetStringKey(kTreeField, accessibility_contents); - FireWebUIListener(request_type, *(result.get())); + result.Set(kTreeField, accessibility_contents); + FireWebUIListener(request_type, result); } -@@ -633,6 +644,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -614,6 +625,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); +#if 0 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { - std::unique_ptr result( -@@ -647,6 +659,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( + base::Value::Dict result = BuildTargetDescriptor(browser); +@@ -626,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } +#endif #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. - std::unique_ptr result(new base::DictionaryValue()); -@@ -763,5 +776,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( + base::Value::Dict result; +@@ -738,5 +751,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -126,10 +125,10 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f +#endif } diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h -index 6bc5891205fc94377040d9195b0ee15a47a90382..16a25b6a5670a74cf260210b06bc9892431cd760 100644 +index 8ae101cdb4de8ea570e3af6e05e9124b51a9f14c..2706f8ad05a6bee71b68f59406eb0bd3391a3fcd 100644 --- a/chrome/browser/accessibility/accessibility_ui.h +++ b/chrome/browser/accessibility/accessibility_ui.h -@@ -25,6 +25,8 @@ struct AXEventNotificationDetails; +@@ -22,6 +22,8 @@ struct AXEventNotificationDetails; class WebContents; } // namespace content @@ -138,7 +137,7 @@ index 6bc5891205fc94377040d9195b0ee15a47a90382..16a25b6a5670a74cf260210b06bc9892 namespace user_prefs { class PrefRegistrySyncable; } // namespace user_prefs -@@ -66,6 +68,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler { +@@ -63,6 +65,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler { static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); private: diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch new file mode 100644 index 0000000000000..db49bbdb07304 --- /dev/null +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -0,0 +1,198 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Mon, 5 Sep 2022 19:07:54 +0900 +Subject: fix: return v8::Value from LocalFrame::RequestExecuteScript + +Allows api::WebFrame::ExecuteJavaScript(InIsolateWorld) to work with +v8::Value instead of base::Value. +Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953 + +diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc +index 032ef69a5b50cef88f341b8a7a3de0acef88898d..a425fe1fb6275afd8e25033932f6f444efd6f643 100644 +--- a/extensions/renderer/script_injection.cc ++++ b/extensions/renderer/script_injection.cc +@@ -332,6 +332,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, + blink::mojom::LoadEventBlockingOption::kBlock, + base::BindOnce(&ScriptInjection::OnJsInjectionCompleted, + weak_ptr_factory_.GetWeakPtr()), ++ base::NullCallback(), + blink::BackForwardCacheAware::kPossiblyDisallow, + injector_->ShouldWaitForPromise()); + } +diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h +index ba043cf658f568e4390db1619b1042749e430b2b..285d53074a0fcfb00caaec8c3f8a0bbebcd68953 100644 +--- a/third_party/blink/public/web/web_local_frame.h ++++ b/third_party/blink/public/web/web_local_frame.h +@@ -424,6 +424,7 @@ class WebLocalFrame : public WebFrame { + mojom::EvaluationTiming, + mojom::LoadEventBlockingOption, + WebScriptExecutionCallback, ++ WebScriptExecutionCallbackUnmodified, + BackForwardCacheAware, + mojom::PromiseResultOption) = 0; + +diff --git a/third_party/blink/public/web/web_script_execution_callback.h b/third_party/blink/public/web/web_script_execution_callback.h +index c37e7ef609c91e9b9107d7a6194b213039184fb9..3f2e27b4f51dc1d673883cf2bf75f596a952ac44 100644 +--- a/third_party/blink/public/web/web_script_execution_callback.h ++++ b/third_party/blink/public/web/web_script_execution_callback.h +@@ -17,6 +17,12 @@ namespace base { + class TimeTicks; + } + ++namespace v8 { ++class Value; ++template ++class Local; ++} ++ + namespace blink { + + template +@@ -26,6 +32,9 @@ using WebScriptExecutionCallback = + base::OnceCallback>&, + base::TimeTicks)>; + ++using WebScriptExecutionCallbackUnmodified = ++ base::OnceCallback>&)>; ++ + } // namespace blink + + #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ +diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +index 3891afe36284d033e3ba88ffda63545b07f6c718..69eb59439932887b34099f7cd3ebd51ecd4aa676 100644 +--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc ++++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +@@ -1133,6 +1133,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( + auto* executor = MakeGarbageCollected( + DomWindow(), ToScriptState(frame_, *isolated_world), + execution_request->Callback(), ++ base::NullCallback(), + /*executor=*/execution_request); + executor->Run(); + +diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc +index 4b2b8fc8e5b48948b36bfdc5b76ebeabe5c72606..90437b41b3e12309c194d9f3e94ac37603403227 100644 +--- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc ++++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc +@@ -262,7 +262,7 @@ void PausableScriptExecutor::CreateAndRun(LocalDOMWindow* window, + } + PausableScriptExecutor* executor = + MakeGarbageCollected( +- window, script_state, std::move(callback), ++ window, script_state, std::move(callback), base::NullCallback(), + MakeGarbageCollected( + window->GetIsolate(), function, receiver, argc, argv)); + executor->Run(); +@@ -277,6 +277,14 @@ void PausableScriptExecutor::ContextDestroyed() { + ScriptState::Scope script_scope(script_state_); + std::move(callback_).Run(Vector>(), {}); + } ++ if (raw_callback_) { ++ // Though the context is (about to be) destroyed, the callback is invoked ++ // with a vector of v8::Local<>s, which implies that creating v8::Locals ++ // is permitted. Ensure a valid scope is present for the callback. ++ // See https://crbug.com/840719. ++ ScriptState::Scope script_scope(script_state_); ++ std::move(raw_callback_).Run(Vector>()); ++ } + Dispose(); + } + +@@ -285,11 +293,12 @@ PausableScriptExecutor::PausableScriptExecutor( + scoped_refptr world, + Vector sources, + mojom::blink::UserActivationOption user_gesture, +- WebScriptExecutionCallback callback) ++ WebScriptExecutionCallback callback, ++ WebScriptExecutionCallbackUnmodified raw_callback) + : PausableScriptExecutor( + window, + ToScriptState(window, *world), +- std::move(callback), ++ std::move(callback), std::move(raw_callback), + MakeGarbageCollected(std::move(sources), + world->GetWorldId(), + user_gesture)) {} +@@ -298,11 +307,12 @@ PausableScriptExecutor::PausableScriptExecutor( + LocalDOMWindow* window, + ScriptState* script_state, + WebScriptExecutionCallback callback, ++ WebScriptExecutionCallbackUnmodified raw_callback, + Executor* executor) + : ExecutionContextLifecycleObserver(window), + script_state_(script_state), + callback_(std::move(callback)), +- blocking_option_(mojom::blink::LoadEventBlockingOption::kDoNotBlock), ++ raw_callback_(std::move(raw_callback)), + executor_(executor) { + CHECK(script_state_); + CHECK(script_state_->ContextIsValid()); +@@ -388,6 +398,9 @@ void PausableScriptExecutor::HandleResults( + if (callback_) + std::move(callback_).Run(results, start_time_); + ++ if (raw_callback_) ++ std::move(raw_callback_).Run(results); ++ + Dispose(); + } + +diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.h b/third_party/blink/renderer/core/frame/pausable_script_executor.h +index 12a42ef52c2689a1c2d3029890fed8e12faa03aa..fe5bd4bee4f236f2958dcf03e1f644639afc4c75 100644 +--- a/third_party/blink/renderer/core/frame/pausable_script_executor.h ++++ b/third_party/blink/renderer/core/frame/pausable_script_executor.h +@@ -48,10 +48,12 @@ class CORE_EXPORT PausableScriptExecutor final + scoped_refptr, + Vector, + mojom::blink::UserActivationOption, +- WebScriptExecutionCallback); ++ WebScriptExecutionCallback, ++ WebScriptExecutionCallbackUnmodified); + PausableScriptExecutor(LocalDOMWindow*, + ScriptState*, + WebScriptExecutionCallback, ++ WebScriptExecutionCallbackUnmodified, + Executor*); + ~PausableScriptExecutor() override; + +@@ -75,6 +77,7 @@ class CORE_EXPORT PausableScriptExecutor final + + Member script_state_; + WebScriptExecutionCallback callback_; ++ WebScriptExecutionCallbackUnmodified raw_callback_; + base::TimeTicks start_time_; + mojom::blink::LoadEventBlockingOption blocking_option_; + TaskHandle task_handle_; +diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +index a31fe747be3c228c4eec512835de6368d29516aa..4197391cb15a55eaca55eca2d3886ebcb8360e95 100644 +--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc ++++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +@@ -1086,6 +1086,7 @@ void WebLocalFrameImpl::RequestExecuteScript( + mojom::blink::EvaluationTiming evaluation_timing, + mojom::blink::LoadEventBlockingOption blocking_option, + WebScriptExecutionCallback callback, ++ WebScriptExecutionCallbackUnmodified raw_callback, + BackForwardCacheAware back_forward_cache_aware, + mojom::blink::PromiseResultOption promise_behavior) { + DCHECK(GetFrame()); +@@ -1109,7 +1110,7 @@ void WebLocalFrameImpl::RequestExecuteScript( + base::checked_cast(sources.size())); + auto* executor = MakeGarbageCollected( + GetFrame()->DomWindow(), std::move(world), std::move(script_sources), +- user_gesture, std::move(callback)); ++ user_gesture, std::move(callback), std::move(raw_callback)); + executor->set_wait_for_promise(promise_behavior); + switch (evaluation_timing) { + case mojom::blink::EvaluationTiming::kAsynchronous: +diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h +index 76cbde766ba8ebc1b503eea9a5b6335f775dc00c..ebb1084be8069251d8f568e7b9f30d3dc83b0a64 100644 +--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h ++++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h +@@ -189,6 +189,7 @@ class CORE_EXPORT WebLocalFrameImpl final + mojom::blink::EvaluationTiming, + mojom::blink::LoadEventBlockingOption, + WebScriptExecutionCallback, ++ WebScriptExecutionCallbackUnmodified, + BackForwardCacheAware back_forward_cache_aware, + mojom::blink::PromiseResultOption) override; + void Alert(const WebString& message) override; diff --git a/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch b/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch index 7a34a68504653..0ff3414d49fa0 100644 --- a/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch +++ b/patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch @@ -18,10 +18,10 @@ fix this, we revert those state update calls to early returns. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856525 diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc -index 84736afeb21d1deec0f4032ef6f3304075d8fffb..d023bb7b5a34c5c055d3d7cc5dc3e04ef43bcc3b 100644 +index 90c7fbebfcedd744163f8294be6de99db7b54aef..5c507f3aa02d918fc9c87ed3842f282f4545f0ff 100644 --- a/content/browser/devtools/protocol/emulation_handler.cc +++ b/content/browser/devtools/protocol/emulation_handler.cc -@@ -565,7 +565,9 @@ WebContentsImpl* EmulationHandler::GetWebContents() { +@@ -588,7 +588,9 @@ WebContentsImpl* EmulationHandler::GetWebContents() { } void EmulationHandler::UpdateTouchEventEmulationState() { @@ -32,7 +32,7 @@ index 84736afeb21d1deec0f4032ef6f3304075d8fffb..d023bb7b5a34c5c055d3d7cc5dc3e04e // We only have a single TouchEmulator for all frames, so let the main frame's // EmulationHandler enable/disable it. DCHECK(!host_->GetParentOrOuterDocument()); -@@ -585,7 +587,9 @@ void EmulationHandler::UpdateTouchEventEmulationState() { +@@ -608,7 +610,9 @@ void EmulationHandler::UpdateTouchEventEmulationState() { } void EmulationHandler::UpdateDeviceEmulationState() { diff --git a/patches/chromium/fix_the_gn_gen_for_components_segmentation_platform.patch b/patches/chromium/fix_the_gn_gen_for_components_segmentation_platform.patch new file mode 100644 index 0000000000000..be71fd0151a97 --- /dev/null +++ b/patches/chromium/fix_the_gn_gen_for_components_segmentation_platform.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Adam Kallai +Date: Mon, 22 Aug 2022 20:35:17 +0000 +Subject: Fix the gn gen for components/segmentation_platform + +'optimization_guide_segmentation_handler' dependency only available if +the 'build_with_tflite_lib' condition is set. + +Change-Id: I4d13e1f17caaaa744b3c95e425466cf851edf613 + +Bug: 1355185 +Change-Id: I4d13e1f17caaaa744b3c95e425466cf851edf613 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3845194 +Reviewed-by: Siddhartha S +Commit-Queue: Siddhartha S +Cr-Commit-Position: refs/heads/main@{#1037919} +(cherry picked from commit 9352250ae5e5589a7484873d7efe66d708ba6ad6) + +diff --git a/components/segmentation_platform/embedder/BUILD.gn b/components/segmentation_platform/embedder/BUILD.gn +index 385ab7e469f4e0c02500295edc7f24cedaf0ac6b..9bbac1528bcf0c7c1589c4962bee0ff9c5febaf7 100644 +--- a/components/segmentation_platform/embedder/BUILD.gn ++++ b/components/segmentation_platform/embedder/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//components/optimization_guide/features.gni") ++ + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +@@ -21,11 +23,14 @@ source_set("embedder") { + "//components/optimization_guide/core", + "//components/optimization_guide/core:features", + "//components/segmentation_platform/internal", +- "//components/segmentation_platform/internal:optimization_guide_segmentation_handler", + "//components/segmentation_platform/internal/proto", + "//components/segmentation_platform/public", + "//url", + ] ++ ++ if (build_with_tflite_lib) { ++ deps += [ "//components/segmentation_platform/internal:optimization_guide_segmentation_handler" ] ++ } + } + + source_set("unit_tests") { diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 972b408dbbc00..27a1fc982be1a 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 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d27548f6b62a7 100644 +index 569297aab0b4187afde801643957949216404082..a1e332ae2bcf2027019261e38bb82c8446e014d1 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3271,6 +3271,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3270,6 +3270,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d2754 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index f399bc59be5705542b34185e7fe7202a029c40ea..3293b6e035a6ea182504aa2700866fea8c213f4c 100644 +index 7eb47e0c73c7f0d8a0cadcf5b8163f8a5154faea..a699439c45bcfce66b697e2a97e6d1ae408cd343 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -270,6 +270,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -271,6 +271,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 0c82f2e509740..e2c389870ebf4 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index d7739924bc3c3daec848db52730bd60c72ff2d8a..78af701cb06f6cb1bdd9829b2fcc46c8 // 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 ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b3c640dd4 100644 +index cb3302bb2abb735609436bdf2a5d4d51cc4258ad..5530d975303cc96701e4b70ffbcaf6e7c02bb016 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -362,7 +362,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -368,7 +368,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -372,7 +373,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -378,7 +379,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index d43e9228ce721..4f42b1699b1a1 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,7 +12,7 @@ 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 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58ef31931ae 100644 +index 54cc8dc51d400a5738c7e3d63e6f368bead2a021..182ef4fde23a6afe2e9d8a8f02d8ccf6161c633e 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { @@ -28,7 +28,7 @@ index 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58e void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb00a156332 100644 +index 1fc56c055d423ab074f8f4f90415e34593a04a18..c637247f003e1c6bfe073a43a09851682cd242cc 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h @@ -125,6 +125,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, @@ -40,10 +40,10 @@ index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb0 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 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f0c91ee61 100644 +index 526b9768da187b0f7d94b3500a63af8242d568af..01faafb23559dd13f5a770c1dd3864a2ea858321 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1209,6 +1209,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1199,6 +1199,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,7 +57,7 @@ index 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f 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 1aff605f7c126104edc9e74adc80d56344177a80..93e589d1ede1fb33dde3b099d04540fef777e182 100644 +index af6dd8d8af99c5bd1e854c8cfbeb89e04476fefd..758adb66dff5aefad9f3c9f8c23de6fa9df33ef7 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h @@ -87,6 +87,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index fba6f47a9f03f..5b11d2d911004 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 1bc95f7cab225ff4ff5d9819fa07d8a8cf7d9f9c..3631ccc4e41db1b6c9d3873f52cc3ff708b18d68 100644 +index d9ae17943b8fcfaa6026869328e60c8cc4057425..7d97829b1a0d2589607eb696bdde1fa72cc09424 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -975,6 +975,11 @@ +@@ -984,6 +984,11 @@ "includes": [4960], }, 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 4249d68d5c2b2..89ec97f2f2949 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 f25be7d134b65a6caf65241a78111de145727fcd..4fcbd6e5fd6e0d692c3bad4232b37d2a95a7073f 100755 +index c8703580d32010666d81fc28ea7325ef0b292fec..a8c9e3af875586d041d58d6d70b5b81092139eed 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -302,6 +302,8 @@ def GetDefaultHostOs(): +@@ -307,6 +307,8 @@ def GetDefaultHostOs(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index e3d33b36f6ce7..5fb0d549c8417 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 ed19f7f1a283da619c01e2dc476d9d1ace950dc7..ef51df5e85584329c9c02aa2b6b88ba9eadd1a31 100644 +index fb4af331fb38b9e431137fd2b3806be84175acbf..14ca983c91cfe495ebd2859866a7f434d0a9ab02 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -251,11 +251,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -253,11 +253,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 f54ca7b264d4c..81ba08c541044 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 b54d534b4d408c30341b20409fec75d3a66ca519..d0a00518d06bbb0da228662924b2ab9e568ef940 100644 +index 34cbeddf6cabd78806304e45e25074d5d2ccd51e..db66cfa6313e805e91d9dbb189ae10b02792a112 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -386,8 +386,12 @@ RunContentProcess(ContentMainParams params, +@@ -413,8 +413,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 6753852394ca9..726031eb70315 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b + @end diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h -index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90209ee47c 100644 +index cfbb9f03214084c5181e48e1b0d497ab0b5cf1b3..21fdd6e2e9fae08443ca74c49c1b6984ea0c3429 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h @@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge; @@ -95,10 +95,10 @@ index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583513ea8ec 100644 +index 8ffa07e273fc65d8d29e119bb7dd4114b5eba6f4..60de405c461ec05a7036025553b82dd18f2acd13 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window, +@@ -78,7 +78,9 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @interface NSWindow (Private) @@ -108,7 +108,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583 - (BOOL)hasKeyAppearance; - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; -@@ -109,6 +111,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { +@@ -110,6 +112,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { } @end @@ -117,7 +117,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583 @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -135,6 +139,8 @@ - (BOOL)usesCustomDrawing { +@@ -136,6 +140,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -126,7 +126,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583 @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -287,6 +293,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -285,6 +291,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -135,7 +135,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -298,6 +306,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -296,6 +304,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 4a955cba8a74e..81239e0f75fef 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,7 +44,7 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063 } // 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 c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94494d5a97 100644 +index 378cb463ff2ad323fe413d5ef40d6bd48659a5df..686527e081f1dc9bfa3cd8313ef818a05a4e5bfb 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 @@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -61,10 +61,10 @@ index c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94 // 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 d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550fb973e03 100644 +index be7b05ee4f779ccc44e6eea7ff7fb3e8bd504d6f..3b3336913cf91c3b7f22cefb4139f82b882c97c9 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 -@@ -76,8 +76,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -77,8 +77,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550 } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -139,8 +141,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -140,8 +142,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -117,10 +117,10 @@ index 6c0700b182e9765afd60d8deec501d13432e1b0a..c85c024a5a5711471e24698f14dda21b return false; } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880db7b309e 100644 +index 0549e3b400cb42e1a3491a2de9739c275ae006df..ab59ea7211b425e36d3d0fa673d8c09b99140716 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h -@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler; +@@ -52,7 +52,9 @@ class ScopedPasswordInputEnabler; @protocol RenderWidgetHostViewMacDelegate; @@ -130,7 +130,7 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880 @class RenderWidgetHostViewCocoa; namespace content { -@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -668,10 +670,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -144,10 +144,10 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880 // 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 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e19b4cc8c 100644 +index d460e055c8bc70845cdf89567e17a79da70fd9f1..f28dcfe0721239ca9341a0db80e8626a515c34d8 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -258,8 +258,10 @@ +@@ -259,8 +259,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -158,7 +158,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1559,8 +1561,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1561,8 +1563,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -169,7 +169,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e return [GetInProcessNSView() window]; } -@@ -1604,9 +1608,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1606,9 +1610,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -181,7 +181,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2101,12 +2107,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2103,12 +2109,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -235,7 +235,7 @@ 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 fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf76b43b00c 100644 +index 5a09100094d0371a3e58db6c7626e06bdcdd17c3..1aa7bde93efdf198998ba4e6a97dcf2aadd9f4e9 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -32,7 +32,9 @@ @@ -248,7 +248,7 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7 @class NSView; namespace remote_cocoa { -@@ -447,11 +449,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -449,11 +451,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -263,7 +263,7 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7 // 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 eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372424d0eb8 100644 +index cdaf472a02038e1fbcb15747dd1992e2ea0e998b..a9cb80cf7f3631eab7d0fcbcf685ee88af6d8972 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm @@ -325,14 +325,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -289,7 +289,7 @@ index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1289,6 +1297,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1304,6 +1312,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -297,7 +297,7 @@ index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1296,14 +1305,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1311,14 +1320,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_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index fe24e81ac7299..34f1f6b50e6aa 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -166,7 +166,7 @@ index 69e60d498941c34cfac9e79c7517765bf93849f5..b998ad7cf01c21e93c57e1283cfdcb1e void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 2a9cf9620bcc4453a24d48037f0092b6f270806a..6182aac37a7153b9a193565253fe77f9b72db55f 100644 +index d872796dee0dee4aa14c238f788b962b3f1c9311..4d5f74c18d773755d5d8f7223bc0d5c944467d69 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -176,6 +176,12 @@ source_set("audio") { 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 1ef84ebf1677c..1872cac3cff7d 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 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059e4289a9b 100644 +index 3ee7e8145e8cd0a68680e2044f0fb44d314a4317..f25c1baa5142d53a882b864a67d94e9e0911f0bf 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -130,6 +130,11 @@ @@ -128,7 +128,7 @@ index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2320,6 +2417,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2324,6 +2421,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,7 +139,7 @@ index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9 100644 +index cc1c9079baed00f6327efe929ab9d004d2272cfb..a9a1beed6c8e59abb9065701f34f155905781a2a 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -104,6 +104,7 @@ class URLMatcher; @@ -150,7 +150,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -822,6 +825,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -827,6 +830,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,7 +169,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d // 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 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83725d3b0b 100644 +index e4eec4dde27862507252d6853ec3186400181c95..e47bbfac56cd6c787ba3e7c0518a5326386a19b6 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -283,6 +283,17 @@ struct NetworkContextFilePaths { @@ -190,7 +190,7 @@ index 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -848,6 +859,9 @@ interface NetworkContext { +@@ -851,6 +862,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 9209f4710b026..ef1fb762c08ec 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -91,10 +91,10 @@ index 41fb02d532190e82d50286e2733a6c3627bf25c8..f19bb5dcb69233733125029d8f997f73 /*weak_document_ptr=*/WeakDocumentPtr(), 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 61ac1d7760432bd1a4118c0929a35168a3e26f49..e2ce4aa910053b1a4fb52fcc1197943af95b02f6 100644 +index fdd74853b9b277d9b47fb99311349b66f70dfa11..06d1f5a8cc7f0ff12e4a7d66b435a19369af126b 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc -@@ -282,6 +282,7 @@ void PlatformNotificationContextImpl::Shutdown() { +@@ -283,6 +283,7 @@ void PlatformNotificationContextImpl::Shutdown() { void PlatformNotificationContextImpl::CreateService( RenderProcessHost* render_process_host, @@ -102,7 +102,7 @@ index 61ac1d7760432bd1a4118c0929a35168a3e26f49..e2ce4aa910053b1a4fb52fcc1197943a const url::Origin& origin, const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, -@@ -289,7 +290,8 @@ void PlatformNotificationContextImpl::CreateService( +@@ -290,7 +291,8 @@ void PlatformNotificationContextImpl::CreateService( DCHECK_CURRENTLY_ON(BrowserThread::UI); services_.push_back(std::make_unique( this, browser_context_, service_worker_context_, render_process_host, @@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518bccab6a7c 100644 +index 18ad9b07e8d6ce33e4f5497aed48269ea49e2b9e..161aefa1d91923be35046dfe735071c687710deb 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2073,8 +2073,9 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2075,8 +2075,9 @@ void RenderProcessHostImpl::CreateNotificationService( // For workers: if (render_frame_id == MSG_ROUTING_NONE) { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -148,7 +148,7 @@ index f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518b return; } -@@ -2082,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2084,7 +2085,7 @@ void RenderProcessHostImpl::CreateNotificationService( RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index bf82c0887b174..6db8209177164 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -113,7 +113,7 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866 // OverlayWindowViews bool ControlsHitTestContainsPoint(const gfx::Point& point) override; diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d123fbd783 100644 +index 590d247e1136b9ac5f766a613e8d91916eb0dda4..453c358d210d48d21a237654143439f2065e98fe 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -14,9 +14,11 @@ @@ -126,9 +126,9 @@ index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d1 #include "chrome/browser/ui/browser_finder.h" +#endif #include "chrome/grit/generated_resources.h" + #include "chromeos/ui/base/chromeos_ui_constants.h" #include "components/vector_icons/vector_icons.h" - #include "content/public/browser/picture_in_picture_window_controller.h" -@@ -36,7 +38,7 @@ +@@ -37,7 +39,7 @@ #include "ui/aura/window.h" #endif 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 f137b04a6e09e..fdd22562281f6 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 277c93b46025fc5efa7c9462222bf3704172e035..6683578241804b9634965f96d0d1c1a317b94643 100644 +index 401c319799f6bc97845bd88a3f0211d2d6511274..db0d729b22b8ae22781b15de00507f14cc669b83 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h @@ -129,6 +129,16 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index ff4a4d114645c..07f0ca2501605 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/BUILD.gn b/BUILD.gn -index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0ca8b03202 100644 +index 645819d78ca8526340714f05acc9f1819e72c4e3..86f6cfd19586f1d352d6a91c3d76b7323ccf26fe 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -973,7 +973,6 @@ if (is_win) { +@@ -987,7 +987,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0c "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -982,6 +981,10 @@ if (is_win) { +@@ -996,6 +995,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2661cf5db 100644 +index f0d4596f0e95391e752c48dc6ac12f76397c27f1..b7313ce8037c88aa5b8826dc2edcb0dfa4ebee46 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -97,7 +97,7 @@ index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -209,16 +209,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings, +@@ -208,16 +208,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings, #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } @@ -134,7 +134,7 @@ index 398d59a0ebad165981e9e96b29ffc672e4b841eb..e420d87ef0e90cddb740ac4b24f92519 void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212b98a2b15 100644 +index 8f4cb7f50dd34c4ef49022242c4b93d703a508a2..d9183b6c1d84a4685f38e84071eb25f26cd28867 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -30,8 +30,6 @@ @@ -146,7 +146,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" #include "components/prefs/pref_service.h" -@@ -86,10 +84,23 @@ namespace printing { +@@ -82,10 +80,23 @@ namespace printing { namespace { @@ -170,7 +170,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -98,6 +109,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -94,6 +105,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -178,7 +178,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } void OnDidGetDefaultPrintSettings( -@@ -147,7 +159,9 @@ void OnDidUpdatePrintSettings( +@@ -143,7 +155,9 @@ void OnDidUpdatePrintSettings( DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -189,7 +189,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -175,6 +189,7 @@ void OnDidScriptedPrint( +@@ -171,6 +185,7 @@ void OnDidScriptedPrint( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -197,7 +197,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -184,7 +199,8 @@ void OnDidScriptedPrint( +@@ -180,7 +195,8 @@ void OnDidScriptedPrint( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -207,7 +207,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -199,12 +215,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -195,12 +211,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -222,7 +222,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -212,7 +230,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -208,7 +226,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -234,17 +234,17 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -240,6 +261,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -236,6 +257,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); + callback_ = std::move(callback); + + GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings)); - - #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) - enterprise_connectors::ContentAnalysisDelegate::Data scanning_data; -@@ -452,7 +476,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( + CompletePrintNow(rfh); + return true; + } +@@ -395,7 +419,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -254,7 +254,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -467,8 +492,11 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -410,8 +435,11 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -267,7 +267,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } void PrintViewManagerBase::UpdatePrintingEnabled() { -@@ -476,8 +504,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { +@@ -419,8 +447,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() { // The Unretained() is safe because ForEachRenderFrameHost() is synchronous. web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost( base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled, @@ -277,7 +277,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } void PrintViewManagerBase::NavigationStopped() { -@@ -593,11 +620,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -536,11 +563,14 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -292,7 +292,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && !service_manager_client_id_.has_value()) { -@@ -635,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -578,18 +608,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -314,7 +314,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -656,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -599,6 +631,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -322,7 +322,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -687,14 +720,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -630,14 +663,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -339,7 +339,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 return; } #endif -@@ -732,7 +765,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -675,7 +708,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); #if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. @@ -347,7 +347,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 #endif ReleasePrinterQuery(); -@@ -747,6 +779,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -690,6 +722,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -359,7 +359,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -757,10 +794,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -700,10 +737,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -372,7 +372,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } void PrintViewManagerBase::DidStartLoading() { -@@ -821,7 +860,12 @@ void PrintViewManagerBase::OnJobDone() { +@@ -759,7 +798,12 @@ void PrintViewManagerBase::OnJobDone() { // Printing is done, we don't need it anymore. // print_job_->is_job_pending() may still be true, depending on the order // of object registration. @@ -386,7 +386,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 ReleasePrintJob(); } -@@ -835,7 +879,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { +@@ -773,7 +817,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -395,7 +395,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 return true; } -@@ -883,7 +927,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -821,7 +865,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -407,7 +407,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 if (!weak_this) return false; -@@ -904,7 +951,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -842,7 +889,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( #endif print_job_->AddObserver(*this); @@ -416,7 +416,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 return true; } -@@ -964,6 +1011,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -902,6 +949,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -428,7 +428,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 if (!print_job_) return; -@@ -971,7 +1023,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -909,7 +961,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -437,7 +437,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 } print_job_->RemoveObserver(*this); -@@ -1013,7 +1065,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -951,7 +1003,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -446,7 +446,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 return true; if (!cookie) { -@@ -1121,7 +1173,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, +@@ -1059,7 +1111,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled, } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -456,10 +456,10 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187845e6a75 100644 +index 871e00c49028ccf58d207f904c22e0107f3c2b65..c9b136ab165410eb533f84254454dac0b6674f14 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h -@@ -43,6 +43,8 @@ namespace printing { +@@ -42,6 +42,8 @@ namespace printing { class PrintQueriesQueue; class PrinterQuery; @@ -468,7 +468,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187 // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { public: -@@ -70,7 +72,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -65,7 +67,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -480,7 +480,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in -@@ -128,6 +133,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -123,6 +128,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void ShowInvalidPrinterSettingsError() override; void PrintingFailed(int32_t cookie, mojom::PrintFailureReason reason) override; @@ -488,7 +488,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187 // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -135,6 +141,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -130,6 +136,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void AddObserver(Observer& observer); void RemoveObserver(Observer& observer); @@ -503,7 +503,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187 protected: explicit PrintViewManagerBase(content::WebContents* web_contents); -@@ -256,7 +270,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -251,7 +265,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -513,7 +513,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187 // 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 -@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -324,8 +339,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -575,7 +575,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a // 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 fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86bc0e0f90 100644 +index 2331b4db94bb6397616dc230498960860554787f..ade741255b9e0274252121ecc2ec68697429c8ad 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -42,6 +42,7 @@ @@ -586,7 +586,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 #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" -@@ -1282,7 +1283,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1283,7 +1284,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -596,7 +596,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 if (!weak_this) return; -@@ -1313,7 +1315,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1314,7 +1316,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -605,7 +605,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1328,7 +1330,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1329,7 +1331,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -614,7 +614,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1405,7 +1407,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1406,7 +1408,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -624,7 +624,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1454,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1455,6 +1458,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -633,7 +633,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2066,7 +2071,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2067,7 +2072,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -643,7 +643,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 // Check if |this| is still valid. if (!weak_this) return; -@@ -2081,7 +2087,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2082,7 +2088,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -654,7 +654,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2089,7 +2097,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2090,7 +2098,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -663,7 +663,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2108,8 +2116,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2109,8 +2117,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -680,7 +680,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 // Check if |this| is still valid. if (!self) return; -@@ -2374,36 +2389,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2375,36 +2390,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -745,7 +745,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2528,7 +2559,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2529,7 +2560,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -796,10 +796,10 @@ index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f003 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6b2992922 100644 +index 993ec8acd401d5ccb1e07652c28f6f0a1d89c6bc..638dbd46cb572274a17b0c06ed3db0cf7b614b7f 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2783,8 +2783,9 @@ source_set("browser") { +@@ -2802,8 +2802,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -812,7 +812,7 @@ index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6 if (is_chromeos) { sources += [ diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc -index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da79270244062c210d6 100644 +index e7f5b062791f6b2b94943c88d487757f2d77c7c5..f69ed3d412caa7254cfbea85a5448770a42b537d 100644 --- a/content/browser/utility_sandbox_delegate_win.cc +++ b/content/browser/utility_sandbox_delegate_win.cc @@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) { @@ -828,9 +828,9 @@ index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da792702440 return true; } +#endif - } // namespace - std::string UtilitySandboxedProcessLauncherDelegate::GetSandboxTag() { + std::string UtilityAppContainerId(base::CommandLine& cmd_line) { + return base::WideToUTF8(cmd_line.GetProgram().value()); diff --git a/printing/printing_context.cc b/printing/printing_context.cc index 6cca846b9831da669ca52aff776caf5a23f6f4d1..39d1032f276181a535de9fba89c2246c7a9814d7 100644 --- a/printing/printing_context.cc diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index f91220b02b3ec..958b5d49d399c 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -24,10 +24,10 @@ This patch adds a few changes to the Chromium code: before the browser thread is ready. diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc -index aca2f19f53657fc2b944b69418e099b056c8e734..e43b0d89e2e6ad0bcb2c34bfacc4ef3b59eaaab1 100644 +index c29925908862930061f63e9f02d614b8a8a7980d..5ce3a8dd6366093ac5d09bab8b1774b8771faea8 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -1424,7 +1424,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1421,7 +1421,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { switch (notify_result_) { case ProcessSingleton::PROCESS_NONE: // No process already running, fall through to starting a new one. 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 7cc9d0f959433..afee0cfa345d2 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 bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca // 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 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e6f060787 100644 +index 457ba67603442e8ae9ea75be1cb3b4bf32ed4c4f..50680346b1db4c687d9d956fd3a13adbbd27e65a 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) { +@@ -2076,6 +2076,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 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7b4f008e1 100644 +index 2b393e7e7089d17a0906610c3c8979c20928a5f6..47b85a2bd890485dec96e23fb2cb8f8553f5c4e2 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4593,6 +4593,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4609,6 +4609,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd6afb9e34 100644 +index 91dd718d313ee66bfeea3c0a08e5d2ec3e38b133..892efd5009b0a0ef00081bd765d20c46d68b2324 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -967,6 +967,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -974,6 +974,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd 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 af8a777096c1202b3742d328c02e9e957389fc1e..3a3359865bcedecfa946d517dd50b299172958c9 100644 +index bea8d6a0d6ac44c56132bc7e3745c5c154a02e79..e3fc1e633a9803eee837acbf6434fc6471d5c067 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -13,6 +13,7 @@ diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 334712e8f5286..0726ac0addf00 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 eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a78f6e1c1 100644 +index 999eeb6fc817a3898b2227fd58aa1ecc660f21a3..8c51cd22fef29fe3e647b80e951af4cf7d9e4637 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -703,6 +703,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -705,6 +705,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a 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 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba71016d60ab99 100644 +index f3a4f3961b543be0787b9f6ace585ce614e3c23e..5f112610fa0815f58436c54c9631b59ddf8606db 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 @@ @@ -38,7 +38,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101 #include "content/public/browser/render_widget_host_view.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/widget_type.h" -@@ -67,9 +69,11 @@ class CursorManager; +@@ -68,9 +70,11 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -50,7 +50,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101 class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -146,6 +150,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -147,6 +151,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -60,7 +60,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -308,6 +315,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -315,6 +322,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 9fb935ca29a76..fc700f5317d69 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ 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 e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3b7e5c7a7 100644 +index e26ed62d252e27792d3f2813b502ac93f723a5c2..87b977a5da2334c1494402f81588d0a3fcd8c7a0 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 @@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -29,7 +29,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3 // RenderWidgetHostViewCocoa --------------------------------------------------- // Private methods: -@@ -597,6 +606,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -598,6 +607,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3 return [self acceptsMouseEventsWhenInactive]; } -@@ -673,6 +685,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -674,6 +686,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -992,6 +1008,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -993,6 +1009,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); @@ -61,7 +61,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3 // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1812,9 +1832,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1813,9 +1833,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 e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1823,7 +1845,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1824,7 +1846,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 15c40e58c1027..3638b1d443987 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 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4328244f8 100644 +index aee9abd99a03ad2266e2fcd15c680ae3b97e9dc3..0223183c4e869e835429a52ad7d9eb381a2d21f5 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) { +@@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1575,6 +1575,12 @@ if (!is_android) { +@@ -1576,6 +1576,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch index 133baa6af9698..02dc352163d6c 100644 --- a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch +++ b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch @@ -10,10 +10,10 @@ can be reverted when those failures are addressed. It's unlikely that this patch will be upstreamed. diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc -index 72f8e9251df63db8ebebad9a5b682add91340e79..89361e9e8ea4e73c571d3960123030c0011a129d 100644 +index 328574de32fb02f014433b1005d5aa625e498d9f..5cdc5a8c67688747ff3b5323c42e4605ab613347 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc -@@ -302,26 +302,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { +@@ -297,26 +297,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 3b4aba5a4d8b0..b674f5fe65211 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 14985e39b792e931a9884ae95b8d550776520478..d6c104b05471161901e76051e6ec0d1059aa2dd1 100644 +index a15cfb291dea69d78bad2b4726b013d8a636a361..50c1d506d20be94d89f7c33fe3efb4bd30fb2305 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1282,7 +1282,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1285,7 +1285,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index 82cc6601cc08a..a47563743be14 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,26 +15,25 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63052b7ee8 100644 +index 71eb2eda28d4d0d5dd9a1ad37309dd27caa69ccf..88a1d29ded5630a484106e6638921c6d279778d7 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc -@@ -93,11 +93,14 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -92,10 +92,12 @@ void MediaStreamDevicesController::RequestPermissions( std::vector permission_types; +#if 0 - permissions::PermissionManager* permission_manager = - permissions::PermissionsClient::Get()->GetPermissionManager( - web_contents->GetBrowserContext()); + content::PermissionController* permission_controller = + web_contents->GetBrowserContext()->GetPermissionController(); +- +#endif - if (controller->ShouldRequestAudio()) { +#if 0 - permissions::PermissionResult permission_status = - permission_manager->GetPermissionStatusForCurrentDocument( - ContentSettingsType::MEDIASTREAM_MIC, rfh); -@@ -109,10 +112,12 @@ void MediaStreamDevicesController::RequestPermissions( - permissions::PermissionStatusSource::FEATURE_POLICY); + content::PermissionResult permission_status = + permission_controller->GetPermissionResultForCurrentDocument( + blink::PermissionType::AUDIO_CAPTURE, rfh); +@@ -106,10 +108,12 @@ void MediaStreamDevicesController::RequestPermissions( + content::PermissionStatusSource::FEATURE_POLICY); return; } +#endif @@ -43,26 +42,26 @@ index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63 } if (controller->ShouldRequestVideo()) { +#if 0 - permissions::PermissionResult permission_status = - permission_manager->GetPermissionStatusForCurrentDocument( - ContentSettingsType::MEDIASTREAM_CAMERA, rfh); -@@ -124,6 +129,7 @@ void MediaStreamDevicesController::RequestPermissions( - permissions::PermissionStatusSource::FEATURE_POLICY); + content::PermissionResult permission_status = + permission_controller->GetPermissionResultForCurrentDocument( + blink::PermissionType::VIDEO_CAPTURE, rfh); +@@ -120,6 +124,7 @@ void MediaStreamDevicesController::RequestPermissions( + content::PermissionStatusSource::FEATURE_POLICY); return; } +#endif permission_types.push_back(blink::PermissionType::VIDEO_CAPTURE); -@@ -135,6 +141,7 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -131,6 +136,7 @@ void MediaStreamDevicesController::RequestPermissions( // pan-tilt-zoom permission and there are suitable PTZ capable devices // available. if (request.request_pan_tilt_zoom_permission && has_pan_tilt_zoom_camera) { +#if 0 permission_status = - permission_manager->GetPermissionStatusForCurrentDocument( - ContentSettingsType::CAMERA_PAN_TILT_ZOOM, rfh); -@@ -144,6 +151,7 @@ void MediaStreamDevicesController::RequestPermissions( + permission_controller->GetPermissionResultForCurrentDocument( + blink::PermissionType::CAMERA_PAN_TILT_ZOOM, rfh); +@@ -140,6 +146,7 @@ void MediaStreamDevicesController::RequestPermissions( controller->RunCallback(/*blocked_by_permissions_policy=*/false); return; } @@ -70,16 +69,16 @@ index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63 permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); } -@@ -417,6 +425,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( - if (rfh->GetLastCommittedOrigin().GetURL() != request_.security_origin) { - return false; - } +@@ -428,6 +435,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( + + // TODO(raymes): This function wouldn't be needed if + // PermissionManager::RequestPermissions returned a denial reason. +#if 0 - permissions::PermissionResult result = - permissions::PermissionsClient::Get() - ->GetPermissionManager(web_contents_->GetBrowserContext()) -@@ -425,6 +434,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( - DCHECK_EQ(CONTENT_SETTING_BLOCK, result.content_setting); + content::PermissionResult result = + web_contents_->GetBrowserContext() + ->GetPermissionController() +@@ -436,6 +444,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( + DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status); return true; } +#endif diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index de9a6514f7b84..7ed514ab08de2 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 d2fbb44deef7a63cc1f5296d338d518bccab6a7c..7bb696c3ad090828b2a7e3a9a648b75bbf39f844 100644 +index 161aefa1d91923be35046dfe735071c687710deb..368d47247ced2320e0627e9cce3cf05e59ea9f39 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1762,9 +1762,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1764,9 +1764,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index 715b58b173cd0..e4fac7f0441b5 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..74140d29ed56ce54e39940e7bffa3778db983f27 100755 +index abd7eb4a8d116075751bcf6e44f872bac83431ef..54c01f56ac3f17b4534b6e89d9f8c4ba3bd79bf9 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py @@ -41,9 +41,11 @@ except ImportError: diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index eb23dbf6cc5af..1b5ecfb240dbc 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 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4 100644 +index 7f04a05eec8780e735e0458c75103d9f2e9b858b..2aa24b773a974e7789c661a0ffa5e01715c6e229 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3073,6 +3073,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3089,6 +3089,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d6 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3083,6 +3090,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3099,6 +3106,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d6 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561d689f467 100644 +index 024cd37e818e1c508cf2a8e324478235444f16ed..a389a9c41f96ec3231b62510cde140c52dcdbe9e 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -94,10 +94,13 @@ class BrowserContext; @@ -52,7 +52,7 @@ index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -236,6 +239,10 @@ class WebContents : public PageNavigator, +@@ -237,6 +240,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 8f160ca9f5c99..b44e2eccaa131 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 7f60d038fb9c2bc8364c580bc9c7684d97fbbcfb..b1eddf20c22edf974375b8a04d70fca72f7834af 100644 +index 3e2342d28760172bcfd765f7ac3733b4d89a1445..351bee9cfcc31dc6ca06f1fc502b70617105191a 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -916,10 +916,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 24da4c76a0724..bd47818e88ade 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 115dab63efa4b90f37609a9a0a363ad75a0ff582..324232704f0bc0db6c20031cc0a2217b35667c3d 100644 +index e815010dcb9437727f32b12f0d47a31384e24677..bb1ffcd003807084b970e11a1b464e5f72142c53 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6579,6 +6579,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6567,6 +6567,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index a84e0a2e368a3..4eca49c954db9 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 d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa27f7084d 100644 +index a9146ec6c85b3dfa854d764e8010124f76cd3fc7..e0b308051be9b34ce26b65f6cd582beb7743662d 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -365,6 +365,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa // 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 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c 100644 +index b822b43d0a2398689120a87b6dbd5f1c5f0f4ee3..53b42b67823474fc5c688654da280cde82faea87 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -869,6 +869,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -860,6 +860,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a 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 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df39eb9d82 100644 +index 9718602c31f866b668cd211ff4fd72f69de1cd42..8f80fb04990c3e2820dcbc9b89dc0255c9c49d30 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -180,6 +180,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 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df 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 b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768af8ba22f 100644 +index ad34b6230f57ad906bae515aa73ea2aaf1bfeede..b5cff1fee2d14c02f2d67cf012b7ba24fc3a7a06 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -638,6 +638,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -625,6 +625,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,7 +67,7 @@ index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768 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 91fd003fe648c8ac854843922714f30434e3663f..f67fbdd1c9eda7feb9f171fa8482c1d5cc29d508 100644 +index 20d674166c78e316751bfa3ec7aed74656eea9b4..d289cfca8d8a9b093d8d30427e594c46b2f56c79 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc @@ -744,6 +744,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { 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 6bde8843fc9a7..d33d2271d35af 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 b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04ecd9f05d8 100644 +index e0b308051be9b34ce26b65f6cd582beb7743662d..857d5eb211890b10e143f54662636f2ba522b698 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -365,6 +365,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04e // 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 c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c5900fc9aec3 100644 +index 53b42b67823474fc5c688654da280cde82faea87..db175070bdcefc84f1d6001568941a9f4f14789c 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -872,6 +872,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c590 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 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f1716318f0d2 100644 +index 8f80fb04990c3e2820dcbc9b89dc0255c9c49d30..f16af9a3e4027066cddbd5082998adc837e9b5dc 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -180,6 +180,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 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f171 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 d7fed3409f1846d9655aa2b4adc89768af8ba22f..169916298918d19f23f4e4dce5a306e94d640226 100644 +index b5cff1fee2d14c02f2d67cf012b7ba24fc3a7a06..765c0882406fa0ab7ae3d0460ff9a9814f60db0a 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -638,6 +638,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -625,6 +625,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/config.json b/patches/config.json index c204b2717009d..e142fc9deee0d 100644 --- a/patches/config.json +++ b/patches/config.json @@ -21,7 +21,5 @@ "src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle", - "src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC", - - "src/electron/patches/lss": "src/third_party/lss" + "src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC" } diff --git a/patches/lss/.patches b/patches/lss/.patches index 773143e264950..e69de29bb2d1d 100644 --- a/patches/lss/.patches +++ b/patches/lss/.patches @@ -1 +0,0 @@ -fix_cast_pwrite64_arg_to_long_for_arm.patch diff --git a/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch b/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch deleted file mode 100644 index 3f74555fe0fd9..0000000000000 --- a/patches/lss/fix_cast_pwrite64_arg_to_long_for_arm.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 9 Aug 2022 14:05:55 -0700 -Subject: fix: cast pwrite64 arg to long for arm - -This patch cases pwrite64 arg to a long in order to avoid a -compilation error on arm. This patch can be eliminated when the -upstream patch is merged into chromium main: - -https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946 - -diff --git a/linux_syscall_support.h b/linux_syscall_support.h -index e4e816f4bd001a6de7b98972d1cbaec9aaa8f821..5ea1295f8e9bb5312469dbc1aadb67dd620d35d3 100644 ---- a/linux_syscall_support.h -+++ b/linux_syscall_support.h -@@ -4842,7 +4842,7 @@ struct kernel_statfs { - unsigned, o2) - LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f, - const void *, b, size_t, c, unsigned, o1, -- long, o2) -+ unsigned, o2) - LSS_INLINE _syscall4(int, _readahead, int, f, - unsigned, o1, unsigned, o2, size_t, c) - #endif diff --git a/patches/node/.patches b/patches/node/.patches index 72c5a5b2d6a7d..611f1f217aa15 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -47,3 +47,5 @@ build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch build_ensure_native_module_compilation_fails_if_not_using_a_new.patch fix_override_createjob_in_node_platform.patch buffer_fix_atob_input_validation.patch +v8_api_advance_api_deprecation.patch +enable_-wunqualified-std-cast-call.patch diff --git a/patches/node/enable_-wunqualified-std-cast-call.patch b/patches/node/enable_-wunqualified-std-cast-call.patch new file mode 100644 index 0000000000000..0a78954c84505 --- /dev/null +++ b/patches/node/enable_-wunqualified-std-cast-call.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Fri, 26 Aug 2022 00:10:16 +0900 +Subject: Enable -Wunqualified-std-cast-call + +Refs https://chromium-review.googlesource.com/c/chromium/src/+/3825237 +Should be upstreamed. + +diff --git a/src/node_http2.cc b/src/node_http2.cc +index ca82da47b4b160af0b1c11f9d162919272666cdb..e60036bb9cc07c5a87c2a017507c3533e229f14f 100644 +--- a/src/node_http2.cc ++++ b/src/node_http2.cc +@@ -645,7 +645,7 @@ void Http2Stream::EmitStatistics() { + duration, + statistics_); + +- env()->SetImmediate([entry = move(entry)](Environment* env) { ++ env()->SetImmediate([entry = std::move(entry)](Environment* env) { + if (HasHttp2Observer(env)) + entry->Notify(env); + }); diff --git a/patches/node/v8_api_advance_api_deprecation.patch b/patches/node/v8_api_advance_api_deprecation.patch new file mode 100644 index 0000000000000..bb431064a381a --- /dev/null +++ b/patches/node/v8_api_advance_api_deprecation.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Fri, 26 Aug 2022 00:03:44 +0900 +Subject: v8: [api] Advance API deprecation + +Refs https://chromium-review.googlesource.com/c/v8/v8/+/3702449 +Should be upstreamed. + +diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc +index 2c36a0b132cf1b21595ac39619b99d316ad81d9e..3dfea77eab2ff880508eda95a5dff80a6564251f 100644 +--- a/src/inspector_agent.cc ++++ b/src/inspector_agent.cc +@@ -217,7 +217,8 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel, + bool prevent_shutdown) + : delegate_(std::move(delegate)), prevent_shutdown_(prevent_shutdown), + retaining_context_(false) { +- session_ = inspector->connect(CONTEXT_GROUP_ID, this, StringView()); ++ session_ = inspector->connect( ++ CONTEXT_GROUP_ID, this, StringView(),V8Inspector::kFullyTrusted); + node_dispatcher_ = std::make_unique(this); + tracing_agent_ = + std::make_unique(env, main_thread_); diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 85b8bf878eb58..4a5ba08bbfe6a 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 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944ea566018 100644 +index 83082271b8b76179b41e943190303e31fa639a95..0a23171a391606bb3408dcf8a488d075a148443a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -650,7 +650,7 @@ config("internal_config") { +@@ -663,7 +663,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944 defines += [ "BUILDING_V8_SHARED" ] } -@@ -6124,7 +6124,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6166,7 +6166,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 6871851eab3de..937d33fb705c8 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 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b84221f3b1 100644 +index 353fa739d89bf85d6dbb202d62b3ddab9b0a899e..ae6d7c8548c1cb336e07dcfe7507f7919eb85845 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9181,7 +9181,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9171,7 +9171,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -18,20 +18,3 @@ index 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b8 i::Isolate* i_isolate = reinterpret_cast(this); i_isolate->default_microtask_queue()->PerformCheckpoint(this); } -diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 41f2378ba770a96d9722b8d50d28f3562ebf5101..59338d1d293d5325e89052dd226a9ad4f9e8b46a 100644 ---- a/src/heap/heap.cc -+++ b/src/heap/heap.cc -@@ -6165,9 +6165,9 @@ void Heap::TearDown() { - void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, - GCType gc_type, void* data) { - DCHECK_NOT_NULL(callback); -- DCHECK(gc_prologue_callbacks_.end() == -- std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(), -- GCCallbackTuple(callback, gc_type, data))); -+ // DCHECK(gc_prologue_callbacks_.end() == -+ // std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(), -+ // GCCallbackTuple(callback, gc_type, data))); - gc_prologue_callbacks_.emplace_back(callback, gc_type, data); - } - 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 722a2ab2441e6..8b0f56b8fe03a 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 09c3dc73292e2778baba3a0f7f1a02d875845d34..cf9dff8346bbe086464391758a5c11f228b3898c 100644 +index b0c6d08bf50a3443e2589f09b6f1f5b7734c000c..7728123805054064d5acecacf6cbf8d1fe4a56c1 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -650,6 +650,10 @@ config("internal_config") { +@@ -663,6 +663,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 d4730296b4dd9..f4551bf39ef14 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 fbdf5f029f19d8c231e70593e4860f8949e66e45..f98808fa74d79f8492f5a9aac92783b0775bfdf6 100644 +index ced30839aa8627b9b21eabea1a4a3b2574a906d8..f038aea4e2e105b711f4530a1c40d63ee340724f 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -930,7 +930,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -928,7 +928,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 00ce43c0d6d10..b9959281d59e2 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 f359ea10d6e83f94b698d9d728147944ea566018..09c3dc73292e2778baba3a0f7f1a02d875845d34 100644 +index 0a23171a391606bb3408dcf8a488d075a148443a..b0c6d08bf50a3443e2589f09b6f1f5b7734c000c 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -6136,7 +6136,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6178,7 +6178,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index 7befb3ae7a01e..3d3a888d896e7 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904 StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c20982a675 100644 +index 9a12cfdd9d02624a6fbbf5b10da958a6024b0857..01acdbcd633e9f11e6bd0673ed33eed5ce4f61fa 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6124,12 +6124,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6139,12 +6139,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c2 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index c4878044b149ec23f4ac9198f402ccc5114e219e..ba9be792cbcce3cbc85062daa524010dced2cfeb 100644 +index 5c89a2ac9de2db35c4b5c326a02269203bb0ce46..ecc20c69e8f72179d32ce53e68bc463105907d11 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2533,7 +2533,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2538,7 +2538,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 39c674b87d709..45230556a6913 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,10 +12,10 @@ 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 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e19359ba5594e 100644 +index 0110e903fd9c3681dca9921d4ad26fa47c38886a..18be54526bc11a4b285d9e0ab1873d587f11899d 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc -@@ -3630,6 +3630,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, +@@ -3627,6 +3627,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, ImmMoveWide(static_cast(imm)) | ShiftMoveWide(shift)); } @@ -39,7 +39,7 @@ index 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e1935 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 e3d8eb27dea2d241933bcb597bef35b46fcd2a09..0a752245ec25c80d5ed34b1a858fa43cc0d6dd40 100644 +index f26054a12ee493fc82cc5285de96da3b5aa149b2..23d8ead77dc4cde1da093510353cc93c14ce4fe0 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h @@ -2120,11 +2120,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 030ccee6f0f7e..e6cd258588445 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1286,6 +1286,7 @@ void WebContents::UpdateExclusiveAccessExitBubbleContent( const GURL& url, ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, + bool notify_download, bool force_update) {} void WebContents::OnExclusiveAccessUserInput() {} diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 45b4846d2f9b4..111984a20c37d 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -664,6 +664,7 @@ class WebContents : public ExclusiveAccessContext, const GURL& url, ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, + bool notify_download, bool force_update) override; void OnExclusiveAccessUserInput() override; content::WebContents* GetActiveWebContents() override; diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 141f04da18110..a344b55023484 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1572,56 +1572,61 @@ void ElectronBrowserClient:: if (render_frame_host.GetFrameTreeNodeId() == contents->GetPrimaryMainFrame()->GetFrameTreeNodeId() || (prefs && prefs->AllowsNodeIntegrationInSubFrames())) { - associated_registry.AddInterface(base::BindRepeating( + 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 + mojo::PendingAssociatedReceiver receiver) { - ElectronApiIPCHandlerImpl::Create(render_frame_host, - std::move(receiver)); + ElectronWebContentsUtilityHandlerImpl::Create(render_frame_host, + std::move(receiver)); }, &render_frame_host)); - } - } - - associated_registry.AddInterface(base::BindRepeating( - [](content::RenderFrameHost* render_frame_host, - 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 - receiver) { - AutofillDriverFactory::BindAutofillDriver(std::move(receiver), - render_frame_host); - }, - &render_frame_host)); + associated_registry.AddInterface( + base::BindRepeating( + [](content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver + receiver) { + AutofillDriverFactory::BindAutofillDriver(std::move(receiver), + render_frame_host); + }, + &render_frame_host)); #if BUILDFLAG(ENABLE_PRINTING) - associated_registry.AddInterface(base::BindRepeating( - [](content::RenderFrameHost* render_frame_host, - mojo::PendingAssociatedReceiver - receiver) { - PrintViewManagerElectron::BindPrintManagerHost(std::move(receiver), - render_frame_host); - }, - &render_frame_host)); + associated_registry.AddInterface( + base::BindRepeating( + [](content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver + receiver) { + PrintViewManagerElectron::BindPrintManagerHost(std::move(receiver), + render_frame_host); + }, + &render_frame_host)); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) - associated_registry.AddInterface(base::BindRepeating( - [](content::RenderFrameHost* render_frame_host, - mojo::PendingAssociatedReceiver - receiver) { - extensions::ExtensionWebContentsObserver::BindLocalFrameHost( - std::move(receiver), render_frame_host); - }, - &render_frame_host)); + associated_registry.AddInterface( + base::BindRepeating( + [](content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver + receiver) { + extensions::ExtensionWebContentsObserver::BindLocalFrameHost( + std::move(receiver), render_frame_host); + }, + &render_frame_host)); #endif #if BUILDFLAG(ENABLE_PDF_VIEWER) - associated_registry.AddInterface(base::BindRepeating( + associated_registry.AddInterface(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, mojo::PendingAssociatedReceiver receiver) { pdf::PDFWebContentsHelper::BindPdfService(std::move(receiver), @@ -1697,9 +1702,10 @@ void ElectronBrowserClient::ExposeInterfacesToRenderer( blink::AssociatedInterfaceRegistry* associated_registry, content::RenderProcessHost* render_process_host) { #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) - associated_registry->AddInterface(base::BindRepeating( - &extensions::EventRouter::BindForRenderer, render_process_host->GetID())); - associated_registry->AddInterface( + associated_registry->AddInterface( + base::BindRepeating(&extensions::EventRouter::BindForRenderer, + render_process_host->GetID())); + associated_registry->AddInterface( base::BindRepeating(&extensions::ExtensionsGuestView::CreateForExtensions, render_process_host->GetID())); #endif diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 432ea24c9ea22..4699a1c908c91 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -389,6 +389,13 @@ ElectronBrowserContext::GetStorageNotificationService() { return nullptr; } +content::ReduceAcceptLanguageControllerDelegate* +ElectronBrowserContext::GetReduceAcceptLanguageControllerDelegate() { + // Needs implementation + // Refs https://chromium-review.googlesource.com/c/chromium/src/+/3687391 + return nullptr; +} + ResolveProxyHelper* ElectronBrowserContext::GetResolveProxyHelper() { if (!resolve_proxy_helper_) { resolve_proxy_helper_ = base::MakeRefCounted(this); diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index b1fa4715cb758..2e1d3bbbb0c9e 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -118,6 +118,8 @@ class ElectronBrowserContext : public content::BrowserContext { content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate() override; content::StorageNotificationService* GetStorageNotificationService() override; + content::ReduceAcceptLanguageControllerDelegate* + GetReduceAcceptLanguageControllerDelegate() override; CookieChangeNotifier* cookie_change_notifier() const { return cookie_change_notifier_.get(); diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index dde2714caec07..8b3d4d50df02f 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -253,6 +253,16 @@ blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( : blink::mojom::PermissionStatus::DENIED; } +content::PermissionResult +ElectronPermissionManager::GetPermissionResultForOriginWithoutContext( + blink::PermissionType permission, + const url::Origin& origin) { + blink::mojom::PermissionStatus status = + GetPermissionStatus(permission, origin.GetURL(), origin.GetURL()); + return content::PermissionResult( + status, content::PermissionStatusSource::UNSPECIFIED); +} + ElectronPermissionManager::SubscriptionId ElectronPermissionManager::SubscribePermissionStatusChange( blink::PermissionType permission, diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index bf98621105b56..00cbb81e9f733 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -73,6 +73,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { const GURL& requesting_origin, bool user_gesture, StatusesCallback callback) override; + void RequestPermissionsWithDetails( const std::vector& permissions, content::RenderFrameHost* render_frame_host, @@ -80,10 +81,6 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { base::Value::Dict details, StatusesCallback callback); - blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( - blink::PermissionType permission, - content::RenderFrameHost* render_frame_host) override; - bool CheckPermissionWithDetails(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, @@ -124,6 +121,12 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { base::OnceCallback< void(const std::vector&)> callback) override; + content::PermissionResult GetPermissionResultForOriginWithoutContext( + blink::PermissionType permission, + const url::Origin& origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( + blink::PermissionType permission, + content::RenderFrameHost* render_frame_host) override; blink::mojom::PermissionStatus GetPermissionStatusForWorker( blink::PermissionType permission, content::RenderProcessHost* render_process_host, diff --git a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc index ba6deb94882af..03e435baee20e 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc +++ b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc @@ -246,7 +246,7 @@ void DesktopNotificationController::AnimateAll() { break; } - it = move(it2); + it = std::move(it2); } } @@ -280,12 +280,12 @@ DesktopNotificationController::AddNotification(std::u16string caption, HBITMAP image) { auto data = std::make_shared(); data->controller = this; - data->caption = move(caption); - data->body_text = move(body_text); + data->caption = std::move(caption); + data->body_text = std::move(body_text); data->image = CopyBitmap(image); // Enqueue new notification - Notification ret{*queue_.insert(queue_.end(), move(data))}; + Notification ret{*queue_.insert(queue_.end(), std::move(data))}; CheckQueue(); return ret; } @@ -311,7 +311,7 @@ void DesktopNotificationController::CloseNotification( void DesktopNotificationController::CheckQueue() { while (instances_.size() < instances_.capacity() && !queue_.empty()) { - CreateToast(move(queue_.front())); + CreateToast(std::move(queue_.front())); queue_.pop_front(); } } @@ -409,8 +409,8 @@ void DesktopNotificationController::Notification::Set(std::u16string caption, if (data_->image) DeleteBitmap(data_->image); - data_->caption = move(caption); - data_->body_text = move(body_text); + data_->caption = std::move(caption); + data_->body_text = std::move(body_text); data_->image = CopyBitmap(image); auto* hwnd = data_->controller->GetToast(data_.get()); diff --git a/shell/browser/ui/devtools_ui.cc b/shell/browser/ui/devtools_ui.cc index ab9f2ffcee28b..0da78f52fb272 100644 --- a/shell/browser/ui/devtools_ui.cc +++ b/shell/browser/ui/devtools_ui.cc @@ -31,8 +31,8 @@ std::string PathWithoutParams(const std::string& path) { .substr(1); } -std::string GetMimeTypeForPath(const std::string& path) { - std::string filename = PathWithoutParams(path); +std::string GetMimeTypeForUrl(const GURL& url) { + std::string filename = url.ExtractFileName(); if (base::EndsWith(filename, ".html", base::CompareCase::INSENSITIVE_ASCII)) { return "text/html"; } else if (base::EndsWith(filename, ".css", @@ -95,8 +95,8 @@ class BundledDataSource : public content::URLDataSource { std::move(callback).Run(nullptr); } - std::string GetMimeType(const std::string& path) override { - return GetMimeTypeForPath(path); + std::string GetMimeType(const GURL& url) override { + return GetMimeTypeForUrl(url); } bool ShouldAddContentSecurityPolicy() override { return false; } diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index bbe8ce0daee38..a49cd01af0abf 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -6,12 +6,12 @@ #include #include +#include #include #include "base/bind.h" #include "base/files/file_path.h" #include "base/strings/string_number_conversions.h" -#include "base/values.h" #include "components/prefs/json_pref_store.h" #include "components/prefs/pref_filter.h" #include "components/prefs/pref_registry_simple.h" @@ -63,18 +63,11 @@ void ZoomLevelDelegate::SetDefaultZoomLevelPref(double level) { } double ZoomLevelDelegate::GetDefaultZoomLevelPref() const { - double default_zoom_level = 0.0; - - const base::Value* default_zoom_level_dictionary = - pref_service_->GetDictionary(kPartitionDefaultZoomLevel); + const base::Value::Dict& default_zoom_level_dictionary = + pref_service_->GetValueDict(kPartitionDefaultZoomLevel); // If no default has been previously set, the default returned is the // value used to initialize default_zoom_level in this function. - 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; + return default_zoom_level_dictionary.FindDouble(partition_key_).value_or(0.0); } void ZoomLevelDelegate::OnZoomLevelChanged( @@ -84,35 +77,33 @@ void ZoomLevelDelegate::OnZoomLevelChanged( double level = change.zoom_level; DictionaryPrefUpdate update(pref_service_, kPartitionPerHostZoomLevels); - base::Value* host_zoom_dictionaries = update.Get(); - DCHECK(host_zoom_dictionaries); + base::Value* host_zoom_update = update.Get(); + DCHECK(host_zoom_update); + base::Value::Dict& host_zoom_dictionaries = host_zoom_update->GetDict(); bool modification_is_removal = blink::PageZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel()); - base::Value* host_zoom_dictionary = - host_zoom_dictionaries->FindDictKey(partition_key_); + base::Value::Dict* host_zoom_dictionary = + host_zoom_dictionaries.FindDict(partition_key_); if (!host_zoom_dictionary) { - host_zoom_dictionaries->SetKey(partition_key_, - base::Value(base::Value::Type::DICTIONARY)); - host_zoom_dictionary = host_zoom_dictionaries->FindDictKey(partition_key_); + base::Value::Dict dict; + host_zoom_dictionaries.Set(partition_key_, std::move(dict)); + host_zoom_dictionary = host_zoom_dictionaries.FindDict(partition_key_); } if (modification_is_removal) - host_zoom_dictionary->RemoveKey(change.host); + host_zoom_dictionary->Remove(change.host); else - host_zoom_dictionary->SetKey(change.host, base::Value(level)); + host_zoom_dictionary->Set(change.host, base::Value(level)); } void ZoomLevelDelegate::ExtractPerHostZoomLevels( - const base::DictionaryValue* host_zoom_dictionary) { + const base::Value::Dict& host_zoom_dictionary) { std::vector keys_to_remove; - std::unique_ptr host_zoom_dictionary_copy = - host_zoom_dictionary->DeepCopyWithoutEmptyChildren(); - for (base::DictionaryValue::Iterator i(*host_zoom_dictionary_copy); - !i.IsAtEnd(); i.Advance()) { - const std::string& host(i.key()); - const absl::optional zoom_level = i.value().GetIfDouble(); + base::Value::Dict host_zoom_dictionary_copy = host_zoom_dictionary.Clone(); + for (auto [host, value] : host_zoom_dictionary_copy) { + const absl::optional zoom_level = value.GetIfDouble(); // Filter out A) the empty host, B) zoom levels equal to the default; and // remember them, so that we can later erase them from Prefs. @@ -120,14 +111,14 @@ void ZoomLevelDelegate::ExtractPerHostZoomLevels( // level was set to its current value. In either case, SetZoomLevelForHost // will ignore type B values, thus, to have consistency with HostZoomMap's // internal state, these values must also be removed from Prefs. - if (host.empty() || !zoom_level || - blink::PageZoomValuesEqual(*zoom_level, + if (host.empty() || !zoom_level.has_value() || + blink::PageZoomValuesEqual(zoom_level.value(), host_zoom_map_->GetDefaultZoomLevel())) { keys_to_remove.push_back(host); continue; } - host_zoom_map_->SetZoomLevelForHost(host, *zoom_level); + host_zoom_map_->SetZoomLevelForHost(host, zoom_level.value()); } // Sanitize prefs to remove entries that match the default zoom level and/or @@ -155,16 +146,15 @@ void ZoomLevelDelegate::InitHostZoomMap(content::HostZoomMap* host_zoom_map) { // Initialize the HostZoomMap with per-host zoom levels from the persisted // zoom-level preference values. - const base::Value* host_zoom_dictionaries = - pref_service_->GetDictionary(kPartitionPerHostZoomLevels); - const base::Value* host_zoom_dictionary = - host_zoom_dictionaries->FindDictKey(partition_key_); + const base::Value::Dict& host_zoom_dictionaries = + pref_service_->GetValueDict(kPartitionPerHostZoomLevels); + const base::Value::Dict* host_zoom_dictionary = + host_zoom_dictionaries.FindDict(partition_key_); if (host_zoom_dictionary) { // Since we're calling this before setting up zoom_subscription_ below we // don't need to worry that host_zoom_dictionary is indirectly affected // by calls to HostZoomMap::SExtractPerHostZoomLevelsetZoomLevelForHost(). - ExtractPerHostZoomLevels( - &base::Value::AsDictionaryValue(*host_zoom_dictionary)); + ExtractPerHostZoomLevels(*host_zoom_dictionary); } zoom_subscription_ = host_zoom_map_->AddZoomLevelChangedCallback(base::BindRepeating( diff --git a/shell/browser/zoom_level_delegate.h b/shell/browser/zoom_level_delegate.h index 56dcba7e68eb0..1c4302fadf8b1 100644 --- a/shell/browser/zoom_level_delegate.h +++ b/shell/browser/zoom_level_delegate.h @@ -7,12 +7,12 @@ #include +#include "base/values.h" #include "components/prefs/pref_service.h" #include "content/public/browser/host_zoom_map.h" #include "content/public/browser/zoom_level_delegate.h" namespace base { -class DictionaryValue; class FilePath; } // namespace base @@ -45,8 +45,7 @@ class ZoomLevelDelegate : public content::ZoomLevelDelegate { void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override; private: - void ExtractPerHostZoomLevels( - const base::DictionaryValue* host_zoom_dictionary); + void ExtractPerHostZoomLevels(const base::Value::Dict& host_zoom_dictionary); // This is a callback function that receives notifications from HostZoomMap // when per-host zoom levels change. It is used to update the per-host diff --git a/shell/common/extensions/electron_extensions_client.cc b/shell/common/extensions/electron_extensions_client.cc index c2f9a573701ce..76baa9df41c5d 100644 --- a/shell/common/extensions/electron_extensions_client.cc +++ b/shell/common/extensions/electron_extensions_client.cc @@ -67,6 +67,7 @@ base::LazyInstance::DestructorAtExit ElectronExtensionsClient::ElectronExtensionsClient() : webstore_base_url_(extension_urls::kChromeWebstoreBaseURL), + new_webstore_base_url_(extension_urls::kNewChromeWebstoreBaseURL), webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) { AddAPIProvider(std::make_unique()); AddAPIProvider(std::make_unique()); @@ -127,6 +128,10 @@ const GURL& ElectronExtensionsClient::GetWebstoreBaseURL() const { return webstore_base_url_; } +const GURL& ElectronExtensionsClient::GetNewWebstoreBaseURL() const { + return new_webstore_base_url_; +} + const GURL& ElectronExtensionsClient::GetWebstoreUpdateURL() const { return webstore_update_url_; } diff --git a/shell/common/extensions/electron_extensions_client.h b/shell/common/extensions/electron_extensions_client.h index c69a875b5dcb7..885f85554f62e 100644 --- a/shell/common/extensions/electron_extensions_client.h +++ b/shell/common/extensions/electron_extensions_client.h @@ -52,11 +52,13 @@ class ElectronExtensionsClient : public extensions::ExtensionsClient { const GURL& GetWebstoreBaseURL() const override; const GURL& GetWebstoreUpdateURL() const override; bool IsBlocklistUpdateURL(const GURL& url) const override; + const GURL& GetNewWebstoreBaseURL() const override; private: ScriptingAllowlist scripting_allowlist_; const GURL webstore_base_url_; + const GURL new_webstore_base_url_; const GURL webstore_update_url_; }; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 12e8cc1018e86..d2399e50c0415 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -23,6 +23,7 @@ #include "shell/common/gin_converters/blink_converter.h" #include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/file_path_converter.h" +#include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/function_template_extensions.h" @@ -56,27 +57,6 @@ namespace gin { -template <> -struct Converter { - static bool FromV8(v8::Isolate* isolate, - v8::Local val, - blink::WebLocalFrame::ScriptExecutionType* out) { - std::string execution_type; - if (!ConvertFromV8(isolate, val, &execution_type)) - return false; - if (execution_type == "asynchronous") { - *out = blink::WebLocalFrame::kAsynchronous; - } else if (execution_type == "asynchronousBlockingOnload") { - *out = blink::WebLocalFrame::kAsynchronousBlockingOnload; - } else if (execution_type == "synchronous") { - *out = blink::WebLocalFrame::kSynchronous; - } else { - return false; - } - return true; - } -}; - template <> struct Converter { static bool FromV8(v8::Isolate* isolate, @@ -132,7 +112,7 @@ bool SpellCheckWord(content::RenderFrame* render_frame, #endif -class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { +class ScriptExecutionCallback { public: // for compatibility with the older version of this, error is after result using CompletionCallback = @@ -144,7 +124,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { CompletionCallback callback) : promise_(std::move(promise)), callback_(std::move(callback)) {} - ~ScriptExecutionCallback() override = default; + ~ScriptExecutionCallback() = default; // disable copy ScriptExecutionCallback(const ScriptExecutionCallback&) = delete; @@ -193,8 +173,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { } } - void Completed( - const blink::WebVector>& result) override { + void Completed(const blink::WebVector>& result) { v8::Isolate* isolate = promise_.isolate(); if (!result.empty()) { if (!result[0].IsEmpty()) { @@ -660,13 +639,20 @@ class WebFrameRenderer : public gin::Wrappable, ScriptExecutionCallback::CompletionCallback completion_callback; args->GetNext(&completion_callback); + auto* self = new ScriptExecutionCallback(std::move(promise), + std::move(completion_callback)); + render_frame->GetWebFrame()->RequestExecuteScript( blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1), - has_user_gesture, blink::WebLocalFrame::kSynchronous, - new ScriptExecutionCallback(std::move(promise), - std::move(completion_callback)), + has_user_gesture ? blink::mojom::UserActivationOption::kActivate + : blink::mojom::UserActivationOption::kDoNotActivate, + blink::mojom::EvaluationTiming::kSynchronous, + blink::mojom::LoadEventBlockingOption::kDoNotBlock, + base::NullCallback(), + base::BindOnce(&ScriptExecutionCallback::Completed, + base::Unretained(self)), blink::BackForwardCacheAware::kAllow, - blink::WebLocalFrame::PromiseBehavior::kDontWait); + blink::mojom::PromiseResultOption::kDoNotWait); return handle; } @@ -692,9 +678,19 @@ class WebFrameRenderer : public gin::Wrappable, bool has_user_gesture = false; args->GetNext(&has_user_gesture); - blink::WebLocalFrame::ScriptExecutionType scriptExecutionType = - blink::WebLocalFrame::kSynchronous; - args->GetNext(&scriptExecutionType); + blink::mojom::EvaluationTiming script_execution_type = + blink::mojom::EvaluationTiming::kSynchronous; + blink::mojom::LoadEventBlockingOption load_blocking_option = + blink::mojom::LoadEventBlockingOption::kDoNotBlock; + std::string execution_type; + args->GetNext(&execution_type); + + if (execution_type == "asynchronous") { + script_execution_type = blink::mojom::EvaluationTiming::kAsynchronous; + } else if (execution_type == "asynchronousBlockingOnload") { + script_execution_type = blink::mojom::EvaluationTiming::kAsynchronous; + load_blocking_option = blink::mojom::LoadEventBlockingOption::kBlock; + } ScriptExecutionCallback::CompletionCallback completion_callback; args->GetNext(&completion_callback); @@ -724,13 +720,19 @@ class WebFrameRenderer : public gin::Wrappable, blink::WebURL(GURL(url))); } + // Deletes itself. + auto* self = new ScriptExecutionCallback(std::move(promise), + std::move(completion_callback)); + render_frame->GetWebFrame()->RequestExecuteScript( - world_id, base::make_span(sources), has_user_gesture, - scriptExecutionType, - new ScriptExecutionCallback(std::move(promise), - std::move(completion_callback)), + world_id, base::make_span(sources), + has_user_gesture ? blink::mojom::UserActivationOption::kActivate + : blink::mojom::UserActivationOption::kDoNotActivate, + script_execution_type, load_blocking_option, base::NullCallback(), + base::BindOnce(&ScriptExecutionCallback::Completed, + base::Unretained(self)), blink::BackForwardCacheAware::kPossiblyDisallow, - blink::WebLocalFrame::PromiseBehavior::kDontWait); + blink::mojom::PromiseResultOption::kDoNotWait); return handle; } diff --git a/shell/renderer/electron_api_service_impl.cc b/shell/renderer/electron_api_service_impl.cc index 7c39544973936..0a8f35bac6bc5 100644 --- a/shell/renderer/electron_api_service_impl.cc +++ b/shell/renderer/electron_api_service_impl.cc @@ -107,8 +107,8 @@ ElectronApiServiceImpl::ElectronApiServiceImpl( RendererClientBase* renderer_client) : content::RenderFrameObserver(render_frame), renderer_client_(renderer_client) { - registry_.AddInterface(base::BindRepeating(&ElectronApiServiceImpl::BindTo, - base::Unretained(this))); + registry_.AddInterface(base::BindRepeating( + &ElectronApiServiceImpl::BindTo, base::Unretained(this))); } void ElectronApiServiceImpl::BindTo( diff --git a/shell/renderer/electron_autofill_agent.cc b/shell/renderer/electron_autofill_agent.cc index 115f602c77660..c648ee17fb2a2 100644 --- a/shell/renderer/electron_autofill_agent.cc +++ b/shell/renderer/electron_autofill_agent.cc @@ -52,8 +52,8 @@ AutofillAgent::AutofillAgent(content::RenderFrame* frame, blink::AssociatedInterfaceRegistry* registry) : content::RenderFrameObserver(frame) { render_frame()->GetWebFrame()->SetAutofillClient(this); - registry->AddInterface(base::BindRepeating(&AutofillAgent::BindReceiver, - base::Unretained(this))); + registry->AddInterface(base::BindRepeating( + &AutofillAgent::BindReceiver, base::Unretained(this))); } AutofillAgent::~AutofillAgent() = default; diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index b57b46cc8c580..9187dca38e7d4 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -322,10 +322,11 @@ void RendererClientBase::RenderFrameCreated( dispatcher->OnRenderFrameCreated(render_frame); - render_frame->GetAssociatedInterfaceRegistry()->AddInterface( - base::BindRepeating( - &extensions::MimeHandlerViewContainerManager::BindReceiver, - render_frame->GetRoutingID())); + render_frame->GetAssociatedInterfaceRegistry() + ->AddInterface( + base::BindRepeating( + &extensions::MimeHandlerViewContainerManager::BindReceiver, + render_frame->GetRoutingID())); #endif #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) @@ -635,7 +636,7 @@ void RendererClientBase::AllowGuestViewElementDefinition( render_frame->GetWebFrame()->RequestExecuteV8Function( context->GetCreationContextChecked(), register_cb, v8::Null(isolate), 0, - nullptr, nullptr); + nullptr, base::NullCallback()); } } // namespace electron From 672464d900267b9d0f531befb99516314ee02a99 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 13:36:23 -0700 Subject: [PATCH 718/811] docs: fix typescript error in code samples (#35656) Fixed typescript error Co-authored-by: Leon Schwanitz --- docs/fiddles/features/web-serial/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/fiddles/features/web-serial/main.js b/docs/fiddles/features/web-serial/main.js index 37b9f35c27b2f..7150ec60651e9 100644 --- a/docs/fiddles/features/web-serial/main.js +++ b/docs/fiddles/features/web-serial/main.js @@ -33,12 +33,16 @@ function createWindow () { if (permission === 'serial' && details.securityOrigin === 'file:///') { return true } + + return false }) mainWindow.webContents.session.setDevicePermissionHandler((details) => { if (details.deviceType === 'serial' && details.origin === 'file://') { return true } + + return false }) mainWindow.loadFile('index.html') From fad97e0b06643febc6aa2da89144aadd5c022c8b Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 13:51:45 -0700 Subject: [PATCH 719/811] docs: improve registerFileProtocol example (#35599) docs: improve registerFileProtocol example (#35580) * improve registerFileProtocol example * link ProtocolResponse * kick lint Co-authored-by: Kishan Bagaria --- docs/api/protocol.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/api/protocol.md b/docs/api/protocol.md index 7a2b334016191..8b0d2fbc89906 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -10,11 +10,12 @@ An example of implementing a protocol that has the same effect as the ```javascript const { app, protocol } = require('electron') const path = require('path') +const url = require('url') app.whenReady().then(() => { protocol.registerFileProtocol('atom', (request, callback) => { - const url = request.url.substr(7) - callback({ path: path.normalize(`${__dirname}/${url}`) }) + const filePath = url.fileURLToPath('file://' + request.url.slice('atom://'.length)) + callback(filePath) }) }) ``` @@ -175,7 +176,7 @@ property. * `handler` Function * `request` [ProtocolRequest](structures/protocol-request.md) * `callback` Function - * `response` ProtocolResponse + * `response` [ProtocolResponse](structures/protocol-response.md) Returns `boolean` - Whether the protocol was successfully registered From 8becf52f11a9291c9f023212db6fc6fab9f21ccb Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 02:29:38 -0700 Subject: [PATCH 720/811] fix: allow maximizing when window enters tablet mode with WCO (#35664) * fix: Backport CL 3753528 for WCO * Update comment * Update shell/browser/ui/views/win_caption_button_container.cc Co-authored-by: Robo Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Co-authored-by: Robo --- shell/browser/ui/views/win_caption_button_container.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/browser/ui/views/win_caption_button_container.cc b/shell/browser/ui/views/win_caption_button_container.cc index 92c0fca690cbd..99a7fc4bc057b 100644 --- a/shell/browser/ui/views/win_caption_button_container.cc +++ b/shell/browser/ui/views/win_caption_button_container.cc @@ -159,10 +159,11 @@ void WinCaptionButtonContainer::UpdateButtons() { const bool is_touch = ui::TouchUiController::Get()->touch_ui(); restore_button_->SetEnabled(!is_touch); - // The maximize button should only be enabled if the window is - // maximizable *and* touch mode is disabled. + // In touch mode, windows cannot be taken out of fullscreen or tiled mode, so + // the maximize/restore button should be disabled, unless the window is not + // maximized. const bool maximizable = frame_view_->window()->IsMaximizable(); - maximize_button_->SetEnabled(!is_touch && maximizable); + maximize_button_->SetEnabled(!(is_touch && is_maximized) && maximizable); const bool closable = frame_view_->window()->IsClosable(); close_button_->SetEnabled(closable); From 12992b253ce588969c1bb97ad91406fe97939df0 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 16:53:53 -0700 Subject: [PATCH 721/811] chore: make macOS spellchecker fns formal no-ops (#35679) * chore: make macOS spellchecker fns formal no-ops * docs: correct no-op note * test: add no-op specs Co-authored-by: Shelley Vohr --- docs/api/session.md | 2 +- shell/browser/api/electron_api_session.cc | 4 +++ spec-main/spellchecker-spec.ts | 38 +++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/api/session.md b/docs/api/session.md index 93f11522be042..c691f237e7260 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -932,7 +932,7 @@ Returns `string[]` - An array of language codes the spellchecker is enabled for. will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this setting with the current OS locale. This setting is persisted across restarts. -**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS. +**Note:** On macOS the OS spellchecker is used and has its own list of languages. On macOS, this API will return whichever languages have been configured by the OS. #### `ses.setSpellCheckerDictionaryDownloadURL(url)` diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 3b691b06bdbc3..a5d59b2d2b2d8 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -1024,6 +1024,7 @@ base::Value Session::GetSpellCheckerLanguages() { void Session::SetSpellCheckerLanguages( gin_helper::ErrorThrower thrower, const std::vector& languages) { +#if !BUILDFLAG(IS_MAC) base::Value::List language_codes; for (const std::string& lang : languages) { std::string code = spellcheck::GetCorrespondingSpellCheckLanguage(lang); @@ -1039,10 +1040,12 @@ void Session::SetSpellCheckerLanguages( // Enable spellcheck if > 0 languages, disable if no languages set browser_context_->prefs()->SetBoolean(spellcheck::prefs::kSpellCheckEnable, !languages.empty()); +#endif } void SetSpellCheckerDictionaryDownloadURL(gin_helper::ErrorThrower thrower, const GURL& url) { +#if !BUILDFLAG(IS_MAC) if (!url.is_valid()) { thrower.ThrowError( "The URL you provided to setSpellCheckerDictionaryDownloadURL is not a " @@ -1050,6 +1053,7 @@ void SetSpellCheckerDictionaryDownloadURL(gin_helper::ErrorThrower thrower, return; } SpellcheckHunspellDictionary::SetBaseDownloadURL(url); +#endif } v8::Local Session::ListWordsInSpellCheckerDictionary() { diff --git a/spec-main/spellchecker-spec.ts b/spec-main/spellchecker-spec.ts index 3cc058158729b..be16f63a6c7e6 100644 --- a/spec-main/spellchecker-spec.ts +++ b/spec-main/spellchecker-spec.ts @@ -212,6 +212,44 @@ ifdescribe(features.isBuiltinSpellCheckerEnabled())('spellchecker', function () }); }); + describe('ses.setSpellCheckerLanguages', () => { + const isMac = process.platform === 'darwin'; + + ifit(isMac)('should be a no-op when setSpellCheckerLanguages is called on macOS', () => { + expect(() => { + w.webContents.session.setSpellCheckerLanguages(['i-am-a-nonexistent-language']); + }).to.not.throw(); + }); + + ifit(!isMac)('should throw when a bad language is passed', () => { + expect(() => { + w.webContents.session.setSpellCheckerLanguages(['i-am-a-nonexistent-language']); + }).to.throw(/Invalid language code provided: "i-am-a-nonexistent-language" is not a valid language code/); + }); + + ifit(!isMac)('should not throw when a recognized language is passed', () => { + expect(() => { + w.webContents.session.setSpellCheckerLanguages(['es']); + }).to.not.throw(); + }); + }); + + describe('SetSpellCheckerDictionaryDownloadURL', () => { + const isMac = process.platform === 'darwin'; + + ifit(isMac)('should be a no-op when a bad url is passed on macOS', () => { + expect(() => { + w.webContents.session.setSpellCheckerDictionaryDownloadURL('i-am-not-a-valid-url'); + }).to.not.throw(); + }); + + ifit(!isMac)('should throw when a bad url is passed', () => { + expect(() => { + w.webContents.session.setSpellCheckerDictionaryDownloadURL('i-am-not-a-valid-url'); + }).to.throw(/The URL you provided to setSpellCheckerDictionaryDownloadURL is not a valid URL/); + }); + }); + describe('ses.removeWordFromSpellCheckerDictionary', () => { it('should successfully remove words to custom dictionary', async () => { const result1 = ses.addWordToSpellCheckerDictionary('foobar'); From b0b8fc2688f6d3fdacaac21bc12db048db6126d0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 06:30:59 -0700 Subject: [PATCH 722/811] Bump v21.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 c8bf94a544abf..680e9b9bea5b6 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.5 \ No newline at end of file +21.0.0-beta.6 \ No newline at end of file diff --git a/package.json b/package.json index 2b7bacaa6deb2..cac68d5f4f9c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.5", + "version": "21.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 b2beab41c0377..4bfcbdf9c74ce 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 21,0,0,5 - PRODUCTVERSION 21,0,0,5 + FILEVERSION 21,0,0,6 + PRODUCTVERSION 21,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a2c687fcc3cbdcc3a865c3e203a40811af82cb75 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 09:38:03 -0700 Subject: [PATCH 723/811] Revert "Bump v21.0.0-beta.6" This reverts commit b0b8fc2688f6d3fdacaac21bc12db048db6126d0. --- 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 680e9b9bea5b6..c8bf94a544abf 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.6 \ No newline at end of file +21.0.0-beta.5 \ No newline at end of file diff --git a/package.json b/package.json index cac68d5f4f9c3..2b7bacaa6deb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.6", + "version": "21.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 4bfcbdf9c74ce..b2beab41c0377 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 21,0,0,6 - PRODUCTVERSION 21,0,0,6 + FILEVERSION 21,0,0,5 + PRODUCTVERSION 21,0,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cbf5843c9a9455d2320040ba1a6387d929e88fc4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:06:18 +0200 Subject: [PATCH 724/811] fix: WCO occlusion of DevTools (#35688) Co-authored-by: Shelley Vohr --- docs/api/web-contents.md | 2 ++ shell/browser/api/electron_api_web_contents.cc | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 71f223081bdd6..0c7f18d55cd0e 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -1626,6 +1626,8 @@ Opens the devtools. When `contents` is a `` tag, the `mode` would be `detach` by default, explicitly passing an empty `mode` can force using last used dock state. +On Windows, if Windows Control Overlay is enabled, Devtools will be opened with `mode: 'detach'`. + #### `contents.closeDevTools()` Closes the devtools. diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index e6cd258588445..e74f2523d5d5e 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -175,6 +175,7 @@ #if BUILDFLAG(IS_WIN) #include "printing/backend/win_helper.h" +#include "shell/browser/native_window_views.h" #endif #endif @@ -2415,6 +2416,14 @@ void WebContents::OpenDevTools(gin::Arguments* args) { } } +#if BUILDFLAG(IS_WIN) + auto* win = static_cast(owner_window()); + // Force a detached state when WCO is enabled to match Chrome + // behavior and prevent occlusion of DevTools. + if (win && win->IsWindowControlsOverlayEnabled()) + state = "detach"; +#endif + DCHECK(inspectable_web_contents_); inspectable_web_contents_->SetDockState(state); inspectable_web_contents_->ShowDevTools(activate); From 5e7ff852f31c4957f831d29d7022e78ded065bda Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:13:25 -0700 Subject: [PATCH 725/811] chore: bump chromium to 106.0.5249.40 (21-x-y) (#35686) * chore: bump chromium in DEPS to 106.0.5249.40 * 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 +- ...apt_exclusive_access_for_electron_needs.patch | 16 ++++++++-------- .../mas_disable_remote_accessibility.patch | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index dfd7929b7e30a..ffca45b11d44a 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.30', + '106.0.5249.40', 'node_version': 'v16.16.0', 'nan_version': diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index b9facbb0e987d..6daf2cabfd185 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff118eed07 100644 +index 8106b5ceec5b6b3ca01d14308a351e63eac809c1..5758757980879a9c1810c4de44f228860688d442 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -17,12 +17,16 @@ @@ -36,7 +36,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff #include "chrome/common/chrome_switches.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" -@@ -177,6 +181,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -181,6 +185,7 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -44,7 +44,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff if (base::FeatureList::IsEnabled( blink::features::kWindowPlacementFullscreenCompanionWindow)) { if (!popunder_preventer_) -@@ -184,6 +189,7 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -188,6 +193,7 @@ void FullscreenController::EnterFullscreenModeForTab( else popunder_preventer_->WillActivateWebContents(web_contents); } @@ -52,7 +52,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -233,7 +239,9 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -237,7 +243,9 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -62,7 +62,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -288,11 +296,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -292,11 +300,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -76,7 +76,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff } void FullscreenController::OnTabDeactivated( -@@ -460,18 +470,17 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -465,18 +475,17 @@ 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. @@ -100,7 +100,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff if (option == TAB) { url = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -498,6 +507,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -509,6 +518,7 @@ void FullscreenController::EnterFullscreenModeInternal( if (!extension_caused_fullscreen_.is_empty()) url = extension_caused_fullscreen_; } @@ -108,7 +108,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); -@@ -525,12 +535,12 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -536,12 +546,12 @@ void FullscreenController::ExitFullscreenModeInternal() { RecordExitingUMA(); toggled_into_fullscreen_ = false; started_fullscreen_transition_ = true; diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 81239e0f75fef..f24ef46dfb0ed 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -197,7 +197,7 @@ index d460e055c8bc70845cdf89567e17a79da70fd9f1..f28dcfe0721239ca9341a0db80e8626a /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 012ab83bb9f4887646decb030b4a18f6b21e0d01..0d8b56cc387b24833ec7950a8049e038f650020c 100644 +index 8efef6d9adbca21613be3c32fe9f43b2d50ff8c5..6e819be94a6a5e8a26598f4883697719fecef693 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -341,6 +341,13 @@ component("base") { From 908751b4f179395f2fb0289f64b9757ad7edcf73 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 15 Sep 2022 13:17:05 -0700 Subject: [PATCH 726/811] chore: update filenames.libcxx.gni (#35689) Co-authored-by: deepak1556 --- filenames.libcxx.gni | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 4d45f286950a0..e2f5c15d90e64 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -1,7 +1,6 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/CMakeLists.txt", "//buildtools/third_party/libc++/trunk/include/__algorithm/adjacent_find.h", - "//buildtools/third_party/libc++/trunk/include/__algorithm/algorithm_family.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/all_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/any_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/binary_search.h", @@ -74,6 +73,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_all_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_any_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_binary_search.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_clamp.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_backward.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_if.h", @@ -98,6 +98,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap_until.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_partitioned.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_permutation.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted_until.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_iterator_concept.h", @@ -114,6 +115,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move_backward.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_next_permutation.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_none_of.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_nth_element.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort.h", @@ -122,6 +124,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_point.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_pop_heap.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_prev_permutation.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_push_heap.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy.h", @@ -133,7 +136,9 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_if.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate_copy.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sample.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search_n.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_difference.h", @@ -179,6 +184,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/stable_sort.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/swap_ranges.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/transform.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/uniform_random_bit_generator_adaptor.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h", @@ -328,6 +334,8 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h", "//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h", "//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h", + "//buildtools/third_party/libc++/trunk/include/__fwd/hash.h", + "//buildtools/third_party/libc++/trunk/include/__fwd/pair.h", "//buildtools/third_party/libc++/trunk/include/__fwd/span.h", "//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h", "//buildtools/third_party/libc++/trunk/include/__hash_table", @@ -514,6 +522,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_union.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/alignment_of.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/apply_cv.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/can_extract_key.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/common_reference.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/common_type.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/conditional.h", @@ -521,6 +530,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cv.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cvref.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/decay.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/dependent_type.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/disjunction.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/enable_if.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/extent.h", @@ -535,6 +545,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/is_base_of.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_bounded_array.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_callable.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_char_like_type.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_class.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_compound.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_const.h", @@ -552,6 +563,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/is_floating_point.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_function.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_fundamental.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_implicitly_default_constructible.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_integral.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_literal_type.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_function_pointer.h", @@ -583,6 +595,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed_integer.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_standard_layout.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_swappable.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivial.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_assignable.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_constructible.h", @@ -602,20 +615,24 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/is_volatile.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/lazy.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/make_32_64_or_128_bit.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/make_const_lvalue_ref.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/make_signed.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/make_unsigned.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/maybe_const.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/nat.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/negation.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/promote.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/rank.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_all_extents.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const_ref.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cv.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cvref.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_extent.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_pointer.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_reference.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/remove_volatile.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/result_of.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/type_identity.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/type_list.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/underlying_type.h", @@ -624,6 +641,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__utility/as_const.h", "//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h", "//buildtools/third_party/libc++/trunk/include/__utility/cmp.h", + "//buildtools/third_party/libc++/trunk/include/__utility/convert_to_integral.h", "//buildtools/third_party/libc++/trunk/include/__utility/declval.h", "//buildtools/third_party/libc++/trunk/include/__utility/exchange.h", "//buildtools/third_party/libc++/trunk/include/__utility/forward.h", @@ -639,6 +657,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__utility/transaction.h", "//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h", "//buildtools/third_party/libc++/trunk/include/__variant/monostate.h", + "//buildtools/third_party/libc++/trunk/include/__verbose_abort", "//buildtools/third_party/libc++/trunk/include/algorithm", "//buildtools/third_party/libc++/trunk/include/any", "//buildtools/third_party/libc++/trunk/include/array", From afd392b921a0a9f83be0364ea31a71510cee3dfd Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:17:39 -0700 Subject: [PATCH 727/811] docs: add back docs about asar archives (#35667) Co-authored-by: Cheng Zhao --- docs/README.md | 1 + docs/tutorial/asar-archives.md | 175 +++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 docs/tutorial/asar-archives.md diff --git a/docs/README.md b/docs/README.md index e346d985d755d..40ae2be10c18c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -68,6 +68,7 @@ an issue: * [Mac App Store](tutorial/mac-app-store-submission-guide.md) * [Windows Store](tutorial/windows-store-guide.md) * [Snapcraft](tutorial/snapcraft.md) + * [ASAR Archives](tutorial/asar-archives.md) * [Updates](tutorial/updates.md) * [Getting Support](tutorial/support.md) diff --git a/docs/tutorial/asar-archives.md b/docs/tutorial/asar-archives.md new file mode 100644 index 0000000000000..23b987f42ee50 --- /dev/null +++ b/docs/tutorial/asar-archives.md @@ -0,0 +1,175 @@ +--- +title: ASAR Archives +description: What is ASAR archive and how does it affect the application. +slug: asar-archives +hide_title: false +--- + +After creating an [application distribution](application-distribution.md), the +app's source code are usually bundled into an [ASAR +archive](https://github.com/electron/asar), which is a simple extensive archive +format designed for Electron apps. By bundling the app we can mitigate issues +around long path names on Windows, speed up `require` and conceal your source +code from cursory inspection. + +The bundled app runs in a virtual file system and most APIs would just work +normally, but for some cases you might want to work on ASAR archives explicitly +due to a few caveats. + +## Using ASAR Archives + +In Electron there are two sets of APIs: Node APIs provided by Node.js and Web +APIs provided by Chromium. Both APIs support reading files from ASAR archives. + +### Node API + +With special patches in Electron, Node APIs like `fs.readFile` and `require` +treat ASAR archives as virtual directories, and the files in it as normal +files in the filesystem. + +For example, suppose we have an `example.asar` archive under `/path/to`: + +```sh +$ asar list /path/to/example.asar +/app.js +/file.txt +/dir/module.js +/static/index.html +/static/main.css +/static/jquery.min.js +``` + +Read a file in the ASAR archive: + +```javascript +const fs = require('fs') +fs.readFileSync('/path/to/example.asar/file.txt') +``` + +List all files under the root of the archive: + +```javascript +const fs = require('fs') +fs.readdirSync('/path/to/example.asar') +``` + +Use a module from the archive: + +```javascript +require('./path/to/example.asar/dir/module.js') +``` + +You can also display a web page in an ASAR archive with `BrowserWindow`: + +```javascript +const { BrowserWindow } = require('electron') +const win = new BrowserWindow() + +win.loadURL('file:///path/to/example.asar/static/index.html') +``` + +### Web API + +In a web page, files in an archive can be requested with the `file:` protocol. +Like the Node API, ASAR archives are treated as directories. + +For example, to get a file with `$.get`: + +```html + +``` + +### Treating an ASAR archive as a Normal File + +For some cases like verifying the ASAR archive's checksum, we need to read the +content of an ASAR archive as a file. For this purpose you can use the built-in +`original-fs` module which provides original `fs` APIs without `asar` support: + +```javascript +const originalFs = require('original-fs') +originalFs.readFileSync('/path/to/example.asar') +``` + +You can also set `process.noAsar` to `true` to disable the support for `asar` in +the `fs` module: + +```javascript +const fs = require('fs') +process.noAsar = true +fs.readFileSync('/path/to/example.asar') +``` + +## Limitations of the Node API + +Even though we tried hard to make ASAR archives in the Node API work like +directories as much as possible, there are still limitations due to the +low-level nature of the Node API. + +### Archives Are Read-only + +The archives can not be modified so all Node APIs that can modify files will not +work with ASAR archives. + +### Working Directory Can Not Be Set to Directories in Archive + +Though ASAR archives are treated as directories, there are no actual +directories in the filesystem, so you can never set the working directory to +directories in ASAR archives. Passing them as the `cwd` option of some APIs +will also cause errors. + +### Extra Unpacking on Some APIs + +Most `fs` APIs can read a file or get a file's information from ASAR archives +without unpacking, but for some APIs that rely on passing the real file path to +underlying system calls, Electron will extract the needed file into a +temporary file and pass the path of the temporary file to the APIs to make them +work. This adds a little overhead for those APIs. + +APIs that requires extra unpacking are: + +* `child_process.execFile` +* `child_process.execFileSync` +* `fs.open` +* `fs.openSync` +* `process.dlopen` - Used by `require` on native modules + +### Fake Stat Information of `fs.stat` + +The `Stats` object returned by `fs.stat` and its friends on files in `asar` +archives is generated by guessing, because those files do not exist on the +filesystem. So you should not trust the `Stats` object except for getting file +size and checking file type. + +### Executing Binaries Inside ASAR archive + +There are Node APIs that can execute binaries like `child_process.exec`, +`child_process.spawn` and `child_process.execFile`, but only `execFile` is +supported to execute binaries inside ASAR archive. + +This is because `exec` and `spawn` accept `command` instead of `file` as input, +and `command`s are executed under shell. There is no reliable way to determine +whether a command uses a file in asar archive, and even if we do, we can not be +sure whether we can replace the path in command without side effects. + +## Adding Unpacked Files to ASAR archives + +As stated above, some Node APIs will unpack the file to the filesystem when +called. Apart from the performance issues, various anti-virus scanners might +be triggered by this behavior. + +As a workaround, you can leave various files unpacked using the `--unpack` option. +In the following example, shared libraries of native Node.js modules will not be +packed: + +```sh +$ asar pack app app.asar --unpack *.node +``` + +After running the command, you will notice that a folder named `app.asar.unpacked` +was created together with the `app.asar` file. It contains the unpacked files +and should be shipped together with the `app.asar` archive. From cb08a466ac9bb9819dbffdbf93e4255aad51e865 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:31:46 -0700 Subject: [PATCH 728/811] Bump v21.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 c8bf94a544abf..680e9b9bea5b6 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.5 \ No newline at end of file +21.0.0-beta.6 \ No newline at end of file diff --git a/package.json b/package.json index 2b7bacaa6deb2..cac68d5f4f9c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.5", + "version": "21.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 b2beab41c0377..4bfcbdf9c74ce 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 21,0,0,5 - PRODUCTVERSION 21,0,0,5 + FILEVERSION 21,0,0,6 + PRODUCTVERSION 21,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c5e920e361bce1abb4beaa2569535fa970985753 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:05:12 -0700 Subject: [PATCH 729/811] build: make check-symlinks.js aware of BRANDING.json changes (#35669) Right now the `check-symlinks.js` assumes that the branding product name is "Electron". If users change `BRANDING.json` on custom builds, the script will fail. Signed-off-by: Juan Cruz Viotti Signed-off-by: Juan Cruz Viotti Co-authored-by: Juan Cruz Viotti --- script/check-symlinks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/check-symlinks.js b/script/check-symlinks.js index db422bb6dc7e6..c68e2ac27eb82 100644 --- a/script/check-symlinks.js +++ b/script/check-symlinks.js @@ -2,13 +2,14 @@ const fs = require('fs'); const path = require('path'); const utils = require('./lib/utils'); +const branding = require('../shell/app/BRANDING.json'); if (process.platform !== 'darwin') { console.log('Not checking symlinks on non-darwin platform'); process.exit(0); } -const appPath = path.resolve(__dirname, '..', '..', 'out', utils.getOutDir(), 'Electron.app'); +const appPath = path.resolve(__dirname, '..', '..', 'out', utils.getOutDir(), `${branding.product_name}.app`); const visited = new Set(); const traverse = (p) => { if (visited.has(p)) return; From b5cf0ad9710d0c36f51d9cbcb3dff927ba951093 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:20:20 -0700 Subject: [PATCH 730/811] feat: webFrameMain.origin (#35534) * feat: webFrameMain.origin * add tests * update docs * fix spec Co-authored-by: Jeremy Rose Co-authored-by: Milan Burda --- docs/api/web-frame-main.md | 10 +++ .../api/electron_api_web_frame_main.cc | 7 ++ .../browser/api/electron_api_web_frame_main.h | 1 + spec-main/api-web-frame-main-spec.ts | 78 +++++++++++++++---- 4 files changed, 82 insertions(+), 14 deletions(-) diff --git a/docs/api/web-frame-main.md b/docs/api/web-frame-main.md index 8ce004b6e9172..3d3b87b354028 100644 --- a/docs/api/web-frame-main.md +++ b/docs/api/web-frame-main.md @@ -169,6 +169,16 @@ convenient when `nodeIntegrationInSubFrames` is not enabled. A `string` representing the current URL of the frame. +#### `frame.origin` _Readonly_ + +A `string` representing the current origin of the frame, serialized according +to [RFC 6454](https://www.rfc-editor.org/rfc/rfc6454). This may be different +from the URL. For instance, if the frame is a child window opened to +`about:blank`, then `frame.origin` will return the parent frame's origin, while +`frame.url` will return the empty string. Pages without a scheme/host/port +triple origin will have the serialized origin of `"null"` (that is, the string +containing the letters n, u, l, l). + #### `frame.top` _Readonly_ A `WebFrameMain | null` representing top frame in the frame hierarchy to which `frame` diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index 178d3e30bda98..0c92c632f3909 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -296,6 +296,12 @@ GURL WebFrameMain::URL() const { return render_frame_->GetLastCommittedURL(); } +std::string WebFrameMain::Origin() const { + if (!CheckRenderFrame()) + return std::string(); + return render_frame_->GetLastCommittedOrigin().Serialize(); +} + blink::mojom::PageVisibilityState WebFrameMain::VisibilityState() const { if (!CheckRenderFrame()) return blink::mojom::PageVisibilityState::kHidden; @@ -397,6 +403,7 @@ v8::Local WebFrameMain::FillObjectTemplate( .SetProperty("processId", &WebFrameMain::ProcessID) .SetProperty("routingId", &WebFrameMain::RoutingID) .SetProperty("url", &WebFrameMain::URL) + .SetProperty("origin", &WebFrameMain::Origin) .SetProperty("visibilityState", &WebFrameMain::VisibilityState) .SetProperty("top", &WebFrameMain::Top) .SetProperty("parent", &WebFrameMain::Parent) diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index e8f1715ab83a2..32e5e351d505d 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -109,6 +109,7 @@ class WebFrameMain : public gin::Wrappable, int ProcessID() const; int RoutingID() const; GURL URL() const; + std::string Origin() const; blink::mojom::PageVisibilityState VisibilityState() const; content::RenderFrameHost* Top() const; diff --git a/spec-main/api-web-frame-main-spec.ts b/spec-main/api-web-frame-main-spec.ts index 1bc812832fad5..9ce8f071e2f17 100644 --- a/spec-main/api-web-frame-main-spec.ts +++ b/spec-main/api-web-frame-main-spec.ts @@ -2,11 +2,11 @@ import { expect } from 'chai'; import * as http from 'http'; import * as path from 'path'; import * as url from 'url'; -import { BrowserWindow, WebFrameMain, webFrameMain, ipcMain } from 'electron/main'; +import { BrowserWindow, WebFrameMain, webFrameMain, ipcMain, app, WebContents } from 'electron/main'; import { closeAllWindows } from './window-helpers'; import { emittedOnce, emittedNTimes } from './events-helpers'; import { AddressInfo } from 'net'; -import { ifit, waitUntil } from './spec-helpers'; +import { defer, ifit, waitUntil } from './spec-helpers'; describe('webFrameMain module', () => { const fixtures = path.resolve(__dirname, '..', 'spec-main', 'fixtures'); @@ -39,7 +39,7 @@ describe('webFrameMain module', () => { let webFrame: WebFrameMain; beforeEach(async () => { - w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame-with-frame-container.html')); webFrame = w.webContents.mainFrame; }); @@ -88,8 +88,8 @@ describe('webFrameMain module', () => { }); describe('cross-origin', () => { - let serverA = null as unknown as Server; - let serverB = null as unknown as Server; + let serverA: Server; + let serverB: Server; before(async () => { serverA = await createServer(); @@ -112,7 +112,7 @@ describe('webFrameMain module', () => { describe('WebFrame.url', () => { it('should report correct address for each subframe', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame-with-frame-container.html')); const webFrame = w.webContents.mainFrame; @@ -122,9 +122,59 @@ describe('webFrameMain module', () => { }); }); + describe('WebFrame.origin', () => { + it('should be null for a fresh WebContents', () => { + const w = new BrowserWindow({ show: false }); + expect(w.webContents.mainFrame.origin).to.equal('null'); + }); + + it('should be file:// for file frames', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadFile(path.join(fixtures, 'blank.html')); + expect(w.webContents.mainFrame.origin).to.equal('file://'); + }); + + it('should be http:// for an http frame', async () => { + const w = new BrowserWindow({ show: false }); + const s = await createServer(); + defer(() => s.server.close()); + await w.loadURL(s.url); + expect(w.webContents.mainFrame.origin).to.equal(s.url.replace(/\/$/, '')); + }); + + it('should show parent origin when child page is about:blank', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadFile(path.join(fixtures, 'blank.html')); + const webContentsCreated: Promise<[unknown, WebContents]> = emittedOnce(app, 'web-contents-created') as any; + expect(w.webContents.mainFrame.origin).to.equal('file://'); + await w.webContents.executeJavaScript('window.open("", null, "show=false"), null'); + const [, childWebContents] = await webContentsCreated; + expect(childWebContents.mainFrame.origin).to.equal('file://'); + }); + + it('should show parent frame\'s origin when about:blank child window opened through cross-origin subframe', async () => { + const w = new BrowserWindow({ show: false }); + const serverA = await createServer(); + const serverB = await createServer(); + defer(() => { + serverA.server.close(); + serverB.server.close(); + }); + await w.loadURL(serverA.url + '?frameSrc=' + encodeURIComponent(serverB.url)); + const { mainFrame } = w.webContents; + expect(mainFrame.origin).to.equal(serverA.url.replace(/\/$/, '')); + const [childFrame] = mainFrame.frames; + expect(childFrame.origin).to.equal(serverB.url.replace(/\/$/, '')); + const webContentsCreated: Promise<[unknown, WebContents]> = emittedOnce(app, 'web-contents-created') as any; + await childFrame.executeJavaScript('window.open("", null, "show=false"), null'); + const [, childWebContents] = await webContentsCreated; + expect(childWebContents.mainFrame.origin).to.equal(childFrame.origin); + }); + }); + describe('WebFrame IDs', () => { it('has properties for various identifiers', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame.html')); const webFrame = w.webContents.mainFrame; expect(webFrame).to.have.ownProperty('url').that.is.a('string'); @@ -154,7 +204,7 @@ describe('webFrameMain module', () => { describe('WebFrame.executeJavaScript', () => { it('can inject code into any subframe', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame-with-frame-container.html')); const webFrame = w.webContents.mainFrame; @@ -165,7 +215,7 @@ describe('webFrameMain module', () => { }); it('can resolve promise', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame.html')); const webFrame = w.webContents.mainFrame; const p = () => webFrame.executeJavaScript('new Promise(resolve => setTimeout(resolve(42), 2000));'); @@ -174,7 +224,7 @@ describe('webFrameMain module', () => { }); it('can reject with error', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame.html')); const webFrame = w.webContents.mainFrame; const p = () => webFrame.executeJavaScript('new Promise((r,e) => setTimeout(e("error!"), 500));'); @@ -195,7 +245,7 @@ describe('webFrameMain module', () => { }); it('can reject when script execution fails', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame.html')); const webFrame = w.webContents.mainFrame; const p = () => webFrame.executeJavaScript('console.log(test)'); @@ -205,7 +255,7 @@ describe('webFrameMain module', () => { describe('WebFrame.reload', () => { it('reloads a frame', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(subframesPath, 'frame.html')); const webFrame = w.webContents.mainFrame; @@ -238,7 +288,7 @@ describe('webFrameMain module', () => { let w: BrowserWindow; beforeEach(async () => { - w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + w = new BrowserWindow({ show: false }); }); // TODO(jkleinsc) fix this flaky test on linux @@ -301,7 +351,7 @@ describe('webFrameMain module', () => { }); it('can find each frame from navigation events', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } }); + const w = new BrowserWindow({ show: false }); // frame-with-frame-container.html, frame-with-frame.html, frame.html const didFrameFinishLoad = emittedNTimes(w.webContents, 'did-frame-finish-load', 3); From 99d9537ef72511da49e1e9df6dbf84fca055cc56 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:20:47 -0700 Subject: [PATCH 731/811] build: fix building with enable_basic_printing false (#35693) Co-authored-by: Milan Burda --- shell/browser/api/electron_api_web_contents.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index e74f2523d5d5e..ed4e6c6825324 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -143,6 +143,10 @@ #include "shell/browser/osr/osr_web_contents_view.h" #endif +#if BUILDFLAG(IS_WIN) +#include "shell/browser/native_window_views.h" +#endif + #if !BUILDFLAG(IS_MAC) #include "ui/aura/window.h" #else @@ -175,9 +179,8 @@ #if BUILDFLAG(IS_WIN) #include "printing/backend/win_helper.h" -#include "shell/browser/native_window_views.h" -#endif #endif +#endif // BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) #include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h" From 8b6b8824876d18a9d8473dff2316b54ab9b7a4c7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 06:30:51 -0700 Subject: [PATCH 732/811] Bump v21.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 680e9b9bea5b6..f170e99978b5b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.6 \ No newline at end of file +21.0.0-beta.7 \ No newline at end of file diff --git a/package.json b/package.json index cac68d5f4f9c3..efcaeac7e2924 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.6", + "version": "21.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 4bfcbdf9c74ce..e1b5e1c888e5e 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 21,0,0,6 - PRODUCTVERSION 21,0,0,6 + FILEVERSION 21,0,0,7 + PRODUCTVERSION 21,0,0,7 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 64b5d7be2efc48e30c9b5fb3094f48c640a25f7d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:27:52 -0400 Subject: [PATCH 733/811] build: update `.nvmrc` Node.js version from 14 to 16 (#35700) Update `.nvmrc` Node.js version from 14 to 16 The `DEPS` file states that Electron is on Node.js ^16.x. I am guessing that the PR bumping to Node.js 16 overlooked the `.nvmrc` file, which is updated in this PR. If leaving the `.nvmrc` file on 14 was intentional, please disregard this PR. Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 8351c19397f4f..b6a7d89c68e0c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 From a1789897d3311fa308e8b9efdece9ce9c1aef543 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:31:58 -0700 Subject: [PATCH 734/811] fix: uv_os_gethostname failing on Windows 7 (libuv patch regression) (#35704) Co-authored-by: Milan Burda --- ...ash_caused_by_gethostnamew_on_windows_7.patch | 16 +++++++++++++++- ...lang_-wdeprecated-declarations_in_libuv.patch | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch b/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch index 5ebadbf25bec8..8d1899062c761 100644 --- a/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch +++ b/patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch @@ -6,7 +6,7 @@ Subject: fix: crash caused by GetHostNameW on Windows 7 Backported from https://github.com/libuv/libuv/pull/3285. diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c -index 33e874ac442f88b58d2b68c8ec9764f6f664552e..2d4cc0aaa02e61bf359e80eca27527efb49fd85e 100644 +index 33e874ac442f88b58d2b68c8ec9764f6f664552e..37ece5e2867ab836492a8b7faa0aa5e1b8e562f0 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -37,6 +37,7 @@ @@ -166,3 +166,17 @@ index 33e874ac442f88b58d2b68c8ec9764f6f664552e..2d4cc0aaa02e61bf359e80eca27527ef int uv_os_gethostname(char* buffer, size_t* size) { WCHAR buf[UV_MAXHOSTNAMESIZE]; size_t len; +@@ -1674,10 +1803,10 @@ int uv_os_gethostname(char* buffer, size_t* size) { + + uv__once_init(); /* Initialize winsock */ + +- if (pGetHostNameW == NULL) +- return UV_ENOSYS; ++ uv_sGetHostNameW gethostnamew = ++ pGetHostNameW == NULL ? uv__gethostnamew_nt60 : pGetHostNameW; + +- if (pGetHostNameW(buf, UV_MAXHOSTNAMESIZE) != 0) ++ if (gethostnamew(buf, UV_MAXHOSTNAMESIZE) != 0) + return uv_translate_sys_error(WSAGetLastError()); + + convert_result = uv__convert_utf16_to_utf8(buf, -1, &utf8_str); diff --git a/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch index bb7df671a3957..a6ae0650793b4 100644 --- a/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch +++ b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch @@ -6,7 +6,7 @@ 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 2d4cc0aaa02e61bf359e80eca27527efb49fd85e..aaa16052e2a9c7d1dca82763c41c0890371f1471 100644 +index 37ece5e2867ab836492a8b7faa0aa5e1b8e562f0..d50296728f7e0810064647125a469f3ed714f8ea 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -1950,10 +1950,17 @@ int uv_os_uname(uv_utsname_t* buffer) { From 3437ffca8b6ab582b360a4a2f3372c140269a5b0 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:50:46 -0400 Subject: [PATCH 735/811] fix: edge case in app.isInApplicationsFolder() (#35730) fix: edge case in app.isInApplicationsFolder() (#35636) * fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt Co-authored-by: Kishan Bagaria Co-authored-by: John Kleinschmidt --- shell/browser/ui/cocoa/electron_bundle_mover.mm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shell/browser/ui/cocoa/electron_bundle_mover.mm b/shell/browser/ui/cocoa/electron_bundle_mover.mm index 881b49c9fa467..57dcadc9932d9 100644 --- a/shell/browser/ui/cocoa/electron_bundle_mover.mm +++ b/shell/browser/ui/cocoa/electron_bundle_mover.mm @@ -182,18 +182,27 @@ return IsInApplicationsFolder([[NSBundle mainBundle] bundlePath]); } +NSString* resolvePath(NSString* path) { + NSString* standardizedPath = [path stringByStandardizingPath]; + char resolved[PATH_MAX]; + if (realpath([standardizedPath UTF8String], resolved) == NULL) + return path; + return @(resolved); +} + bool ElectronBundleMover::IsInApplicationsFolder(NSString* bundlePath) { // Check all the normal Application directories NSArray* applicationDirs = NSSearchPathForDirectoriesInDomains( NSApplicationDirectory, NSAllDomainsMask, true); + NSString* resolvedBundlePath = resolvePath(bundlePath); for (NSString* appDir in applicationDirs) { - if ([bundlePath hasPrefix:appDir]) + if ([resolvedBundlePath hasPrefix:appDir]) return true; } // Also, handle the case that the user has some other Application directory // (perhaps on a separate data partition). - if ([[bundlePath pathComponents] containsObject:@"Applications"]) + if ([[resolvedBundlePath pathComponents] containsObject:@"Applications"]) return true; return false; From f18485f8bf98739ede44c6235d92c7c389237736 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 12:22:42 -0500 Subject: [PATCH 736/811] chore: fix ambiguous reference gcc compile error (#35734) Co-authored-by: Bruno Pitrus --- shell/browser/serial/electron_serial_delegate.cc | 10 ++++++---- shell/browser/serial/electron_serial_delegate.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/shell/browser/serial/electron_serial_delegate.cc b/shell/browser/serial/electron_serial_delegate.cc index 2306be383db46..0c7f63d4ab9fe 100644 --- a/shell/browser/serial/electron_serial_delegate.cc +++ b/shell/browser/serial/electron_serial_delegate.cc @@ -66,16 +66,18 @@ device::mojom::SerialPortManager* ElectronSerialDelegate::GetPortManager( return GetChooserContext(frame)->GetPortManager(); } -void ElectronSerialDelegate::AddObserver(content::RenderFrameHost* frame, - Observer* observer) { +void ElectronSerialDelegate::AddObserver( + content::RenderFrameHost* frame, + content::SerialDelegate::Observer* observer) { observer_list_.AddObserver(observer); auto* chooser_context = GetChooserContext(frame); if (!port_observation_.IsObserving()) port_observation_.Observe(chooser_context); } -void ElectronSerialDelegate::RemoveObserver(content::RenderFrameHost* frame, - Observer* observer) { +void ElectronSerialDelegate::RemoveObserver( + content::RenderFrameHost* frame, + content::SerialDelegate::Observer* observer) { observer_list_.RemoveObserver(observer); } diff --git a/shell/browser/serial/electron_serial_delegate.h b/shell/browser/serial/electron_serial_delegate.h index 5876d7e511041..add2c4471f1e4 100644 --- a/shell/browser/serial/electron_serial_delegate.h +++ b/shell/browser/serial/electron_serial_delegate.h @@ -38,9 +38,9 @@ class ElectronSerialDelegate : public content::SerialDelegate, device::mojom::SerialPortManager* GetPortManager( content::RenderFrameHost* frame) override; void AddObserver(content::RenderFrameHost* frame, - Observer* observer) override; + content::SerialDelegate::Observer* observer) override; void RemoveObserver(content::RenderFrameHost* frame, - Observer* observer) override; + content::SerialDelegate::Observer* observer) override; void RevokePortPermissionWebInitiated( content::RenderFrameHost* frame, const base::UnguessableToken& token) override; From fc1d8a80e66cf442c915cce11f62b739ad429189 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 22:04:31 -0500 Subject: [PATCH 737/811] chore: add missing .eslintrc.json files to limit imports properly (#35747) Co-authored-by: Milan Burda --- lib/browser/.eslintrc.json | 2 +- lib/common/.eslintrc.json | 23 +++++++++++++++++++++++ lib/common/api/clipboard.ts | 1 + lib/isolated_renderer/.eslintrc.json | 18 ++++++++++++++++++ lib/renderer/.eslintrc.json | 18 ++++++++++++++++++ lib/renderer/common-init.ts | 2 +- lib/renderer/inspector.ts | 2 +- lib/renderer/web-frame-init.ts | 2 +- lib/sandboxed_renderer/.eslintrc.json | 18 ++++++++++++++++++ lib/worker/.eslintrc.json | 18 ++++++++++++++++++ 10 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 lib/common/.eslintrc.json create mode 100644 lib/isolated_renderer/.eslintrc.json create mode 100644 lib/renderer/.eslintrc.json create mode 100644 lib/sandboxed_renderer/.eslintrc.json create mode 100644 lib/worker/.eslintrc.json diff --git a/lib/browser/.eslintrc.json b/lib/browser/.eslintrc.json index 27d223a509d96..dab1dafc3f26e 100644 --- a/lib/browser/.eslintrc.json +++ b/lib/browser/.eslintrc.json @@ -18,4 +18,4 @@ } ] } -} \ No newline at end of file +} diff --git a/lib/common/.eslintrc.json b/lib/common/.eslintrc.json new file mode 100644 index 0000000000000..42964484b5c34 --- /dev/null +++ b/lib/common/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + "electron", + "electron/main", + "electron/renderer" + ], + "patterns": [ + "./*", + "../*", + "@electron/internal/browser/*", + "@electron/internal/isolated_renderer/*", + "@electron/internal/renderer/*", + "@electron/internal/sandboxed_worker/*", + "@electron/internal/worker/*" + ] + } + ] + } +} diff --git a/lib/common/api/clipboard.ts b/lib/common/api/clipboard.ts index dd03b4f279d68..55f7958bc7963 100644 --- a/lib/common/api/clipboard.ts +++ b/lib/common/api/clipboard.ts @@ -1,5 +1,6 @@ import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; +// eslint-disable-next-line no-restricted-imports import type * as ipcRendererUtilsModule from '@electron/internal/renderer/ipc-renderer-internal-utils'; const clipboard = process._linkedBinding('electron_common_clipboard'); diff --git a/lib/isolated_renderer/.eslintrc.json b/lib/isolated_renderer/.eslintrc.json new file mode 100644 index 0000000000000..cb5f6cadaa4f3 --- /dev/null +++ b/lib/isolated_renderer/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + "electron", + "electron/main" + ], + "patterns": [ + "./*", + "../*", + "@electron/internal/browser/*" + ] + } + ] + } +} diff --git a/lib/renderer/.eslintrc.json b/lib/renderer/.eslintrc.json new file mode 100644 index 0000000000000..cb5f6cadaa4f3 --- /dev/null +++ b/lib/renderer/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + "electron", + "electron/main" + ], + "patterns": [ + "./*", + "../*", + "@electron/internal/browser/*" + ] + } + ] + } +} diff --git a/lib/renderer/common-init.ts b/lib/renderer/common-init.ts index 4ceff37416d59..bfec34419ddd3 100644 --- a/lib/renderer/common-init.ts +++ b/lib/renderer/common-init.ts @@ -1,4 +1,4 @@ -import { ipcRenderer } from 'electron'; +import { ipcRenderer } from 'electron/renderer'; import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal'; import type * as webViewInitModule from '@electron/internal/renderer/web-view/web-view-init'; diff --git a/lib/renderer/inspector.ts b/lib/renderer/inspector.ts index 346de2030ef40..8dd941d30619a 100644 --- a/lib/renderer/inspector.ts +++ b/lib/renderer/inspector.ts @@ -2,7 +2,7 @@ import { internalContextBridge } from '@electron/internal/renderer/api/context-b import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal'; import * as ipcRendererUtils from '@electron/internal/renderer/ipc-renderer-internal-utils'; import { webFrame } from 'electron/renderer'; -import { IPC_MESSAGES } from '../common/ipc-messages'; +import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; const { contextIsolationEnabled } = internalContextBridge; diff --git a/lib/renderer/web-frame-init.ts b/lib/renderer/web-frame-init.ts index 37225cfb3428a..ac4db7f9a74dc 100644 --- a/lib/renderer/web-frame-init.ts +++ b/lib/renderer/web-frame-init.ts @@ -1,4 +1,4 @@ -import { webFrame, WebFrame } from 'electron'; +import { webFrame, WebFrame } from 'electron/renderer'; import * as ipcRendererUtils from '@electron/internal/renderer/ipc-renderer-internal-utils'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; diff --git a/lib/sandboxed_renderer/.eslintrc.json b/lib/sandboxed_renderer/.eslintrc.json new file mode 100644 index 0000000000000..cb5f6cadaa4f3 --- /dev/null +++ b/lib/sandboxed_renderer/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + "electron", + "electron/main" + ], + "patterns": [ + "./*", + "../*", + "@electron/internal/browser/*" + ] + } + ] + } +} diff --git a/lib/worker/.eslintrc.json b/lib/worker/.eslintrc.json new file mode 100644 index 0000000000000..cb5f6cadaa4f3 --- /dev/null +++ b/lib/worker/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + "electron", + "electron/main" + ], + "patterns": [ + "./*", + "../*", + "@electron/internal/browser/*" + ] + } + ] + } +} From 0ced2338ea20a1c372bc8f06f19a44141f6086d8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 15:25:43 +0200 Subject: [PATCH 738/811] fix: crash loading non-standard schemes in iframes (#35517) * fix: crash loading non-standard schemes in iframes * test: move fixture to correct location * chore: update patches Co-authored-by: Shelley Vohr Co-authored-by: Charles Kerr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/.patches | 1 + ...ding_non-standard_schemes_in_iframes.patch | 78 +++++++++++++++++++ spec-main/api-protocol-spec.ts | 23 +++++- spec-main/fixtures/pages/iframe-protocol.html | 11 +++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch create mode 100644 spec-main/fixtures/pages/iframe-protocol.html diff --git a/patches/chromium/.patches b/patches/chromium/.patches index e575ac484e854..14f516fa4dc37 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -121,3 +121,4 @@ fix_revert_emulationhandler_update_functions_to_early_return.patch fix_return_v8_value_from_localframe_requestexecutescript.patch disable_optimization_guide_for_preconnect_feature.patch fix_the_gn_gen_for_components_segmentation_platform.patch +fix_crash_loading_non-standard_schemes_in_iframes.patch diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch new file mode 100644 index 0000000000000..84d7eb40925bc --- /dev/null +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -0,0 +1,78 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Mon, 29 Aug 2022 11:44:57 +0200 +Subject: fix: crash loading non-standard schemes in iframes + +This fixes a crash that occurs when loading non-standard schemes from +iframes or webviews. This was happening because +ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin contains explicit +exceptions to allow built-in non-standard schemes, but does not check +for non-standard schemes registered by the embedder. + +Upstream, https://bugs.chromium.org/p/chromium/issues/detail?id=1081397 +contains several paths forward - here I chose to swap out the +CHECK in navigation_request.cc from policy->CanAccessDataForOrigin to +policy->CanCommitOriginAndUrl. + +Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. + +diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc +index 37434a26db44ed035fcbebd9febbda10efa859da..060b310d38db85944e37b8a202493212106d8946 100644 +--- a/content/browser/renderer_host/navigation_request.cc ++++ b/content/browser/renderer_host/navigation_request.cc +@@ -6573,10 +6573,11 @@ std::pair NavigationRequest:: + if (IsForMhtmlSubframe()) + return origin_with_debug_info; + +- int process_id = GetRenderFrameHost()->GetProcess()->GetID(); +- auto* policy = ChildProcessSecurityPolicyImpl::GetInstance(); +- CHECK( +- policy->CanAccessDataForOrigin(process_id, origin_with_debug_info.first)); ++ CanCommitStatus can_commit = GetRenderFrameHost()->CanCommitOriginAndUrl( ++ origin_with_debug_info.first, GetURL(), IsSameDocument(), IsPdf(), ++ GetUrlInfo().is_sandboxed); ++ CHECK_EQ(CanCommitStatus::CAN_COMMIT_ORIGIN_AND_URL, can_commit); ++ + return origin_with_debug_info; + } + +diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h +index 6aff64db8cc09f95d658fe9e0bd54c0b4c6ff433..e1dda0c951f9ea6f28b6d43ab2b9d4481f5d7773 100644 +--- a/content/browser/renderer_host/render_frame_host_impl.h ++++ b/content/browser/renderer_host/render_frame_host_impl.h +@@ -2557,6 +2557,17 @@ class CONTENT_EXPORT RenderFrameHostImpl + HandleAXEvents(tree_id, std::move(updates_and_events), reset_token); + } + ++ // Returns whether the given origin and URL is allowed to commit in the ++ // current RenderFrameHost. The |url| is used to ensure it matches the origin ++ // in cases where it is applicable. This is a more conservative check than ++ // RenderProcessHost::FilterURL, since it will be used to kill processes that ++ // commit unauthorized origins. ++ CanCommitStatus CanCommitOriginAndUrl(const url::Origin& origin, ++ const GURL& url, ++ bool is_same_document_navigation, ++ bool is_pdf, ++ bool is_sandboxed); ++ + protected: + friend class RenderFrameHostFactory; + +@@ -2892,17 +2903,6 @@ class CONTENT_EXPORT RenderFrameHostImpl + // relevant. + void ResetWaitingState(); + +- // Returns whether the given origin and URL is allowed to commit in the +- // current RenderFrameHost. The |url| is used to ensure it matches the origin +- // in cases where it is applicable. This is a more conservative check than +- // RenderProcessHost::FilterURL, since it will be used to kill processes that +- // commit unauthorized origins. +- CanCommitStatus CanCommitOriginAndUrl(const url::Origin& origin, +- const GURL& url, +- bool is_same_document_navigation, +- bool is_pdf, +- bool is_sandboxed); +- + // Returns whether a subframe navigation request should be allowed to commit + // to the current RenderFrameHost. + bool CanSubframeCommitOriginAndUrl(NavigationRequest* navigation_request); diff --git a/spec-main/api-protocol-spec.ts b/spec-main/api-protocol-spec.ts index 980c289cb1e7f..7988724baf5b4 100644 --- a/spec-main/api-protocol-spec.ts +++ b/spec-main/api-protocol-spec.ts @@ -9,7 +9,7 @@ import * as fs from 'fs'; import * as qs from 'querystring'; import * as stream from 'stream'; import { EventEmitter } from 'events'; -import { closeWindow } from './window-helpers'; +import { closeAllWindows, closeWindow } from './window-helpers'; import { emittedOnce } from './events-helpers'; import { WebmGenerator } from './video-helpers'; import { delay } from './spec-helpers'; @@ -216,6 +216,8 @@ describe('protocol module', () => { const normalPath = path.join(fixturesPath, 'pages', 'a.html'); const normalContent = fs.readFileSync(normalPath); + afterEach(closeAllWindows); + it('sends file path as response', async () => { registerFileProtocol(protocolName, (request, callback) => callback(filePath)); const r = await ajax(protocolName + '://fake-host'); @@ -239,6 +241,25 @@ describe('protocol module', () => { expect(r.headers).to.have.property('x-great-header', 'sogreat'); }); + it('can load iframes with custom protocols', (done) => { + registerFileProtocol('custom', (request, callback) => { + const filename = request.url.substring(9); + const p = path.join(__dirname, 'fixtures', 'pages', filename); + callback({ path: p }); + }); + + const w = new BrowserWindow({ + show: false, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + } + }); + + w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'iframe-protocol.html')); + ipcMain.once('loaded-iframe-custom-protocol', () => done()); + }); + it.skip('throws an error when custom headers are invalid', (done) => { registerFileProtocol(protocolName, (request, callback) => { expect(() => callback({ diff --git a/spec-main/fixtures/pages/iframe-protocol.html b/spec-main/fixtures/pages/iframe-protocol.html new file mode 100644 index 0000000000000..a283115b19382 --- /dev/null +++ b/spec-main/fixtures/pages/iframe-protocol.html @@ -0,0 +1,11 @@ + + + + From 199ccfd84014377811cbeec685ba6d774e40878c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 16:12:40 -0400 Subject: [PATCH 739/811] docs: fix wording mistake in security.md section 4 (#35743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: fix wording mistake in security.md section 4 (#35682) Update security.md Under "4. Process Sandboxing", it said "For mor information on what `contextIsolation` is..." which was the previous section (copied from there). This updates it to say "For more information on what Process Sandboxing is..." Co-authored-by: Sebastian Vittersø <37065184+sebastianvitterso@users.noreply.github.com> --- docs/tutorial/security.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index 0d98921a95afe..2a26dae1e267a 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -256,7 +256,7 @@ the sandbox in all renderers. Loading, reading or processing any untrusted content in an unsandboxed process, including the main process, is not advised. :::info -For more information on what `contextIsolation` is and how to enable it please +For more information on what Process Sandboxing is and how to enable it please see our dedicated [Process Sandboxing](sandbox.md) document. :::info From 248ae5dc43efc888ad4198753192cb76023bfdb7 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:56:27 +0200 Subject: [PATCH 740/811] docs: add forge-overview.md (#35759) --- docs/tutorial/application-distribution.md | 4 +- docs/tutorial/boilerplates-and-clis.md | 6 +- docs/tutorial/code-signing.md | 109 +--------------------- docs/tutorial/distribution-overview.md | 2 +- docs/tutorial/forge-overview.md | 36 +++++++ docs/tutorial/tutorial-5-packaging.md | 7 ++ 6 files changed, 51 insertions(+), 113 deletions(-) create mode 100644 docs/tutorial/forge-overview.md diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index 1b17541f2b3f5..6f5d86290dc0d 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -11,8 +11,8 @@ can either use specialized tooling or manual approaches. ## With tooling There are a couple tools out there that exist to package and distribute your Electron app. -We recommend using [Electron Forge](https://www.electronforge.io). You can check out -its documentation directly, or refer to the [Packaging and Distribution](./tutorial-5-packaging.md) +We recommend using [Electron Forge](./forge-overview.md). You can check out +its [documentation](https://www.electronforge.io) directly, or refer to the [Packaging and Distribution](./tutorial-5-packaging.md) part of the Electron tutorial. ## Manual packaging diff --git a/docs/tutorial/boilerplates-and-clis.md b/docs/tutorial/boilerplates-and-clis.md index 304254285180e..f344ae1b25979 100644 --- a/docs/tutorial/boilerplates-and-clis.md +++ b/docs/tutorial/boilerplates-and-clis.md @@ -26,10 +26,8 @@ beginners, using a command line tool is likely to be helpful*. ## electron-forge -A "complete tool for building modern Electron applications". Electron Forge -unifies the existing (and well maintained) build tools for Electron development -into a cohesive package so that anyone can jump right in to Electron -development. +Electron Forge is a tool for packaging and publishing Electron applications. It unifies Electron's tooling ecosystem +into a single extensible interface so that anyone can jump right into making Electron apps. Forge comes with [a ready-to-use template](https://electronforge.io/templates) using Webpack as a bundler. It includes an example typescript configuration and provides two configuration files to enable easy customization. It uses the same core modules used by the greater Electron community (like [`electron-packager`](https://github.com/electron/electron-packager)) – diff --git a/docs/tutorial/code-signing.md b/docs/tutorial/code-signing.md index a035b480cd57e..06fae1eaf7252 100644 --- a/docs/tutorial/code-signing.md +++ b/docs/tutorial/code-signing.md @@ -54,85 +54,11 @@ and notarized requires a few additions to your configuration. [Forge](https://el collection of the official Electron tools, using [`electron-packager`], [`electron-osx-sign`], and [`electron-notarize`] under the hood. -Let's take a look at an example `package.json` configuration with all required fields. Not all of them are -required: the tools will be clever enough to automatically find a suitable `identity`, for instance, -but we recommend that you are explicit. - -```json title="package.json" {7} -{ - "name": "my-app", - "version": "0.0.1", - "config": { - "forge": { - "packagerConfig": { - "osxSign": { - "identity": "Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)", - "hardened-runtime": true, - "entitlements": "entitlements.plist", - "entitlements-inherit": "entitlements.plist", - "signature-flags": "library" - }, - "osxNotarize": { - "appleId": "felix@felix.fun", - "appleIdPassword": "my-apple-id-password" - } - } - } - } -} -``` - -The `entitlements.plist` file referenced here needs the following macOS-specific entitlements -to assure the Apple security mechanisms that your app is doing these things -without meaning any harm: - -```xml title="entitlements.plist" - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.debugger - - - -``` - -Note that up until Electron 12, the `com.apple.security.cs.allow-unsigned-executable-memory` entitlement was required -as well. However, it should not be used anymore if it can be avoided. - -To see all of this in action, check out Electron Fiddle's source code, -[especially its `electron-forge` configuration -file](https://github.com/electron/fiddle/blob/master/forge.config.js). - -If you plan to access the microphone or camera within your app using Electron's APIs, you'll also -need to add the following entitlements: - -```xml title="entitlements.plist" -com.apple.security.device.audio-input - -com.apple.security.device.camera - -``` - -If these are not present in your app's entitlements when you invoke, for example: - -```js title="main.js" -const { systemPreferences } = require('electron') -const microphone = systemPreferences.askForMediaAccess('microphone') -``` - -Your app may crash. See the Resource Access section in [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime) for more information and entitlements you may need. - -### Using Electron Builder - -Electron Builder comes with a custom solution for signing your application. You -can find [its documentation here](https://www.electron.build/code-signing). +Detailed instructions on how to configure your application can be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-macos). ### Using Electron Packager -If you're not using an integrated build pipeline like Forge or Builder, you +If you're not using an integrated build pipeline like Forge, you are likely using [`electron-packager`], which includes [`electron-osx-sign`] and [`electron-notarize`]. @@ -204,36 +130,7 @@ commit it to your source code. ### Using Electron Forge -Once you have a code signing certificate file (`.pfx`), you can sign -[Squirrel.Windows][maker-squirrel] and [MSI][maker-msi] installers in Electron Forge -with the `certificateFile` and `certificatePassword` fields in their respective -configuration objects. - -For example, if you keep your Forge config in your `package.json` file and are -creating a Squirrel.Windows installer: - -```json {9-15} title='package.json' -{ - "name": "my-app", - "version": "0.0.1", - //... - "config": { - "forge": { - "packagerConfig": {}, - "makers": [ - { - "name": "@electron-forge/maker-squirrel", - "config": { - "certificateFile": "./cert.pfx", - "certificatePassword": "this-is-a-secret" - } - } - ] - } - } - //... -} -``` +Electron Forge is the recommended way to sign your `Squirrel.Windows` and `WiX MSI` installers. Detailed instructions on how to configure your application can be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-macos). ### Using electron-winstaller (Squirrel.Windows) diff --git a/docs/tutorial/distribution-overview.md b/docs/tutorial/distribution-overview.md index b7e9bd991b4fd..1c78837c144d2 100644 --- a/docs/tutorial/distribution-overview.md +++ b/docs/tutorial/distribution-overview.md @@ -11,7 +11,7 @@ you can deliver it to your users. ## Packaging To distribute your app with Electron, you need to package all your resources and assets -into an executable and rebrand it. To do this, you can either use specialized tooling +into an executable and rebrand it. To do this, you can either use specialized tooling like Electron Forge or do it manually. See the [Application Packaging][application-packaging] tutorial for more information. diff --git a/docs/tutorial/forge-overview.md b/docs/tutorial/forge-overview.md new file mode 100644 index 0000000000000..e297e700c4fdc --- /dev/null +++ b/docs/tutorial/forge-overview.md @@ -0,0 +1,36 @@ +# Distributing Apps With Electron Forge + +Electron Forge is a tool for packaging and publishing Electron applications. +It unifies Electron's build tooling ecosystem into +a single extensible interface so that anyone can jump right into making Electron apps. + +## Getting started + +The [Electron Forge docs] contain detailed information on taking your application +from source code to your end users' machines. +This includes: + +* Packaging your application [(package)] +* Generating executables and installers for each OS [(make)], and, +* Publishing these files to online platforms to download [(publish)]. + +For beginners, we recommend following through Electron's [tutorial] to develop, build, +package and publish your first Electron app. If you have already developed an app on your machine +and want to start on packaging and distribution, start from [step 5] of the tutorial. + +## Getting help + +* If you need help with developing your app, our [community Discord server][discord] is a great place +to get advice from other Electron app developers. +* If you suspect you're running into a bug with Forge, please check the [GitHub issue tracker] +to see if any existing issues match your problem. If not, feel free to fill out our bug report +template and submit a new issue. + +[Electron Forge Docs]: https://www.electronforge.io/ +[step 5]: ./tutorial-5-packaging.md +[(package)]: https://www.electronforge.io/cli#package +[(make)]: https://www.electronforge.io/cli#make +[(publish)]: https://www.electronforge.io/cli#publish +[GitHub issue tracker]: https://github.com/electron-userland/electron-forge/issues +[discord]: https://discord.gg/APGC3k5yaH +[tutorial]: https://www.electronjs.org/docs/latest/tutorial/tutorial-prerequisites diff --git a/docs/tutorial/tutorial-5-packaging.md b/docs/tutorial/tutorial-5-packaging.md index 3ab4f15b50d84..032511145e746 100644 --- a/docs/tutorial/tutorial-5-packaging.md +++ b/docs/tutorial/tutorial-5-packaging.md @@ -111,6 +111,12 @@ Electron Forge can be configured to create distributables in different OS-specif ::: +:::tip Creating and Adding Application Icons + +Setting custom application icons requires a few additions to your config. Check out [Forge's icon tutorial] for more information. + +::: + :::note Packaging without Electron Forge If you want to manually package your code, or if you're just interested understanding the @@ -214,6 +220,7 @@ information. [electron forge]: https://www.electronforge.io [electron forge cli documentation]: https://www.electronforge.io/cli#commands [makers]: https://www.electronforge.io/config/makers +[Forge's icon tutorial]: https://www.electronforge.io/guides/create-and-add-icons From 3dd6c6886b2b87a223c201a045cf21fed32ad09d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 06:30:57 -0700 Subject: [PATCH 741/811] Bump v21.0.0-beta.8 --- 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 f170e99978b5b..4e769dc94ad4e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.7 \ No newline at end of file +21.0.0-beta.8 \ No newline at end of file diff --git a/package.json b/package.json index efcaeac7e2924..3b417c1fa169f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.7", + "version": "21.0.0-beta.8", "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 e1b5e1c888e5e..b422eaf79de86 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 21,0,0,7 - PRODUCTVERSION 21,0,0,7 + FILEVERSION 21,0,0,8 + PRODUCTVERSION 21,0,0,8 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 38bb3e81d306a4b7af3e9053bb9e9b52b52df737 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 10:01:11 -0700 Subject: [PATCH 742/811] fix: compensate for title bar height when setting bounds on `BrowserView` (#35502) fix: compensate for title bar height when setting bounds Co-authored-by: Shelley Vohr --- shell/browser/native_browser_view_mac.mm | 39 +++++++++++++++++++----- spec-main/api-browser-view-spec.ts | 9 +++++- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/shell/browser/native_browser_view_mac.mm b/shell/browser/native_browser_view_mac.mm index 9cb5d11d8610b..685b7194b5280 100644 --- a/shell/browser/native_browser_view_mac.mm +++ b/shell/browser/native_browser_view_mac.mm @@ -262,9 +262,21 @@ - (void)drawDebugRect:(NSRect)aRect { auto* view = iwc_view->GetNativeView().GetNativeNSView(); auto* superview = view.superview; const auto superview_height = superview ? superview.frame.size.height : 0; + + // We need to use the content rect to calculate the titlebar height if the + // superview is an framed NSWindow, otherwise it will be offset incorrectly by + // the height of the titlebar. + auto titlebar_height = 0; + if (auto* win = [superview window]) { + const auto content_rect_height = + [win contentRectForFrameRect:superview.frame].size.height; + titlebar_height = superview_height - content_rect_height; + } + + auto new_height = + superview_height - bounds.y() - bounds.height() + titlebar_height; view.frame = - NSMakeRect(bounds.x(), superview_height - bounds.y() - bounds.height(), - bounds.width(), bounds.height()); + NSMakeRect(bounds.x(), new_height, bounds.width(), bounds.height()); // Ensure draggable regions are properly updated to reflect new bounds. UpdateDraggableRegions(draggable_regions_); @@ -275,12 +287,23 @@ - (void)drawDebugRect:(NSRect)aRect { if (!iwc_view) return gfx::Rect(); NSView* view = iwc_view->GetNativeView().GetNativeNSView(); - const int superview_height = - (view.superview) ? view.superview.frame.size.height : 0; - return gfx::Rect( - view.frame.origin.x, - superview_height - view.frame.origin.y - view.frame.size.height, - view.frame.size.width, view.frame.size.height); + auto* superview = view.superview; + const int superview_height = superview ? superview.frame.size.height : 0; + + // We need to use the content rect to calculate the titlebar height if the + // superview is an framed NSWindow, otherwise it will be offset incorrectly by + // the height of the titlebar. + auto titlebar_height = 0; + if (auto* win = [superview window]) { + const auto content_rect_height = + [win contentRectForFrameRect:superview.frame].size.height; + titlebar_height = superview_height - content_rect_height; + } + + auto new_height = superview_height - view.frame.origin.y - + view.frame.size.height + titlebar_height; + return gfx::Rect(view.frame.origin.x, new_height, view.frame.size.width, + view.frame.size.height); } void NativeBrowserViewMac::SetBackgroundColor(SkColor color) { diff --git a/spec-main/api-browser-view-spec.ts b/spec-main/api-browser-view-spec.ts index 3352c06e991a4..ef32bef9feaa2 100644 --- a/spec-main/api-browser-view-spec.ts +++ b/spec-main/api-browser-view-spec.ts @@ -146,7 +146,14 @@ describe('BrowserView module', () => { }); describe('BrowserView.getBounds()', () => { - it('returns the current bounds', () => { + it('returns correct bounds on a framed window', () => { + view = new BrowserView(); + const bounds = { x: 10, y: 20, width: 30, height: 40 }; + view.setBounds(bounds); + expect(view.getBounds()).to.deep.equal(bounds); + }); + + it('returns correct bounds on a frameless window', () => { view = new BrowserView(); const bounds = { x: 10, y: 20, width: 30, height: 40 }; view.setBounds(bounds); From 46c473930e4e15b6dc3ed8ca94f38ba3ae214eb8 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 22:18:19 +0200 Subject: [PATCH 743/811] chore: bump chromium to 106.0.5249.51 (21-x-y) (#35768) * chore: bump chromium in DEPS to 106.0.5249.51 * 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/chromium/can_create_window.patch | 2 +- patches/chromium/webview_fullscreen.patch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index ffca45b11d44a..b730762315bc2 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.40', + '106.0.5249.51', 'node_version': 'v16.16.0', 'nan_version': diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 55d8906d9432c..6a4ef1c6c1dbd 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,7 +9,7 @@ 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 abfe94dc8c31fc928eb554ec3f2ec095aa6a970b..e815010dcb9437727f32b12f0d47a31384e24677 100644 +index 753d3cb544f812689616ce7bd05d24844f20883c..1f58d6a342b0c1e0c5fd4d525a684a166f11a69d 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc @@ -7313,6 +7313,7 @@ void RenderFrameHostImpl::CreateNewWindow( diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index bd47818e88ade..915b68b72b7c5 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,7 +14,7 @@ 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 e815010dcb9437727f32b12f0d47a31384e24677..bb1ffcd003807084b970e11a1b464e5f72142c53 100644 +index 1f58d6a342b0c1e0c5fd4d525a684a166f11a69d..05d803e286343e1443863c6dd292102bae12fe83 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc @@ -6567,6 +6567,17 @@ void RenderFrameHostImpl::EnterFullscreen( From 3f10c4d1f852e24a63694f4b5d175d2f04f6ca3c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 11:35:13 -0700 Subject: [PATCH 744/811] docs: changed event.data to data under the message.port in docs (#35782) * docs: changed event.data to data under the message.port in docs * docs: corrected BrowserWindow wrong usage and change window.messagePort to window.electronMessagePort Co-authored-by: cyrilchukwuebuka --- docs/tutorial/message-ports.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/message-ports.md b/docs/tutorial/message-ports.md index b236f4133e450..583ced73c438e 100644 --- a/docs/tutorial/message-ports.md +++ b/docs/tutorial/message-ports.md @@ -101,7 +101,7 @@ app.whenReady().then(async () => { } }) - const secondaryWindow = BrowserWindow({ + const secondaryWindow = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false, @@ -144,7 +144,7 @@ to use `contextIsolation` and set up specific contextBridge calls for each of yo expected messages, but for the simplicity of this example we don't. You can find an example of context isolation further down this page at [Communicating directly between the main process and the main world of a context-isolated page](#communicating-directly-between-the-main-process-and-the-main-world-of-a-context-isolated-page) -That means window.messagePort is globally available and you can call +That means window.electronMessagePort is globally available and you can call `postMessage` on it from anywhere in your app to send a message to the other renderer. @@ -272,7 +272,7 @@ const makeStreamingRequest = (element, callback) => { } makeStreamingRequest(42, (data) => { - console.log('got response data:', event.data) + console.log('got response data:', data) }) // We will see "got response data: 42" 10 times. ``` From f3667073e849263b3ed5b6975b1a7382b934e5f8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 11:44:27 -0700 Subject: [PATCH 745/811] docs: update the link for Introduction to Node.js (#35771) Updated the link for Introduction to NodeJs Co-authored-by: Aman Gupta --- docs/tutorial/tutorial-1-prerequisites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/tutorial-1-prerequisites.md b/docs/tutorial/tutorial-1-prerequisites.md index 4c73758ab4023..164811fc4ec80 100644 --- a/docs/tutorial/tutorial-1-prerequisites.md +++ b/docs/tutorial/tutorial-1-prerequisites.md @@ -123,7 +123,7 @@ the list of versions in the [electron/releases] repository. [homebrew]: https://brew.sh/ [mdn-guide]: https://developer.mozilla.org/en-US/docs/Learn/ [node]: https://nodejs.org/ -[node-guide]: https://nodejs.dev/learn +[node-guide]: https://nodejs.dev/en/learn/ [node-download]: https://nodejs.org/en/download/ [nvm]: https://github.com/nvm-sh/nvm [process-model]: ./process-model.md From 0a4b160328beaafdfd88debeb6d3784d04a7137a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 12:40:47 -0700 Subject: [PATCH 746/811] fix: allow docking DevTools with WCO (#35765) fix: allow for docking devtools with WCO Co-authored-by: Shelley Vohr --- shell/browser/api/electron_api_web_contents.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index ed4e6c6825324..3340c0e47e357 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2410,14 +2410,6 @@ void WebContents::OpenDevTools(gin::Arguments* args) { !owner_window()) { state = "detach"; } - bool activate = true; - if (args && args->Length() == 1) { - gin_helper::Dictionary options; - if (args->GetNext(&options)) { - options.Get("mode", &state); - options.Get("activate", &activate); - } - } #if BUILDFLAG(IS_WIN) auto* win = static_cast(owner_window()); @@ -2427,6 +2419,15 @@ void WebContents::OpenDevTools(gin::Arguments* args) { state = "detach"; #endif + bool activate = true; + if (args && args->Length() == 1) { + gin_helper::Dictionary options; + if (args->GetNext(&options)) { + options.Get("mode", &state); + options.Get("activate", &activate); + } + } + DCHECK(inspectable_web_contents_); inspectable_web_contents_->SetDockState(state); inspectable_web_contents_->ShowDevTools(activate); From 9631cee679fe60188a1030bface77982699c9f89 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Sat, 24 Sep 2022 12:31:53 -0700 Subject: [PATCH 747/811] feat: allow custom v8 snapshots to be used in the main process and the default snapshot in the renderer process (#35695) * feat: allow custom v8 snapshots to be used in the main process and the default snapshot in the renderer process (#35266) * Updates to allow for using a custom v8 snapshot file name * Allow using a custom v8 snapshot file name * Fix up patch due to merge * Use fuse to set up custom v8 snapshot file in browser process * Refactor to use delegate instead of command line parameter * Refactoring * Update due to merge * PR comments * Rename patch * Rename patch * chore: update patches Co-authored-by: Ryan Manuel Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- build/fuses/fuses.json5 | 3 +- docs/tutorial/fuses.md | 7 + patches/chromium/.patches | 1 + ...e_browser_v8_snapshot_file_name_fuse.patch | 156 ++++++++++++++++++ shell/app/electron_main_delegate.cc | 15 ++ shell/app/electron_main_delegate.h | 2 + 6 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch diff --git a/build/fuses/fuses.json5 b/build/fuses/fuses.json5 index f4984aa2a17b4..e8df5ffd7ab98 100644 --- a/build/fuses/fuses.json5 +++ b/build/fuses/fuses.json5 @@ -7,5 +7,6 @@ "node_options": "1", "node_cli_inspect": "1", "embedded_asar_integrity_validation": "0", - "only_load_app_from_asar": "0" + "only_load_app_from_asar": "0", + "load_browser_process_specific_v8_snapshot": "0" } diff --git a/docs/tutorial/fuses.md b/docs/tutorial/fuses.md index bb0c61b475136..d933a841c46c5 100644 --- a/docs/tutorial/fuses.md +++ b/docs/tutorial/fuses.md @@ -54,6 +54,13 @@ For more information on how to use asar integrity validation please read the [As The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code. +### `loadBrowserProcessSpecificV8Snapshot` + +**Default:** Disabled +**@electron/fuses:** `FuseV1Options.LoadBrowserProcessSpecificV8Snapshot` + +The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do. + ## How do I flip the fuses? ### The easy way diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 14f516fa4dc37..6b99ece695061 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -122,3 +122,4 @@ fix_return_v8_value_from_localframe_requestexecutescript.patch disable_optimization_guide_for_preconnect_feature.patch fix_the_gn_gen_for_components_segmentation_platform.patch fix_crash_loading_non-standard_schemes_in_iframes.patch +create_browser_v8_snapshot_file_name_fuse.patch diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch new file mode 100644 index 0000000000000..5eaff40c1c9ca --- /dev/null +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -0,0 +1,156 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ryan Manuel +Date: Thu, 4 Aug 2022 22:37:01 -0500 +Subject: Create browser v8 snapshot file name fuse + +By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This patch allows consumers +to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. + +diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc +index 14ca983c91cfe495ebd2859866a7f434d0a9ab02..a3e5764a1920c8a6bf1ce21e02d0ac743b027a40 100644 +--- a/content/app/content_main_runner_impl.cc ++++ b/content/app/content_main_runner_impl.cc +@@ -37,6 +37,7 @@ + #include "base/process/memory.h" + #include "base/process/process.h" + #include "base/process/process_handle.h" ++#include "base/strings/string_piece.h" + #include "base/strings/string_number_conversions.h" + #include "base/strings/string_util.h" + #include "base/task/thread_pool/thread_pool_instance.h" +@@ -232,8 +233,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { + + #endif + +-void LoadV8SnapshotFile(const base::CommandLine& command_line) { ++void LoadV8SnapshotFile(const raw_ptr delegate, const base::CommandLine& command_line) { + const gin::V8SnapshotFileType snapshot_type = GetSnapshotType(command_line); ++ base::StringPiece browser_v8_snapshot_file_name = delegate->GetBrowserV8SnapshotFilename(); ++ if (!browser_v8_snapshot_file_name.empty()) { ++ gin::V8Initializer::LoadV8SnapshotFromFileName(browser_v8_snapshot_file_name, snapshot_type); ++ return; ++ } + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) + base::FileDescriptorStore& file_descriptor_store = + base::FileDescriptorStore::GetInstance(); +@@ -262,11 +268,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, + + #endif // V8_USE_EXTERNAL_STARTUP_DATA + +-void LoadV8SnapshotIfNeeded(const base::CommandLine& command_line, ++void LoadV8SnapshotIfNeeded(const raw_ptr delegate, ++ const base::CommandLine& command_line, + const std::string& process_type) { + #if defined(V8_USE_EXTERNAL_STARTUP_DATA) + if (ShouldLoadV8Snapshot(command_line, process_type)) +- LoadV8SnapshotFile(command_line); ++ LoadV8SnapshotFile(delegate, command_line); + #endif // V8_USE_EXTERNAL_STARTUP_DATA + } + +@@ -925,7 +932,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { + return TerminateForFatalInitializationError(); + #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) + +- LoadV8SnapshotIfNeeded(command_line, process_type); ++ LoadV8SnapshotIfNeeded(delegate_, command_line, process_type); + + blink::TrialTokenValidator::SetOriginTrialPolicyGetter( + base::BindRepeating([]() -> blink::OriginTrialPolicy* { +diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc +index 5450eb6ba565164953b778f861d8fc75a06b6115..3f15d5a83d6e8011da09da178a0a9dfd2dd95d30 100644 +--- a/content/public/app/content_main_delegate.cc ++++ b/content/public/app/content_main_delegate.cc +@@ -5,6 +5,7 @@ + #include "content/public/app/content_main_delegate.h" + + #include "base/check.h" ++#include "base/strings/string_piece.h" + #include "build/build_config.h" + #include "content/public/browser/content_browser_client.h" + #include "content/public/common/content_client.h" +@@ -83,6 +84,10 @@ absl::optional ContentMainDelegate::PostEarlyInitialization( + return absl::nullopt; + } + ++base::StringPiece ContentMainDelegate::GetBrowserV8SnapshotFilename() { ++ return base::StringPiece(); ++} ++ + ContentClient* ContentMainDelegate::CreateContentClient() { + return new ContentClient(); + } +diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h +index f40146c4ed20e63dd09450e43c26736171f02ed4..5e3246a1346bd0210e7b83842a17dcc1986c8647 100644 +--- a/content/public/app/content_main_delegate.h ++++ b/content/public/app/content_main_delegate.h +@@ -9,6 +9,7 @@ + #include + #include + ++#include "base/strings/string_piece.h" + #include "build/build_config.h" + #include "content/common/content_export.h" + #include "content/public/common/main_function_params.h" +@@ -154,6 +155,8 @@ class CONTENT_EXPORT ContentMainDelegate { + virtual bool ShouldHandleConsoleControlEvents(); + #endif + ++ virtual base::StringPiece GetBrowserV8SnapshotFilename(); ++ + protected: + friend class ContentClientCreator; + friend class ContentClientInitializer; +diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc +index 5530d975303cc96701e4b70ffbcaf6e7c02bb016..edd9959cc0fd23711e19de4aee104199a8a3599e 100644 +--- a/gin/v8_initializer.cc ++++ b/gin/v8_initializer.cc +@@ -496,8 +496,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, + + #if defined(V8_USE_EXTERNAL_STARTUP_DATA) + +-// static +-void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { ++void V8Initializer::LoadV8SnapshotFromFileName(base::StringPiece file_name, V8SnapshotFileType snapshot_file_type) { + if (g_mapped_snapshot) { + // TODO(crbug.com/802962): Confirm not loading different type of snapshot + // files in a process. +@@ -506,10 +505,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { + + base::MemoryMappedFile::Region file_region; + base::File file = +- OpenV8File(GetSnapshotFileName(snapshot_file_type), &file_region); ++ OpenV8File(file_name.data(), &file_region); + LoadV8SnapshotFromFile(std::move(file), &file_region, snapshot_file_type); + } + ++// static ++void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { ++ const char* file_name = GetSnapshotFileName(snapshot_file_type); ++ ++ LoadV8SnapshotFromFileName(file_name, snapshot_file_type); ++} ++ + // static + void V8Initializer::LoadV8SnapshotFromFile( + base::File snapshot_file, +diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h +index 13a120c7fe8e69a44793473f3124c33d572a07a3..acb294780873c1d84546eb2b9acc00f86838361d 100644 +--- a/gin/v8_initializer.h ++++ b/gin/v8_initializer.h +@@ -9,6 +9,7 @@ + + #include "base/files/file.h" + #include "base/files/memory_mapped_file.h" ++#include "base/strings/string_piece.h" + #include "build/build_config.h" + #include "gin/array_buffer.h" + #include "gin/gin_export.h" +@@ -42,6 +43,7 @@ class GIN_EXPORT V8Initializer { + int* snapshot_size_out); + + #if defined(V8_USE_EXTERNAL_STARTUP_DATA) ++ static void LoadV8SnapshotFromFileName(base::StringPiece file_name, V8SnapshotFileType snapshot_file_type); + // Load V8 snapshot from default resources, if they are available. + static void LoadV8Snapshot( + V8SnapshotFileType snapshot_file_type = V8SnapshotFileType::kDefault); diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 537f74a14d6d9..73d063026ad3e 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -23,6 +23,7 @@ #include "components/content_settings/core/common/content_settings_pattern.h" #include "content/public/common/content_switches.h" #include "electron/buildflags/buildflags.h" +#include "electron/fuses.h" #include "extensions/common/constants.h" #include "ipc/ipc_buildflags.h" #include "sandbox/policy/switches.h" @@ -422,6 +423,20 @@ absl::optional ElectronMainDelegate::PreBrowserMain() { return absl::nullopt; } +base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() { + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + std::string process_type = + command_line->GetSwitchValueASCII(::switches::kProcessType); + bool load_browser_process_specific_v8_snapshot = + process_type.empty() && + electron::fuses::IsLoadBrowserProcessSpecificV8SnapshotEnabled(); + if (load_browser_process_specific_v8_snapshot) { + return "browser_v8_context_snapshot.bin"; + } + return ContentMainDelegate::GetBrowserV8SnapshotFilename(); +} + content::ContentBrowserClient* ElectronMainDelegate::CreateContentBrowserClient() { browser_client_ = std::make_unique(); diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index e8e57fad85db6..0a8363fb7a90b 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -30,6 +30,8 @@ class ElectronMainDelegate : public content::ContentMainDelegate { ElectronMainDelegate(const ElectronMainDelegate&) = delete; ElectronMainDelegate& operator=(const ElectronMainDelegate&) = delete; + base::StringPiece GetBrowserV8SnapshotFilename() override; + protected: // content::ContentMainDelegate: absl::optional BasicStartupComplete() override; From 015be485736f4da7f79e95bf194f9d248d49caa9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 06:30:56 -0700 Subject: [PATCH 748/811] Bump v21.0.0-beta.9 --- 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 4e769dc94ad4e..d3de8d4c16efb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.8 \ No newline at end of file +21.0.0-beta.9 \ No newline at end of file diff --git a/package.json b/package.json index 3b417c1fa169f..286542f290a97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.8", + "version": "21.0.0-beta.9", "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 b422eaf79de86..7ed941f3826e8 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 21,0,0,8 - PRODUCTVERSION 21,0,0,8 + FILEVERSION 21,0,0,9 + PRODUCTVERSION 21,0,0,9 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9c3d32a0d3714179cd4641c9ea05a8f8a44fa50b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 06:34:17 -0700 Subject: [PATCH 749/811] Revert "Bump v21.0.0-beta.9" This reverts commit 015be485736f4da7f79e95bf194f9d248d49caa9. --- 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 d3de8d4c16efb..4e769dc94ad4e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.9 \ No newline at end of file +21.0.0-beta.8 \ No newline at end of file diff --git a/package.json b/package.json index 286542f290a97..3b417c1fa169f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.9", + "version": "21.0.0-beta.8", "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 7ed941f3826e8..b422eaf79de86 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 21,0,0,9 - PRODUCTVERSION 21,0,0,9 + FILEVERSION 21,0,0,8 + PRODUCTVERSION 21,0,0,8 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f1e4cfaca38035ec12122b5b13f7223cd7317a75 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:29:01 -0400 Subject: [PATCH 750/811] build: remove unused GitHub app config file (#35814) chore: remove unused GitHub action config file Co-authored-by: David Sanders --- .github/semantic.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .github/semantic.yml diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index 4168a3cdeed9e..0000000000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Always validate the PR title, and ignore the commits -titleOnly: true From 6e2d2d8d73312865e8df86640d7b3eb49b8d4443 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 08:50:42 -0700 Subject: [PATCH 751/811] fix: potential exception when calling webFrameMainBinding.fromIdOrNull() (#35803) * fix: potential exception when calling webFrameMainBinding.fromIdOrNull() * replace try/catch in getWebFrameForEvent Co-authored-by: Milan Burda Co-authored-by: Milan Burda --- lib/browser/api/web-contents.ts | 15 ++++++++++----- typings/internal-ambient.d.ts | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 5887f8ea2f03d..a0369fc734a14 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -536,6 +536,11 @@ const addReturnValueToEvent = (event: Electron.IpcMainEvent) => { }); }; +const getWebFrameForEvent = (event: Electron.IpcMainEvent | Electron.IpcMainInvokeEvent) => { + if (!event.processId || !event.frameId) return null; + return webFrameMainBinding.fromIdOrNull(event.processId, event.frameId); +}; + const commandLine = process._linkedBinding('electron_common_command_line'); const environment = process._linkedBinding('electron_common_environment'); @@ -573,7 +578,7 @@ WebContents.prototype._init = function () { } else { addReplyToEvent(event); this.emit('ipc-message', event, channel, ...args); - const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId); + const maybeWebFrame = getWebFrameForEvent(event); maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, ...args); ipc.emit(channel, event, ...args); ipcMain.emit(channel, event, ...args); @@ -587,8 +592,8 @@ WebContents.prototype._init = function () { console.error(`Error occurred in handler for '${channel}':`, error); event.sendReply({ error: error.toString() }); }; - const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId); - const targets: (ElectronInternal.IpcMainInternal| undefined)[] = internal ? [ipcMainInternal] : [maybeWebFrame && maybeWebFrame.ipc, ipc, ipcMain]; + const maybeWebFrame = getWebFrameForEvent(event); + const targets: (ElectronInternal.IpcMainInternal| null)[] = internal ? [ipcMainInternal] : [maybeWebFrame && maybeWebFrame.ipc, ipc, ipcMain]; const target = targets.find(target => target && (target as any)._invokeHandlers.has(channel)); if (target) { (target as any)._invokeHandlers.get(channel)(event, ...args); @@ -604,7 +609,7 @@ WebContents.prototype._init = function () { ipcMainInternal.emit(channel, event, ...args); } else { addReplyToEvent(event); - const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId); + const maybeWebFrame = getWebFrameForEvent(event); if (this.listenerCount('ipc-message-sync') === 0 && ipc.listenerCount(channel) === 0 && ipcMain.listenerCount(channel) === 0 && (!maybeWebFrame || maybeWebFrame.ipc.listenerCount(channel) === 0)) { console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${channel}' channel without listeners.`); } @@ -618,7 +623,7 @@ WebContents.prototype._init = function () { this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) { addSenderFrameToEvent(event); event.ports = ports.map(p => new MessagePortMain(p)); - const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId); + const maybeWebFrame = getWebFrameForEvent(event); maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, message); ipc.emit(channel, event, message); ipcMain.emit(channel, event, message); diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 7fcd2ecb2acc2..6dcf6de2ca985 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -237,7 +237,7 @@ declare namespace NodeJS { _linkedBinding(name: 'electron_browser_web_frame_main'): { WebFrameMain: typeof Electron.WebFrameMain; fromId(processId: number, routingId: number): Electron.WebFrameMain; - fromIdOrNull(processId: number, routingId: number): Electron.WebFrameMain; + fromIdOrNull(processId: number, routingId: number): Electron.WebFrameMain | null; } _linkedBinding(name: 'electron_renderer_crash_reporter'): Electron.CrashReporter; _linkedBinding(name: 'electron_renderer_ipc'): { ipc: IpcRendererBinding }; From 587abcc0a3a3919fce0fe683ac5c7d6b5fe34fc5 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:51:23 -0400 Subject: [PATCH 752/811] build: fix major dependencies update workflow file (#35817) Co-authored-by: Shelley Vohr --- .github/workflows/release_dependency_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_dependency_versions.yml b/.github/workflows/release_dependency_versions.yml index d03cf272cc30f..d270b6a21bbac 100644 --- a/.github/workflows/release_dependency_versions.yml +++ b/.github/workflows/release_dependency_versions.yml @@ -20,7 +20,7 @@ jobs: trigger: runs-on: ubuntu-latest needs: check_tag - if: jobs.check_tag.outputs.should_release == 'true' + if: needs.check_tag.outputs.should_release == 'true' steps: - uses: actions/checkout@v3 - name: Trigger New chromedriver Release From c97955017dc64d0deecd73ee06a2f0a49f582bff Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 10:07:06 -0700 Subject: [PATCH 753/811] feat: add app.getSystemLocale() method (#35794) * feat: add app.getSystemLocale() method * Update shell/browser/electron_browser_main_parts.cc Co-authored-by: Charles Kerr * Change methods to be const * Apply PR feedback * Fix mac compile * Add missing scope * Apply style changes * Change note * Add braces to get the comment indentation right * Change to static * Apply PR feedback * Fix the documentation * Remove extraneous file Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Co-authored-by: Charles Kerr --- docs/api/app.md | 8 +++++++- shell/browser/api/electron_api_app.cc | 12 ++++++++++++ shell/browser/api/electron_api_app.h | 1 + shell/browser/browser_process_impl.cc | 8 ++++++++ shell/browser/browser_process_impl.h | 4 ++++ shell/browser/electron_browser_main_parts.cc | 13 +++++++++++-- shell/browser/electron_browser_main_parts.h | 1 + shell/browser/electron_browser_main_parts_mac.mm | 14 ++++++++++++++ spec-main/api-app-spec.ts | 6 ++++++ spec-main/chromium-spec.ts | 6 ++++-- spec/fixtures/api/locale-check/main.js | 2 +- 11 files changed, 69 insertions(+), 6 deletions(-) diff --git a/docs/api/app.md b/docs/api/app.md index 960bed3dc8782..624c5a1ebb054 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -715,7 +715,7 @@ To set the locale, you'll want to use a command line switch at app startup, whic **Note:** When distributing your packaged app, you have to also ship the `locales` folder. -**Note:** On Windows, you have to call it after the `ready` events gets emitted. +**Note:** This API must be called after the `ready` event is emitted. ### `app.getLocaleCountryCode()` @@ -723,6 +723,12 @@ Returns `string` - User operating system's locale two-letter [ISO 3166](https:// **Note:** When unable to detect locale country code, it returns empty string. +### `app.getSystemLocale()` + +Returns `string` - The current system locale. On Windows and Linux, it is fetched using Chromium's `i18n` library. On macOS, the `NSLocale` object is used instead. + +**Note:** This API must be called after the `ready` event is emitted. + ### `app.addRecentDocument(path)` _macOS_ _Windows_ * `path` string diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 73ff1d4956309..65b8fe7dbe85b 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -47,6 +47,7 @@ #include "shell/browser/api/electron_api_session.h" #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/api/gpuinfo_manager.h" +#include "shell/browser/browser_process_impl.h" #include "shell/browser/electron_browser_context.h" #include "shell/browser/electron_browser_main_parts.h" #include "shell/browser/javascript_environment.h" @@ -1038,6 +1039,16 @@ std::string App::GetLocale() { return g_browser_process->GetApplicationLocale(); } +std::string App::GetSystemLocale(gin_helper::ErrorThrower thrower) const { + if (!Browser::Get()->is_ready()) { + thrower.ThrowError( + "app.getSystemLocale() can only be called " + "after app is ready"); + return std::string(); + } + return static_cast(g_browser_process)->GetSystemLocale(); +} + std::string App::GetLocaleCountryCode() { std::string region; #if BUILDFLAG(IS_WIN) @@ -1779,6 +1790,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) { .SetMethod("setAppLogsPath", &App::SetAppLogsPath) .SetMethod("setDesktopName", &App::SetDesktopName) .SetMethod("getLocale", &App::GetLocale) + .SetMethod("getSystemLocale", &App::GetSystemLocale) .SetMethod("getLocaleCountryCode", &App::GetLocaleCountryCode) #if BUILDFLAG(USE_NSS_CERTS) .SetMethod("importCertificate", &App::ImportCertificate) diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index c253088deb64d..079c5ca1fd6ab 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -191,6 +191,7 @@ class App : public ElectronBrowserClient::Delegate, void SetDesktopName(const std::string& desktop_name); std::string GetLocale(); std::string GetLocaleCountryCode(); + std::string GetSystemLocale(gin_helper::ErrorThrower thrower) const; void OnSecondInstance(const base::CommandLine& cmd, const base::FilePath& cwd, const std::vector additional_data); diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 31653e104f8c5..1d6fccb5e0b5c 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -293,6 +293,14 @@ HidPolicyAllowedDevices* BrowserProcessImpl::hid_policy_allowed_devices() { return nullptr; } +void BrowserProcessImpl::SetSystemLocale(const std::string& locale) { + system_locale_ = locale; +} + +const std::string& BrowserProcessImpl::GetSystemLocale() const { + return system_locale_; +} + void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { locale_ = locale; } diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index 3a135cade0cbb..05bcd3f3ba3a0 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -49,6 +49,9 @@ class BrowserProcessImpl : public BrowserProcess { void PostDestroyThreads() {} void PostMainMessageLoopRun(); + void SetSystemLocale(const std::string& locale); + const std::string& GetSystemLocale() const; + void EndSession() override {} void FlushLocalStateAndReply(base::OnceClosure reply) override {} bool IsShuttingDown() override; @@ -110,6 +113,7 @@ class BrowserProcessImpl : public BrowserProcess { #endif std::unique_ptr local_state_; std::string locale_; + std::string system_locale_; }; #endif // ELECTRON_SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 046752918d45c..82a479866288f 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -11,6 +11,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/feature_list.h" +#include "base/i18n/rtl.h" #include "base/metrics/field_trial.h" #include "base/path_service.h" #include "base/run_loop.h" @@ -283,8 +284,16 @@ void ElectronBrowserMainParts::PostEarlyInitialization() { } int ElectronBrowserMainParts::PreCreateThreads() { - if (!views::LayoutProvider::Get()) + if (!views::LayoutProvider::Get()) { layout_provider_ = std::make_unique(); + } + + // Fetch the system locale for Electron. +#if BUILDFLAG(IS_MAC) + fake_browser_process_->SetSystemLocale(GetCurrentSystemLocale()); +#else + fake_browser_process_->SetSystemLocale(base::i18n::GetConfiguredLocale()); +#endif auto* command_line = base::CommandLine::ForCurrentProcess(); std::string locale = command_line->GetSwitchValueASCII(::switches::kLang); @@ -321,7 +330,7 @@ int ElectronBrowserMainParts::PreCreateThreads() { } #endif - // Initialize the app locale. + // Initialize the app locale for Electron and Chromium. std::string app_locale = l10n_util::GetApplicationLocale(loaded_locale); ElectronBrowserClient::SetApplicationLocale(app_locale); fake_browser_process_->SetApplicationLocale(app_locale); diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index 3c45ed29bfbb7..76d5d2d0774fc 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -130,6 +130,7 @@ class ElectronBrowserMainParts : public content::BrowserMainParts { void FreeAppDelegate(); void RegisterURLHandler(); void InitializeMainNib(); + static std::string GetCurrentSystemLocale(); #endif #if BUILDFLAG(IS_MAC) diff --git a/shell/browser/electron_browser_main_parts_mac.mm b/shell/browser/electron_browser_main_parts_mac.mm index f280f66579f06..4ed64a912d769 100644 --- a/shell/browser/electron_browser_main_parts_mac.mm +++ b/shell/browser/electron_browser_main_parts_mac.mm @@ -4,6 +4,8 @@ #include "shell/browser/electron_browser_main_parts.h" +#include + #include "base/mac/bundle_locations.h" #include "base/mac/foundation_util.h" #include "base/path_service.h" @@ -74,4 +76,16 @@ [mainNib release]; } +std::string ElectronBrowserMainParts::GetCurrentSystemLocale() { + NSString* systemLocaleIdentifier = + [[NSLocale currentLocale] localeIdentifier]; + + // Mac OS X uses "_" instead of "-", so swap to get a real locale value. + std::string locale_value = [[systemLocaleIdentifier + stringByReplacingOccurrencesOfString:@"_" + withString:@"-"] UTF8String]; + + return locale_value; +} + } // namespace electron diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index a08df928fad1e..a244364fdf253 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -118,6 +118,12 @@ describe('app module', () => { }); }); + describe('app.getSystemLocale()', () => { + it('should not be empty', () => { + expect(app.getSystemLocale()).to.not.equal(''); + }); + }); + describe('app.getLocaleCountryCode()', () => { it('should be empty or have length of two', () => { const localeCountryCode = app.getLocaleCountryCode(); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 957fab8b67ccf..0427588893f64 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -374,6 +374,7 @@ describe('command line switches', () => { }); describe('--lang switch', () => { const currentLocale = app.getLocale(); + const currentSystemLocale = app.getSystemLocale(); const testLocale = async (locale: string, result: string, printEnv: boolean = false) => { const appPath = path.join(fixturesPath, 'api', 'locale-check'); const args = [appPath, `--set-lang=${locale}`]; @@ -396,8 +397,9 @@ describe('command line switches', () => { expect(output).to.equal(result); }; - it('should set the locale', async () => testLocale('fr', 'fr')); - it('should not set an invalid locale', async () => testLocale('asdfkl', currentLocale)); + it('should set the locale', async () => testLocale('fr', `fr|${currentSystemLocale}`)); + it('should set the locale with country code', async () => testLocale('zh-CN', `zh-CN|${currentSystemLocale}`)); + it('should not set an invalid locale', async () => testLocale('asdfkl', `${currentLocale}|${currentSystemLocale}`)); const lcAll = String(process.env.LC_ALL); ifit(process.platform === 'linux')('current process has a valid LC_ALL env', async () => { diff --git a/spec/fixtures/api/locale-check/main.js b/spec/fixtures/api/locale-check/main.js index 929a9e0e9519a..dd4e6317dbb61 100644 --- a/spec/fixtures/api/locale-check/main.js +++ b/spec/fixtures/api/locale-check/main.js @@ -9,7 +9,7 @@ app.whenReady().then(() => { if (process.argv[3] === '--print-env') { process.stdout.write(String(process.env.LC_ALL)); } else { - process.stdout.write(app.getLocale()); + process.stdout.write(`${app.getLocale()}|${app.getSystemLocale()}`); } process.stdout.end(); From 7bf3913bf33f154ee1a0a8bf5f81238fce0da834 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 13:29:38 -0400 Subject: [PATCH 754/811] feat: add support for Web Bluetooth pin pairing (#35818) * feat: add bluetooth pairing handler * Update docs/api/session.md Co-authored-by: Charles Kerr * Update docs/api/session.md Co-authored-by: Charles Kerr * docs: update based on review * Apply suggestions from code review Co-authored-by: Erick Zhao Co-authored-by: Charles Kerr * chore: update docs per review * chore: cleanup callback per review Co-authored-by: John Kleinschmidt Co-authored-by: Charles Kerr Co-authored-by: Erick Zhao --- docs/api/session.md | 65 +++++++++++++++++ docs/fiddles/features/web-bluetooth/main.js | 19 ++++- .../fiddles/features/web-bluetooth/preload.js | 6 ++ .../features/web-bluetooth/renderer.js | 28 +++++++- docs/tutorial/devices.md | 4 ++ filenames.auto.gni | 1 + shell/browser/api/electron_api_session.cc | 14 ++++ shell/browser/api/electron_api_session.h | 2 + .../bluetooth/electron_bluetooth_delegate.cc | 69 ++++++++++++++++++- .../bluetooth/electron_bluetooth_delegate.h | 7 ++ shell/browser/electron_permission_manager.cc | 17 +++++ shell/browser/electron_permission_manager.h | 9 +++ 12 files changed, 235 insertions(+), 6 deletions(-) create mode 100644 docs/fiddles/features/web-bluetooth/preload.js diff --git a/docs/api/session.md b/docs/api/session.md index c691f237e7260..ee1c3e7a8b347 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -769,6 +769,71 @@ app.whenReady().then(() => { }) ``` +#### `ses.setBluetoothPairingHandler(handler)` _Windows_ _Linux_ + +* `handler` Function | null + * `details` Object + * `deviceId` string + * `pairingKind` string - The type of pairing prompt being requested. + One of the following values: + * `confirm` + This prompt is requesting confirmation that the Bluetooth device should + be paired. + * `confirmPin` + This prompt is requesting confirmation that the provided PIN matches the + pin displayed on the device. + * `providePin` + This prompt is requesting that a pin be provided for the device. + * `frame` [WebFrameMain](web-frame-main.md) + * `pin` string (optional) - The pin value to verify if `pairingKind` is `confirmPin`. + * `callback` Function + * `response` Object + * `confirmed` boolean - `false` should be passed in if the dialog is canceled. + If the `pairingKind` is `confirm` or `confirmPin`, this value should indicate + if the pairing is confirmed. If the `pairingKind` is `providePin` the value + should be `true` when a value is provided. + * `pin` string | null (optional) - When the `pairingKind` is `providePin` + this value should be the required pin for the Bluetooth device. + +Sets a handler to respond to Bluetooth pairing requests. This handler +allows developers to handle devices that require additional validation +before pairing. When a handler is not defined, any pairing on Linux or Windows +that requires additional validation will be automatically cancelled. +macOS does not require a handler because macOS handles the pairing +automatically. To clear the handler, call `setBluetoothPairingHandler(null)`. + +```javascript + +const { app, BrowserWindow, ipcMain, session } = require('electron') + +let bluetoothPinCallback = null + +function createWindow () { + const mainWindow = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) +} + +// Listen for an IPC message from the renderer to get the response for the Bluetooth pairing. +ipcMain.on('bluetooth-pairing-response', (event, response) => { + bluetoothPinCallback(response) +}) + +mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => { + bluetoothPinCallback = callback + // Send a IPC message to the renderer to prompt the user to confirm the pairing. + // Note that this will require logic in the renderer to handle this message and + // display a prompt to the user. + mainWindow.webContents.send('bluetooth-pairing-request', details) +}) + +app.whenReady().then(() => { + createWindow() +}) +``` + #### `ses.clearHostResolverCache()` Returns `Promise` - Resolves when the operation is complete. diff --git a/docs/fiddles/features/web-bluetooth/main.js b/docs/fiddles/features/web-bluetooth/main.js index b3cc55a438198..5d560579cc05f 100644 --- a/docs/fiddles/features/web-bluetooth/main.js +++ b/docs/fiddles/features/web-bluetooth/main.js @@ -1,10 +1,13 @@ -const {app, BrowserWindow} = require('electron') +const {app, BrowserWindow, ipcMain} = require('electron') const path = require('path') function createWindow () { const mainWindow = new BrowserWindow({ width: 800, - height: 600 + height: 600, + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } }) mainWindow.webContents.on('select-bluetooth-device', (event, deviceList, callback) => { @@ -14,6 +17,18 @@ function createWindow () { } }) + // Listen for a message from the renderer to get the response for the Bluetooth pairing. + ipcMain.on('bluetooth-pairing-response', (event, response) => { + bluetoothPinCallback(response) + }) + + mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => { + + bluetoothPinCallback = callback + // Send a message to the renderer to prompt the user to confirm the pairing. + mainWindow.webContents.send('bluetooth-pairing-request', details) + }) + mainWindow.loadFile('index.html') } diff --git a/docs/fiddles/features/web-bluetooth/preload.js b/docs/fiddles/features/web-bluetooth/preload.js new file mode 100644 index 0000000000000..0732ea315ff7f --- /dev/null +++ b/docs/fiddles/features/web-bluetooth/preload.js @@ -0,0 +1,6 @@ +const { contextBridge, ipcRenderer } = require('electron') + +contextBridge.exposeInMainWorld('electronAPI', { + bluetoothPairingRequest: (callback) => ipcRenderer.on('bluetooth-pairing-request', callback), + bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-respnse', response) +}) \ No newline at end of file diff --git a/docs/fiddles/features/web-bluetooth/renderer.js b/docs/fiddles/features/web-bluetooth/renderer.js index e5830955599af..080fb6105b287 100644 --- a/docs/fiddles/features/web-bluetooth/renderer.js +++ b/docs/fiddles/features/web-bluetooth/renderer.js @@ -5,4 +5,30 @@ async function testIt() { document.getElementById('device-name').innerHTML = device.name || `ID: ${device.id}` } -document.getElementById('clickme').addEventListener('click',testIt) \ No newline at end of file +document.getElementById('clickme').addEventListener('click',testIt) + +window.electronAPI.bluetoothPairingRequest((event, details) => { + const response = {} + + switch (details.pairingKind) { + case 'confirm': { + response.confirmed = confirm(`Do you want to connect to device ${details.deviceId}?`) + break + } + case 'confirmPin': { + response.confirmed = confirm(`Does the pin ${details.pin} match the pin displayed on device ${details.deviceId}?`) + break + } + case 'providePin': { + const pin = prompt(`Please provide a pin for ${details.deviceId}.`) + if (pin) { + response.pin = pin + response.confirmed = true + } else { + response.confirmed = false + } + } + } + + window.electronAPI.bluetoothPairingResponse(response) +}) \ No newline at end of file diff --git a/docs/tutorial/devices.md b/docs/tutorial/devices.md index cba807891f07b..6f11fec760208 100644 --- a/docs/tutorial/devices.md +++ b/docs/tutorial/devices.md @@ -16,6 +16,10 @@ with bluetooth devices. In order to use this API in Electron, developers will need to handle the [`select-bluetooth-device` event on the webContents](../api/web-contents.md#event-select-bluetooth-device) associated with the device request. +Additionally, [`ses.setBluetoothPairingHandler(handler)`](../api/session.md#sessetbluetoothpairinghandlerhandler-windows-linux) +can be used to handle pairing to bluetooth devices on Windows or Linux when +additional validation such as a pin is needed. + ### Example This example demonstrates an Electron application that automatically selects diff --git a/filenames.auto.gni b/filenames.auto.gni index 2b865962a3885..57d9f4d1384ee 100644 --- a/filenames.auto.gni +++ b/filenames.auto.gni @@ -142,6 +142,7 @@ auto_filenames = { "lib/common/define-properties.ts", "lib/common/ipc-messages.ts", "lib/common/web-view-methods.ts", + "lib/common/webpack-globals-provider.ts", "lib/renderer/api/context-bridge.ts", "lib/renderer/api/crash-reporter.ts", "lib/renderer/api/ipc-renderer.ts", diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index a5d59b2d2b2d8..340adbd1a65a3 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -655,6 +655,18 @@ void Session::SetDevicePermissionHandler(v8::Local val, permission_manager->SetDevicePermissionHandler(handler); } +void Session::SetBluetoothPairingHandler(v8::Local val, + gin::Arguments* args) { + ElectronPermissionManager::BluetoothPairingHandler handler; + if (!(val->IsNull() || gin::ConvertFromV8(args->isolate(), val, &handler))) { + args->ThrowTypeError("Must pass null or function"); + return; + } + auto* permission_manager = static_cast( + browser_context()->GetPermissionControllerDelegate()); + permission_manager->SetBluetoothPairingHandler(handler); +} + v8::Local Session::ClearHostResolverCache(gin::Arguments* args) { v8::Isolate* isolate = args->isolate(); gin_helper::Promise promise(isolate); @@ -1204,6 +1216,8 @@ gin::ObjectTemplateBuilder Session::GetObjectTemplateBuilder( &Session::SetPermissionCheckHandler) .SetMethod("setDevicePermissionHandler", &Session::SetDevicePermissionHandler) + .SetMethod("setBluetoothPairingHandler", + &Session::SetBluetoothPairingHandler) .SetMethod("clearHostResolverCache", &Session::ClearHostResolverCache) .SetMethod("clearAuthCache", &Session::ClearAuthCache) .SetMethod("allowNTLMCredentialsForDomains", diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index c5f21920dcc6e..9507d706a4f20 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -105,6 +105,8 @@ class Session : public gin::Wrappable, gin::Arguments* args); void SetDevicePermissionHandler(v8::Local val, gin::Arguments* args); + void SetBluetoothPairingHandler(v8::Local val, + gin::Arguments* args); v8::Local ClearHostResolverCache(gin::Arguments* args); v8::Local ClearAuthCache(); void AllowNTLMCredentialsForDomains(const std::string& domains); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index 340cb5a4a35f2..6cfc775041553 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -7,6 +7,7 @@ #include #include +#include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "content/public/browser/render_frame_host.h" @@ -14,7 +15,10 @@ #include "device/bluetooth/bluetooth_device.h" #include "device/bluetooth/public/cpp/bluetooth_uuid.h" #include "shell/browser/api/electron_api_web_contents.h" +#include "shell/browser/electron_permission_manager.h" #include "shell/browser/lib/bluetooth_chooser.h" +#include "shell/common/gin_converters/frame_converter.h" +#include "shell/common/gin_helper/dictionary.h" #include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h" #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h" @@ -23,6 +27,28 @@ using content::RenderFrameHost; using content::WebContents; using device::BluetoothUUID; +namespace gin { + +template <> +struct Converter { + static v8::Local ToV8( + v8::Isolate* isolate, + content::BluetoothDelegate::PairingKind pairing_kind) { + switch (pairing_kind) { + case content::BluetoothDelegate::PairingKind::kConfirmOnly: + return StringToV8(isolate, "confirm"); + case content::BluetoothDelegate::PairingKind::kConfirmPinMatch: + return StringToV8(isolate, "confirmPin"); + case content::BluetoothDelegate::PairingKind::kProvidePin: + return StringToV8(isolate, "providePin"); + default: + return StringToV8(isolate, "unknown"); + } + } +}; + +} // namespace gin + namespace electron { ElectronBluetoothDelegate::ElectronBluetoothDelegate() = default; @@ -136,9 +162,46 @@ void ElectronBluetoothDelegate::ShowDevicePairPrompt( PairPromptCallback callback, PairingKind pairing_kind, const absl::optional& pin) { - NOTIMPLEMENTED(); - std::move(callback).Run(BluetoothDelegate::PairPromptResult( - BluetoothDelegate::PairPromptStatus::kCancelled)); + auto* web_contents = content::WebContents::FromRenderFrameHost(frame); + if (web_contents) { + auto* permission_manager = static_cast( + web_contents->GetBrowserContext()->GetPermissionControllerDelegate()); + + v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); + v8::HandleScope scope(isolate); + gin_helper::Dictionary details = + gin_helper::Dictionary::CreateEmpty(isolate); + details.Set("deviceId", device_identifier); + details.Set("pairingKind", pairing_kind); + details.SetGetter("frame", frame); + if (pin.has_value()) { + details.Set("pin", pin.value()); + } + + permission_manager->CheckBluetoothDevicePair( + details, base::AdaptCallbackForRepeating(base::BindOnce( + &ElectronBluetoothDelegate::OnDevicePairPromptResponse, + weak_factory_.GetWeakPtr(), std::move(callback)))); + } +} + +void ElectronBluetoothDelegate::OnDevicePairPromptResponse( + PairPromptCallback callback, + base::Value::Dict response) { + BluetoothDelegate::PairPromptResult result; + if (response.FindBool("confirmed").value_or(false)) { + result.result_code = BluetoothDelegate::PairPromptStatus::kSuccess; + } else { + result.result_code = BluetoothDelegate::PairPromptStatus::kCancelled; + } + + const std::string* pin = response.FindString("pin"); + if (pin) { + std::u16string trimmed_input = base::UTF8ToUTF16(*pin); + base::TrimWhitespace(trimmed_input, base::TRIM_ALL, &trimmed_input); + result.pin = base::UTF16ToUTF8(trimmed_input); + } + std::move(callback).Run(result); } } // namespace electron diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index df4f07703e815..8328f45636ad3 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -9,6 +9,7 @@ #include #include +#include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/scoped_observation.h" #include "content/public/browser/bluetooth_delegate.h" @@ -91,6 +92,12 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { void AddFramePermissionObserver(FramePermissionObserver* observer) override; void RemoveFramePermissionObserver( FramePermissionObserver* observer) override; + + private: + void OnDevicePairPromptResponse(PairPromptCallback callback, + base::Value::Dict response); + + base::WeakPtrFactory weak_factory_{this}; }; } // namespace electron diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 8b3d4d50df02f..995a704bb6503 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -130,6 +130,11 @@ void ElectronPermissionManager::SetDevicePermissionHandler( device_permission_handler_ = handler; } +void ElectronPermissionManager::SetBluetoothPairingHandler( + const BluetoothPairingHandler& handler) { + bluetooth_pairing_handler_ = handler; +} + void ElectronPermissionManager::RequestPermission( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, @@ -276,6 +281,18 @@ ElectronPermissionManager::SubscribePermissionStatusChange( void ElectronPermissionManager::UnsubscribePermissionStatusChange( SubscriptionId id) {} +void ElectronPermissionManager::CheckBluetoothDevicePair( + gin_helper::Dictionary details, + PairCallback pair_callback) const { + if (bluetooth_pairing_handler_.is_null()) { + base::Value::Dict response; + response.Set("confirmed", false); + std::move(pair_callback).Run(std::move(response)); + } else { + bluetooth_pairing_handler_.Run(details, std::move(pair_callback)); + } +} + bool ElectronPermissionManager::CheckPermissionWithDetails( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 00cbb81e9f733..3aa980ea22d71 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -13,6 +13,7 @@ #include "content/public/browser/permission_controller_delegate.h" #include "gin/dictionary.h" #include "shell/browser/electron_browser_context.h" +#include "shell/common/gin_helper/dictionary.h" namespace base { class Value; @@ -38,6 +39,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { base::OnceCallback; using StatusesCallback = base::OnceCallback&)>; + using PairCallback = base::OnceCallback; using RequestHandler = base::RepeatingCallback&)>; + using BluetoothPairingHandler = + base::RepeatingCallback; // Handler to dispatch permission requests in JS. void SetPermissionRequestHandler(const RequestHandler& handler); void SetPermissionCheckHandler(const CheckHandler& handler); void SetDevicePermissionHandler(const DeviceCheckHandler& handler); + void SetBluetoothPairingHandler(const BluetoothPairingHandler& handler); // content::PermissionControllerDelegate: void RequestPermission(blink::PermissionType permission, @@ -81,6 +86,9 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { base::Value::Dict details, StatusesCallback callback); + void CheckBluetoothDevicePair(gin_helper::Dictionary details, + PairCallback pair_callback) const; + bool CheckPermissionWithDetails(blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, @@ -147,6 +155,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { RequestHandler request_handler_; CheckHandler check_handler_; DeviceCheckHandler device_permission_handler_; + BluetoothPairingHandler bluetooth_pairing_handler_; PendingRequestsMap pending_requests_; }; From d3b678a03e523708bfe5ca3721cbd1e8bc4151be Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:02:36 -0700 Subject: [PATCH 755/811] Bump v21.0.0 --- 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 4e769dc94ad4e..2ad7925f6fb87 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0-beta.8 \ No newline at end of file +21.0.0 \ No newline at end of file diff --git a/package.json b/package.json index 3b417c1fa169f..ee8a88b7eb3fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0-beta.8", + "version": "21.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 b422eaf79de86..33f71d1f56e71 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 21,0,0,8 - PRODUCTVERSION 21,0,0,8 + FILEVERSION 21,0,0,0 + PRODUCTVERSION 21,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c21da5431107cfce73c1face28a0dffe05227349 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:39:09 -0400 Subject: [PATCH 756/811] fix: Handle an electron.d.ts file in a custom build (#35822) fix: Handle an electron.d.ts file in a custom build (#33979) * Handle an electron.d.ts file in a custom build * Fix linter issues Co-authored-by: Felix Rieseberg Co-authored-by: Felix Rieseberg Co-authored-by: Felix Rieseberg --- npm/install.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/npm/install.js b/npm/install.js index 069701adee67a..864ca633fd30f 100755 --- a/npm/install.js +++ b/npm/install.js @@ -70,8 +70,30 @@ function isInstalled () { // unzips and makes path.txt point at the correct executable function extractFile (zipPath) { - return extract(zipPath, { dir: path.join(__dirname, 'dist') }) - .then(() => fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath)); + return new Promise((resolve, reject) => { + const distPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist'); + + extract(zipPath, { dir: path.join(__dirname, 'dist') }) + .then(() => { + // If the zip contains an "electron.d.ts" file, + // move that up + const srcTypeDefPath = path.join(distPath, 'electron.d.ts'); + const targetTypeDefPath = path.join(__dirname, 'electron.d.ts'); + const hasTypeDefinitions = fs.existsSync(srcTypeDefPath); + + if (hasTypeDefinitions) { + try { + fs.renameSync(srcTypeDefPath, targetTypeDefPath); + } catch (err) { + reject(err); + } + } + + // Write a "path.txt" file. + return fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath); + }) + .catch((err) => reject(err)); + }); } function getPlatformPath () { From a183995b09b76423e0fe2a1e2c649cf54df7812e Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 13:50:51 -0400 Subject: [PATCH 757/811] chore: bump chromium to 106.0.5249.61 (21-x-y) (#35833) * chore: bump chromium in DEPS to 106.0.5249.61 * 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 +- ..._maximized_parameter_to_linuxui_getwindowframeprovider.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b730762315bc2..463fd8ef72352 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.51', + '106.0.5249.61', 'node_version': 'v16.16.0', 'nan_version': diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index cf013cc6850e6..372cd21f99c5c 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,7 +8,7 @@ decorations in maximized mode where needed, preventing empty space caused by decoration shadows and rounded titlebars around the window while maximized. diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc -index 1fbb58152c19193d480b437aea123abdd61c24fe..2b7e305d643aa2e0afef4c578688897c3a8832bf 100644 +index dd42b1e87cf30413f96fdcfed9d8dc8c04fd537a..6c0612fb0f0dca32486d04491f9cd49a428836d1 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc @@ -500,13 +500,15 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { From 78ffd4f6045ad718eb164b5ad8df19cdc96992ad Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 14:31:39 -0700 Subject: [PATCH 758/811] build: fix deps workflow tag comparison (#35844) Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- .github/workflows/release_dependency_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .github/workflows/release_dependency_versions.yml diff --git a/.github/workflows/release_dependency_versions.yml b/.github/workflows/release_dependency_versions.yml old mode 100644 new mode 100755 index d270b6a21bbac..00db1ba079d59 --- a/.github/workflows/release_dependency_versions.yml +++ b/.github/workflows/release_dependency_versions.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - name: Check Tag run: | - if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.0\.0$ ]]; then + if [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.0\.0$ ]]; then echo ::set-output name=should_release::true fi trigger: From cb22573c3e76e09df9fbad36dc372080c04d349e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 08:31:01 -0700 Subject: [PATCH 759/811] Bump v21.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 2ad7925f6fb87..51d2144bcd0a8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.0 \ No newline at end of file +21.0.1 \ No newline at end of file diff --git a/package.json b/package.json index ee8a88b7eb3fe..a4df233c6a1e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.0", + "version": "21.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 33f71d1f56e71..ba908b1e11981 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 21,0,0,0 - PRODUCTVERSION 21,0,0,0 + FILEVERSION 21,0,1,0 + PRODUCTVERSION 21,0,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "21.0.0" + VALUE "FileVersion", "21.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", "21.0.0" + VALUE "ProductVersion", "21.0.1" VALUE "SquirrelAwareVersion", "1" END END From 32b64170b99591aa02843e2b58042597a75e94a5 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 12:55:18 -0400 Subject: [PATCH 760/811] feat: add WebContents.opener and webContents.fromFrame() (#35819) * feat: add WebContents.opener * feat: add webContents.fromFrame(frame) * fix: unknown type name * test: fix and add more fromFrame cases * docs: clarified terminology Co-authored-by: Samuel Maddock --- docs/api/web-contents.md | 12 ++++ lib/browser/api/web-contents.ts | 4 ++ .../browser/api/electron_api_web_contents.cc | 16 +++++ shell/browser/api/electron_api_web_contents.h | 1 + spec-main/api-web-contents-spec.ts | 72 ++++++++++++++++++- 5 files changed, 104 insertions(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 0c7f18d55cd0e..37e5137340a23 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -45,6 +45,13 @@ returns `null`. Returns `WebContents` | undefined - A WebContents instance with the given ID, or `undefined` if there is no WebContents associated with the given ID. +### `webContents.fromFrame(frame)` + +* `frame` WebFrameMain + +Returns `WebContents` | undefined - A WebContents instance with the given WebFrameMain, or +`undefined` if there is no WebContents associated with the given WebFrameMain. + ### `webContents.fromDevToolsTargetId(targetId)` * `targetId` string - The Chrome DevTools Protocol [TargetID](https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetID) associated with the WebContents instance. @@ -2079,6 +2086,11 @@ when the page becomes backgrounded. This also affects the Page Visibility API. A [`WebFrameMain`](web-frame-main.md) property that represents the top frame of the page's frame hierarchy. +#### `contents.opener` _Readonly_ + +A [`WebFrameMain`](web-frame-main.md) property that represents the frame that opened this WebContents, either +with open(), or by navigating a link with a target attribute. + [keyboardevent]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent [event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter [SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index a0369fc734a14..5b9131fcec003 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -838,6 +838,10 @@ export function fromId (id: string) { return binding.fromId(id); } +export function fromFrame (frame: Electron.WebFrameMain) { + return binding.fromFrame(frame); +} + export function fromDevToolsTargetId (targetId: string) { return binding.fromDevToolsTargetId(targetId); } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 3340c0e47e357..ec6a24301111c 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3435,6 +3435,10 @@ content::RenderFrameHost* WebContents::MainFrame() { return web_contents()->GetPrimaryMainFrame(); } +content::RenderFrameHost* WebContents::Opener() { + return web_contents()->GetOpener(); +} + void WebContents::NotifyUserActivation() { content::RenderFrameHost* frame = web_contents()->GetPrimaryMainFrame(); if (frame) @@ -4045,6 +4049,7 @@ v8::Local WebContents::FillObjectTemplate( .SetProperty("devToolsWebContents", &WebContents::DevToolsWebContents) .SetProperty("debugger", &WebContents::Debugger) .SetProperty("mainFrame", &WebContents::MainFrame) + .SetProperty("opener", &WebContents::Opener) .Build(); } @@ -4159,6 +4164,7 @@ namespace { using electron::api::GetAllWebContents; using electron::api::WebContents; +using electron::api::WebFrameMain; gin::Handle WebContentsFromID(v8::Isolate* isolate, int32_t id) { WebContents* contents = WebContents::FromID(id); @@ -4166,6 +4172,15 @@ gin::Handle WebContentsFromID(v8::Isolate* isolate, int32_t id) { : gin::Handle(); } +gin::Handle WebContentsFromFrame(v8::Isolate* isolate, + WebFrameMain* web_frame) { + content::RenderFrameHost* rfh = web_frame->render_frame_host(); + content::WebContents* source = content::WebContents::FromRenderFrameHost(rfh); + WebContents* contents = WebContents::From(source); + return contents ? gin::CreateHandle(isolate, contents) + : gin::Handle(); +} + gin::Handle WebContentsFromDevToolsTargetID( v8::Isolate* isolate, std::string target_id) { @@ -4194,6 +4209,7 @@ void Initialize(v8::Local exports, gin_helper::Dictionary dict(isolate, exports); dict.Set("WebContents", WebContents::GetConstructor(context)); dict.SetMethod("fromId", &WebContentsFromID); + dict.SetMethod("fromFrame", &WebContentsFromFrame); dict.SetMethod("fromDevToolsTargetId", &WebContentsFromDevToolsTargetID); dict.SetMethod("getAllWebContents", &GetAllWebContentsAsV8); } diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 111984a20c37d..1d7bc0ccb7e34 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -332,6 +332,7 @@ class WebContents : public ExclusiveAccessContext, v8::Local DevToolsWebContents(v8::Isolate* isolate); v8::Local Debugger(v8::Isolate* isolate); content::RenderFrameHost* MainFrame(); + content::RenderFrameHost* Opener(); WebContentsZoomController* GetZoomController() { return zoom_controller_; } diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 6b326e8008e64..f19fc67d49c70 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -6,7 +6,7 @@ import * as http from 'http'; import { BrowserWindow, ipcMain, webContents, session, WebContents, app, BrowserView } from 'electron/main'; import { emittedOnce } from './events-helpers'; import { closeAllWindows } from './window-helpers'; -import { ifdescribe, delay, defer } from './spec-helpers'; +import { ifdescribe, delay, defer, waitUntil } from './spec-helpers'; const pdfjs = require('pdfjs-dist'); const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures'); @@ -46,6 +46,28 @@ describe('webContents module', () => { }); }); + describe('fromFrame()', () => { + it('returns WebContents for mainFrame', () => { + const contents = (webContents as any).create() as WebContents; + expect(webContents.fromFrame(contents.mainFrame)).to.equal(contents); + }); + it('returns undefined for disposed frame', async () => { + const contents = (webContents as any).create() as WebContents; + const { mainFrame } = contents; + contents.destroy(); + await waitUntil(() => typeof webContents.fromFrame(mainFrame) === 'undefined'); + }); + it('throws when passing invalid argument', async () => { + let errored = false; + try { + webContents.fromFrame({} as any); + } catch { + errored = true; + } + expect(errored).to.be.true(); + }); + }); + describe('fromDevToolsTargetId()', () => { it('returns WebContents for attached DevTools target', async () => { const w = new BrowserWindow({ show: false }); @@ -1281,6 +1303,54 @@ describe('webContents module', () => { }); }); + describe('opener api', () => { + afterEach(closeAllWindows); + it('can get opener with window.open()', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); + await w.loadURL('about:blank'); + const childPromise = emittedOnce(w.webContents, 'did-create-window'); + w.webContents.executeJavaScript('window.open("about:blank")', true); + const [childWindow] = await childPromise; + expect(childWindow.webContents.opener).to.equal(w.webContents.mainFrame); + }); + it('has no opener when using "noopener"', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); + await w.loadURL('about:blank'); + const childPromise = emittedOnce(w.webContents, 'did-create-window'); + w.webContents.executeJavaScript('window.open("about:blank", undefined, "noopener")', true); + const [childWindow] = await childPromise; + expect(childWindow.webContents.opener).to.be.null(); + }); + it('can get opener with a[target=_blank][rel=opener]', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); + await w.loadURL('about:blank'); + const childPromise = emittedOnce(w.webContents, 'did-create-window'); + w.webContents.executeJavaScript(`(function() { + const a = document.createElement('a'); + a.target = '_blank'; + a.rel = 'opener'; + a.href = 'about:blank'; + a.click(); + }())`, true); + const [childWindow] = await childPromise; + expect(childWindow.webContents.opener).to.equal(w.webContents.mainFrame); + }); + it('has no opener with a[target=_blank][rel=noopener]', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); + await w.loadURL('about:blank'); + const childPromise = emittedOnce(w.webContents, 'did-create-window'); + w.webContents.executeJavaScript(`(function() { + const a = document.createElement('a'); + a.target = '_blank'; + a.rel = 'noopener'; + a.href = 'about:blank'; + a.click(); + }())`, true); + const [childWindow] = await childPromise; + expect(childWindow.webContents.opener).to.be.null(); + }); + }); + describe('render view deleted events', () => { let server: http.Server; let serverUrl: string; From 12d9fe3ab7becd0fce518e84723241e13f69f293 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:22:43 +0200 Subject: [PATCH 761/811] fix: set display_id in desktop capturer on Linux (#35836) fix: set display_id in desktop capturer on Linux (#33861) Previously, display_id was an empty string, pending Chrome support for sharing individual screens. Now that this has been added, it is desirable to have this property set correctly. Co-authored-by: John Kleinschmidt Co-authored-by: James Cash Co-authored-by: John Kleinschmidt --- .../api/electron_api_desktop_capturer.cc | 132 +++++++++++++++++- 1 file changed, 129 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/electron_api_desktop_capturer.cc b/shell/browser/api/electron_api_desktop_capturer.cc index 60a7b31b231ef..63fa340e273bf 100644 --- a/shell/browser/api/electron_api_desktop_capturer.cc +++ b/shell/browser/api/electron_api_desktop_capturer.cc @@ -4,6 +4,7 @@ #include "shell/browser/api/electron_api_desktop_capturer.h" +#include #include #include #include @@ -24,12 +25,125 @@ #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" +#if defined(USE_OZONE) +#include "ui/ozone/buildflags.h" +#if BUILDFLAG(OZONE_PLATFORM_X11) +#define USE_OZONE_PLATFORM_X11 +#endif +#endif + #if BUILDFLAG(IS_WIN) #include "third_party/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h" #include "third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" #include "ui/display/win/display_info.h" +#elif BUILDFLAG(IS_LINUX) +#if defined(USE_OZONE_PLATFORM_X11) +#include "base/logging.h" +#include "ui/base/x/x11_display_util.h" +#include "ui/base/x/x11_util.h" +#include "ui/display/util/edid_parser.h" // nogncheck +#include "ui/gfx/x/randr.h" +#include "ui/gfx/x/x11_atom_cache.h" +#include "ui/gfx/x/xproto_util.h" +#endif // defined(USE_OZONE_PLATFORM_X11) #endif // BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) +// Private function in ui/base/x/x11_display_util.cc +std::map GetMonitors(int version, + x11::RandR* randr, + x11::Window window) { + std::map output_to_monitor; + if (version >= 105) { + if (auto reply = randr->GetMonitors({window}).Sync()) { + for (size_t monitor = 0; monitor < reply->monitors.size(); monitor++) { + for (x11::RandR::Output output : reply->monitors[monitor].outputs) + output_to_monitor[output] = monitor; + } + } + } + return output_to_monitor; +} +// Get the EDID data from the |output| and stores to |edid|. +// Private function in ui/base/x/x11_display_util.cc +std::vector GetEDIDProperty(x11::RandR* randr, + x11::RandR::Output output) { + constexpr const char kRandrEdidProperty[] = "EDID"; + auto future = randr->GetOutputProperty(x11::RandR::GetOutputPropertyRequest{ + .output = output, + .property = x11::GetAtom(kRandrEdidProperty), + .long_length = 128}); + auto response = future.Sync(); + std::vector edid; + if (response && response->format == 8 && response->type != x11::Atom::None) + edid = std::move(response->data); + return edid; +} + +// Find the mapping from monitor name atom to the display identifier +// that the screen API uses. Based on the logic in BuildDisplaysFromXRandRInfo +// in ui/base/x/x11_display_util.cc +std::map MonitorAtomIdToDisplayId() { + auto* connection = x11::Connection::Get(); + auto& randr = connection->randr(); + auto x_root_window = ui::GetX11RootWindow(); + int version = ui::GetXrandrVersion(); + + std::map monitor_atom_to_display; + + auto resources = randr.GetScreenResourcesCurrent({x_root_window}).Sync(); + if (!resources) { + LOG(ERROR) << "XRandR returned no displays; don't know how to map ids"; + return monitor_atom_to_display; + } + + std::map output_to_monitor = + GetMonitors(version, &randr, x_root_window); + auto monitors_reply = randr.GetMonitors({x_root_window}).Sync(); + + for (size_t i = 0; i < resources->outputs.size(); i++) { + x11::RandR::Output output_id = resources->outputs[i]; + auto output_info = + randr.GetOutputInfo({output_id, resources->config_timestamp}).Sync(); + if (!output_info) + continue; + + if (output_info->connection != x11::RandR::RandRConnection::Connected) + continue; + + if (output_info->crtc == static_cast(0)) + continue; + + auto crtc = + randr.GetCrtcInfo({output_info->crtc, resources->config_timestamp}) + .Sync(); + if (!crtc) + continue; + display::EdidParser edid_parser( + GetEDIDProperty(&randr, static_cast(output_id))); + auto output_32 = static_cast(output_id); + int64_t display_id = + output_32 > 0xff ? 0 : edid_parser.GetIndexBasedDisplayId(output_32); + // It isn't ideal, but if we can't parse the EDID data, fall back on the + // display number. + if (!display_id) + display_id = i; + + // Find the mapping between output identifier and the monitor name atom + // Note this isn't the atom string, but the numeric atom identifier, + // since this is what the WebRTC system uses as the display identifier + auto output_monitor_iter = output_to_monitor.find(output_id); + if (output_monitor_iter != output_to_monitor.end()) { + x11::Atom atom = + monitors_reply->monitors[output_monitor_iter->second].name; + monitor_atom_to_display[static_cast(atom)] = display_id; + } + } + + return monitor_atom_to_display; +} +#endif + namespace gin { template <> @@ -178,10 +292,22 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) { for (auto& source : screen_sources) { source.display_id = base::NumberToString(source.media_list_source.id.id); } +#elif BUILDFLAG(IS_LINUX) +#if defined(USE_OZONE_PLATFORM_X11) + // On Linux, with X11, the source id is the numeric value of the + // display name atom and the display id is either the EDID or the + // loop index when that display was found (see + // BuildDisplaysFromXRandRInfo in ui/base/x/x11_display_util.cc) + std::map monitor_atom_to_display_id = + MonitorAtomIdToDisplayId(); + for (auto& source : screen_sources) { + auto display_id_iter = + monitor_atom_to_display_id.find(source.media_list_source.id.id); + if (display_id_iter != monitor_atom_to_display_id.end()) + source.display_id = base::NumberToString(display_id_iter->second); + } +#endif // defined(USE_OZONE_PLATFORM_X11) #endif // BUILDFLAG(IS_WIN) - // TODO(ajmacd): Add Linux support. The IDs across APIs differ but Chrome - // only supports capturing the entire desktop on Linux. Revisit this if - // individual screen support is added. std::move(screen_sources.begin(), screen_sources.end(), std::back_inserter(captured_sources_)); } From 572a9b16a17fdafaac558f6b453875f814c5a886 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 15:43:19 +0200 Subject: [PATCH 762/811] fix: `TryCatch` scope in node_bindings (#35895) fix: TryCatch scope in node_bindings Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- shell/common/node_bindings.cc | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) mode change 100644 => 100755 shell/common/node_bindings.cc diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc old mode 100644 new mode 100755 index ce03319e87d26..f6b548215fdc6 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -492,19 +492,22 @@ node::Environment* NodeBindings::CreateEnvironment( flags |= node::EnvironmentFlags::kNoStartDebugSignalHandler; } - v8::TryCatch try_catch(isolate); - env = node::CreateEnvironment( - isolate_data_, context, args, exec_args, - static_cast(flags)); - - if (try_catch.HasCaught()) { - std::string err_msg = - "Failed to initialize node environment in process: " + process_type; - v8::Local message = try_catch.Message(); - std::string msg; - if (!message.IsEmpty() && gin::ConvertFromV8(isolate, message->Get(), &msg)) - err_msg += " , with error: " + msg; - LOG(ERROR) << err_msg; + { + v8::TryCatch try_catch(isolate); + env = node::CreateEnvironment( + isolate_data_, context, args, exec_args, + static_cast(flags)); + + if (try_catch.HasCaught()) { + std::string err_msg = + "Failed to initialize node environment in process: " + process_type; + v8::Local message = try_catch.Message(); + std::string msg; + if (!message.IsEmpty() && + gin::ConvertFromV8(isolate, message->Get(), &msg)) + err_msg += " , with error: " + msg; + LOG(ERROR) << err_msg; + } } DCHECK(env); From 38955998f595c346e73de7268b49874d5bffd574 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 20:31:25 -0700 Subject: [PATCH 763/811] docs: update bluetooth fiddle example event name to trigger correct event (#35907) Fix event type spelling for bluetooth fiddle example Co-authored-by: sam Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: sam --- docs/fiddles/features/web-bluetooth/preload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 docs/fiddles/features/web-bluetooth/preload.js diff --git a/docs/fiddles/features/web-bluetooth/preload.js b/docs/fiddles/features/web-bluetooth/preload.js old mode 100644 new mode 100755 index 0732ea315ff7f..0c21fcce93881 --- a/docs/fiddles/features/web-bluetooth/preload.js +++ b/docs/fiddles/features/web-bluetooth/preload.js @@ -2,5 +2,5 @@ const { contextBridge, ipcRenderer } = require('electron') contextBridge.exposeInMainWorld('electronAPI', { bluetoothPairingRequest: (callback) => ipcRenderer.on('bluetooth-pairing-request', callback), - bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-respnse', response) + bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-response', response) }) \ No newline at end of file From 4cd78dfccc70c103adea6bed213da155f39dfd88 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 20:31:39 -0700 Subject: [PATCH 764/811] chore: bump chromium to 106.0.5249.91 (21-x-y) (#35871) chore: bump chromium in DEPS to 106.0.5249.91 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 463fd8ef72352..ebbabaa699d71 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.61', + '106.0.5249.91', 'node_version': 'v16.16.0', 'nan_version': From 63beca3002dd0c1ab2d6ef1db08b9d6a1b72c894 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 11:05:59 +0200 Subject: [PATCH 765/811] docs: update supported Mac versions (#35914) Co-authored-by: VerteDinde Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: VerteDinde --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 README.md diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 7bcb3e9253137..dfb49e1e148b5 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ For more installation options and troubleshooting tips, see Each Electron release provides binaries for macOS, Windows, and Linux. -* macOS (El Capitan and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11. +* macOS (High Sierra and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11. * Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. * Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on: * Ubuntu 14.04 and newer From 2b69b32c1d4581cb7c6ec95c38a37bc4235664bf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 08:31:26 -0700 Subject: [PATCH 766/811] Bump v21.1.0 --- 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 51d2144bcd0a8..03224ad202d22 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.0.1 \ No newline at end of file +21.1.0 \ No newline at end of file diff --git a/package.json b/package.json index a4df233c6a1e8..080de11515066 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.0.1", + "version": "21.1.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 ba908b1e11981..27bdf75fe6fca 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 21,0,1,0 - PRODUCTVERSION 21,0,1,0 + FILEVERSION 21,1,0,0 + PRODUCTVERSION 21,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "21.0.1" + VALUE "FileVersion", "21.1.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "21.0.1" + VALUE "ProductVersion", "21.1.0" VALUE "SquirrelAwareVersion", "1" END END From 0b733793c3fec910f0322f570eb1f37d2a88866d Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 5 Oct 2022 12:11:06 -0700 Subject: [PATCH 767/811] build: fix filesystem permissions from bad trop commits Ref: https://github.com/electron/electron/commit/572a9b16a17fdafaac558f6b453875f814c5a886 Ref: https://github.com/electron/electron/commit/38955998f595c346e73de7268b49874d5bffd574 Ref: https://github.com/electron/electron/commit/63beca3002dd0c1ab2d6ef1db08b9d6a1b72c894 --- README.md | 0 docs/fiddles/features/web-bluetooth/preload.js | 0 shell/common/node_bindings.cc | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 README.md mode change 100755 => 100644 docs/fiddles/features/web-bluetooth/preload.js mode change 100755 => 100644 shell/common/node_bindings.cc diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/docs/fiddles/features/web-bluetooth/preload.js b/docs/fiddles/features/web-bluetooth/preload.js old mode 100755 new mode 100644 diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc old mode 100755 new mode 100644 From 80a4ea2601a5f0d31d89b05e385586c1cd93a8c2 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 6 Oct 2022 04:28:52 -0700 Subject: [PATCH 768/811] chore: cherry-pick c83640db21b5 from chromium (#35925) * chore: cherry-pick c83640db21b5 from chromium * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/.patches | 1 + .../chromium/cherry-pick-c83640db21b5.patch | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 patches/chromium/cherry-pick-c83640db21b5.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 6b99ece695061..bd0340c00135a 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -123,3 +123,4 @@ disable_optimization_guide_for_preconnect_feature.patch fix_the_gn_gen_for_components_segmentation_platform.patch fix_crash_loading_non-standard_schemes_in_iframes.patch create_browser_v8_snapshot_file_name_fuse.patch +cherry-pick-c83640db21b5.patch diff --git a/patches/chromium/cherry-pick-c83640db21b5.patch b/patches/chromium/cherry-pick-c83640db21b5.patch new file mode 100644 index 0000000000000..28911679eccf1 --- /dev/null +++ b/patches/chromium/cherry-pick-c83640db21b5.patch @@ -0,0 +1,122 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Wed, 5 Oct 2022 06:03:23 +0000 +Subject: build: set DTSDKBuild correctly when generating plist files + +Currently we set DTSDKBuild to the version of the SDK used to build +Chromium. This value is supposed to be the build version (this is +what xcode sets it to for instance). We read this value out of the +SDK directly and use it instead. + +Change-Id: Ieb7990f13095683ad8c026f027b2605ae39523a4 + +diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni +index 43577925d2ef9cd79970d8307104e0abc1756583..0819d4cc1b17f216eae8c1a562b0301ba6298d57 100644 +--- a/build/config/mac/mac_sdk.gni ++++ b/build/config/mac/mac_sdk.gni +@@ -40,6 +40,11 @@ declare_args() { + # will fail. + mac_sdk_official_version = "12.3" + ++ # The SDK build version used when making official builds. This is a single ++ # exact version found at "System/Library/CoreServices/SystemVersion.plist" ++ # inside the SDK. ++ mac_sdk_official_build_version = "21E226" ++ + # Production builds should use hermetic Xcode. If you want to do production + # builds with system Xcode to test new SDKs, set this. + # Don't set this on any bots. +@@ -103,11 +108,13 @@ if (use_system_xcode) { + find_sdk_args = [ + "--print_sdk_path", + "--print_bin_path", ++ "--print_sdk_build", + mac_sdk_min, + ] + find_sdk_lines = + exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines") +- mac_sdk_version = find_sdk_lines[2] ++ mac_sdk_version = find_sdk_lines[3] ++ mac_sdk_build_version = find_sdk_lines[2] + if (mac_sdk_path == "") { + mac_sdk_path = find_sdk_lines[0] + mac_bin_path = find_sdk_lines[1] +@@ -116,6 +123,7 @@ if (use_system_xcode) { + } + } else { + mac_sdk_version = mac_sdk_official_version ++ mac_sdk_build_version = mac_sdk_official_build_version + _dev = _hermetic_xcode_path + "/Contents/Developer" + _sdk = "MacOSX${mac_sdk_version}.sdk" + mac_sdk_path = _dev + "/Platforms/MacOSX.platform/Developer/SDKs/$_sdk" +diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni +index 03073f830401c4891376a3b59e2e7a870e3d34b7..04d403054c1a83fcbbc70be7cfd239ecbec315d3 100644 +--- a/build/config/mac/rules.gni ++++ b/build/config/mac/rules.gni +@@ -41,7 +41,7 @@ template("mac_info_plist") { + apple_info_plist(target_name) { + format = "xml1" + extra_substitutions = [ +- "MAC_SDK_BUILD=$mac_sdk_version", ++ "MAC_SDK_BUILD=$mac_sdk_build_version", + "MAC_SDK_NAME=$mac_sdk_name$mac_sdk_version", + "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target", + "CHROMIUM_MIN_SYSTEM_VERSION=$mac_min_system_version", +diff --git a/build/mac/find_sdk.py b/build/mac/find_sdk.py +index d86f3109357a9246d570cb02992dc82552ba7c20..b2400c7e8c70957e364444f509880900ce3b641f 100755 +--- a/build/mac/find_sdk.py ++++ b/build/mac/find_sdk.py +@@ -24,6 +24,7 @@ Sample Output: + from __future__ import print_function + + import os ++import plistlib + import re + import subprocess + import sys +@@ -51,6 +52,9 @@ def main(): + parser.add_option("--print_bin_path", + action="store_true", dest="print_bin_path", default=False, + help="Additionally print the path the toolchain bin dir.") ++ parser.add_option("--print_sdk_build", ++ action="store_true", dest="print_sdk_build", default=False, ++ help="Additionally print the build version of the SDK.") + options, args = parser.parse_args() + if len(args) != 1: + parser.error('Please specify a minimum SDK version') +@@ -80,20 +84,30 @@ def main(): + if not sdks: + raise Exception('No %s+ SDK found' % min_sdk_version) + best_sdk = sorted(sdks, key=parse_version)[0] ++ sdk_name = 'MacOSX' + best_sdk + '.sdk' ++ sdk_path = os.path.join(sdk_dir, sdk_name) + + if options.print_sdk_path: +- sdk_name = 'MacOSX' + best_sdk + '.sdk' +- print(os.path.join(sdk_dir, sdk_name)) ++ print(sdk_path) + + if options.print_bin_path: + bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/' + print(os.path.join(dev_dir, bin_path)) + +- return best_sdk ++ if options.print_sdk_build: ++ system_version_plist = os.path.join(sdk_path, ++ 'System/Library/CoreServices/SystemVersion.plist') ++ with open(system_version_plist, 'rb') as f: ++ system_version_info = plistlib.load(f) ++ if 'ProductBuildVersion' not in system_version_info: ++ raise Exception('Failed to determine ProductBuildVersion' + ++ 'for SDK at path %s' % system_version_plist) ++ print(system_version_info['ProductBuildVersion']) ++ ++ print(best_sdk) + + + if __name__ == '__main__': + if sys.platform != 'darwin': + raise Exception("This script only runs on Mac") +- print(main()) +- sys.exit(0) ++ sys.exit(main()) From cef4f6a8e7f9675d9ae490b2c60917f82a6073c6 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:56:20 -0400 Subject: [PATCH 769/811] chore: bump chromium to 106.0.5249.103 (21-x-y) (#35933) chore: bump chromium in DEPS to 106.0.5249.103 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ebbabaa699d71..f4d934a16b53d 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.91', + '106.0.5249.103', 'node_version': 'v16.16.0', 'nan_version': From 9048de7caba212fb48b9b2120f734813a4da2798 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 02:37:18 -0700 Subject: [PATCH 770/811] fix: override `content::ContentMainDelegate::CreateContentClient()` (#35965) * fix: override content::ContentMainDelegate::CreateContentClient() Co-authored-by: Shelley Vohr * chore: remove extra call Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- shell/app/electron_main_delegate.cc | 8 +++++--- shell/app/electron_main_delegate.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 73d063026ad3e..6111b30a11951 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -316,9 +316,6 @@ absl::optional ElectronMainDelegate::BasicStartupComplete() { ::switches::kDisableGpuMemoryBufferCompositorResources); #endif - content_client_ = std::make_unique(); - SetContentClient(content_client_.get()); - return absl::nullopt; } @@ -437,6 +434,11 @@ base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() { return ContentMainDelegate::GetBrowserV8SnapshotFilename(); } +content::ContentClient* ElectronMainDelegate::CreateContentClient() { + content_client_ = std::make_unique(); + return content_client_.get(); +} + content::ContentBrowserClient* ElectronMainDelegate::CreateContentBrowserClient() { browser_client_ = std::make_unique(); diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index 0a8363fb7a90b..ca48a02a3b820 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -38,6 +38,7 @@ class ElectronMainDelegate : public content::ContentMainDelegate { void PreSandboxStartup() override; void SandboxInitialized(const std::string& process_type) override; absl::optional PreBrowserMain() override; + content::ContentClient* CreateContentClient() override; content::ContentBrowserClient* CreateContentBrowserClient() override; content::ContentGpuClient* CreateContentGpuClient() override; content::ContentRendererClient* CreateContentRendererClient() override; From bc27dc4597dc75590010ac08e869d1102daa4b8c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 12:32:49 -0400 Subject: [PATCH 771/811] fix: expose the built-in electron module via the ESM loader (#35958) * fix: expose the built-in electron module via the ESM loader Co-authored-by: Samuel Attard * Update .patches * chore: update patches Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard Co-authored-by: Samuel Attard Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/node/.patches | 1 + ...n_electron_module_via_the_esm_loader.patch | 87 +++++++++++++++++++ spec-main/modules-spec.ts | 12 +++ 3 files changed, 100 insertions(+) create mode 100644 patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch diff --git a/patches/node/.patches b/patches/node/.patches index 611f1f217aa15..298d3c8426171 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -49,3 +49,4 @@ fix_override_createjob_in_node_platform.patch buffer_fix_atob_input_validation.patch v8_api_advance_api_deprecation.patch enable_-wunqualified-std-cast-call.patch +fix_expose_the_built-in_electron_module_via_the_esm_loader.patch diff --git a/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch b/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch new file mode 100644 index 0000000000000..ca41bd3391169 --- /dev/null +++ b/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch @@ -0,0 +1,87 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Thu, 6 Oct 2022 04:09:16 -0700 +Subject: fix: expose the built-in electron module via the ESM loader + +This allows usage of `import { app } from 'electron'` and `import('electron')` natively in the browser + non-sandboxed renderer + +diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js +index 5ae0e17dcfb5e24a1a117c33c4d42891686e693f..619fe6cef3b02eb575410225f41d3e7d51f37b93 100644 +--- a/lib/internal/modules/esm/get_format.js ++++ b/lib/internal/modules/esm/get_format.js +@@ -31,6 +31,7 @@ const protocolHandlers = ObjectAssign(ObjectCreate(null), { + 'http:': getHttpProtocolModuleFormat, + 'https:': getHttpProtocolModuleFormat, + 'node:'() { return 'builtin'; }, ++ 'electron:'() { return 'commonjs'; }, + }); + + function getDataProtocolModuleFormat(parsed) { +diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js +index 3576f75f0a40a64dceb7e2649b344b83ebc04b39..314fbb78931eef154a1e47c655e2d4bafe11bac3 100644 +--- a/lib/internal/modules/esm/resolve.js ++++ b/lib/internal/modules/esm/resolve.js +@@ -888,6 +888,8 @@ function parsePackageName(specifier, base) { + return { packageName, packageSubpath, isScoped }; + } + ++const electronSpecifiers = new SafeSet(['electron', 'electron/main', 'electron/common', 'electron/renderer']); ++ + /** + * @param {string} specifier + * @param {string | URL | undefined} base +@@ -898,6 +900,10 @@ function packageResolve(specifier, base, conditions) { + if (NativeModule.canBeRequiredByUsers(specifier)) + return new URL('node:' + specifier); + ++ if (electronSpecifiers.has(specifier)) { ++ return new URL('electron:electron'); ++ } ++ + const { packageName, packageSubpath, isScoped } = + parsePackageName(specifier, base); + +@@ -1099,7 +1105,7 @@ function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { + + function throwIfUnsupportedURLProtocol(url) { + if (url.protocol !== 'file:' && url.protocol !== 'data:' && +- url.protocol !== 'node:') { ++ url.protocol !== 'node:' && url.protocol !== 'electron:') { + throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url); + } + } +diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js +index d7f4c7edec63d3ce500955a37c6eac00e3e524fd..b97cac53365b121f8e232f0085ff166511c3dda3 100644 +--- a/lib/internal/modules/esm/translators.js ++++ b/lib/internal/modules/esm/translators.js +@@ -155,7 +155,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source, + + if (!cjsParse) await initCJSParse(); + const { module, exportNames } = cjsPreparseModuleExports(filename); +- const namesWithDefault = exportNames.has('default') ? ++ const namesWithDefault = filename === 'electron' ? ['default', ...Object.keys(module.exports)] : exportNames.has('default') ? + [...exportNames] : ['default', ...exportNames]; + + return new ModuleWrap(url, undefined, namesWithDefault, function() { +@@ -174,7 +174,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source, + } + } + +- for (const exportName of exportNames) { ++ for (const exportName of namesWithDefault) { + if (!ObjectPrototypeHasOwnProperty(exports, exportName) || + exportName === 'default') + continue; +diff --git a/lib/internal/url.js b/lib/internal/url.js +index 939374a495856cf2b9c573fa98dc1895eee5e143..c37258ac29e8b7558c1f9a2af7ba6bdd0eab1355 100644 +--- a/lib/internal/url.js ++++ b/lib/internal/url.js +@@ -1418,6 +1418,8 @@ function fileURLToPath(path) { + path = new URL(path); + else if (!isURLInstance(path)) + throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path); ++ if (path.protocol === 'electron:') ++ return 'electron'; + if (path.protocol !== 'file:') + throw new ERR_INVALID_URL_SCHEME('file'); + return isWindows ? getPathFromURLWin32(path) : getPathFromURLPosix(path); diff --git a/spec-main/modules-spec.ts b/spec-main/modules-spec.ts index a83797961fcf7..0cebbbeb642d9 100644 --- a/spec-main/modules-spec.ts +++ b/spec-main/modules-spec.ts @@ -183,4 +183,16 @@ describe('modules support', () => { }); }); }); + + describe('esm', () => { + it('can load the built-in "electron" module via ESM import', async () => { + await expect(import('electron')).to.eventually.be.ok(); + }); + + it('the built-in "electron" module loaded via ESM import has the same exports as the CJS module', async () => { + const esmElectron = await import('electron'); + const cjsElectron = require('electron'); + expect(Object.keys(esmElectron)).to.deep.equal(Object.keys(cjsElectron)); + }); + }); }); From 9f99f4ed0e15d54f6d55496ee41a07102e84a81a Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Tue, 11 Oct 2022 11:55:31 -0700 Subject: [PATCH 772/811] chore: cherry-pick 30a32e6 from chromium (#35370) (#35970) chore: apply chromium commit 30a32e6 (#35370) chore: Apply Chromium commit 30a32e6 --- shell/browser/ui/views/win_caption_button.cc | 2 +- shell/browser/ui/views/win_icon_painter.cc | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index 9903fecd3146d..9d90fc6a6fd27 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Modified from chrome/browser/ui/views/frame/windows_10_caption_button.cc +// Modified from chrome/browser/ui/views/frame/windows_caption_button.cc #include "shell/browser/ui/views/win_caption_button.h" diff --git a/shell/browser/ui/views/win_icon_painter.cc b/shell/browser/ui/views/win_icon_painter.cc index d61a7970c6705..d89d63d439051 100644 --- a/shell/browser/ui/views/win_icon_painter.cc +++ b/shell/browser/ui/views/win_icon_painter.cc @@ -25,7 +25,7 @@ void DrawRect(gfx::Canvas* canvas, void DrawRoundRect(gfx::Canvas* canvas, const gfx::Rect& rect, - int radius, + float radius, const cc::PaintFlags& flags) { gfx::RectF rect_f(rect); float stroke_half_width = flags.getStrokeWidth() / 2; @@ -74,7 +74,7 @@ void WinIconPainter::PaintMaximizeIcon(gfx::Canvas* canvas, void WinIconPainter::PaintRestoreIcon(gfx::Canvas* canvas, const gfx::Rect& symbol_rect, const cc::PaintFlags& flags) { - const int separation = std::floor(2 * canvas->image_scale()); + const int separation = base::ClampFloor(2 * canvas->image_scale()); gfx::Rect icon_rect = symbol_rect; icon_rect.Inset(gfx::Insets::TLBR(separation, 0, 0, separation)); @@ -113,14 +113,14 @@ void Win11IconPainter::PaintMaximizeIcon(gfx::Canvas* canvas, cc::PaintFlags paint_flags = flags; paint_flags.setAntiAlias(true); - const float corner_radius = 2 * canvas->image_scale(); + const float corner_radius = canvas->image_scale(); DrawRoundRect(canvas, symbol_rect, corner_radius, flags); } void Win11IconPainter::PaintRestoreIcon(gfx::Canvas* canvas, const gfx::Rect& symbol_rect, const cc::PaintFlags& flags) { - const int separation = std::floor(2 * canvas->image_scale()); + const int separation = base::ClampFloor(2 * canvas->image_scale()); gfx::Rect icon_rect = symbol_rect; icon_rect.Inset(gfx::Insets::TLBR(separation, 0, 0, separation)); @@ -128,14 +128,11 @@ void Win11IconPainter::PaintRestoreIcon(gfx::Canvas* canvas, paint_flags.setAntiAlias(true); // Bottom left ("in front") rounded square. - const float bottom_rect_radius = 1 * canvas->image_scale(); + const float bottom_rect_radius = canvas->image_scale(); DrawRoundRect(canvas, icon_rect, bottom_rect_radius, flags); // Top right ("behind") top+right edges of rounded square (2.5x). icon_rect.Offset(separation, -separation); - // Apply inset to left+bottom edges since we don't draw arcs for those edges - constexpr int top_rect_inset = 1; - icon_rect.Inset(gfx::Insets::TLBR(0, top_rect_inset, top_rect_inset, 0)); const float top_rect_radius = 2.5f * canvas->image_scale(); DrawRoundRectEdges(canvas, icon_rect, top_rect_radius, flags); From 77bc03e051624987a5864e12791c33579aad0fdb Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 23:20:11 +0200 Subject: [PATCH 773/811] fix: on-screen-keyboard hides on input blurred in webview (#35982) * fix: on-screen-keyboard hides on input blurred in webview Co-authored-by: Kyrylo Hrechykhin * chore: update patches Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Kyrylo Hrechykhin Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- patches/chromium/.patches | 1 + ...board_hides_on_input_blur_in_webview.patch | 59 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index bd0340c00135a..5d4cdbaa54944 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -124,3 +124,4 @@ fix_the_gn_gen_for_components_segmentation_platform.patch fix_crash_loading_non-standard_schemes_in_iframes.patch create_browser_v8_snapshot_file_name_fuse.patch cherry-pick-c83640db21b5.patch +fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch new file mode 100644 index 0000000000000..f501a3b7786e3 --- /dev/null +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -0,0 +1,59 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Kyrylo Hrechykhin +Date: Thu, 6 Oct 2022 18:30:53 +0200 +Subject: fix: on-screen-keyboard hides on input blur in webview + +Changes introduced by this patch fix issue where OSK does not hide on +input rendered inside webview is blurred. This patch should be removed +when proper fix in chromium repo is available. + +Note: the issue still occurs if input rendered in webview blurred due +to touch outside of webview. It is caused by webview implementation +details. Specificaly due to webview has its own tree nodes and focused +node does not change in this case. + +chromium-bug: https://crbug.com/1369605 + +diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc +index 4e6d62be68d59c8a49159fda4d1e68f101a6f0a3..cfd5a01ea84a1f454a5172da3e96e66a50c82939 100644 +--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc ++++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc +@@ -992,6 +992,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( + return viz::ScopedSurfaceIdAllocator(std::move(allocation_task)); + } + ++void RenderWidgetHostViewChildFrame::FocusedNodeChanged( ++ bool is_editable_node, ++ const gfx::Rect& node_bounds_in_screen) { ++ NOTREACHED(); ++} ++ + ui::TextInputType RenderWidgetHostViewChildFrame::GetTextInputType() const { + if (!text_input_manager_) + return ui::TEXT_INPUT_TYPE_NONE; +diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h +index 70b151bcb8e3b1964d316bf2e169dbe0f28f24c7..c3857298974a0c2761efcd3924587607997e3117 100644 +--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h ++++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h +@@ -181,6 +181,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame + void DisableAutoResize(const gfx::Size& new_size) override; + viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties( + const cc::RenderFrameMetadata& metadata) override; ++ void FocusedNodeChanged(bool is_editable_node, ++ const gfx::Rect& node_bounds_in_screen) override; + + // RenderFrameMetadataProvider::Observer implementation. + void OnRenderFrameMetadataChangedBeforeActivation( +diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc +index 74993d461cbd0885a709cf8b663b9c69650aa3cf..940045d9bbb62676811f55f5d30a93a352f43ede 100644 +--- a/content/browser/web_contents/web_contents_impl.cc ++++ b/content/browser/web_contents/web_contents_impl.cc +@@ -7928,7 +7928,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( + "WebContentsImpl::OnFocusedElementChangedInFrame", + "render_frame_host", frame); + RenderWidgetHostViewBase* root_view = +- static_cast(GetRenderWidgetHostView()); ++ static_cast(GetTopLevelRenderWidgetHostView()); + if (!root_view || !frame->GetView()) + return; + // Convert to screen coordinates from window coordinates by adding the From fd520896359e0f4d70252ebefa43a24fc73db7d2 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:02:39 -0400 Subject: [PATCH 774/811] docs: remove references to Widevine (#35990) Co-authored-by: John Kleinschmidt Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- docs/README.md | 1 - docs/tutorial/testing-widevine-cdm.md | 95 --------------------------- 2 files changed, 96 deletions(-) delete mode 100644 docs/tutorial/testing-widevine-cdm.md diff --git a/docs/README.md b/docs/README.md index 40ae2be10c18c..57172020a87d6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -83,7 +83,6 @@ These individual tutorials expand on topics discussed in the guide above. * Electron Releases & Developer Feedback * [Versioning Policy](tutorial/electron-versioning.md) * [Release Timelines](tutorial/electron-timelines.md) -* [Testing Widevine CDM](tutorial/testing-widevine-cdm.md) --- diff --git a/docs/tutorial/testing-widevine-cdm.md b/docs/tutorial/testing-widevine-cdm.md deleted file mode 100644 index b2bcd7cde4a6f..0000000000000 --- a/docs/tutorial/testing-widevine-cdm.md +++ /dev/null @@ -1,95 +0,0 @@ -# Testing Widevine CDM - -In Electron you can use the Widevine CDM library shipped with Chrome browser. - -Widevine Content Decryption Modules (CDMs) are how streaming services protect -content using HTML5 video to web browsers without relying on an NPAPI plugin -like Flash or Silverlight. Widevine support is an alternative solution for -streaming services that currently rely on Silverlight for playback of -DRM-protected video content. It will allow websites to show DRM-protected video -content in Firefox without the use of NPAPI plugins. The Widevine CDM runs in an -open-source CDM sandbox providing better user security than NPAPI plugins. - -#### Note on VMP - -As of [`Electron v1.8.0 (Chrome v59)`](https://electronjs.org/releases#1.8.1), -the below steps are may only be some of the necessary steps to enable Widevine; -any app on or after that version intending to use the Widevine CDM may need to -be signed using a license obtained from [Widevine](https://www.widevine.com/) -itself. - -Per [Widevine](https://www.widevine.com/): - -> Chrome 59 (and later) includes support for Verified Media Path (VMP). VMP -> provides a method to verify the authenticity of a device platform. For browser -> deployments, this will provide an additional signal to determine if a -> browser-based implementation is reliable and secure. -> -> The proxy integration guide has been updated with information about VMP and -> how to issue licenses. -> -> Widevine recommends our browser-based integrations (vendors and browser-based -> applications) add support for VMP. - -To enable video playback with this new restriction, -[castLabs](https://castlabs.com/open-source/downstream/) has created a -[fork](https://github.com/castlabs/electron-releases) that has implemented the -necessary changes to enable Widevine to be played in an Electron application if -one has obtained the necessary licenses from widevine. - -## Getting the library - -Open `chrome://components/` in Chrome browser, find `Widevine Content Decryption Module` -and make sure it is up to date, then you can find the library files from the -application directory. - -### On Windows - -The library file `widevinecdm.dll` will be under -`Program Files(x86)/Google/Chrome/Application/CHROME_VERSION/WidevineCdm/_platform_specific/win_(x86|x64)/` -directory. - -### On macOS - -The library file `libwidevinecdm.dylib` will be under -`/Applications/Google Chrome.app/Contents/Versions/CHROME_VERSION/Google Chrome Framework.framework/Versions/A/Libraries/WidevineCdm/_platform_specific/mac_(x86|x64)/` -directory. - -**Note:** Make sure that chrome version used by Electron is greater than or -equal to the `min_chrome_version` value of Chrome's widevine cdm component. -The value can be found in `manifest.json` under `WidevineCdm` directory. - -## Using the library - -After getting the library files, you should pass the path to the file -with `--widevine-cdm-path` command line switch, and the library's version -with `--widevine-cdm-version` switch. The command line switches have to be -passed before the `ready` event of `app` module gets emitted. - -Example code: - -```javascript -const { app, BrowserWindow } = require('electron') - -// You have to pass the directory that contains widevine library here, it is -// * `libwidevinecdm.dylib` on macOS, -// * `widevinecdm.dll` on Windows. -app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevine_library') -// The version of plugin can be got from `chrome://components` page in Chrome. -app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.866') - -let win = null -app.whenReady().then(() => { - win = new BrowserWindow() - win.show() -}) -``` - -## Verifying Widevine CDM support - -To verify whether widevine works, you can use following ways: - -* Open https://shaka-player-demo.appspot.com/ and load a manifest that uses -`Widevine`. -* Open http://www.dash-player.com/demo/drm-test-area/, check whether the page -says `bitdash uses Widevine in your browser`, then play the video. From 595ed3e128a2585edcdf9732ee7c988cdc25aee9 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:05:10 -0400 Subject: [PATCH 775/811] fix: `webContents.printToPDF` option plumbing (#35992) fix: contents.printToPDF option plumbing Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- lib/browser/api/web-contents.ts | 14 +++++++------- shell/browser/api/electron_api_web_contents.cc | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 5b9131fcec003..1890bdb018509 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -173,13 +173,13 @@ WebContents.prototype.printToPDF = async function (options) { headerTemplate: '', footerTemplate: '', printBackground: false, - scale: 1, + scale: 1.0, paperWidth: 8.5, - paperHeight: 11, - marginTop: 0, - marginBottom: 0, - marginLeft: 0, - marginRight: 0, + paperHeight: 11.0, + marginTop: 0.0, + marginBottom: 0.0, + marginLeft: 0.0, + marginRight: 0.0, pageRanges: '', preferCSSPageSize: false }; @@ -209,7 +209,7 @@ WebContents.prototype.printToPDF = async function (options) { if (typeof options.scale !== 'number') { return Promise.reject(new Error('scale must be a Number')); } - printSettings.scaleFactor = options.scale; + printSettings.scale = options.scale; } const { pageSize } = options; diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index ec6a24301111c..e12bc087c693f 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2821,12 +2821,12 @@ v8::Local WebContents::PrintToPDF(const base::Value& settings) { settings.GetDict().FindBool("displayHeaderFooter"); auto print_background = settings.GetDict().FindBool("shouldPrintBackgrounds"); auto scale = settings.GetDict().FindDouble("scale"); - auto paper_width = settings.GetDict().FindInt("paperWidth"); - auto paper_height = settings.GetDict().FindInt("paperHeight"); - auto margin_top = settings.GetDict().FindIntByDottedPath("margins.top"); - auto margin_bottom = settings.GetDict().FindIntByDottedPath("margins.bottom"); - auto margin_left = settings.GetDict().FindIntByDottedPath("margins.left"); - auto margin_right = settings.GetDict().FindIntByDottedPath("margins.right"); + auto paper_width = settings.GetDict().FindDouble("paperWidth"); + auto paper_height = settings.GetDict().FindDouble("paperHeight"); + auto margin_top = settings.GetDict().FindDouble("marginTop"); + auto margin_bottom = settings.GetDict().FindDouble("marginBottom"); + auto margin_left = settings.GetDict().FindDouble("marginLeft"); + auto margin_right = settings.GetDict().FindDouble("marginRight"); auto page_ranges = *settings.GetDict().FindString("pageRanges"); auto header_template = *settings.GetDict().FindString("headerTemplate"); auto footer_template = *settings.GetDict().FindString("footerTemplate"); From 7727b7ecba4fc788c38dc67b0d2f133951ada4b3 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:15:33 -0400 Subject: [PATCH 776/811] fix: drag and drop should copy on macOS (#35977) fix: drag and drop should copy on macOS (#35963) Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- shell/browser/ui/drag_util_mac.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/browser/ui/drag_util_mac.mm b/shell/browser/ui/drag_util_mac.mm index 4c4649c6cb434..36656ea362941 100644 --- a/shell/browser/ui/drag_util_mac.mm +++ b/shell/browser/ui/drag_util_mac.mm @@ -20,7 +20,8 @@ @implementation DragDownloadItemSource - (NSDragOperation)draggingSession:(NSDraggingSession*)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { - return NSDragOperationEvery; + return context == NSDraggingContextOutsideApplication ? NSDragOperationCopy + : NSDragOperationEvery; } @end @@ -70,7 +71,7 @@ void DragFileItems(const std::vector& files, NSEvent* dragEvent = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDragged location:position - modifierFlags:NSEventMaskLeftMouseDragged + modifierFlags:0 timestamp:eventTime windowNumber:[[native_view window] windowNumber] context:nil From 16a3a456a6a7d8bf970ea2b86ba41ce6e09f095a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 08:31:33 -0700 Subject: [PATCH 777/811] Bump v21.1.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 03224ad202d22..c8c4861230ac9 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.1.0 \ No newline at end of file +21.1.1 \ No newline at end of file diff --git a/package.json b/package.json index 080de11515066..22967c2bb058a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.1.0", + "version": "21.1.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 27bdf75fe6fca..2d1bc47134c40 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 21,1,0,0 - PRODUCTVERSION 21,1,0,0 + FILEVERSION 21,1,1,0 + PRODUCTVERSION 21,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "21.1.0" + VALUE "FileVersion", "21.1.1" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "21.1.0" + VALUE "ProductVersion", "21.1.1" VALUE "SquirrelAwareVersion", "1" END END From 1cb0a98f6cc5aa19ea873e46e4aa6c4ae96f3e96 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 13:10:16 -0400 Subject: [PATCH 778/811] chore: bump chromium to 106.0.5249.119 (21-x-y) (#36001) chore: bump chromium in DEPS to 106.0.5249.119 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f4d934a16b53d..af2db8b965485 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '106.0.5249.103', + '106.0.5249.119', 'node_version': 'v16.16.0', 'nan_version': From 0874e61e4fb0121e9c54e3ddd677cdc6cfd7dbaf Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:00:29 -0400 Subject: [PATCH 779/811] build: fix building with enable_ppapi = false (#36006) Co-authored-by: Milan Burda Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda --- BUILD.gn | 11 ++++++++--- chromium_src/BUILD.gn | 16 +++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index e1a99dfadb4d9..6966cd3c5c9fd 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -404,9 +404,6 @@ source_set("electron_lib") { "//media/mojo/mojom", "//net:extras", "//net:net_resources", - "//ppapi/host", - "//ppapi/proxy", - "//ppapi/shared_impl", "//printing/buildflags", "//services/device/public/cpp/geolocation", "//services/device/public/cpp/hid", @@ -625,6 +622,14 @@ source_set("electron_lib") { ] } + if (enable_ppapi) { + deps += [ + "//ppapi/host", + "//ppapi/proxy", + "//ppapi/shared_impl", + ] + } + if (enable_run_as_node) { sources += [ "shell/app/node_main.cc", diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index c07fb721a8484..33e7b62541d72 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/ozone.gni") import("//build/config/ui.gni") import("//components/spellcheck/spellcheck_build_features.gni") import("//electron/buildflags/buildflags.gni") +import("//ppapi/buildflags/buildflags.gni") import("//printing/buildflags/buildflags.gni") import("//third_party/widevine/cdm/widevine.gni") @@ -372,15 +373,20 @@ source_set("plugins") { deps += [ "//components/strings", "//media:media_buildflags", - "//ppapi/buildflags", - "//ppapi/host", - "//ppapi/proxy", - "//ppapi/proxy:ipc", - "//ppapi/shared_impl", "//services/device/public/mojom", "//skia", "//storage/browser", ] + + if (enable_ppapi) { + deps += [ + "//ppapi/buildflags", + "//ppapi/host", + "//ppapi/proxy", + "//ppapi/proxy:ipc", + "//ppapi/shared_impl", + ] + } } # This source set is just so we don't have to depend on all of //chrome/browser From a86510b30cae0ff016a5ea95b314c5e5ad73f6bf Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 13 Oct 2022 17:06:06 -0400 Subject: [PATCH 780/811] fix: disable `nodeIntegrationInWorker` for certain Worker types (#36009) fix: disable nodeIntegrationInWorker for certain Worker types Co-authored-by: Shelley Vohr Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- docs/tutorial/multithreading.md | 2 + shell/renderer/electron_renderer_client.cc | 16 +++++- spec-main/chromium-spec.ts | 49 +++++++++++-------- spec/fixtures/pages/service-worker/empty.html | 0 .../pages/service-worker/worker-no-node.js | 6 +++ spec/fixtures/pages/shared_worker.html | 12 ----- 6 files changed, 51 insertions(+), 34 deletions(-) create mode 100644 spec/fixtures/pages/service-worker/empty.html create mode 100644 spec/fixtures/pages/service-worker/worker-no-node.js delete mode 100644 spec/fixtures/pages/shared_worker.html diff --git a/docs/tutorial/multithreading.md b/docs/tutorial/multithreading.md index 222db8337005e..d42350e2c73a3 100644 --- a/docs/tutorial/multithreading.md +++ b/docs/tutorial/multithreading.md @@ -20,6 +20,8 @@ const win = new BrowserWindow({ The `nodeIntegrationInWorker` can be used independent of `nodeIntegration`, but `sandbox` must not be set to `true`. +**Note:** This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies. + ## Available APIs All built-in modules of Node.js are supported in Web Workers, and `asar` diff --git a/shell/renderer/electron_renderer_client.cc b/shell/renderer/electron_renderer_client.cc index 24c5bc9f7613c..c3884cb6ba191 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -21,6 +21,7 @@ #include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/renderer/core/execution_context/execution_context.h" // nogncheck namespace electron { @@ -156,8 +157,15 @@ void ElectronRendererClient::WillReleaseScriptContext( void ElectronRendererClient::WorkerScriptReadyForEvaluationOnWorkerThread( v8::Local context) { - // TODO(loc): Note that this will not be correct for in-process child windows - // with webPreferences that have a different value for nodeIntegrationInWorker + // We do not create a Node.js environment in service or shared workers + // owing to an inability to customize sandbox policies in these workers + // given that they're run out-of-process. + auto* ec = blink::ExecutionContext::From(context); + if (ec->IsServiceWorkerGlobalScope() || ec->IsSharedWorkerGlobalScope()) + return; + + // This won't be correct for in-process child windows with webPreferences + // that have a different value for nodeIntegrationInWorker if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kNodeIntegrationInWorker)) { WebWorkerObserver::GetCurrent()->WorkerScriptReadyForEvaluation(context); @@ -166,6 +174,10 @@ void ElectronRendererClient::WorkerScriptReadyForEvaluationOnWorkerThread( void ElectronRendererClient::WillDestroyWorkerContextOnWorkerThread( v8::Local context) { + auto* ec = blink::ExecutionContext::From(context); + if (ec->IsServiceWorkerGlobalScope() || ec->IsSharedWorkerGlobalScope()) + return; + // TODO(loc): Note that this will not be correct for in-process child windows // with webPreferences that have a different value for nodeIntegrationInWorker if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 0427588893f64..75181a8ffda20 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -652,7 +652,7 @@ describe('chromium features', () => { w.loadFile(path.join(fixturesPath, 'pages', 'service-worker', 'custom-scheme-index.html')); }); - it('should not crash when nodeIntegration is enabled', (done) => { + it('should not allow nodeIntegrationInWorker', async () => { const w = new BrowserWindow({ show: false, webPreferences: { @@ -663,21 +663,19 @@ describe('chromium features', () => { } }); - w.webContents.on('ipc-message', (event, channel, message) => { - if (channel === 'reload') { - w.webContents.reload(); - } else if (channel === 'error') { - done(`unexpected error : ${message}`); - } else if (channel === 'response') { - expect(message).to.equal('Hello from serviceWorker!'); - session.fromPartition('sw-file-scheme-worker-spec').clearStorageData({ - storages: ['serviceworkers'] - }).then(() => done()); - } - }); + await w.loadURL(`file://${fixturesPath}/pages/service-worker/empty.html`); - w.webContents.on('crashed', () => done(new Error('WebContents crashed.'))); - w.loadFile(path.join(fixturesPath, 'pages', 'service-worker', 'index.html')); + const data = await w.webContents.executeJavaScript(` + navigator.serviceWorker.register('worker-no-node.js', { + scope: './' + }).then(() => navigator.serviceWorker.ready) + + new Promise((resolve) => { + navigator.serviceWorker.onmessage = event => resolve(event.data); + }); + `); + + expect(data).to.equal('undefined undefined undefined undefined'); }); }); @@ -789,11 +787,22 @@ describe('chromium features', () => { expect(data).to.equal('undefined undefined undefined undefined'); }); - it('has node integration with nodeIntegrationInWorker', async () => { - const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nodeIntegrationInWorker: true, contextIsolation: false } }); - w.loadURL(`file://${fixturesPath}/pages/shared_worker.html`); - const [, data] = await emittedOnce(ipcMain, 'worker-result'); - expect(data).to.equal('object function object function'); + it('does not have node integration with nodeIntegrationInWorker', async () => { + const w = new BrowserWindow({ + show: false, + webPreferences: { + nodeIntegration: true, + nodeIntegrationInWorker: true, + contextIsolation: false + } + }); + + await w.loadURL(`file://${fixturesPath}/pages/blank.html`); + const data = await w.webContents.executeJavaScript(` + const worker = new SharedWorker('../workers/shared_worker_node.js'); + new Promise((resolve) => { worker.port.onmessage = e => resolve(e.data); }) + `); + expect(data).to.equal('undefined undefined undefined undefined'); }); }); }); diff --git a/spec/fixtures/pages/service-worker/empty.html b/spec/fixtures/pages/service-worker/empty.html new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/spec/fixtures/pages/service-worker/worker-no-node.js b/spec/fixtures/pages/service-worker/worker-no-node.js new file mode 100644 index 0000000000000..e22b7ca012cd8 --- /dev/null +++ b/spec/fixtures/pages/service-worker/worker-no-node.js @@ -0,0 +1,6 @@ +self.clients.matchAll({ includeUncontrolled: true }).then((clients) => { + if (!clients?.length) return; + + const msg = [typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' '); + clients[0].postMessage(msg); +}); diff --git a/spec/fixtures/pages/shared_worker.html b/spec/fixtures/pages/shared_worker.html deleted file mode 100644 index 5bd409d857b93..0000000000000 --- a/spec/fixtures/pages/shared_worker.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - From 17d8889e4120948fc8ee6fc79dfc2dce82d6399a Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Sun, 16 Oct 2022 16:20:41 -0700 Subject: [PATCH 781/811] ci: use AppVeyor workflows (#36028) * ci: use AppVeyor workflows (#35377) * ci: use AppVeyor workflows * fixup for skipping test on pr jobs * ci: clean up appveyor.yml to match main Co-authored-by: John Kleinschmidt --- appveyor.yml | 456 +++++++++++++++++++++++++++++---------------------- 1 file changed, 262 insertions(+), 194 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b4593261bde6b..574e5edf0419b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,213 +34,281 @@ environment: MOCHA_REPORTER: mocha-multi-reporters MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap GOMA_FALLBACK_ON_AUTH_FAILURE: true -build_script: - - ps: >- - if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { - Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild - } else { - node script/yarn.js install --frozen-lockfile - $result = node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH - Write-Output $result - if ($result.ExitCode -eq 0) { - Write-warning "Skipping build for doc only change"; Exit-AppveyorBuild + matrix: + + - job_name: Build + + - job_name: Test + job_depends_on: Build + +clone_folder: C:\projects\src\electron + +# the first failed job cancels other jobs and fails entire build +matrix: + fast_finish: true + +for: + + - + matrix: + only: + - job_name: Build + + init: + - ps: >- + if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { + Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild } - } - - echo "Building $env:GN_CONFIG build" - - git config --global core.longpaths true - - cd .. - - 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) + + build_script: + - ps: | + node script/yarn.js install --frozen-lockfile + node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH + if ($LASTEXITCODE -eq 0) { + Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild + } + $global:LASTEXITCODE = 0 + - cd .. + - ps: Write-Host "Building $env:GN_CONFIG build" + - git config --global core.longpaths true + - update_depot_tools.bat + - 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 } - } - - ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools" - - ps: >- - if ($env:GN_CONFIG -ne 'release') { - $env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " - } - - >- - gclient config - --name "src\electron" - --unmanaged - %GCLIENT_EXTRA_ARGS% - "https://github.com/electron/electron" - - ps: >- - if ($env:GN_CONFIG -eq 'release') { - $env:RUN_GCLIENT_SYNC="true" - } else { - cd src\electron - node script\generate-deps-hash.js - $depshash = Get-Content .\.depshash -Raw - $zipfile = "Z:\$depshash.7z" - cd ..\.. - if (Test-Path -Path $zipfile) { - # file exists, unzip and then gclient sync - 7z x -y $zipfile -mmt=30 -aoa - if (-not (Test-Path -Path "src\buildtools")) { - # the zip file must be corrupt - resync + - 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') { + $env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " + } + - >- + gclient config + --name "src\electron" + --unmanaged + %GCLIENT_EXTRA_ARGS% + "https://github.com/electron/electron" + - ps: >- + if ($env:GN_CONFIG -eq 'release') { + $env:RUN_GCLIENT_SYNC="true" + } else { + cd src\electron + node script\generate-deps-hash.js + $depshash = Get-Content .\.depshash -Raw + $zipfile = "Z:\$depshash.7z" + cd ..\.. + if (Test-Path -Path $zipfile) { + # file exists, unzip and then gclient sync + 7z x -y $zipfile -mmt=14 -aoa + if (-not (Test-Path -Path "src\buildtools")) { + # the zip file must be corrupt - resync + $env:RUN_GCLIENT_SYNC="true" + if ($env:TARGET_ARCH -ne 'ia32') { + # only save on x64/woa to avoid contention saving + $env:SAVE_GCLIENT_SRC="true" + } + } else { + # update angle + cd src\third_party\angle + git remote set-url origin https://chromium.googlesource.com/angle/angle.git + git fetch + cd ..\..\.. + } + } else { + # file does not exist, gclient sync, then zip $env:RUN_GCLIENT_SYNC="true" if ($env:TARGET_ARCH -ne 'ia32') { # only save on x64/woa to avoid contention saving $env:SAVE_GCLIENT_SRC="true" } - } else { - # update angle - cd src\third_party\angle - git remote set-url origin https://chromium.googlesource.com/angle/angle.git - git fetch - cd ..\..\.. } - } else { - # file does not exist, gclient sync, then zip - $env:RUN_GCLIENT_SYNC="true" - if ($env:TARGET_ARCH -ne 'ia32') { - # only save on x64/woa to avoid contention saving - $env:SAVE_GCLIENT_SRC="true" + } + - if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync ) + - ps: >- + if ($env:SAVE_GCLIENT_SRC -eq 'true') { + # archive current source for future use + # only run on x64/woa to avoid contention saving + $(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30) + if ($LASTEXITCODE -ne 0) { + Write-warning "Could not save source to shared drive; continuing anyway" + } + # build time generation of file gen/angle/angle_commit.h depends on + # third_party/angle/.git + # https://chromium-review.googlesource.com/c/angle/angle/+/2074924 + $(7z a $zipfile src\third_party\angle\.git) + if ($LASTEXITCODE -ne 0) { + Write-warning "Failed to add third_party\angle\.git; continuing anyway" + } + # build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD + # https://dawn-review.googlesource.com/c/dawn/+/83901 + $(7z a $zipfile src\third_party\dawn\.git) + if ($LASTEXITCODE -ne 0) { + Write-warning "Failed to add third_party\dawn\.git; continuing anyway" + } + } + - 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% " + - gn check out/Default //electron:electron_lib + - gn check out/Default //electron:electron_app + - gn check out/Default //electron/shell/common/api:mojo + - if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app) + - if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default ) + - gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%" + - ninja -C out/ffmpeg electron:electron_ffmpeg_zip + - ninja -C out/Default electron:electron_dist_zip + - ninja -C out/Default shell_browser_ui_unittests + - gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args + - ninja -C out/Default electron:electron_mksnapshot_zip + - cd out\Default + - 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S + - cd ..\.. + - ninja -C out/Default electron:hunspell_dictionaries_zip + - ninja -C out/Default electron:electron_chromedriver_zip + - ninja -C out/Default third_party/electron_node:headers + - python %LOCAL_GOMA_DIR%\goma_ctl.py stat + - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json + - 7z a node_headers.zip out\Default\gen\node_headers + - 7z a builtins-pgo.zip v8\tools\builtins-pgo + - ps: >- + if ($env:GN_CONFIG -eq 'release') { + # Needed for msdia140.dll on 64-bit windows + $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" + ninja -C out/Default electron:electron_symbols + } + - ps: >- + if ($env:GN_CONFIG -eq 'release') { + python electron\script\zip-symbols.py + appveyor-retry appveyor PushArtifact out/Default/symbols.zip + } else { + # It's useful to have pdb files when debugging testing builds that are + # built on CI. + 7z a pdb.zip out\Default\*.pdb + } + - python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest + + deploy_script: + - cd electron + - ps: >- + if (Test-Path Env:\ELECTRON_RELEASE) { + if (Test-Path Env:\UPLOAD_TO_STORAGE) { + Write-Output "Uploading Electron release distribution to azure" + & python script\release\uploaders\upload.py --verbose --upload_to_storage + } else { + Write-Output "Uploading Electron release distribution to github releases" + & python script\release\uploaders\upload.py --verbose + } + } elseif (Test-Path Env:\TEST_WOA) { + node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH } + on_finish: + # Uncomment this lines to enable RDP + #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + - cd C:\projects\src + - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) + - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) + - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe) + - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip) + - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip) + - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip) + - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip) + - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip) + - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib) + - if exist builtins-pgo.zip (appveyor-retry appveyor PushArtifact builtins-pgo.zip) + - ps: >- + if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) { + appveyor-retry appveyor PushArtifact pdb.zip + } + + - + matrix: + only: + - job_name: Test + + init: + - ps: | + if ($env:RUN_TESTS -ne 'true') { + Write-warning "Skipping tests for $env:APPVEYOR_PROJECT_NAME"; Exit-AppveyorBuild } - } - - if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync ) - - ps: >- - if ($env:SAVE_GCLIENT_SRC -eq 'true') { - # archive current source for future use - # only run on x64/woa to avoid contention saving - $(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30) - if ($LASTEXITCODE -ne 0) { - Write-warning "Could not save source to shared drive; continuing anyway" + if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { + Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild } - # build time generation of file gen/angle/angle_commit.h depends on - # third_party/angle/.git - # https://chromium-review.googlesource.com/c/angle/angle/+/2074924 - $(7z a $zipfile src\third_party\angle\.git) - if ($LASTEXITCODE -ne 0) { - Write-warning "Failed to add third_party\angle\.git; continuing anyway" + build_script: + - ps: | + node script/yarn.js install --frozen-lockfile + node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH + if ($LASTEXITCODE -eq 0) { + Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild } - # build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD - # https://dawn-review.googlesource.com/c/dawn/+/83901 - $(7z a $zipfile src\third_party\dawn\.git) - if ($LASTEXITCODE -ne 0) { - Write-warning "Failed to add third_party\dawn\.git; continuing anyway" + $global:LASTEXITCODE = 0 + - ps: | + cd .. + mkdir out\Default + cd .. + # Download build artifacts + $apiUrl = 'https://ci.appveyor.com/api' + $build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID" + $artifacts_to_download = @('dist.zip','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','builtins-pgo.zip') + foreach ($job in $build_info.build.jobs) { + if ($job.name -eq "Build") { + $jobId = $job.jobId + foreach($artifact_name in $artifacts_to_download) { + if ($artifact_name -eq 'shell_browser_ui_unittests.exe' -Or $artifact_name -eq 'electron.lib') { + $outfile = "src\out\Default\$artifact_name" + } else { + $outfile = $artifact_name + } + Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile + } + } } - } - - 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% " - - gn check out/Default //electron:electron_lib - - gn check out/Default //electron:electron_app - - gn check out/Default //electron/shell/common/api:mojo - - if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app) - - if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default ) - - gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%" - - ninja -C out/ffmpeg electron:electron_ffmpeg_zip - - ninja -C out/Default electron:electron_dist_zip - - ninja -C out/Default shell_browser_ui_unittests - - gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args - - ninja -C out/Default electron:electron_mksnapshot_zip - - cd out\Default - - 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S - - cd ..\.. - - ninja -C out/Default electron:hunspell_dictionaries_zip - - ninja -C out/Default electron:electron_chromedriver_zip - - ninja -C out/Default third_party/electron_node:headers - - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - - 7z a node_headers.zip out\Default\gen\node_headers - - ps: >- - if ($env:GN_CONFIG -eq 'release') { - # Needed for msdia140.dll on 64-bit windows - $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin" - ninja -C out/Default electron:electron_symbols - } - - ps: >- - if ($env:GN_CONFIG -eq 'release') { - python electron\script\zip-symbols.py - appveyor-retry appveyor PushArtifact out/Default/symbols.zip - } else { - # It's useful to have pdb files when debugging testing builds that are - # built on CI. - 7z a pdb.zip out\Default\*.pdb - } - - python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest -test_script: - # Workaround for https://github.com/appveyor/ci/issues/2420 - - set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core" - - ps: >- - if ((-Not (Test-Path Env:\TEST_WOA)) -And (-Not (Test-Path Env:\ELECTRON_RELEASE)) -And ($env:GN_CONFIG -in "testing", "release")) { - $env:RUN_TESTS="true" - } - - ps: >- - if ($env:RUN_TESTS -eq 'true') { - New-Item .\out\Default\gen\node_headers\Release -Type directory - Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib - } else { - echo "Skipping tests for $env:GN_CONFIG build" - } - - cd electron - - 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 ) - - if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeparately --enable-logging=file --log-file=%cd%\electron.log ) - - 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 ) - - 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" - - if "%RUN_TESTS%"=="true" ( echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd% ) - - 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" -deploy_script: - - cd electron - - ps: >- - if (Test-Path Env:\ELECTRON_RELEASE) { - if (Test-Path Env:\UPLOAD_TO_STORAGE) { - Write-Output "Uploading Electron release distribution to azure" - & python script\release\uploaders\upload.py --verbose --upload_to_storage - } else { - Write-Output "Uploading Electron release distribution to github releases" - & python script\release\uploaders\upload.py --verbose + - ps: | + $out_default_zips = @('dist.zip','chromedriver.zip','mksnapshot.zip') + foreach($zip_name in $out_default_zips) { + 7z x -y -osrc\out\Default $zip_name } - } elseif (Test-Path Env:\TEST_WOA) { - node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH - } -on_finish: - # Uncomment this lines to enable RDP - #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - - cd .. - - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json ) - - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip) - - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe) - - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip) - - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip) - - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip) - - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip) - - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip) - - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib) - - ps: >- - if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) { - appveyor-retry appveyor PushArtifact pdb.zip - } + - ps: 7z x -y -osrc\out\ffmpeg ffmpeg.zip + - ps: 7z x -y -osrc node_headers.zip + - ps: 7z x -y -osrc builtins-pgo.zip - - if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log ) + test_script: + # Workaround for https://github.com/appveyor/ci/issues/2420 + - set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core" + - ps: | + cd src + New-Item .\out\Default\gen\node_headers\Release -Type directory + Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib + - cd electron + - echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log + - echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log + - cd .. + - 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" + - echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd% + - echo "Done verifying mksnapshot" + - echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% + - echo "Done verifying chromedriver" + + on_finish: + - if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log ) \ No newline at end of file From cef7f6f99b21a497bbb2b149d17a79831beb9dde Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 15:25:54 +0900 Subject: [PATCH 782/811] test: re-enable power monitor tests on arm64 (#36022) test: re-enable powermonitor on arm64 Co-authored-by: John Kleinschmidt Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- spec-main/api-power-monitor-spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec-main/api-power-monitor-spec.ts b/spec-main/api-power-monitor-spec.ts index c1f55fc5606ae..1867e8f97b0e3 100644 --- a/spec-main/api-power-monitor-spec.ts +++ b/spec-main/api-power-monitor-spec.ts @@ -14,8 +14,7 @@ import { promisify } from 'util'; describe('powerMonitor', () => { let logindMock: any, dbusMockPowerMonitor: any, getCalls: any, emitSignal: any, reset: any; - // TODO(deepak1556): Enable on arm64 after upgrade, it crashes at the moment. - ifdescribe(process.platform === 'linux' && process.arch !== 'arm64' && process.env.DBUS_SYSTEM_BUS_ADDRESS != null)('when powerMonitor module is loaded with dbus mock', () => { + ifdescribe(process.platform === 'linux' && process.env.DBUS_SYSTEM_BUS_ADDRESS != null)('when powerMonitor module is loaded with dbus mock', () => { before(async () => { const systemBus = dbus.systemBus(); const loginService = systemBus.getService('org.freedesktop.login1'); From 8dcdf5c26ddd7c0f0373571b3ff82a23d6265777 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 09:51:15 +0200 Subject: [PATCH 783/811] fix: remove extra dot in extension (#36027) * fix: remove extra period of extension Co-authored-by: mlaurencin * update comment Co-authored-by: mlaurencin Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: mlaurencin Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com> --- shell/browser/electron_download_manager_delegate.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index e2a0c8896c547..88fcc373c3383 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -99,14 +99,14 @@ bool GetRegistryDescriptionFromExtension(const std::string& file_ext, // Set up a filter for a Save/Open dialog, |ext_desc| as the text descriptions // of the |file_ext| types (optional), and (optionally) the default 'All Files' // view. The purpose of the filter is to show only files of a particular type in -// a Windows Save/Open dialog box. The resulting filter is returned. The filter +// a Windows Save/Open dialog box. The resulting filter is returned. The filters // created here are: // 1. only files that have 'file_ext' as their extension // 2. all files (only added if 'include_all_files' is true) // If a description is not provided for a file extension, it will be retrieved // from the registry. If the file extension does not exist in the registry, a // default description will be created (e.g. "qqq" yields "QQQ File"). -// Copied from ui/shell_dialogs/select_file_dialog_win.cc +// Modified from ui/shell_dialogs/select_file_dialog_win.cc file_dialog::Filters FormatFilterForExtensions( const std::vector& file_ext, const std::vector& ext_desc, @@ -168,6 +168,10 @@ file_dialog::Filters FormatFilterForExtensions( base::ReplaceChars(desc, "*", base::StringPiece(), &desc); } + // Remove the preceeding '.' character from the extension. + size_t ext_index = ext.find_first_not_of('.'); + if (ext_index != std::string::npos) + ext = ext.substr(ext_index); result.push_back({desc, {ext}}); } From 27944d805bc2efbee409150607eda61511bd22f4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:35:26 +0200 Subject: [PATCH 784/811] fix: override app's desktop name and v8 flags in default-app (#36050) Co-authored-by: Piroro-hs Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Piroro-hs --- default_app/main.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/default_app/main.ts b/default_app/main.ts index f2834624f7430..7defe97f3ecf3 100644 --- a/default_app/main.ts +++ b/default_app/main.ts @@ -83,7 +83,7 @@ function loadApplicationPackage (packagePath: string) { }); try { - // Override app name and version. + // Override app's package.json data. packagePath = path.resolve(packagePath); const packageJsonPath = path.join(packagePath, 'package.json'); let appPath; @@ -104,6 +104,16 @@ function loadApplicationPackage (packagePath: string) { } else if (packageJson.name) { app.name = packageJson.name; } + if (packageJson.desktopName) { + app.setDesktopName(packageJson.desktopName); + } else { + app.setDesktopName(`${app.name}.desktop`); + } + // Set v8 flags, deliberately lazy load so that apps that do not use this + // feature do not pay the price + if (packageJson.v8Flags) { + require('v8').setFlagsFromString(packageJson.v8Flags); + } appPath = packagePath; } From de9889e78ab0a55dc7504517c82934b63df9e194 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 14:17:48 -0400 Subject: [PATCH 785/811] docs: update VS Code debugger types to remove "pwa-" prefix (#36053) Co-authored-by: David Sanders Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders --- docs/tutorial/tutorial-2-first-app.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/tutorial-2-first-app.md b/docs/tutorial/tutorial-2-first-app.md index 75d94d618e014..072cb5a843430 100644 --- a/docs/tutorial/tutorial-2-first-app.md +++ b/docs/tutorial/tutorial-2-first-app.md @@ -369,12 +369,12 @@ run. Create a launch.json configuration in a new `.vscode` folder in your projec "name": "Renderer", "port": 9222, "request": "attach", - "type": "pwa-chrome", + "type": "chrome", "webRoot": "${workspaceFolder}" }, { "name": "Main", - "type": "pwa-node", + "type": "node", "request": "launch", "cwd": "${workspaceFolder}", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", @@ -398,11 +398,11 @@ What we have done in the `launch.json` file is to create 3 configurations: - `Main` is used to start the main process and also expose port 9222 for remote debugging (`--remote-debugging-port=9222`). This is the port that we will use to attach the debugger for the `Renderer`. Because the main process is a Node.js process, the type is set to - `pwa-node` (`pwa-` is the prefix that tells VS Code to use the latest JavaScript debugger). + `node`. - `Renderer` is used to debug the renderer process. Because the main process is the one that creates the process, we have to "attach" to it (`"request": "attach"`) instead of creating a new one. - The renderer process is a web one, so the debugger we have to use is `pwa-chrome`. + The renderer process is a web one, so the debugger we have to use is `chrome`. - `Main + renderer` is a [compound task] that executes the previous ones simultaneously. :::caution From c8c335874a89736127f41fcd147ce61e1a1f2a3f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 08:31:10 -0700 Subject: [PATCH 786/811] Bump v21.2.0 --- 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 c8c4861230ac9..ab3add4d87bc7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -21.1.1 \ No newline at end of file +21.2.0 \ No newline at end of file diff --git a/package.json b/package.json index 22967c2bb058a..3a5ba0eaadaad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "21.1.1", + "version": "21.2.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 2d1bc47134c40..55164305f4d69 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 21,1,1,0 - PRODUCTVERSION 21,1,1,0 + FILEVERSION 21,2,0,0 + PRODUCTVERSION 21,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "21.1.1" + VALUE "FileVersion", "21.2.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "21.1.1" + VALUE "ProductVersion", "21.2.0" VALUE "SquirrelAwareVersion", "1" END END From 55f4a1dcbd82fc5b62af5639f46a475eff3b850a Mon Sep 17 00:00:00 2001 From: blm Date: Mon, 24 Oct 2022 19:34:40 -0400 Subject: [PATCH 787/811] copied electronite files from older version. --- .../Electronite/ElectroniteBuildNotes.md | 45 + .../ElectroniteCurrentVersionBuildNotes.md | 85 + .../Electronite/LinuxBuildNotes.md | 177 + .../Electronite/LinuxBuildNotesChromeTools.md | 37 + docs/development/Electronite/MacBuildNotes.md | 123 + .../Electronite/MacBuildNotesChromeTools.md | 37 + .../Electronite/WindowsBuildNotes.md | 168 + .../WindowsBuildNotesChromeTools.md | 37 + docs/development/Electronite/electron.d.ts | 18122 ++++++++++++++++ .../Electronite/electronite-tools.bat | 148 + .../Electronite/electronite-tools.sh | 130 + .../development/Electronite/electronite.patch | 288 + docs/development/Electronite/step.bat | 155 + docs/development/Electronite/step.sh | 133 + patches/chromium/add_graphite.patch | 217 + 15 files changed, 19902 insertions(+) create mode 100644 docs/development/Electronite/ElectroniteBuildNotes.md create mode 100644 docs/development/Electronite/ElectroniteCurrentVersionBuildNotes.md create mode 100644 docs/development/Electronite/LinuxBuildNotes.md create mode 100644 docs/development/Electronite/LinuxBuildNotesChromeTools.md create mode 100644 docs/development/Electronite/MacBuildNotes.md create mode 100644 docs/development/Electronite/MacBuildNotesChromeTools.md create mode 100644 docs/development/Electronite/WindowsBuildNotes.md create mode 100644 docs/development/Electronite/WindowsBuildNotesChromeTools.md create mode 100644 docs/development/Electronite/electron.d.ts create mode 100755 docs/development/Electronite/electronite-tools.bat create mode 100755 docs/development/Electronite/electronite-tools.sh create mode 100644 docs/development/Electronite/electronite.patch create mode 100755 docs/development/Electronite/step.bat create mode 100755 docs/development/Electronite/step.sh create mode 100644 patches/chromium/add_graphite.patch diff --git a/docs/development/Electronite/ElectroniteBuildNotes.md b/docs/development/Electronite/ElectroniteBuildNotes.md new file mode 100644 index 0000000000000..8081c88273f3e --- /dev/null +++ b/docs/development/Electronite/ElectroniteBuildNotes.md @@ -0,0 +1,45 @@ +# Electronite Build Notes + +Electronite is a version of Electron that is patched to support rendering [graphite](https://github.com/silnrsi/graphite) enabled fonts. + +Based on wiki notes for `electronite-v12.0.5` from: https://github.com/unfoldingWord/electronite/wiki + +# Updating + +When updating the code, the standard is to create new branches like `electronite-v12.0.5`. These eventually get pushed up to the server and tagged for the release. + +## Graphite + +For minor graphite updates you can simply change the version of graphite needed in `/DEPS`. + +For example, this updates graphite from [1.3.13](https://github.com/silnrsi/graphite/releases/tag/1.3.13) to [1.3.14](https://github.com/silnrsi/graphite/releases/tag/1.3.14). +```diff +-'graphite_version': 'b45f9b271214b95f3b42e5c9863eae4b0bfb7fd7', ++'graphite_version': '92f59dcc52f73ce747f1cdc831579ed2546884aa', +``` + +If there are larger changes to the graphite API you may need to do some patching in the Electron code see [[Graphite Patch]]. + +## Patching Electron + +The simplest way to update Electronite is to pull down the branch from upstream and re-apply the [[Graphite Patch]]. This avoids merge conflicts and an ugly commit history. + +Updating Electronite is pretty straight forward. +1. Get the version of Electron that you want to update to, e.g. `git checkout upstream v12.0.5`. +2. Branch from Electron `git checkout -b electronite-12.0.5` +3. Apply the [Graphite Patch](https://github.com/unfoldingWord/electronite/wiki/Graphite-Patch) `git am add-graphite-to-electron.patch` (you might need to manually apply it if there are conflicting changes from upstream). +4. Build and test the Electronite branch (see below). +5. If everything is working properly, push the branch and tag the release using the proper naming convention, and create a new release based on your new tag with the compiled binaries attached to it. +6. Upload a patched version of `electron.d.ts` to the release as well for easy reference. See https://github.com/unfoldingWord-dev/electronite-cli/blob/master/README.md#development for details. + +# Building + +[Build Notes](ElectroniteCurrentVersionBuildNotes.md) + +# Other Electronite Steps + +Will need to update and publish these packages: +- https://github.com/unfoldingWord-dev/electronite-cli + - look at the README.md +- https://github.com/unfoldingWord-box3/electronite-packager + - this doesn't have notes yet - for now just merged in master branch from Electron to update version to latest `15.4.0` diff --git a/docs/development/Electronite/ElectroniteCurrentVersionBuildNotes.md b/docs/development/Electronite/ElectroniteCurrentVersionBuildNotes.md new file mode 100644 index 0000000000000..e65ddab30cbe8 --- /dev/null +++ b/docs/development/Electronite/ElectroniteCurrentVersionBuildNotes.md @@ -0,0 +1,85 @@ +# Electronite Build Notes + +Electronite is a version of Electron that is patched to support rendering [graphite](https://github.com/silnrsi/graphite) enabled fonts. + +Based on wiki notes for `electronite-v12.0.5` from: https://github.com/unfoldingWord/electronite/wiki + +# Building + +- [Windows build notes](WindowsBuildNotes.md) +- [MacOS build notes](MacBuildNotes.md) +- [Linux build notes](LinuxBuildNotes.md) + +Running the scripts without arguments will display the following commands which you will generally want to execute in order: +1. `get ` fetches all of the code. Where `` is a branch or tag. +2. `build [target]` compiles Electronite for target (default is x64) +3. `release [target]` creates the distributable (default is x64) + +Also, you'll want to build code from a properly tagged release because [other tooling](https://github.com/topics/electronite) expects a specific naming convention. +When tagging a new release of Electronite use the same naming convention as Electron with the addition of a `-graphite` suffix. For example if Electron has a `v7.2.3` release, Electronite will have a corresponding `v7.2.3-graphite` release. + +> Note: When building Electronite you will need to download about 20 gb of source code. + +After running the above commands you will have a zipped file at `./electron-gn/src/out/Release/dist.zip`. You can rename this file and upload it as an artifact to the proper release on Github. Here's the naming convention: + +* `electronite--win32-x64.zip` +* `electronite--win32-ia32.zip` +* `electronite--linux-x64.zip` +* `electronite--darwin-x64.zip` + +Where `` is the tagged release without the `-graphite` suffix. e.g. `electronite-v7.2.3-linux-x64.zip` + +> You must compile Electronite on a Linux, Windows, and macOS in order to generate the three distributables above. +> Cross compilation for different OS is not possible. + +## Troubleshooting + +#### Delete cached repository +If you encounter errors while fetching the source code (this includes chromium) you may need to delete one of the cached repositories, or a lock file. Look through the console output to identify the repository that was being fetched when the download failed. Delete the identified repository from your `.git_cache` and also delete any `.lock` files. Re-run the download and it should succeed. + +#### Disable your VPN +This problem has only been seen on some Linux systems. +It is necessary to disable any active VPNs on the computer in order to successfully download the source code. If you do not, you may get errors about not being able to reach one of the source code servers. If this occurs, delete the affected cached repository if any and try again after turning off your VPN. + +#### Select Xcode build tools + +If you get an error like the following: +``` +xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance +``` + +You need to select the Xcode application +``` +sudo xcode-select -s /Applications/Xcode.app/Contents/Developer +``` + +## Help! + +Check out this [Electronite playlist](https://www.youtube.com/playlist?list=PLf7IRQ2kP73kmC8y8gLQoHs4I26LzrRrq) on YouTube if you need some help using the scripts. + +# Testing + +Once you have a compiled Electronite binary you can test it by visiting this page https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_fontdemo. + +* Run Electronite +* Open the developer console in the running Electronite instance. +* execute `window.location="the test url above"` +* Ensure all the tests pass by visually inspecting the rendered fonts and comparing against the image samples on the site. + +## Troubleshooting + +Some font elements need to be enabled via css flags, and these flags are specific to each browser. +On the test page mentioned above, the padauk font uses a Mozilla specific css flag, but since Electronite is based on chromium those don't work. Therefore, it is necessary to tweak the css a little. + + +```diff +.padauk_ttf { + font-family: PadaukT, sans-serif; + font-size: 150%; +- -moz-font-feature-settings: "wtri=1"; +- -moz-font-feature-settings: "wtri" 1; ++ font-feature-settings: "wtri" 1; +} +``` + +See [this issue](https://github.com/unfoldingWord/translationCore/issues/6879#issuecomment-624429380) for a detailed explaination. \ No newline at end of file diff --git a/docs/development/Electronite/LinuxBuildNotes.md b/docs/development/Electronite/LinuxBuildNotes.md new file mode 100644 index 0000000000000..4284871af36a6 --- /dev/null +++ b/docs/development/Electronite/LinuxBuildNotes.md @@ -0,0 +1,177 @@ +## Building Electronite on Linux +### Setup on Clean Linux VM +- Configured my VM using these notes as a reference: [build-instructions-linux](../build-instructions-linux.md) +- Make sure the VM has a lot of disk space - I ran out of disk space with 60GB of storage configured. Rather than starting over with a new VM. I added a second Virtual Hard Drive with 100GB and then used that drive for the builds. +- if you have trouble building with these notes, you could try the older Chromium Build tools: [LinuxBuildNotesChromeTools](LinuxBuildNotesChromeTools.md) +- if you get warning that you need to upgrade to newer g++, here's an example of how to upgrade to g++ 10: +``` +sudo apt install build-essential +sudo apt -y install g++-10 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 +g++ --version +``` +- to create `arm64` and `arm` builds, you must have installed the arm dependencies mentioned in the Linux build instructions above. Then run: +- install and configure python: +``` +sudo apt install python python3.9 +pip3 install --user --upgrade pip +pip3 install --user pyobjc +``` + +- installed electron build-tools (https://github.com/electron/build-tools): +``` +npm i -g @electron/build-tools +``` +- if e commands don’t work, try this and then initialization seemed to work: +``` +git clone https://github.com/electron/build-tools ~/.electron_build_tools && (cd ~/.electron_build_tools && npm install) +``` + +#### Monitoring Goma status +- if you browse to http://localhost:8088 on your local machine you can monitor compile jobs as they flow through the goma system. + + +### Build Electronite +#### Build x64 +- open terminal and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +e init --root=~/Develop/Electronite-Build -o x64 x64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~/.electron_build_tools/configs/evm.x64.json` + and add option to args: `"target_cpu = \"x64\""` +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd ~/Develop/Electronite-Build/src/electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ../.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +export NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Test the build. + - Do `e start`. + - Open the developer console by typing`Control-Shift-I`. + - in console execute `window.location="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_fontdemo"` + - Ensure all the tests pass by visually inspecting the rendered fonts and comparing against the image samples on the site. + - The example for Padauk from server will not be correct with the triangles. So need to: + Open elements tab, select body of html, do Control-F to search, and search for `padauk_ttf`, and apply attribute `font-feature-settings: "wtri" 1;`. The triangles should now be rendered correctly. + +- Make the release to ~/Develop/Electronite-Build/src/out/x64/dist.zip +``` +./src/electron/script/strip-binaries.py -d src/out/x64 +e build electron:dist +``` + +#### Build x86 +- open terminal and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +sudo apt-get install ia32-libs-gtk ia32-libs +e init --root=~/Develop/Electronite-Build -o x86 x86 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~/.electron_build_tools/configs/evm.x86.json` + and add option to args: `"target_cpu = \"x86\""` + +- if Electronite source already checked out, then skip to `Build Init` step: + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd ~/Develop/Electronite-Build/src/electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ../.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Build Init: to create `x86` builds, you must have installed the x86 dependencies mentioned in the Linux build instructions above. Then run: +``` +cd ./src +build/linux/sysroot_scripts/install-sysroot.py --arch=x86 +cd .. +``` + +- Do build (takes a long time) +``` +export NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Make the release to ~/Develop/Electronite-Build/src/out/x86/dist.zip +``` +./src/electron/script/strip-binaries.py --target-cpu=x86 -d src/out/x86 +e build electron:dist +``` + +#### Build Arm64 +- open terminal and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +sudo apt-get install binutils-aarch64-linux-gnu +e init --root=~/Develop/Electronite-Build -o arm64 arm64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~/.electron_build_tools/configs/evm.arm64.json` + and add option to args: `"target_cpu = \"arm64\""` + +- if Electronite source already checked out, then skip to `Build Init` step: + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd ~/Develop/Electronite-Build/src/electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ../.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Build Init: to create `arm64` builds, you must have installed the arm64 dependencies mentioned in the Linux build instructions above. Then run: +``` +cd ./src +build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 +cd .. +``` + +- Do build (takes a long time) +``` +export NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Make the release to ~/Develop/Electronite-Build/src/out/arm64/dist.zip +``` +./src/electron/script/strip-binaries.py --target-cpu=arm64 -d src/out/arm64 +e build electron:dist +``` diff --git a/docs/development/Electronite/LinuxBuildNotesChromeTools.md b/docs/development/Electronite/LinuxBuildNotesChromeTools.md new file mode 100644 index 0000000000000..ad4847d8a560d --- /dev/null +++ b/docs/development/Electronite/LinuxBuildNotesChromeTools.md @@ -0,0 +1,37 @@ +## Building Electronite on Linux +### Setup on Linux VM +- Configured my VM using these notes as a reference: [build-instructions-linux](../build-instructions-linux.md){ +- Make sure the VM has a lot of disk space - I ran out of disk space with 60GB of storage configured. Rather than starting over with a new VM. I added a second Virtual Hard Drive with 100GB and then used that drive for the builds. + +### Build Electronite +- open terminal and cd to the folder you will use for build +- install the depot_tools here: `git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git` +- download build script to this folder from: [electronite-tools](electronite-tools.sh) +- set execute permission on script: `chmod +x ./electronite-tools.sh` +- before build do: `export PATH=/path/to/depot_tools:$PATH` +- get source files (this can take several hours the first time as the git cache is loaded): `./electronite-tools.sh get <>` +- to create `arm64` builds, you must have installed the arm64 dependencies mentioned in the Linux build instructions above. After doing `e sync` run: +``` +cd electron-gn/src +build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 +cd ../.. +``` +- to create `arm` builds, you must have installed the arm dependencies mentioned in the Linux build instructions above. After doing `e sync` run: +``` +cd electron-gn/src +build/linux/sysroot_scripts/install-sysroot.py --arch=arm +cd ../.. +``` +- builds can take over 20 hours on a VM. +- build Electronite for Intel 64-bit: + - build for 64-bit: `./electronite-tools.sh build x64` + - create release for 32-bit: `./electronite-tools.sh release x64` + +- build Electronite for Arm 64-bit: + - build for arm 64-bit: `./electronite-tools.sh build arm64` + - create release for arm 64-bit: `./electronite-tools.sh release arm64` + +- build Electronite for Arm: + - build for arm: `./electronite-tools.sh build arm` + - create release for arm: `./electronite-tools.sh release arm` + \ No newline at end of file diff --git a/docs/development/Electronite/MacBuildNotes.md b/docs/development/Electronite/MacBuildNotes.md new file mode 100644 index 0000000000000..01786fdb9c3d3 --- /dev/null +++ b/docs/development/Electronite/MacBuildNotes.md @@ -0,0 +1,123 @@ +## Building Electronite on MacOS +### Setup on MacOS Big Sur +- Configured using these notes as a reference: [build-instructions-macos](../build-instructions-macos.md) +- Can build on Catalina by changing the build config. Change `~/Develop/Electronite-Build/src/electron/.circleci/config/base.yml` by setting `macos/parameters/xcode/default` to 12.4.0 (but will not get any speed up from goma, so probably best to set goma to `none`) +- Building for x64 does not work on M1 Silicon Macs, only for Arm64. On Intel based Macs can build for both Arm64 and Intel x64 +- Make sure you have a lot of free disk space - need over 150GB free. +- if you have trouble building with these notes, you could try the older Chromium Build tools: [MacBuildNotesChromeTools](MacBuildNotesChromeTools.md) + +- installed node using nvm + - install nvm: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash` + - restart terminal + - install latest stable node: +``` +nvm install --lts +nvm use --lts +node --version +``` +- installed homebrew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"` +- Installed Python 3.9 (Python 3.10 has breaking changes that broke the compile) `brew install python@3.9` +- configured Python: +``` +pip3 install --user --upgrade pip +pip3 install --user pyobjc +``` +- installed electron build-tools (https://github.com/electron/build-tools): +``` +sudo npm i -g @electron/build-tools +``` + +- if e commands don’t work, try this and then initialization seemed to work: +``` +git clone https://github.com/electron/build-tools ~/.electron_build_tools && (cd ~/.electron_build_tools && npm install) +``` + +#### Monitoring Goma status +- if you browse to http://localhost:8088 on your local machine you can monitor compile jobs as they flow through the goma system. + + +### Build Electronite +#### Build Intel x64 +- open terminal and initialize build (on M1 Mac, had to use `--goma none`): +``` +e init --root=~/Develop/Electronite-Build -o x64 x64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~/.electron_build_tools/configs/evm.x64.json` + and add option to args: `"target_cpu = \"x64\""` +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd ~/Develop/Electronite-Build/src/electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ../.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +export NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Test the build. + - Do `e start`. + - Open the developer console by typing`Command-Shift-I`. + - in console execute `window.location="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_fontdemo"` + - Ensure all the tests pass by visually inspecting the rendered fonts and comparing against the image samples on the site. + - The example for Padauk from server will not be correct with the triangles. So need to: +Open elements tab, select body of html, do command-F to search, and search for `padauk_ttf`, and apply attribute `font-feature-settings: "wtri" 1;`. The triangles should now be rendered correctly. + +- Make the release to ~/Develop/Electronite-Build/src/out/x64/dist.zip +``` +e build electron:dist +``` + +#### Build Arm64 +- open terminal and initialize build (on M1 Mac, had to use `--goma none`, and it may be faster if you have a slow or unreliable internet connection): +``` +e init --root=~/Develop/Electronite-Build -o arm64 arm64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~/.electron_build_tools/configs/evm.arm64.json` +and add option to args: `"target_cpu = \"arm64\""` + +- if Electronite source already checked out, then skip to `Do build` step: + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd ~/Develop/Electronite-Build/src/electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ../.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +export NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Make the release to ~/Develop/Electronite-Build/src/out/arm64/dist.zip +``` +e build electron:dist +``` diff --git a/docs/development/Electronite/MacBuildNotesChromeTools.md b/docs/development/Electronite/MacBuildNotesChromeTools.md new file mode 100644 index 0000000000000..9558db03dc1a6 --- /dev/null +++ b/docs/development/Electronite/MacBuildNotesChromeTools.md @@ -0,0 +1,37 @@ +## Building Electronite on MacOS +### Setup on MacOS Catalina VM +- Configured my VM using these notes as a reference: [build-instructions-macos](../build-instructions-macos.md) +- Make sure the VM has a lot of disk space - I was able to build with 120GB of storage configured. But only had 13GB of space at end of build, so that may not be enough in the future. +- Installed xcode 12.4. +- installed node using nvm + - install nvm: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash` + - restart terminal + - install latest node: +``` +nvm install --lts +nvm use --lts +node --version +``` +- installed homebrew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"` +- Installed Python 3.9 (Python 3.10 has breaking changes that broke compile) `brew install python@3.9` +- configured Python: +``` +pip3 install --user --upgrade pip +pip3 install --user pyobjc +``` + +### Build Electronite +- open terminal and cd to the folder you will use for build +- install the depot_tools here: `git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git` +- download build script to this folder from: [electronite-tools](electronite-tools.sh) +- set execute permission on script: `chmod +x ./electronite-tools.sh` +- before build do: `export PATH=/path/to/depot_tools:$PATH` +- get source files (this can take several hours the first time as the git cache is loaded): `./electronite-tools.sh get <>` +- builds can take over 15 hours on a VM. +- build Electronite for MacOS Intel 64-bit: + - build for 64-bit: `./electronite-tools.sh build x64` + - create release for 32-bit: `./electronite-tools.sh release x64` +- build Electronite for MacOS Arm 64-bit: + - build for arm 64-bit: `./electronite-tools.sh build arm64` + - create release for arm 64-bit: `./electronite-tools.sh release arm64` + diff --git a/docs/development/Electronite/WindowsBuildNotes.md b/docs/development/Electronite/WindowsBuildNotes.md new file mode 100644 index 0000000000000..351473bd21a87 --- /dev/null +++ b/docs/development/Electronite/WindowsBuildNotes.md @@ -0,0 +1,168 @@ +## Building Electronite on Windows +### Setup on Clean Windows 10 VM +- Configured my VM using these notes as a reference: + - https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md#visual-studio + - [build-instructions-windows](../build-instructions-windows.md) +- Make sure the VM has a lot of disk space - I configured with 220GB of storage. +- if you have trouble building with these notes, you could try the older Chromium Build tools: [WindowsBuildNotesChromeTools](WindowsBuildNotesChromeTools.md) +- Make sure to add exception to the build folder for Windows defender, or it will delete a couple of the build files. + - Go to Start button > Settings > Update & Security > Windows Security > Virus & threat protection. + - Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions. + - Add folder `.\Build-Electron` (which is the default build folder used below, or the build folder you actually use). +- Add to git support for long file names: `git config --system core.longpaths true` +- Installed VS 2019 Community edition and Windows SDK 10.0.19041.0. +- Installed Python 3.9.11 (Python 3.10 has breaking changes that broke compile) from https://www.python.org/downloads/windows/ +- configured Python: +``` +python3 -m pip install --upgrade pip setuptools wheel +python3 -m pip install pywin32 +``` +- installed node LTS +- Added environment variables: +``` +2019_install=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community +WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10 +``` + +- installed: https://chocolatey.org/install + +- Setup Build tools (using command prompt, not powershell). Install using didn't work for me: +``` +npm i -g @electron/build-tools +C: +cd %HOMEPATH% +git clone https://github.com/electron/build-tools .electron_build_tools +cd .electron_build_tools +npm i +``` + +#### Monitoring Goma status +- if you browse to http://localhost:8088 on your local machine you can monitor compile jobs as they flow through the goma system. + +### Build Electronite +#### Build Intel x64 +- open command prompt and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +e init --root=.\Build-Electron -o x64 x64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~\.electron_build_tools\configs\evm.x64.json` +and add option to args: `"target_cpu = \"x64\""` + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd .\Build-Electron\src\electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ..\.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +set NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Test the build. + - Do `e start`. + - Open the developer console by typing`Control-Shift-I`. + - in console execute `window.location="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_fontdemo"` + - Ensure all the tests pass by visually inspecting the rendered fonts and comparing against the image samples on the site. + - The example for Padauk from server will not be correct with the triangles. So need to: + Open elements tab, select body of html, do Control-F to search, and search for `padauk_ttf`, and apply attribute `font-feature-settings: "wtri" 1;`. The triangles should now be rendered correctly. + +- Make the release to .\Build-Electron\src\out\x64\dist.zip +``` +e build electron:dist +``` + +#### Build Intel x86 (32 bit) +- open command prompt and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +e init --root=.\Build-Electron -o x86 x86 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~\.electron_build_tools\configs\evm.x86.json` + and add option to args: `"target_cpu = \"x86\""` + +- if Electronite source already checked out, then skip to `Do build` step: + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd .\Build-Electron\src\electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ..\.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +set NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Make the release to .\Build-Electron\src\out\x86\dist.zip +``` +e build electron:dist +``` + +#### Build Intel arm64 +- open command prompt and initialize build configuration (note that if you have a slow or unreliable internet connection, it is better to change the goma setting from `cache-only` to `none`): +``` +e init --root=.\Build-Electron -o arm64 arm64 -i release --goma cache-only --fork unfoldingWord/electronite --use-https -f +``` + +- edit `~\.electron_build_tools\configs\evm.arm64.json` + and add option to args: `"target_cpu = \"arm64\""` + +- if Electronite source already checked out, then skip to `Do build` step: + +- get the base Electron source code (this can take many hours the first time as the git cache is loaded): +``` +e sync +``` + +- checkout the correct Electronite tag +``` +cd .\Build-Electron\src\electron +git fetch --all +git checkout tags/v18.3.2-graphite-beta -b v18.3.2-graphite-beta +cd ..\.. +``` + +- now get the Electronite sources +``` +e sync +``` + +- Do build (takes a long time) +``` +set NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " +e build electron +``` + +- Make the release to .\Build-Electron\src\out\arm64\dist.zip +``` +e build electron:dist +``` + diff --git a/docs/development/Electronite/WindowsBuildNotesChromeTools.md b/docs/development/Electronite/WindowsBuildNotesChromeTools.md new file mode 100644 index 0000000000000..94affab40bb12 --- /dev/null +++ b/docs/development/Electronite/WindowsBuildNotesChromeTools.md @@ -0,0 +1,37 @@ +## Building Electronite on Windows +### Setup on Clean Windows 10 VM +- Configured my VM using these notes as a reference: + - https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md#visual-studio + - [build-instructions-windows](../build-instructions-windows.md) +- Make sure the VM has a lot of disk space - I ran out of disk space with 120GB of storage configured. Rather than starting over with a new VM. I added a second Virtual Hard Drive with 100GB and then used that drive for the builds. +- Make sure to add exception to the build folder for Windows defender, or it will delete a couple of the build files. +- Add to git support for long file names: `git config --system core.longpaths true` +- Installed VS 2019 Community edition and Windows SDK 10.0.19041.0. +- Installed Python 3.9.11 (Python 3.10 has breaking changes that broke compile) from https://www.python.org/downloads/windows/ +- configured Python: +``` +python3 -m pip install --upgrade pip setuptools wheel +python3 -m pip install pywin32 +``` +- installed node +- Added environment variables: +``` +2019_install=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community +WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10 +``` + +### Build Electronite +- _**Note:** Use command prompt, not powershell as it will cause problems._ +- cd to the folder you will use for build +- unzip the depot_tools here +- download build script to this folder from: [electronite-tools](electronite-tools.bat) +- before build do: `set PATH=%cd%\depot_tools;%PATH%` +- get source files (this can take several hours the first time as the git cache is loaded): `.\electronite-tools.bat get <>` +- builds can take over 20 hours on a VM. +- build Electronite for 32-bit Windows: + - build for 32-bit: `.\electronite-tools.bat build x86` + - create release for 32-bit: `.\electronite-tools.bat release x86` +- build Electronite for 64-bit Windows: + - build for 64-bit: `.\electronite-tools.bat build x64` + - create release for 64-bit: `.\electronite-tools.bat release x64` + diff --git a/docs/development/Electronite/electron.d.ts b/docs/development/Electronite/electron.d.ts new file mode 100644 index 0000000000000..4cbe4b615c14a --- /dev/null +++ b/docs/development/Electronite/electron.d.ts @@ -0,0 +1,18122 @@ +// Type definitions for Electron 21.2.0 +// Project: http://electronjs.org/ +// Definitions by: The Electron Team +// Definitions: https://github.com/electron/electron-typescript-definitions + +/// + +type GlobalEvent = Event & { returnValue: any }; + +declare namespace Electron { + const NodeEventEmitter: typeof import('events').EventEmitter; + + class Accelerator extends String { + + } + interface App extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/app + + /** + * Emitted when Chrome's accessibility support changes. This event fires when + * assistive technologies, such as screen readers, are enabled or disabled. See + * https://www.chromium.org/developers/design-documents/accessibility for more + * details. + * + * @platform darwin,win32 + */ + on(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + once(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + addListener(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + removeListener(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + /** + * Emitted when the application is activated. Various actions can trigger this + * event, such as launching the application for the first time, attempting to + * re-launch the application when it's already running, or clicking on the + * application's dock or taskbar icon. + * + * @platform darwin + */ + on(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + once(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + addListener(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + removeListener(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + /** + * Emitted during Handoff after an activity from this device was successfully + * resumed on another one. + * + * @platform darwin + */ + on(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + once(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + addListener(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + removeListener(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + /** + * Emitted before the application starts closing its windows. Calling + * `event.preventDefault()` will prevent the default behavior, which is terminating + * the application. + * + * **Note:** If application quit was initiated by `autoUpdater.quitAndInstall()`, + * then `before-quit` is emitted *after* emitting `close` event on all windows and + * closing them. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'before-quit', listener: (event: Event) => void): this; + once(event: 'before-quit', listener: (event: Event) => void): this; + addListener(event: 'before-quit', listener: (event: Event) => void): this; + removeListener(event: 'before-quit', listener: (event: Event) => void): this; + /** + * Emitted when a browserWindow gets blurred. + */ + on(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when a new browserWindow is created. + */ + on(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when a browserWindow gets focused. + */ + on(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when failed to verify the `certificate` for `url`, to trust the + * certificate you should prevent the default behavior with + * `event.preventDefault()` and call `callback(true)`. + */ + on(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void, + isMainFrame: boolean) => void): this; + once(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void, + isMainFrame: boolean) => void): this; + addListener(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void, + isMainFrame: boolean) => void): this; + removeListener(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void, + isMainFrame: boolean) => void): this; + /** + * Emitted when the child process unexpectedly disappears. This is normally because + * it was crashed or killed. It does not include renderer processes. + */ + on(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + once(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + addListener(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + removeListener(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + /** + * Emitted during Handoff when an activity from a different device wants to be + * resumed. You should call `event.preventDefault()` if you want to handle this + * event. + * + * A user activity can be continued only in an app that has the same developer Team + * ID as the activity's source app and that supports the activity's type. Supported + * activity types are specified in the app's `Info.plist` under the + * `NSUserActivityTypes` key. + * + * @platform darwin + */ + on(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown, + details: ContinueActivityDetails) => void): this; + once(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown, + details: ContinueActivityDetails) => void): this; + addListener(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown, + details: ContinueActivityDetails) => void): this; + removeListener(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown, + details: ContinueActivityDetails) => void): this; + /** + * Emitted during Handoff when an activity from a different device fails to be + * resumed. + * + * @platform darwin + */ + on(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + once(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + addListener(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + removeListener(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + /** + * Emitted when mac application become active. Difference from `activate` event is + * that `did-become-active` is emitted every time the app becomes active, not only + * when Dock icon is clicked or application is re-launched. + * + * @platform darwin + */ + on(event: 'did-become-active', listener: (event: Event) => void): this; + once(event: 'did-become-active', listener: (event: Event) => void): this; + addListener(event: 'did-become-active', listener: (event: Event) => void): this; + removeListener(event: 'did-become-active', listener: (event: Event) => void): this; + /** + * Emitted whenever there is a GPU info update. + */ + on(event: 'gpu-info-update', listener: Function): this; + once(event: 'gpu-info-update', listener: Function): this; + addListener(event: 'gpu-info-update', listener: Function): this; + removeListener(event: 'gpu-info-update', listener: Function): this; + /** + * Emitted when the GPU process crashes or is killed. + * + * **Deprecated:** This event is superceded by the `child-process-gone` event which + * contains more information about why the child process disappeared. It isn't + * always because it crashed. The `killed` boolean can be replaced by checking + * `reason === 'killed'` when you switch to that event. + * + * @deprecated + */ + on(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + once(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + addListener(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + removeListener(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + /** + * Emitted when `webContents` wants to do basic auth. + * + * The default behavior is to cancel all authentications. To override this you + * should prevent the default behavior with `event.preventDefault()` and call + * `callback(username, password)` with the credentials. + * + * If `callback` is called without a username or password, the authentication + * request will be cancelled and the authentication error will be returned to the + * page. + */ + on(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + once(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + addListener(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + removeListener(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + /** + * Emitted when the user clicks the native macOS new tab button. The new tab button + * is only visible if the current `BrowserWindow` has a `tabbingIdentifier` + * + * @platform darwin + */ + on(event: 'new-window-for-tab', listener: (event: Event) => void): this; + once(event: 'new-window-for-tab', listener: (event: Event) => void): this; + addListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; + removeListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; + /** + * Emitted when the user wants to open a file with the application. The `open-file` + * event is usually emitted when the application is already open and the OS wants + * to reuse the application to open the file. `open-file` is also emitted when a + * file is dropped onto the dock and the application is not yet running. Make sure + * to listen for the `open-file` event very early in your application startup to + * handle this case (even before the `ready` event is emitted). + * + * You should call `event.preventDefault()` if you want to handle this event. + * + * On Windows, you have to parse `process.argv` (in the main process) to get the + * filepath. + * + * @platform darwin + */ + on(event: 'open-file', listener: (event: Event, + path: string) => void): this; + once(event: 'open-file', listener: (event: Event, + path: string) => void): this; + addListener(event: 'open-file', listener: (event: Event, + path: string) => void): this; + removeListener(event: 'open-file', listener: (event: Event, + path: string) => void): this; + /** + * Emitted when the user wants to open a URL with the application. Your + * application's `Info.plist` file must define the URL scheme within the + * `CFBundleURLTypes` key, and set `NSPrincipalClass` to `AtomApplication`. + * + * You should call `event.preventDefault()` if you want to handle this event. + * + * As with the `open-file` event, be sure to register a listener for the `open-url` + * event early in your application startup to detect if the the application being + * is being opened to handle a URL. If you register the listener in response to a + * `ready` event, you'll miss URLs that trigger the launch of your application. + * + * @platform darwin + */ + on(event: 'open-url', listener: (event: Event, + url: string) => void): this; + once(event: 'open-url', listener: (event: Event, + url: string) => void): this; + addListener(event: 'open-url', listener: (event: Event, + url: string) => void): this; + removeListener(event: 'open-url', listener: (event: Event, + url: string) => void): this; + /** + * Emitted when the application is quitting. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + once(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + addListener(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + removeListener(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + /** + * Emitted once, when Electron has finished initializing. On macOS, `launchInfo` + * holds the `userInfo` of the `NSUserNotification` or information from + * `UNNotificationResponse` that was used to open the application, if it was + * launched from Notification Center. You can also call `app.isReady()` to check if + * this event has already fired and `app.whenReady()` to get a Promise that is + * fulfilled when Electron is initialized. + */ + on(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + once(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + addListener(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + removeListener(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + /** + * Emitted when the renderer process unexpectedly disappears. This is normally + * because it was crashed or killed. + */ + on(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + once(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + addListener(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + removeListener(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + /** + * Emitted when the renderer process of `webContents` crashes or is killed. + * + * **Deprecated:** This event is superceded by the `render-process-gone` event + * which contains more information about why the render process disappeared. It + * isn't always because it crashed. The `killed` boolean can be replaced by + * checking `reason === 'killed'` when you switch to that event. + * + * @deprecated + */ + on(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + once(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + addListener(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + removeListener(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + /** + * This event will be emitted inside the primary instance of your application when + * a second instance has been executed and calls `app.requestSingleInstanceLock()`. + * + * `argv` is an Array of the second instance's command line arguments, and + * `workingDirectory` is its current working directory. Usually applications + * respond to this by making their primary window focused and non-minimized. + * + * **Note:** If the second instance is started by a different user than the first, + * the `argv` array will not include the arguments. + * + * This event is guaranteed to be emitted after the `ready` event of `app` gets + * emitted. + * + * **Note:** Extra command line arguments might be added by Chromium, such as + * `--original-process-start-time`. + */ + on(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string, + /** + * A JSON object of additional data passed from the second instance + */ + additionalData: unknown) => void): this; + once(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string, + /** + * A JSON object of additional data passed from the second instance + */ + additionalData: unknown) => void): this; + addListener(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string, + /** + * A JSON object of additional data passed from the second instance + */ + additionalData: unknown) => void): this; + removeListener(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string, + /** + * A JSON object of additional data passed from the second instance + */ + additionalData: unknown) => void): this; + /** + * Emitted when a client certificate is requested. + * + * The `url` corresponds to the navigation entry requesting the client certificate + * and `callback` can be called with an entry filtered from the list. Using + * `event.preventDefault()` prevents the application from using the first + * certificate from the store. + */ + on(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + once(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + addListener(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + removeListener(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + /** + * Emitted when Electron has created a new `session`. + */ + on(event: 'session-created', listener: (session: Session) => void): this; + once(event: 'session-created', listener: (session: Session) => void): this; + addListener(event: 'session-created', listener: (session: Session) => void): this; + removeListener(event: 'session-created', listener: (session: Session) => void): this; + /** + * Emitted when Handoff is about to be resumed on another device. If you need to + * update the state to be transferred, you should call `event.preventDefault()` + * immediately, construct a new `userInfo` dictionary and call + * `app.updateCurrentActivity()` in a timely manner. Otherwise, the operation will + * fail and `continue-activity-error` will be called. + * + * @platform darwin + */ + on(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + once(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + addListener(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + removeListener(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + /** + * Emitted when a new webContents is created. + */ + on(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + once(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + addListener(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + removeListener(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + /** + * Emitted during Handoff before an activity from a different device wants to be + * resumed. You should call `event.preventDefault()` if you want to handle this + * event. + * + * @platform darwin + */ + on(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + once(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + addListener(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + removeListener(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + /** + * Emitted when the application has finished basic startup. On Windows and Linux, + * the `will-finish-launching` event is the same as the `ready` event; on macOS, + * this event represents the `applicationWillFinishLaunching` notification of + * `NSApplication`. You would usually set up listeners for the `open-file` and + * `open-url` events here, and start the crash reporter and auto updater. + * + * In most cases, you should do everything in the `ready` event handler. + */ + on(event: 'will-finish-launching', listener: Function): this; + once(event: 'will-finish-launching', listener: Function): this; + addListener(event: 'will-finish-launching', listener: Function): this; + removeListener(event: 'will-finish-launching', listener: Function): this; + /** + * Emitted when all windows have been closed and the application will quit. Calling + * `event.preventDefault()` will prevent the default behavior, which is terminating + * the application. + * + * See the description of the `window-all-closed` event for the differences between + * the `will-quit` and `window-all-closed` events. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'will-quit', listener: (event: Event) => void): this; + once(event: 'will-quit', listener: (event: Event) => void): this; + addListener(event: 'will-quit', listener: (event: Event) => void): this; + removeListener(event: 'will-quit', listener: (event: Event) => void): this; + /** + * Emitted when all windows have been closed. + * + * If you do not subscribe to this event and all windows are closed, the default + * behavior is to quit the app; however, if you subscribe, you control whether the + * app quits or not. If the user pressed `Cmd + Q`, or the developer called + * `app.quit()`, Electron will first try to close all the windows and then emit the + * `will-quit` event, and in this case the `window-all-closed` event would not be + * emitted. + */ + on(event: 'window-all-closed', listener: Function): this; + once(event: 'window-all-closed', listener: Function): this; + addListener(event: 'window-all-closed', listener: Function): this; + removeListener(event: 'window-all-closed', listener: Function): this; + /** + * Adds `path` to the recent documents list. + * + * This list is managed by the OS. On Windows, you can visit the list from the task + * bar, and on macOS, you can visit it from dock menu. + * + * @platform darwin,win32 + */ + addRecentDocument(path: string): void; + /** + * Clears the recent documents list. + * + * @platform darwin,win32 + */ + clearRecentDocuments(): void; + /** + * Configures host resolution (DNS and DNS-over-HTTPS). By default, the following + * resolvers will be used, in order: + * + * * DNS-over-HTTPS, if the DNS provider supports it, then + * * the built-in resolver (enabled on macOS only by default), then + * * the system's resolver (e.g. `getaddrinfo`). + * + * This can be configured to either restrict usage of non-encrypted DNS + * (`secureDnsMode: "secure"`), or disable DNS-over-HTTPS (`secureDnsMode: "off"`). + * It is also possible to enable or disable the built-in resolver. + * + * To disable insecure DNS, you can specify a `secureDnsMode` of `"secure"`. If you + * do so, you should make sure to provide a list of DNS-over-HTTPS servers to use, + * in case the user's DNS configuration does not include a provider that supports + * DoH. + * + * This API must be called after the `ready` event is emitted. + */ + configureHostResolver(options: ConfigureHostResolverOptions): void; + /** + * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain + * basis if the GPU processes crashes too frequently. This function disables that + * behavior. + * + * This method can only be called before app is ready. + */ + disableDomainBlockingFor3DAPIs(): void; + /** + * Disables hardware acceleration for current app. + * + * This method can only be called before app is ready. + */ + disableHardwareAcceleration(): void; + /** + * Enables full sandbox mode on the app. This means that all renderers will be + * launched sandboxed, regardless of the value of the `sandbox` flag in + * WebPreferences. + * + * This method can only be called before app is ready. + */ + enableSandbox(): void; + /** + * Exits immediately with `exitCode`. `exitCode` defaults to 0. + * + * All windows will be closed immediately without asking the user, and the + * `before-quit` and `will-quit` events will not be emitted. + */ + exit(exitCode?: number): void; + /** + * On Linux, focuses on the first visible window. On macOS, makes the application + * the active app. On Windows, focuses on the application's first window. + * + * You should seek to use the `steal` option as sparingly as possible. + */ + focus(options?: FocusOptions): void; + /** + * Resolve with an object containing the following: + * + * * `icon` NativeImage - the display icon of the app handling the protocol. + * * `path` string - installation path of the app handling the protocol. + * * `name` string - display name of the app handling the protocol. + * + * This method returns a promise that contains the application name, icon and path + * of the default handler for the protocol (aka URI scheme) of a URL. + * + * @platform darwin,win32 + */ + getApplicationInfoForProtocol(url: string): Promise; + /** + * Name of the application handling the protocol, or an empty string if there is no + * handler. For instance, if Electron is the default handler of the URL, this could + * be `Electron` on Windows and Mac. However, don't rely on the precise format + * which is not guaranteed to remain unchanged. Expect a different format on Linux, + * possibly with a `.desktop` suffix. + * + * This method returns the application name of the default handler for the protocol + * (aka URI scheme) of a URL. + */ + getApplicationNameForProtocol(url: string): string; + /** + * Array of `ProcessMetric` objects that correspond to memory and CPU usage + * statistics of all the processes associated with the app. + */ + getAppMetrics(): ProcessMetric[]; + /** + * The current application directory. + */ + getAppPath(): string; + /** + * The current value displayed in the counter badge. + * + * @platform linux,darwin + */ + getBadgeCount(): number; + /** + * The type of the currently running activity. + * + * @platform darwin + */ + getCurrentActivityType(): string; + /** + * fulfilled with the app's icon, which is a NativeImage. + * + * Fetches a path's associated icon. + * + * On _Windows_, there a 2 kinds of icons: + * + * * Icons associated with certain file extensions, like `.mp3`, `.png`, etc. + * * Icons inside the file itself, like `.exe`, `.dll`, `.ico`. + * + * On _Linux_ and _macOS_, icons depend on the application associated with file + * mime type. + */ + getFileIcon(path: string, options?: FileIconOptions): Promise; + /** + * The Graphics Feature Status from `chrome://gpu/`. + * + * **Note:** This information is only usable after the `gpu-info-update` event is + * emitted. + */ + getGPUFeatureStatus(): GPUFeatureStatus; + /** + * For `infoType` equal to `complete`: Promise is fulfilled with `Object` + * containing all the GPU Information as in chromium's GPUInfo object. This + * includes the version and driver information that's shown on `chrome://gpu` page. + * + * For `infoType` equal to `basic`: Promise is fulfilled with `Object` containing + * fewer attributes than when requested with `complete`. Here's an example of basic + * response: + * + * Using `basic` should be preferred if only basic information like `vendorId` or + * `driverId` is needed. + */ + getGPUInfo(infoType: 'basic' | 'complete'): Promise; + /** + * * `minItems` Integer - The minimum number of items that will be shown in the + * Jump List (for a more detailed description of this value see the MSDN docs). + * * `removedItems` JumpListItem[] - Array of `JumpListItem` objects that + * correspond to items that the user has explicitly removed from custom categories + * in the Jump List. These items must not be re-added to the Jump List in the + * **next** call to `app.setJumpList()`, Windows will not display any custom + * category that contains any of the removed items. + * + * @platform win32 + */ + getJumpListSettings(): JumpListSettings; + /** + * The current application locale, fetched using Chromium's `l10n_util` library. + * Possible return values are documented here. + * + * To set the locale, you'll want to use a command line switch at app startup, + * which may be found here. + * + * **Note:** When distributing your packaged app, you have to also ship the + * `locales` folder. + * + * **Note:** This API must be called after the `ready` event is emitted. + */ + getLocale(): string; + /** + * User operating system's locale two-letter ISO 3166 country code. The value is + * taken from native OS APIs. + * + * **Note:** When unable to detect locale country code, it returns empty string. + */ + getLocaleCountryCode(): string; + /** + * If you provided `path` and `args` options to `app.setLoginItemSettings`, then + * you need to pass the same arguments here for `openAtLogin` to be set correctly. + * + * + * * `openAtLogin` boolean - `true` if the app is set to open at login. + * * `openAsHidden` boolean _macOS_ - `true` if the app is set to open as hidden at + * login. This setting is not available on MAS builds. + * * `wasOpenedAtLogin` boolean _macOS_ - `true` if the app was opened at login + * automatically. This setting is not available on MAS builds. + * * `wasOpenedAsHidden` boolean _macOS_ - `true` if the app was opened as a hidden + * login item. This indicates that the app should not open any windows at startup. + * This setting is not available on MAS builds. + * * `restoreState` boolean _macOS_ - `true` if the app was opened as a login item + * that should restore the state from the previous session. This indicates that the + * app should restore the windows that were open the last time the app was closed. + * This setting is not available on MAS builds. + * * `executableWillLaunchAtLogin` boolean _Windows_ - `true` if app is set to open + * at login and its run key is not deactivated. This differs from `openAtLogin` as + * it ignores the `args` option, this property will be true if the given executable + * would be launched at login with **any** arguments. + * * `launchItems` Object[] _Windows_ + * * `name` string _Windows_ - name value of a registry entry. + * * `path` string _Windows_ - The executable to an app that corresponds to a + * registry entry. + * * `args` string[] _Windows_ - the command-line arguments to pass to the + * executable. + * * `scope` string _Windows_ - one of `user` or `machine`. Indicates whether the + * registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`. + * * `enabled` boolean _Windows_ - `true` if the app registry key is startup + * approved and therefore shows as `enabled` in Task Manager and Windows settings. + * + * @platform darwin,win32 + */ + getLoginItemSettings(options?: LoginItemSettingsOptions): LoginItemSettings; + /** + * The current application's name, which is the name in the application's + * `package.json` file. + * + * Usually the `name` field of `package.json` is a short lowercase name, according + * to the npm modules spec. You should usually also specify a `productName` field, + * which is your application's full capitalized name, and which will be preferred + * over `name` by Electron. + */ + getName(): string; + /** + * A path to a special directory or file associated with `name`. On failure, an + * `Error` is thrown. + * + * If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being + * called first, a default log directory will be created equivalent to calling + * `app.setAppLogsPath()` without a `path` parameter. + */ + getPath(name: 'home' | 'appData' | 'userData' | 'sessionData' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string; + /** + * The current system locale. On Windows and Linux, it is fetched using Chromium's + * `i18n` library. On macOS, the `NSLocale` object is used instead. + * + * **Note:** This API must be called after the `ready` event is emitted. + */ + getSystemLocale(): string; + /** + * The version of the loaded application. If no version is found in the + * application's `package.json` file, the version of the current bundle or + * executable is returned. + */ + getVersion(): string; + /** + * This method returns whether or not this instance of your app is currently + * holding the single instance lock. You can request the lock with + * `app.requestSingleInstanceLock()` and release with + * `app.releaseSingleInstanceLock()` + */ + hasSingleInstanceLock(): boolean; + /** + * Hides all application windows without minimizing them. + * + * @platform darwin + */ + hide(): void; + /** + * Imports the certificate in pkcs12 format into the platform certificate store. + * `callback` is called with the `result` of import operation, a value of `0` + * indicates success while any other value indicates failure according to Chromium + * net_error_list. + * + * @platform linux + */ + importCertificate(options: ImportCertificateOptions, callback: (result: number) => void): void; + /** + * Invalidates the current Handoff user activity. + * + * @platform darwin + */ + invalidateCurrentActivity(): void; + /** + * `true` if Chrome's accessibility support is enabled, `false` otherwise. This API + * will return `true` if the use of assistive technologies, such as screen readers, + * has been detected. See + * https://www.chromium.org/developers/design-documents/accessibility for more + * details. + * + * @platform darwin,win32 + */ + isAccessibilitySupportEnabled(): boolean; + /** + * Whether the current executable is the default handler for a protocol (aka URI + * scheme). + * + * **Note:** On macOS, you can use this method to check if the app has been + * registered as the default protocol handler for a protocol. You can also verify + * this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the + * macOS machine. Please refer to Apple's documentation for details. + * + * The API uses the Windows Registry and `LSCopyDefaultHandlerForURLScheme` + * internally. + */ + isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * whether or not the current OS version allows for native emoji pickers. + */ + isEmojiPanelSupported(): boolean; + /** + * `true` if the application—including all of its windows—is hidden (e.g. with + * `Command-H`), `false` otherwise. + * + * @platform darwin + */ + isHidden(): boolean; + /** + * Whether the application is currently running from the systems Application + * folder. Use in combination with `app.moveToApplicationsFolder()` + * + * @platform darwin + */ + isInApplicationsFolder(): boolean; + /** + * `true` if Electron has finished initializing, `false` otherwise. See also + * `app.whenReady()`. + */ + isReady(): boolean; + /** + * whether `Secure Keyboard Entry` is enabled. + * + * By default this API will return `false`. + * + * @platform darwin + */ + isSecureKeyboardEntryEnabled(): boolean; + /** + * Whether the current desktop environment is Unity launcher. + * + * @platform linux + */ + isUnityRunning(): boolean; + /** + * Whether the move was successful. Please note that if the move is successful, + * your application will quit and relaunch. + * + * No confirmation dialog will be presented by default. If you wish to allow the + * user to confirm the operation, you may do so using the `dialog` API. + * + * **NOTE:** This method throws errors if anything other than the user causes the + * move to fail. For instance if the user cancels the authorization dialog, this + * method returns false. If we fail to perform the copy, then this method will + * throw an error. The message in the error should be informative and tell you + * exactly what went wrong. + * + * By default, if an app of the same name as the one being moved exists in the + * Applications directory and is _not_ running, the existing app will be trashed + * and the active app moved into its place. If it _is_ running, the preexisting + * running app will assume focus and the previously active app will quit itself. + * This behavior can be changed by providing the optional conflict handler, where + * the boolean returned by the handler determines whether or not the move conflict + * is resolved with default behavior. i.e. returning `false` will ensure no + * further action is taken, returning `true` will result in the default behavior + * and the method continuing. + * + * For example: + * + * Would mean that if an app already exists in the user directory, if the user + * chooses to 'Continue Move' then the function would continue with its default + * behavior and the existing app will be trashed and the active app moved into its + * place. + * + * @platform darwin + */ + moveToApplicationsFolder(options?: MoveToApplicationsFolderOptions): boolean; + /** + * Try to close all windows. The `before-quit` event will be emitted first. If all + * windows are successfully closed, the `will-quit` event will be emitted and by + * default the application will terminate. + * + * This method guarantees that all `beforeunload` and `unload` event handlers are + * correctly executed. It is possible that a window cancels the quitting by + * returning `false` in the `beforeunload` event handler. + */ + quit(): void; + /** + * Relaunches the app when current instance exits. + * + * By default, the new instance will use the same working directory and command + * line arguments with current instance. When `args` is specified, the `args` will + * be passed as command line arguments instead. When `execPath` is specified, the + * `execPath` will be executed for relaunch instead of current app. + * + * Note that this method does not quit the app when executed, you have to call + * `app.quit` or `app.exit` after calling `app.relaunch` to make the app restart. + * + * When `app.relaunch` is called for multiple times, multiple instances will be + * started after current instance exited. + * + * An example of restarting current instance immediately and adding a new command + * line argument to the new instance: + */ + relaunch(options?: RelaunchOptions): void; + /** + * Releases all locks that were created by `requestSingleInstanceLock`. This will + * allow multiple instances of the application to once again run side by side. + */ + releaseSingleInstanceLock(): void; + /** + * Whether the call succeeded. + * + * This method checks if the current executable as the default handler for a + * protocol (aka URI scheme). If so, it will remove the app as the default handler. + * + * @platform darwin,win32 + */ + removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * The return value of this method indicates whether or not this instance of your + * application successfully obtained the lock. If it failed to obtain the lock, + * you can assume that another instance of your application is already running with + * the lock and exit immediately. + * + * I.e. This method returns `true` if your process is the primary instance of your + * application and your app should continue loading. It returns `false` if your + * process should immediately quit as it has sent its parameters to another + * instance that has already acquired the lock. + * + * On macOS, the system enforces single instance automatically when users try to + * open a second instance of your app in Finder, and the `open-file` and `open-url` + * events will be emitted for that. However when users start your app in command + * line, the system's single instance mechanism will be bypassed, and you have to + * use this method to ensure single instance. + * + * An example of activating the window of primary instance when a second instance + * starts: + */ + requestSingleInstanceLock(additionalData?: Record): boolean; + /** + * Marks the current Handoff user activity as inactive without invalidating it. + * + * @platform darwin + */ + resignCurrentActivity(): void; + /** + * Set the about panel options. This will override the values defined in the app's + * `.plist` file on macOS. See the Apple docs for more details. On Linux, values + * must be set in order to be shown; there are no defaults. + * + * If you do not set `credits` but still wish to surface them in your app, AppKit + * will look for a file named "Credits.html", "Credits.rtf", and "Credits.rtfd", in + * that order, in the bundle returned by the NSBundle class method main. The first + * file found is used, and if none is found, the info area is left blank. See Apple + * documentation for more information. + */ + setAboutPanelOptions(options: AboutPanelOptionsOptions): void; + /** + * Manually enables Chrome's accessibility support, allowing to expose + * accessibility switch to users in application settings. See Chromium's + * accessibility docs for more details. Disabled by default. + * + * This API must be called after the `ready` event is emitted. + * + * **Note:** Rendering accessibility tree can significantly affect the performance + * of your app. It should not be enabled by default. + * + * @platform darwin,win32 + */ + setAccessibilitySupportEnabled(enabled: boolean): void; + /** + * Sets the activation policy for a given app. + * + * Activation policy types: + * + * * 'regular' - The application is an ordinary app that appears in the Dock and + * may have a user interface. + * * 'accessory' - The application doesn’t appear in the Dock and doesn’t have a + * menu bar, but it may be activated programmatically or by clicking on one of its + * windows. + * * 'prohibited' - The application doesn’t appear in the Dock and may not create + * windows or be activated. + * + * @platform darwin + */ + setActivationPolicy(policy: 'regular' | 'accessory' | 'prohibited'): void; + /** + * Sets or creates a directory your app's logs which can then be manipulated with + * `app.getPath()` or `app.setPath(pathName, newPath)`. + * + * Calling `app.setAppLogsPath()` without a `path` parameter will result in this + * directory being set to `~/Library/Logs/YourAppName` on _macOS_, and inside the + * `userData` directory on _Linux_ and _Windows_. + */ + setAppLogsPath(path?: string): void; + /** + * Changes the Application User Model ID to `id`. + * + * @platform win32 + */ + setAppUserModelId(id: string): void; + /** + * Whether the call succeeded. + * + * Sets the current executable as the default handler for a protocol (aka URI + * scheme). It allows you to integrate your app deeper into the operating system. + * Once registered, all links with `your-protocol://` will be opened with the + * current executable. The whole link, including protocol, will be passed to your + * application as a parameter. + * + * **Note:** On macOS, you can only register protocols that have been added to your + * app's `info.plist`, which cannot be modified at runtime. However, you can change + * the file during build time via Electron Forge, Electron Packager, or by editing + * `info.plist` with a text editor. Please refer to Apple's documentation for + * details. + * + * **Note:** In a Windows Store environment (when packaged as an `appx`) this API + * will return `true` for all calls but the registry key it sets won't be + * accessible by other applications. In order to register your Windows Store + * application as a default protocol handler you must declare the protocol in your + * manifest. + * + * The API uses the Windows Registry and `LSSetDefaultHandlerForURLScheme` + * internally. + */ + setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * Whether the call succeeded. + * + * Sets the counter badge for current app. Setting the count to `0` will hide the + * badge. + * + * On macOS, it shows on the dock icon. On Linux, it only works for Unity launcher. + * + * **Note:** Unity launcher requires a `.desktop` file to work. For more + * information, please read the Unity integration documentation. + * + * @platform linux,darwin + */ + setBadgeCount(count?: number): boolean; + /** + * Sets or removes a custom Jump List for the application, and returns one of the + * following strings: + * + * * `ok` - Nothing went wrong. + * * `error` - One or more errors occurred, enable runtime logging to figure out + * the likely cause. + * * `invalidSeparatorError` - An attempt was made to add a separator to a custom + * category in the Jump List. Separators are only allowed in the standard `Tasks` + * category. + * * `fileTypeRegistrationError` - An attempt was made to add a file link to the + * Jump List for a file type the app isn't registered to handle. + * * `customCategoryAccessDeniedError` - Custom categories can't be added to the + * Jump List due to user privacy or group policy settings. + * + * If `categories` is `null` the previously set custom Jump List (if any) will be + * replaced by the standard Jump List for the app (managed by Windows). + * + * **Note:** If a `JumpListCategory` object has neither the `type` nor the `name` + * property set then its `type` is assumed to be `tasks`. If the `name` property is + * set but the `type` property is omitted then the `type` is assumed to be + * `custom`. + * + * **Note:** Users can remove items from custom categories, and Windows will not + * allow a removed item to be added back into a custom category until **after** the + * next successful call to `app.setJumpList(categories)`. Any attempt to re-add a + * removed item to a custom category earlier than that will result in the entire + * custom category being omitted from the Jump List. The list of removed items can + * be obtained using `app.getJumpListSettings()`. + * + * **Note:** The maximum length of a Jump List item's `description` property is 260 + * characters. Beyond this limit, the item will not be added to the Jump List, nor + * will it be displayed. + * + * Here's a very simple example of creating a custom Jump List: + * + * @platform win32 + */ + setJumpList(categories: (JumpListCategory[]) | (null)): ('ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError'); + /** + * To work with Electron's `autoUpdater` on Windows, which uses Squirrel, you'll + * want to set the launch path to Update.exe, and pass arguments that specify your + * application name. For example: + * + * @platform darwin,win32 + */ + setLoginItemSettings(settings: Settings): void; + /** + * Overrides the current application's name. + * + * **Note:** This function overrides the name used internally by Electron; it does + * not affect the name that the OS uses. + */ + setName(name: string): void; + /** + * Overrides the `path` to a special directory or file associated with `name`. If + * the path specifies a directory that does not exist, an `Error` is thrown. In + * that case, the directory should be created with `fs.mkdirSync` or similar. + * + * You can only override paths of a `name` defined in `app.getPath`. + * + * By default, web pages' cookies and caches will be stored under the `sessionData` + * directory. If you want to change this location, you have to override the + * `sessionData` path before the `ready` event of the `app` module is emitted. + */ + setPath(name: string, path: string): void; + /** + * Set the `Secure Keyboard Entry` is enabled in your application. + * + * By using this API, important information such as password and other sensitive + * information can be prevented from being intercepted by other processes. + * + * See Apple's documentation for more details. + * + * **Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it + * when it is no longer needed. + * + * @platform darwin + */ + setSecureKeyboardEntryEnabled(enabled: boolean): void; + /** + * Creates an `NSUserActivity` and sets it as the current activity. The activity is + * eligible for Handoff to another device afterward. + * + * @platform darwin + */ + setUserActivity(type: string, userInfo: any, webpageURL?: string): void; + /** + * Adds `tasks` to the Tasks category of the Jump List on Windows. + * + * `tasks` is an array of `Task` objects. + * + * Whether the call succeeded. + * + * **Note:** If you'd like to customize the Jump List even more use + * `app.setJumpList(categories)` instead. + * + * @platform win32 + */ + setUserTasks(tasks: Task[]): boolean; + /** + * Shows application windows after they were hidden. Does not automatically focus + * them. + * + * @platform darwin + */ + show(): void; + /** + * Show the app's about panel options. These options can be overridden with + * `app.setAboutPanelOptions(options)`. + */ + showAboutPanel(): void; + /** + * Show the platform's native emoji picker. + * + * @platform darwin,win32 + */ + showEmojiPanel(): void; + /** + * This function **must** be called once you have finished accessing the security + * scoped file. If you do not remember to stop accessing the bookmark, kernel + * resources will be leaked and your app will lose its ability to reach outside the + * sandbox completely, until your app is restarted. + * + * Start accessing a security scoped resource. With this method Electron + * applications that are packaged for the Mac App Store may reach outside their + * sandbox to access files chosen by the user. See Apple's documentation for a + * description of how this system works. + * + * @platform mas + */ + startAccessingSecurityScopedResource(bookmarkData: string): Function; + /** + * Updates the current activity if its type matches `type`, merging the entries + * from `userInfo` into its current `userInfo` dictionary. + * + * @platform darwin + */ + updateCurrentActivity(type: string, userInfo: any): void; + /** + * fulfilled when Electron is initialized. May be used as a convenient alternative + * to checking `app.isReady()` and subscribing to the `ready` event if the app is + * not ready yet. + */ + whenReady(): Promise; + /** + * A `boolean` property that's `true` if Chrome's accessibility support is enabled, + * `false` otherwise. This property will be `true` if the use of assistive + * technologies, such as screen readers, has been detected. Setting this property + * to `true` manually enables Chrome's accessibility support, allowing developers + * to expose accessibility switch to users in application settings. + * + * See Chromium's accessibility docs for more details. Disabled by default. + * + * This API must be called after the `ready` event is emitted. + * + * **Note:** Rendering accessibility tree can significantly affect the performance + * of your app. It should not be enabled by default. + * + * @platform darwin,win32 + */ + accessibilitySupportEnabled: boolean; + /** + * A `Menu | null` property that returns `Menu` if one has been set and `null` + * otherwise. Users can pass a Menu to set this property. + */ + applicationMenu: (Menu) | (null); + /** + * An `Integer` property that returns the badge count for current app. Setting the + * count to `0` will hide the badge. + * + * On macOS, setting this with any nonzero integer shows on the dock icon. On + * Linux, this property only works for Unity launcher. + * + * **Note:** Unity launcher requires a `.desktop` file to work. For more + * information, please read the Unity integration documentation. + * + * **Note:** On macOS, you need to ensure that your application has the permission + * to display notifications for this property to take effect. + * + * @platform linux,darwin + */ + badgeCount: number; + /** + * A `CommandLine` object that allows you to read and manipulate the command line + * arguments that Chromium uses. + * + */ + readonly commandLine: CommandLine; + /** + * A `Dock` `| undefined` object that allows you to perform actions on your app + * icon in the user's dock on macOS. + * + * @platform darwin + */ + readonly dock: Dock; + /** + * A `boolean` property that returns `true` if the app is packaged, `false` + * otherwise. For many apps, this property can be used to distinguish development + * and production environments. + * + */ + readonly isPackaged: boolean; + /** + * A `string` property that indicates the current application's name, which is the + * name in the application's `package.json` file. + * + * Usually the `name` field of `package.json` is a short lowercase name, according + * to the npm modules spec. You should usually also specify a `productName` field, + * which is your application's full capitalized name, and which will be preferred + * over `name` by Electron. + */ + name: string; + /** + * A `boolean` which when `true` indicates that the app is currently running under + * an ARM64 translator (like the macOS Rosetta Translator Environment or Windows + * WOW). + * + * You can use this property to prompt users to download the arm64 version of your + * application when they are running the x64 version under Rosetta incorrectly. + * + * @platform darwin,win32 + */ + readonly runningUnderARM64Translation: boolean; + /** + * A `boolean` which when `true` indicates that the app is currently running under + * the Rosetta Translator Environment. + * + * You can use this property to prompt users to download the arm64 version of your + * application when they are running the x64 version under Rosetta incorrectly. + * + * **Deprecated:** This property is superceded by the + * `runningUnderARM64Translation` property which detects when the app is being + * translated to ARM64 in both macOS and Windows. + * + * @deprecated + * @platform darwin + */ + readonly runningUnderRosettaTranslation: boolean; + /** + * A `string` which is the user agent string Electron will use as a global + * fallback. + * + * This is the user agent that will be used when no user agent is set at the + * `webContents` or `session` level. It is useful for ensuring that your entire + * app has the same user agent. Set to a custom value as early as possible in your + * app's initialization to ensure that your overridden value is used. + */ + userAgentFallback: string; + } + + interface AutoUpdater extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/auto-updater + + /** + * This event is emitted after a user calls `quitAndInstall()`. + * + * When this API is called, the `before-quit` event is not emitted before all + * windows are closed. As a result you should listen to this event if you wish to + * perform actions before the windows are closed while a process is quitting, as + * well as listening to `before-quit`. + */ + on(event: 'before-quit-for-update', listener: Function): this; + once(event: 'before-quit-for-update', listener: Function): this; + addListener(event: 'before-quit-for-update', listener: Function): this; + removeListener(event: 'before-quit-for-update', listener: Function): this; + /** + * Emitted when checking if an update has started. + */ + on(event: 'checking-for-update', listener: Function): this; + once(event: 'checking-for-update', listener: Function): this; + addListener(event: 'checking-for-update', listener: Function): this; + removeListener(event: 'checking-for-update', listener: Function): this; + /** + * Emitted when there is an error while updating. + */ + on(event: 'error', listener: (error: Error) => void): this; + once(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + removeListener(event: 'error', listener: (error: Error) => void): this; + /** + * Emitted when there is an available update. The update is downloaded + * automatically. + */ + on(event: 'update-available', listener: Function): this; + once(event: 'update-available', listener: Function): this; + addListener(event: 'update-available', listener: Function): this; + removeListener(event: 'update-available', listener: Function): this; + /** + * Emitted when an update has been downloaded. + * + * On Windows only `releaseName` is available. + * + * **Note:** It is not strictly necessary to handle this event. A successfully + * downloaded update will still be applied the next time the application starts. + */ + on(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + once(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + addListener(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + removeListener(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + /** + * Emitted when there is no available update. + */ + on(event: 'update-not-available', listener: Function): this; + once(event: 'update-not-available', listener: Function): this; + addListener(event: 'update-not-available', listener: Function): this; + removeListener(event: 'update-not-available', listener: Function): this; + /** + * Asks the server whether there is an update. You must call `setFeedURL` before + * using this API. + * + * **Note:** If an update is available it will be downloaded automatically. Calling + * `autoUpdater.checkForUpdates()` twice will download the update two times. + */ + checkForUpdates(): void; + /** + * The current update feed URL. + */ + getFeedURL(): string; + /** + * Restarts the app and installs the update after it has been downloaded. It should + * only be called after `update-downloaded` has been emitted. + * + * Under the hood calling `autoUpdater.quitAndInstall()` will close all application + * windows first, and automatically call `app.quit()` after all windows have been + * closed. + * + * **Note:** It is not strictly necessary to call this function to apply an update, + * as a successfully downloaded update will always be applied the next time the + * application starts. + */ + quitAndInstall(): void; + /** + * Sets the `url` and initialize the auto updater. + */ + setFeedURL(options: FeedURLOptions): void; + } + + interface BluetoothDevice { + + // Docs: https://electronjs.org/docs/api/structures/bluetooth-device + + deviceId: string; + deviceName: string; + } + + class BrowserView { + + // Docs: https://electronjs.org/docs/api/browser-view + + /** + * BrowserView + */ + constructor(options?: BrowserViewConstructorOptions); + /** + * The `bounds` of this BrowserView instance as `Object`. + * + * @experimental + */ + getBounds(): Rectangle; + setAutoResize(options: AutoResizeOptions): void; + /** + * 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 + * * 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`. + * + * @experimental + */ + setBackgroundColor(color: string): void; + /** + * Resizes and moves the view to the supplied bounds relative to the window. + * + * @experimental + */ + setBounds(bounds: Rectangle): void; + /** + * A `WebContents` object owned by this view. + * + * @experimental + */ + webContents: WebContents; + } + + class BrowserWindow extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/browser-window + + /** + * Emitted when the window is set or unset to show always on top of other windows. + */ + on(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + once(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + addListener(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + removeListener(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + /** + * Emitted when an App Command is invoked. These are typically related to keyboard + * media keys or browser commands, as well as the "Back" button built into some + * mice on Windows. + * + * Commands are lowercased, underscores are replaced with hyphens, and the + * `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is + * emitted as `browser-backward`. + * + * The following app commands are explicitly supported on Linux: + * + * * `browser-backward` + * * `browser-forward` + * + * @platform win32,linux + */ + on(event: 'app-command', listener: (event: Event, + command: string) => void): this; + once(event: 'app-command', listener: (event: Event, + command: string) => void): this; + addListener(event: 'app-command', listener: (event: Event, + command: string) => void): this; + removeListener(event: 'app-command', listener: (event: Event, + command: string) => void): this; + /** + * Emitted when the window loses focus. + */ + on(event: 'blur', listener: Function): this; + once(event: 'blur', listener: Function): this; + addListener(event: 'blur', listener: Function): this; + removeListener(event: 'blur', listener: Function): this; + /** + * Emitted when the window is going to be closed. It's emitted before the + * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()` + * will cancel the close. + * + * Usually you would want to use the `beforeunload` handler to decide whether the + * window should be closed, which will also be called when the window is reloaded. + * In Electron, returning any value other than `undefined` would cancel the close. + * For example: + * + * _**Note**: There is a subtle difference between the behaviors of + * `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', + * handler)`. It is recommended to always set the `event.returnValue` explicitly, + * instead of only returning a value, as the former works more consistently within + * Electron._ + */ + on(event: 'close', listener: (event: Event) => void): this; + once(event: 'close', listener: (event: Event) => void): this; + addListener(event: 'close', listener: (event: Event) => void): this; + removeListener(event: 'close', listener: (event: Event) => void): this; + /** + * Emitted when the window is closed. After you have received this event you should + * remove the reference to the window and avoid using it any more. + */ + on(event: 'closed', listener: Function): this; + once(event: 'closed', listener: Function): this; + addListener(event: 'closed', listener: Function): this; + removeListener(event: 'closed', listener: Function): this; + /** + * Emitted when the window enters a full-screen state. + */ + on(event: 'enter-full-screen', listener: Function): this; + once(event: 'enter-full-screen', listener: Function): this; + addListener(event: 'enter-full-screen', listener: Function): this; + removeListener(event: 'enter-full-screen', listener: Function): this; + /** + * Emitted when the window enters a full-screen state triggered by HTML API. + */ + on(event: 'enter-html-full-screen', listener: Function): this; + once(event: 'enter-html-full-screen', listener: Function): this; + addListener(event: 'enter-html-full-screen', listener: Function): this; + removeListener(event: 'enter-html-full-screen', listener: Function): this; + /** + * Emitted when the window gains focus. + */ + on(event: 'focus', listener: Function): this; + once(event: 'focus', listener: Function): this; + addListener(event: 'focus', listener: Function): this; + removeListener(event: 'focus', listener: Function): this; + /** + * Emitted when the window is hidden. + */ + on(event: 'hide', listener: Function): this; + once(event: 'hide', listener: Function): this; + addListener(event: 'hide', listener: Function): this; + removeListener(event: 'hide', listener: Function): this; + /** + * Emitted when the window leaves a full-screen state. + */ + on(event: 'leave-full-screen', listener: Function): this; + once(event: 'leave-full-screen', listener: Function): this; + addListener(event: 'leave-full-screen', listener: Function): this; + removeListener(event: 'leave-full-screen', listener: Function): this; + /** + * Emitted when the window leaves a full-screen state triggered by HTML API. + */ + on(event: 'leave-html-full-screen', listener: Function): this; + once(event: 'leave-html-full-screen', listener: Function): this; + addListener(event: 'leave-html-full-screen', listener: Function): this; + removeListener(event: 'leave-html-full-screen', listener: Function): this; + /** + * Emitted when window is maximized. + */ + on(event: 'maximize', listener: Function): this; + once(event: 'maximize', listener: Function): this; + addListener(event: 'maximize', listener: Function): this; + removeListener(event: 'maximize', listener: Function): this; + /** + * Emitted when the window is minimized. + */ + on(event: 'minimize', listener: Function): this; + once(event: 'minimize', listener: Function): this; + addListener(event: 'minimize', listener: Function): this; + removeListener(event: 'minimize', listener: Function): this; + /** + * Emitted when the window is being moved to a new position. + */ + on(event: 'move', listener: Function): this; + once(event: 'move', listener: Function): this; + addListener(event: 'move', listener: Function): this; + removeListener(event: 'move', listener: Function): this; + /** + * Emitted once when the window is moved to a new position. + * + * __Note__: On macOS this event is an alias of `move`. + * + * @platform darwin,win32 + */ + on(event: 'moved', listener: Function): this; + once(event: 'moved', listener: Function): this; + addListener(event: 'moved', listener: Function): this; + removeListener(event: 'moved', listener: Function): this; + /** + * Emitted when the native new tab button is clicked. + * + * @platform darwin + */ + on(event: 'new-window-for-tab', listener: Function): this; + once(event: 'new-window-for-tab', listener: Function): this; + addListener(event: 'new-window-for-tab', listener: Function): this; + removeListener(event: 'new-window-for-tab', listener: Function): this; + /** + * Emitted when the document changed its title, calling `event.preventDefault()` + * will prevent the native window's title from changing. `explicitSet` is false + * when title is synthesized from file URL. + */ + on(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + once(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + addListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + removeListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + /** + * Emitted when the web page has been rendered (while not being shown) and window + * can be displayed without a visual flash. + * + * Please note that using this event implies that the renderer will be considered + * "visible" and paint even though `show` is false. This event will never fire if + * you use `paintWhenInitiallyHidden: false` + */ + on(event: 'ready-to-show', listener: Function): this; + once(event: 'ready-to-show', listener: Function): this; + addListener(event: 'ready-to-show', listener: Function): this; + removeListener(event: 'ready-to-show', listener: Function): this; + /** + * Emitted after the window has been resized. + */ + on(event: 'resize', listener: Function): this; + once(event: 'resize', listener: Function): this; + addListener(event: 'resize', listener: Function): this; + removeListener(event: 'resize', listener: Function): this; + /** + * Emitted once when the window has finished being resized. + * + * This is usually emitted when the window has been resized manually. On macOS, + * resizing the window with `setBounds`/`setSize` and setting the `animate` + * parameter to `true` will also emit this event once resizing has finished. + * + * @platform darwin,win32 + */ + on(event: 'resized', listener: Function): this; + once(event: 'resized', listener: Function): this; + addListener(event: 'resized', listener: Function): this; + removeListener(event: 'resized', listener: Function): this; + /** + * Emitted when the unresponsive web page becomes responsive again. + */ + on(event: 'responsive', listener: Function): this; + once(event: 'responsive', listener: Function): this; + addListener(event: 'responsive', listener: Function): this; + removeListener(event: 'responsive', listener: Function): this; + /** + * Emitted when the window is restored from a minimized state. + */ + on(event: 'restore', listener: Function): this; + once(event: 'restore', listener: Function): this; + addListener(event: 'restore', listener: Function): this; + removeListener(event: 'restore', listener: Function): this; + /** + * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture + * is ended. The `rotation` value on each emission is the angle in degrees rotated + * since the last emission. The last emitted event upon a rotation gesture will + * always be of value `0`. Counter-clockwise rotation values are positive, while + * clockwise ones are negative. + * + * @platform darwin + */ + on(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + once(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + addListener(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + removeListener(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + /** + * Emitted when scroll wheel event phase has begun. + * + * @platform darwin + */ + on(event: 'scroll-touch-begin', listener: Function): this; + once(event: 'scroll-touch-begin', listener: Function): this; + addListener(event: 'scroll-touch-begin', listener: Function): this; + removeListener(event: 'scroll-touch-begin', listener: Function): this; + /** + * Emitted when scroll wheel event phase filed upon reaching the edge of element. + * + * @platform darwin + */ + on(event: 'scroll-touch-edge', listener: Function): this; + once(event: 'scroll-touch-edge', listener: Function): this; + addListener(event: 'scroll-touch-edge', listener: Function): this; + removeListener(event: 'scroll-touch-edge', listener: Function): this; + /** + * Emitted when scroll wheel event phase has ended. + * + * @platform darwin + */ + on(event: 'scroll-touch-end', listener: Function): this; + once(event: 'scroll-touch-end', listener: Function): this; + addListener(event: 'scroll-touch-end', listener: Function): this; + removeListener(event: 'scroll-touch-end', listener: Function): this; + /** + * Emitted when window session is going to end due to force shutdown or machine + * restart or session log off. + * + * @platform win32 + */ + on(event: 'session-end', listener: Function): this; + once(event: 'session-end', listener: Function): this; + addListener(event: 'session-end', listener: Function): this; + removeListener(event: 'session-end', listener: Function): this; + /** + * Emitted when the window opens a sheet. + * + * @platform darwin + */ + on(event: 'sheet-begin', listener: Function): this; + once(event: 'sheet-begin', listener: Function): this; + addListener(event: 'sheet-begin', listener: Function): this; + removeListener(event: 'sheet-begin', listener: Function): this; + /** + * Emitted when the window has closed a sheet. + * + * @platform darwin + */ + on(event: 'sheet-end', listener: Function): this; + once(event: 'sheet-end', listener: Function): this; + addListener(event: 'sheet-end', listener: Function): this; + removeListener(event: 'sheet-end', listener: Function): this; + /** + * Emitted when the window is shown. + */ + on(event: 'show', listener: Function): this; + once(event: 'show', listener: Function): this; + addListener(event: 'show', listener: Function): this; + removeListener(event: 'show', listener: Function): this; + /** + * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`, + * `left`. + * + * The method underlying this event is built to handle older macOS-style trackpad + * swiping, where the content on the screen doesn't move with the swipe. Most macOS + * trackpads are not configured to allow this kind of swiping anymore, so in order + * for it to emit properly the 'Swipe between pages' preference in `System + * Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three + * fingers'. + * + * @platform darwin + */ + on(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + once(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + addListener(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + removeListener(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + /** + * Emitted when the system context menu is triggered on the window, this is + * normally only triggered when the user right clicks on the non-client area of + * your window. This is the window titlebar or any area you have declared as + * `-webkit-app-region: drag` in a frameless window. + * + * Calling `event.preventDefault()` will prevent the menu from being displayed. + * + * @platform win32 + */ + on(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + once(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + addListener(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + removeListener(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + /** + * Emitted when the window exits from a maximized state. + */ + on(event: 'unmaximize', listener: Function): this; + once(event: 'unmaximize', listener: Function): this; + addListener(event: 'unmaximize', listener: Function): this; + removeListener(event: 'unmaximize', listener: Function): this; + /** + * Emitted when the web page becomes unresponsive. + */ + on(event: 'unresponsive', listener: Function): this; + once(event: 'unresponsive', listener: Function): this; + addListener(event: 'unresponsive', listener: Function): this; + removeListener(event: 'unresponsive', listener: Function): this; + /** + * Emitted before the window is moved. On Windows, calling `event.preventDefault()` + * will prevent the window from being moved. + * + * Note that this is only emitted when the window is being moved manually. Moving + * the window with `setPosition`/`setBounds`/`center` will not emit this event. + * + * @platform darwin,win32 + */ + on(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + once(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + addListener(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + removeListener(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + /** + * Emitted before the window is resized. Calling `event.preventDefault()` will + * prevent the window from being resized. + * + * Note that this is only emitted when the window is being resized manually. + * Resizing the window with `setBounds`/`setSize` will not emit this event. + * + * The possible values and behaviors of the `edge` option are platform dependent. + * Possible values are: + * + * * On Windows, possible values are `bottom`, `top`, `left`, `right`, `top-left`, + * `top-right`, `bottom-left`, `bottom-right`. + * * On macOS, possible values are `bottom` and `right`. + * * The value `bottom` is used to denote vertical resizing. + * * The value `right` is used to denote horizontal resizing. + * + * @platform darwin,win32 + */ + on(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle, + details: WillResizeDetails) => void): this; + once(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle, + details: WillResizeDetails) => void): this; + addListener(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle, + details: WillResizeDetails) => void): this; + removeListener(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle, + details: WillResizeDetails) => void): this; + /** + * BrowserWindow + */ + constructor(options?: BrowserWindowConstructorOptions); + /** + * The window that owns the given `browserView`. If the given view is not attached + * to any window, returns `null`. + */ + static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null); + /** + * The window with the given `id`. + */ + static fromId(id: number): (BrowserWindow) | (null); + /** + * The window that owns the given `webContents` or `null` if the contents are not + * owned by a window. + */ + static fromWebContents(webContents: WebContents): (BrowserWindow) | (null); + /** + * An array of all opened browser windows. + */ + static getAllWindows(): BrowserWindow[]; + /** + * The window that is focused in this application, otherwise returns `null`. + */ + static getFocusedWindow(): (BrowserWindow) | (null); + /** + * Replacement API for setBrowserView supporting work with multi browser views. + * + * @experimental + */ + addBrowserView(browserView: BrowserView): void; + /** + * Adds a window as a tab on this window, after the tab for the window instance. + * + * @platform darwin + */ + addTabbedWindow(browserWindow: BrowserWindow): void; + /** + * Removes focus from the window. + */ + blur(): void; + blurWebView(): void; + /** + * Resolves with a NativeImage + * + * Captures a snapshot of the page within `rect`. Omitting `rect` will capture the + * whole visible page. If the page is not visible, `rect` may be empty. + */ + capturePage(rect?: Rectangle): Promise; + /** + * Moves window to the center of the screen. + */ + center(): void; + /** + * Try to close the window. This has the same effect as a user manually clicking + * the close button of the window. The web page may cancel the close though. See + * the close event. + */ + close(): void; + /** + * Closes the currently open Quick Look panel. + * + * @platform darwin + */ + closeFilePreview(): void; + /** + * Force closing the window, the `unload` and `beforeunload` event won't be emitted + * for the web page, and `close` event will also not be emitted for this window, + * but it guarantees the `closed` event will be emitted. + */ + destroy(): void; + /** + * Starts or stops flashing the window to attract user's attention. + */ + flashFrame(flag: boolean): void; + /** + * Focuses on the window. + */ + focus(): void; + focusOnWebView(): void; + /** + * Gets the background color of the window in Hex (`#RRGGBB`) format. + * + * See Setting `backgroundColor`. + * + * **Note:** The alpha value is _not_ returned alongside the red, green, and blue + * values. + */ + getBackgroundColor(): string; + /** + * The `bounds` of the window as `Object`. + */ + getBounds(): Rectangle; + /** + * The `BrowserView` attached to `win`. Returns `null` if one is not attached. + * Throws an error if multiple `BrowserView`s are attached. + * + * @experimental + */ + getBrowserView(): (BrowserView) | (null); + /** + * an array of all BrowserViews that have been attached with `addBrowserView` or + * `setBrowserView`. + * + * **Note:** The BrowserView API is currently experimental and may change or be + * removed in future Electron releases. + * + * @experimental + */ + getBrowserViews(): BrowserView[]; + /** + * All child windows. + */ + getChildWindows(): BrowserWindow[]; + /** + * The `bounds` of the window's client area as `Object`. + */ + getContentBounds(): Rectangle; + /** + * Contains the window's client area's width and height. + */ + getContentSize(): number[]; + /** + * Contains the window's maximum width and height. + */ + getMaximumSize(): number[]; + /** + * Window id in the format of DesktopCapturerSource's id. For example + * "window:1324:0". + * + * More precisely the format is `window:id:other_id` where `id` is `HWND` on + * Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on + * Linux. `other_id` is used to identify web contents (tabs) so within the same top + * level window. + */ + getMediaSourceId(): string; + /** + * Contains the window's minimum width and height. + */ + getMinimumSize(): number[]; + /** + * The platform-specific handle of the window. + * + * The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and + * `Window` (`unsigned long`) on Linux. + */ + getNativeWindowHandle(): Buffer; + /** + * Contains the window bounds of the normal state + * + * **Note:** whatever the current state of the window : maximized, minimized or in + * fullscreen, this function always returns the position and size of the window in + * normal state. In normal state, getBounds and getNormalBounds returns the same + * `Rectangle`. + */ + getNormalBounds(): Rectangle; + /** + * between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns + * 1. + */ + getOpacity(): number; + /** + * The parent window or `null` if there is no parent. + */ + getParentWindow(): (BrowserWindow) | (null); + /** + * Contains the window's current position. + */ + getPosition(): number[]; + /** + * The pathname of the file the window represents. + * + * @platform darwin + */ + getRepresentedFilename(): string; + /** + * Contains the window's width and height. + */ + getSize(): number[]; + /** + * The title of the native window. + * + * **Note:** The title of the web page can be different from the title of the + * native window. + */ + getTitle(): string; + /** + * The custom position for the traffic light buttons in frameless window. + * + * @platform darwin + */ + getTrafficLightPosition(): Point; + /** + * Whether the window has a shadow. + */ + hasShadow(): boolean; + /** + * Hides the window. + */ + hide(): void; + /** + * Hooks a windows message. The `callback` is called when the message is received + * in the WndProc. + * + * @platform win32 + */ + hookWindowMessage(message: number, callback: (wParam: any, lParam: any) => void): void; + /** + * Whether the window is always on top of other windows. + */ + isAlwaysOnTop(): boolean; + /** + * Whether the window can be manually closed by user. + * + * On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isClosable(): boolean; + /** + * Whether the window is destroyed. + */ + isDestroyed(): boolean; + /** + * Whether the window's document has been edited. + * + * @platform darwin + */ + isDocumentEdited(): boolean; + /** + * whether the window is enabled. + */ + isEnabled(): boolean; + /** + * Returns whether the window can be focused. + * + * @platform darwin,win32 + */ + isFocusable(): void; + /** + * Whether the window is focused. + */ + isFocused(): boolean; + /** + * Whether the window is in fullscreen mode. + */ + isFullScreen(): boolean; + /** + * Whether the maximize/zoom window button toggles fullscreen mode or maximizes the + * window. + */ + isFullScreenable(): boolean; + /** + * Whether the window is in kiosk mode. + */ + isKiosk(): boolean; + /** + * Whether the window can be manually maximized by user. + * + * On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMaximizable(): boolean; + /** + * Whether the window is maximized. + */ + isMaximized(): boolean; + /** + * Whether menu bar automatically hides itself. + * + * @platform win32,linux + */ + isMenuBarAutoHide(): boolean; + /** + * Whether the menu bar is visible. + * + * @platform win32,linux + */ + isMenuBarVisible(): boolean; + /** + * Whether the window can be manually minimized by the user. + * + * On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMinimizable(): boolean; + /** + * Whether the window is minimized. + */ + isMinimized(): boolean; + /** + * Whether current window is a modal window. + */ + isModal(): boolean; + /** + * Whether the window can be moved by user. + * + * On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMovable(): boolean; + /** + * Whether the window is in normal state (not maximized, not minimized, not in + * fullscreen mode). + */ + isNormal(): boolean; + /** + * Whether the window can be manually resized by the user. + */ + isResizable(): boolean; + /** + * Whether the window is in simple (pre-Lion) fullscreen mode. + * + * @platform darwin + */ + isSimpleFullScreen(): boolean; + /** + * Whether the window is in Windows 10 tablet mode. + * + * Since Windows 10 users can use their PC as tablet, under this mode apps can + * choose to optimize their UI for tablets, such as enlarging the titlebar and + * hiding titlebar buttons. + * + * This API returns whether the window is in tablet mode, and the `resize` event + * can be be used to listen to changes to tablet mode. + * + * @platform win32 + */ + isTabletMode(): boolean; + /** + * Whether the window is visible to the user. + */ + isVisible(): boolean; + /** + * Whether the window is visible on all workspaces. + * + * **Note:** This API always returns false on Windows. + * + * @platform darwin,linux + */ + isVisibleOnAllWorkspaces(): boolean; + /** + * `true` or `false` depending on whether the message is hooked. + * + * @platform win32 + */ + isWindowMessageHooked(message: number): boolean; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Same as `webContents.loadFile`, `filePath` should be a path to an HTML file + * relative to the root of your application. See the `webContents` docs for more + * information. + */ + loadFile(filePath: string, options?: LoadFileOptions): Promise; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Same as `webContents.loadURL(url[, options])`. + * + * The `url` can be a remote address (e.g. `http://`) or a path to a local HTML + * file using the `file://` protocol. + * + * To ensure that file URLs are properly formatted, it is recommended to use Node's + * `url.format` method: + * + * You can load a URL using a `POST` request with URL-encoded data by doing the + * following: + */ + loadURL(url: string, options?: LoadURLOptions): Promise; + /** + * Maximizes the window. This will also show (but not focus) the window if it isn't + * being displayed already. + */ + maximize(): void; + /** + * Merges all windows into one window with multiple tabs when native tabs are + * enabled and there is more than one open window. + * + * @platform darwin + */ + mergeAllWindows(): void; + /** + * Minimizes the window. On some platforms the minimized window will be shown in + * the Dock. + */ + minimize(): void; + /** + * Moves window above the source window in the sense of z-order. If the + * `mediaSourceId` is not of type window or if the window does not exist then this + * method throws an error. + */ + moveAbove(mediaSourceId: string): void; + /** + * Moves the current tab into a new window if native tabs are enabled and there is + * more than one tab in the current window. + * + * @platform darwin + */ + moveTabToNewWindow(): void; + /** + * Moves window to top(z-order) regardless of focus + */ + moveTop(): void; + /** + * Uses Quick Look to preview a file at a given path. + * + * @platform darwin + */ + previewFile(path: string, displayName?: string): void; + /** + * Same as `webContents.reload`. + */ + reload(): void; + removeBrowserView(browserView: BrowserView): void; + /** + * Remove the window's menu bar. + * + * @platform linux,win32 + */ + removeMenu(): void; + /** + * Restores the window from minimized state to its previous state. + */ + restore(): void; + /** + * Selects the next tab when native tabs are enabled and there are other tabs in + * the window. + * + * @platform darwin + */ + selectNextTab(): void; + /** + * Selects the previous tab when native tabs are enabled and there are other tabs + * in the window. + * + * @platform darwin + */ + selectPreviousTab(): void; + /** + * Sets whether the window should show always on top of other windows. After + * setting this, the window is still a normal window, not a toolbox window which + * can not be focused on. + */ + setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void; + /** + * Sets the properties for the window's taskbar button. + * + * **Note:** `relaunchCommand` and `relaunchDisplayName` must always be set + * together. If one of those properties is not set, then neither will be used. + * + * @platform win32 + */ + setAppDetails(options: AppDetailsOptions): void; + /** + * This will make a window maintain an aspect ratio. The extra size allows a + * developer to have space, specified in pixels, not included within the aspect + * ratio calculations. This API already takes into account the difference between a + * window's size and its content size. + * + * Consider a normal window with an HD video player and associated controls. + * Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls + * on the right edge and 50 pixels of controls below the player. In order to + * maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within + * the player itself we would call this function with arguments of 16/9 and { + * width: 40, height: 50 }. The second argument doesn't care where the extra width + * and height are within the content view--only that they exist. Sum any extra + * width and height areas you have within the overall content view. + * + * The aspect ratio is not respected when window is resized programmatically with + * APIs like `win.setSize`. + */ + setAspectRatio(aspectRatio: number, extraSize?: Size): void; + /** + * Controls whether to hide cursor when typing. + * + * @platform darwin + */ + setAutoHideCursor(autoHide: boolean): void; + /** + * Sets whether the window menu bar should hide itself automatically. Once set the + * menu bar will only show when users press the single `Alt` key. + * + * If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't + * hide it immediately. + * + * @platform win32,linux + */ + setAutoHideMenuBar(hide: boolean): void; + /** + * 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 + * * 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`. + */ + setBackgroundColor(backgroundColor: string): void; + /** + * Resizes and moves the window to the supplied bounds. Any properties that are not + * supplied will default to their current values. + */ + setBounds(bounds: Partial, animate?: boolean): void; + setBrowserView(browserView: (BrowserView) | (null)): void; + /** + * Sets whether the window can be manually closed by user. On Linux does nothing. + * + * @platform darwin,win32 + */ + setClosable(closable: boolean): void; + /** + * Resizes and moves the window's client area (e.g. the web page) to the supplied + * bounds. + */ + setContentBounds(bounds: Rectangle, animate?: boolean): void; + /** + * Prevents the window contents from being captured by other apps. + * + * On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows + * it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10 + * version 2004 and up the window will be removed from capture entirely, older + * Windows versions behave as if `WDA_MONITOR` is applied capturing a black window. + * + * @platform darwin,win32 + */ + setContentProtection(enable: boolean): void; + /** + * Resizes the window's client area (e.g. the web page) to `width` and `height`. + */ + setContentSize(width: number, height: number, animate?: boolean): void; + /** + * Specifies whether the window’s document has been edited, and the icon in title + * bar will become gray when set to `true`. + * + * @platform darwin + */ + setDocumentEdited(edited: boolean): void; + /** + * Disable or enable the window. + */ + setEnabled(enable: boolean): void; + /** + * Changes whether the window can be focused. + * + * On macOS it does not remove the focus from the window. + * + * @platform darwin,win32 + */ + setFocusable(focusable: boolean): void; + /** + * Sets whether the window should be in fullscreen mode. + */ + setFullScreen(flag: boolean): void; + /** + * Sets whether the maximize/zoom window button toggles fullscreen mode or + * maximizes the window. + */ + setFullScreenable(fullscreenable: boolean): void; + /** + * Sets whether the window should have a shadow. + */ + setHasShadow(hasShadow: boolean): void; + /** + * Changes window icon. + * + * @platform win32,linux + */ + setIcon(icon: (NativeImage) | (string)): void; + /** + * Makes the window ignore all mouse events. + * + * All mouse events happened in this window will be passed to the window below this + * window, but if this window has focus, it will still receive keyboard events. + */ + setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void; + /** + * Enters or leaves kiosk mode. + */ + setKiosk(flag: boolean): void; + /** + * Sets whether the window can be manually maximized by user. On Linux does + * nothing. + * + * @platform darwin,win32 + */ + setMaximizable(maximizable: boolean): void; + /** + * Sets the maximum size of window to `width` and `height`. + */ + setMaximumSize(width: number, height: number): void; + /** + * Sets the `menu` as the window's menu bar. + * + * @platform linux,win32 + */ + setMenu(menu: (Menu) | (null)): void; + /** + * Sets whether the menu bar should be visible. If the menu bar is auto-hide, users + * can still bring up the menu bar by pressing the single `Alt` key. + * + * @platform win32,linux + */ + setMenuBarVisibility(visible: boolean): void; + /** + * Sets whether the window can be manually minimized by user. On Linux does + * nothing. + * + * @platform darwin,win32 + */ + setMinimizable(minimizable: boolean): void; + /** + * Sets the minimum size of window to `width` and `height`. + */ + setMinimumSize(width: number, height: number): void; + /** + * Sets whether the window can be moved by user. On Linux does nothing. + * + * @platform darwin,win32 + */ + setMovable(movable: boolean): void; + /** + * Sets the opacity of the window. On Linux, does nothing. Out of bound number + * values are clamped to the [0, 1] range. + * + * @platform win32,darwin + */ + setOpacity(opacity: number): void; + /** + * Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to + * convey some sort of application status or to passively notify the user. + * + * @platform win32 + */ + setOverlayIcon(overlay: (NativeImage) | (null), description: string): void; + /** + * Sets `parent` as current window's parent window, passing `null` will turn + * current window into a top-level window. + */ + setParentWindow(parent: (BrowserWindow) | (null)): void; + /** + * Moves window to `x` and `y`. + */ + setPosition(x: number, y: number, animate?: boolean): void; + /** + * Sets progress value in progress bar. Valid range is [0, 1.0]. + * + * Remove progress bar when progress < 0; Change to indeterminate mode when + * progress > 1. + * + * On Linux platform, only supports Unity desktop environment, you need to specify + * the `*.desktop` file name to `desktopName` field in `package.json`. By default, + * it will assume `{app.name}.desktop`. + * + * On Windows, a mode can be passed. Accepted values are `none`, `normal`, + * `indeterminate`, `error`, and `paused`. If you call `setProgressBar` without a + * mode set (but with a value within the valid range), `normal` will be assumed. + */ + setProgressBar(progress: number, options?: ProgressBarOptions): void; + /** + * Sets the pathname of the file the window represents, and the icon of the file + * will show in window's title bar. + * + * @platform darwin + */ + setRepresentedFilename(filename: string): void; + /** + * Sets whether the window can be manually resized by the user. + */ + setResizable(resizable: boolean): void; + /** + * Setting a window shape determines the area within the window where the system + * permits drawing and user interaction. Outside of the given region, no pixels + * will be drawn and no mouse events will be registered. Mouse events outside of + * the region will not be received by that window, but will fall through to + * whatever is behind the window. + * + * @experimental + * @platform win32,linux + */ + setShape(rects: Rectangle[]): void; + /** + * Changes the attachment point for sheets on macOS. By default, sheets are + * attached just below the window frame, but you may want to display them beneath a + * HTML-rendered toolbar. For example: + * + * @platform darwin + */ + setSheetOffset(offsetY: number, offsetX?: number): void; + /** + * Enters or leaves simple fullscreen mode. + * + * Simple fullscreen mode emulates the native fullscreen behavior found in versions + * of macOS prior to Lion (10.7). + * + * @platform darwin + */ + setSimpleFullScreen(flag: boolean): void; + /** + * Resizes the window to `width` and `height`. If `width` or `height` are below any + * set minimum size constraints the window will snap to its minimum size. + */ + setSize(width: number, height: number, animate?: boolean): void; + /** + * Makes the window not show in the taskbar. + * + * @platform darwin,win32 + */ + setSkipTaskbar(skip: boolean): void; + /** + * Whether the buttons were added successfully + * + * Add a thumbnail toolbar with a specified set of buttons to the thumbnail image + * of a window in a taskbar button layout. Returns a `boolean` object indicates + * whether the thumbnail has been added successfully. + * + * The number of buttons in thumbnail toolbar should be no greater than 7 due to + * the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be + * removed due to the platform's limitation. But you can call the API with an empty + * array to clean the buttons. + * + * The `buttons` is an array of `Button` objects: + * + * * `Button` Object + * * `icon` NativeImage - The icon showing in thumbnail toolbar. + * * `click` Function + * * `tooltip` string (optional) - The text of the button's tooltip. + * * `flags` string[] (optional) - Control specific states and behaviors of the + * button. By default, it is `['enabled']`. + * + * The `flags` is an array that can include following `string`s: + * + * * `enabled` - The button is active and available to the user. + * * `disabled` - The button is disabled. It is present, but has a visual state + * indicating it will not respond to user action. + * * `dismissonclick` - When the button is clicked, the thumbnail window closes + * immediately. + * * `nobackground` - Do not draw a button border, use only the image. + * * `hidden` - The button is not shown to the user. + * * `noninteractive` - The button is enabled but not interactive; no pressed + * button state is drawn. This value is intended for instances where the button is + * used in a notification. + * + * @platform win32 + */ + setThumbarButtons(buttons: ThumbarButton[]): boolean; + /** + * Sets the region of the window to show as the thumbnail image displayed when + * hovering over the window in the taskbar. You can reset the thumbnail to be the + * entire window by specifying an empty region: `{ x: 0, y: 0, width: 0, height: 0 + * }`. + * + * @platform win32 + */ + setThumbnailClip(region: Rectangle): void; + /** + * Sets the toolTip that is displayed when hovering over the window thumbnail in + * the taskbar. + * + * @platform win32 + */ + setThumbnailToolTip(toolTip: string): void; + /** + * Changes the title of native window to `title`. + */ + setTitle(title: string): void; + /** + * On a Window with Window Controls Overlay already enabled, this method updates + * the style of the title bar overlay. + * + * @platform win32 + */ + setTitleBarOverlay(options: TitleBarOverlayOptions): void; + /** + * Raises `browserView` above other `BrowserView`s attached to `win`. Throws an + * error if `browserView` is not attached to `win`. + * + * @experimental + */ + setTopBrowserView(browserView: BrowserView): void; + /** + * Sets the touchBar layout for the current window. Specifying `null` or + * `undefined` clears the touch bar. This method only has an effect if the machine + * has a touch bar and is running on macOS 10.12.1+. + * + * **Note:** The TouchBar API is currently experimental and may change or be + * removed in future Electron releases. + * + * @platform darwin + */ + setTouchBar(touchBar: (TouchBar) | (null)): void; + /** + * Set a custom position for the traffic light buttons in frameless window. + * + * @platform darwin + */ + setTrafficLightPosition(position: Point): void; + /** + * Adds a vibrancy effect to the browser window. Passing `null` or an empty string + * will remove the vibrancy effect on the window. + * + * Note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` + * have been deprecated and will be removed in an upcoming version of macOS. + * + * @platform darwin + */ + setVibrancy(type: (('appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void; + /** + * Sets whether the window should be visible on all workspaces. + * + * **Note:** This API does nothing on Windows. + * + * @platform darwin,linux + */ + setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void; + /** + * Sets whether the window traffic light buttons should be visible. + * + * @platform darwin + */ + setWindowButtonVisibility(visible: boolean): void; + /** + * Shows and gives focus to the window. + */ + show(): void; + /** + * Same as `webContents.showDefinitionForSelection()`. + * + * @platform darwin + */ + showDefinitionForSelection(): void; + /** + * Shows the window but doesn't focus on it. + */ + showInactive(): void; + /** + * Toggles the visibility of the tab bar if native tabs are enabled and there is + * only one tab in the current window. + * + * @platform darwin + */ + toggleTabBar(): void; + /** + * Unhooks all of the window messages. + * + * @platform win32 + */ + unhookAllWindowMessages(): void; + /** + * Unhook the window message. + * + * @platform win32 + */ + unhookWindowMessage(message: number): void; + /** + * Unmaximizes the window. + */ + unmaximize(): void; + /** + * A `string` property that defines an alternative title provided only to + * accessibility tools such as screen readers. This string is not directly visible + * to users. + */ + accessibleTitle: string; + /** + * A `boolean` property that determines whether the window menu bar should hide + * itself automatically. Once set, the menu bar will only show when users press the + * single `Alt` key. + * + * If the menu bar is already visible, setting this property to `true` won't hide + * it immediately. + */ + autoHideMenuBar: boolean; + /** + * A `boolean` property that determines whether the window can be manually closed + * by user. + * + * On Linux the setter is a no-op, although the getter returns `true`. + * + * @platform darwin,win32 + */ + closable: boolean; + /** + * A `boolean` property that specifies whether the window’s document has been + * edited. + * + * The icon in title bar will become gray when set to `true`. + * + * @platform darwin + */ + documentEdited: boolean; + /** + * A `boolean` property that determines whether the window is excluded from the + * application’s Windows menu. `false` by default. + * + * @platform darwin + */ + excludedFromShownWindowsMenu: boolean; + /** + * A `boolean` property that determines whether the window is focusable. + * + * @platform win32,darwin + */ + focusable: boolean; + /** + * A `boolean` property that determines whether the window is in fullscreen mode. + */ + fullScreen: boolean; + /** + * A `boolean` property that determines whether the maximize/zoom window button + * toggles fullscreen mode or maximizes the window. + */ + fullScreenable: boolean; + /** + * A `Integer` property representing the unique ID of the window. Each ID is unique + * among all `BrowserWindow` instances of the entire Electron application. + * + */ + readonly id: number; + /** + * A `boolean` property that determines whether the window is in kiosk mode. + */ + kiosk: boolean; + /** + * A `boolean` property that determines whether the window can be manually + * maximized by user. + * + * On Linux the setter is a no-op, although the getter returns `true`. + * + * @platform darwin,win32 + */ + maximizable: boolean; + /** + * A `boolean` property that determines whether the menu bar should be visible. + * + * **Note:** If the menu bar is auto-hide, users can still bring up the menu bar by + * pressing the single `Alt` key. + * + * @platform win32,linux + */ + menuBarVisible: boolean; + /** + * A `boolean` property that determines whether the window can be manually + * minimized by user. + * + * On Linux the setter is a no-op, although the getter returns `true`. + * + * @platform darwin,win32 + */ + minimizable: boolean; + /** + * A `boolean` property that determines Whether the window can be moved by user. + * + * On Linux the setter is a no-op, although the getter returns `true`. + * + * @platform darwin,win32 + */ + movable: boolean; + /** + * A `string` property that determines the pathname of the file the window + * represents, and the icon of the file will show in window's title bar. + * + * @platform darwin + */ + representedFilename: string; + /** + * A `boolean` property that determines whether the window can be manually resized + * by user. + */ + resizable: boolean; + /** + * A `boolean` property that determines whether the window has a shadow. + */ + shadow: boolean; + /** + * A `boolean` property that determines whether the window is in simple (pre-Lion) + * fullscreen mode. + */ + simpleFullScreen: boolean; + /** + * A `string` property that determines the title of the native window. + * + * **Note:** The title of the web page can be different from the title of the + * native window. + */ + title: string; + /** + * A `boolean` property that determines whether the window is visible on all + * workspaces. + * + * **Note:** Always returns false on Windows. + * + * @platform darwin,linux + */ + visibleOnAllWorkspaces: boolean; + /** + * A `WebContents` object this window owns. All web page related events and + * operations will be done via it. + * + * See the `webContents` documentation for its methods and events. + * + */ + readonly webContents: WebContents; + } + + interface Certificate { + + // Docs: https://electronjs.org/docs/api/structures/certificate + + /** + * PEM encoded data + */ + data: string; + /** + * Fingerprint of the certificate + */ + fingerprint: string; + /** + * Issuer principal + */ + issuer: CertificatePrincipal; + /** + * Issuer certificate (if not self-signed) + */ + issuerCert: Certificate; + /** + * Issuer's Common Name + */ + issuerName: string; + /** + * Hex value represented string + */ + serialNumber: string; + /** + * Subject principal + */ + subject: CertificatePrincipal; + /** + * Subject's Common Name + */ + subjectName: string; + /** + * End date of the certificate being valid in seconds + */ + validExpiry: number; + /** + * Start date of the certificate being valid in seconds + */ + validStart: number; + } + + interface CertificatePrincipal { + + // Docs: https://electronjs.org/docs/api/structures/certificate-principal + + /** + * Common Name. + */ + commonName: string; + /** + * Country or region. + */ + country: string; + /** + * Locality. + */ + locality: string; + /** + * Organization names. + */ + organizations: string[]; + /** + * Organization Unit names. + */ + organizationUnits: string[]; + /** + * State or province. + */ + state: string; + } + + class ClientRequest extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/client-request + + /** + * Emitted when the `request` is aborted. The `abort` event will not be fired if + * the `request` is already closed. + */ + on(event: 'abort', listener: Function): this; + once(event: 'abort', listener: Function): this; + addListener(event: 'abort', listener: Function): this; + removeListener(event: 'abort', listener: Function): this; + /** + * Emitted as the last event in the HTTP request-response transaction. The `close` + * event indicates that no more events will be emitted on either the `request` or + * `response` objects. + */ + on(event: 'close', listener: Function): this; + once(event: 'close', listener: Function): this; + addListener(event: 'close', listener: Function): this; + removeListener(event: 'close', listener: Function): this; + /** + * Emitted when the `net` module fails to issue a network request. Typically when + * the `request` object emits an `error` event, a `close` event will subsequently + * follow and no response object will be provided. + */ + on(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + once(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + addListener(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + removeListener(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + /** + * Emitted just after the last chunk of the `request`'s data has been written into + * the `request` object. + */ + on(event: 'finish', listener: Function): this; + once(event: 'finish', listener: Function): this; + addListener(event: 'finish', listener: Function): this; + removeListener(event: 'finish', listener: Function): this; + /** + * Emitted when an authenticating proxy is asking for user credentials. + * + * The `callback` function is expected to be called back with user credentials: + * + * * `username` string + * * `password` string + * + * Providing empty credentials will cancel the request and report an authentication + * error on the response object: + */ + on(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + once(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + addListener(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + removeListener(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + /** + * Emitted when the server returns a redirect response (e.g. 301 Moved + * Permanently). Calling `request.followRedirect` will continue with the + * redirection. If this event is handled, `request.followRedirect` must be called + * **synchronously**, otherwise the request will be cancelled. + */ + on(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + once(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + addListener(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + removeListener(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + on(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + once(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + addListener(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + removeListener(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + /** + * ClientRequest + */ + constructor(options: (ClientRequestConstructorOptions) | (string)); + /** + * Cancels an ongoing HTTP transaction. If the request has already emitted the + * `close` event, the abort operation will have no effect. Otherwise an ongoing + * event will emit `abort` and `close` events. Additionally, if there is an ongoing + * response object,it will emit the `aborted` event. + */ + abort(): void; + /** + * Sends the last chunk of the request data. Subsequent write or end operations + * will not be allowed. The `finish` event is emitted just after the end operation. + */ + end(chunk?: (string) | (Buffer), encoding?: string, callback?: () => void): void; + /** + * Continues any pending redirection. Can only be called during a `'redirect'` + * event. + */ + followRedirect(): void; + /** + * The value of a previously set extra header name. + */ + getHeader(name: string): string; + /** + * * `active` boolean - Whether the request is currently active. If this is false + * no other properties will be set + * * `started` boolean - Whether the upload has started. If this is false both + * `current` and `total` will be set to 0. + * * `current` Integer - The number of bytes that have been uploaded so far + * * `total` Integer - The number of bytes that will be uploaded this request + * + * You can use this method in conjunction with `POST` requests to get the progress + * of a file upload or other data transfer. + */ + getUploadProgress(): UploadProgress; + /** + * Removes a previously set extra header name. This method can be called only + * before first write. Trying to call it after the first write will throw an error. + */ + removeHeader(name: string): void; + /** + * Adds an extra HTTP header. The header name will be issued as-is without + * lowercasing. It can be called only before first write. Calling this method after + * the first write will throw an error. If the passed value is not a `string`, its + * `toString()` method will be called to obtain the final value. + * + * Certain headers are restricted from being set by apps. These headers are listed + * below. More information on restricted headers can be found in Chromium's header + * utils. + * + * * `Content-Length` + * * `Host` + * * `Trailer` or `Te` + * * `Upgrade` + * * `Cookie2` + * * `Keep-Alive` + * * `Transfer-Encoding` + * + * Additionally, setting the `Connection` header to the value `upgrade` is also + * disallowed. + */ + setHeader(name: string, value: string): void; + /** + * `callback` is essentially a dummy function introduced in the purpose of keeping + * similarity with the Node.js API. It is called asynchronously in the next tick + * after `chunk` content have been delivered to the Chromium networking layer. + * Contrary to the Node.js implementation, it is not guaranteed that `chunk` + * content have been flushed on the wire before `callback` is called. + * + * Adds a chunk of data to the request body. The first write operation may cause + * the request headers to be issued on the wire. After the first write operation, + * it is not allowed to add or remove a custom header. + */ + write(chunk: (string) | (Buffer), encoding?: string, callback?: () => void): void; + /** + * A `boolean` specifying whether the request will use HTTP chunked transfer + * encoding or not. Defaults to false. The property is readable and writable, + * however it can be set only before the first write operation as the HTTP headers + * are not yet put on the wire. Trying to set the `chunkedEncoding` property after + * the first write will throw an error. + * + * Using chunked encoding is strongly recommended if you need to send a large + * request body as data will be streamed in small chunks instead of being + * internally buffered inside Electron process memory. + */ + chunkedEncoding: boolean; + } + + interface Clipboard { + + // Docs: https://electronjs.org/docs/api/clipboard + + /** + * An array of supported formats for the clipboard `type`. + */ + availableFormats(type?: 'selection' | 'clipboard'): string[]; + /** + * Clears the clipboard content. + */ + clear(type?: 'selection' | 'clipboard'): void; + /** + * Whether the clipboard supports the specified `format`. + * + * @experimental + */ + has(format: string, type?: 'selection' | 'clipboard'): boolean; + /** + * Reads `format` type from the clipboard. + * + * `format` should contain valid ASCII characters and have `/` separator. `a/c`, + * `a/bc` are valid formats while `/abc`, `abc/`, `a/`, `/a`, `a` are not valid. + * + * @experimental + */ + read(format: string): string; + /** + * * `title` string + * * `url` string + * + * Returns an Object containing `title` and `url` keys representing the bookmark in + * the clipboard. The `title` and `url` values will be empty strings when the + * bookmark is unavailable. The `title` value will always be empty on Windows. + * + * @platform darwin,win32 + */ + readBookmark(): ReadBookmark; + /** + * Reads `format` type from the clipboard. + * + * @experimental + */ + readBuffer(format: string): Buffer; + /** + * The text on the find pasteboard, which is the pasteboard that holds information + * about the current state of the active application’s find panel. + * + * This method uses synchronous IPC when called from the renderer process. The + * cached value is reread from the find pasteboard whenever the application is + * activated. + * + * @platform darwin + */ + readFindText(): string; + /** + * The content in the clipboard as markup. + */ + readHTML(type?: 'selection' | 'clipboard'): string; + /** + * The image content in the clipboard. + */ + readImage(type?: 'selection' | 'clipboard'): NativeImage; + /** + * The content in the clipboard as RTF. + */ + readRTF(type?: 'selection' | 'clipboard'): string; + /** + * The content in the clipboard as plain text. + */ + readText(type?: 'selection' | 'clipboard'): string; + /** + * Writes `data` to the clipboard. + */ + write(data: Data, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `title` (macOS only) and `url` into the clipboard as a bookmark. + * + * **Note:** Most apps on Windows don't support pasting bookmarks into them so you + * can use `clipboard.write` to write both a bookmark and fallback text to the + * clipboard. + * + * @platform darwin,win32 + */ + writeBookmark(title: string, url: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `buffer` into the clipboard as `format`. + * + * @experimental + */ + writeBuffer(format: string, buffer: Buffer, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the find pasteboard (the pasteboard that holds + * information about the current state of the active application’s find panel) as + * plain text. This method uses synchronous IPC when called from the renderer + * process. + * + * @platform darwin + */ + writeFindText(text: string): void; + /** + * Writes `markup` to the clipboard. + */ + writeHTML(markup: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes `image` to the clipboard. + */ + writeImage(image: NativeImage, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the clipboard in RTF. + */ + writeRTF(text: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the clipboard as plain text. + */ + writeText(text: string, type?: 'selection' | 'clipboard'): void; + } + + class CommandLine { + + // Docs: https://electronjs.org/docs/api/command-line + + /** + * Append an argument to Chromium's command line. The argument will be quoted + * correctly. Switches will precede arguments regardless of appending order. + * + * If you're appending an argument like `--switch=value`, consider using + * `appendSwitch('switch', 'value')` instead. + * + * **Note:** This will not affect `process.argv`. The intended usage of this + * function is to control Chromium's behavior. + */ + appendArgument(value: string): void; + /** + * Append a switch (with optional `value`) to Chromium's command line. + * + * **Note:** This will not affect `process.argv`. The intended usage of this + * function is to control Chromium's behavior. + */ + appendSwitch(the_switch: string, value?: string): void; + /** + * The command-line switch value. + * + * **Note:** When the switch is not present or has no value, it returns empty + * string. + */ + getSwitchValue(the_switch: string): string; + /** + * Whether the command-line switch is present. + */ + hasSwitch(the_switch: string): boolean; + /** + * Removes the specified switch from Chromium's command line. + * + * **Note:** This will not affect `process.argv`. The intended usage of this + * function is to control Chromium's behavior. + */ + removeSwitch(the_switch: string): void; + } + + interface ContentTracing { + + // Docs: https://electronjs.org/docs/api/content-tracing + + /** + * resolves with an array of category groups once all child processes have + * acknowledged the `getCategories` request + * + * Get a set of category groups. The category groups can change as new code paths + * are reached. See also the list of built-in tracing categories. + * + * > **NOTE:** Electron adds a non-default tracing category called `"electron"`. + * This category can be used to capture Electron-specific tracing events. + */ + getCategories(): Promise; + /** + * Resolves with an object containing the `value` and `percentage` of trace buffer + * maximum usage + * + * * `value` number + * * `percentage` number + * + * Get the maximum usage across processes of trace buffer as a percentage of the + * full state. + */ + getTraceBufferUsage(): Promise; + /** + * resolved once all child processes have acknowledged the `startRecording` + * request. + * + * Start recording on all processes. + * + * Recording begins immediately locally and asynchronously on child processes as + * soon as they receive the EnableRecording request. + * + * If a recording is already running, the promise will be immediately resolved, as + * only one trace operation can be in progress at a time. + */ + startRecording(options: (TraceConfig) | (TraceCategoriesAndOptions)): Promise; + /** + * resolves with a path to a file that contains the traced data once all child + * processes have acknowledged the `stopRecording` request + * + * Stop recording on all processes. + * + * Child processes typically cache trace data and only rarely flush and send trace + * data back to the main process. This helps to minimize the runtime overhead of + * tracing since sending trace data over IPC can be an expensive operation. So, to + * end tracing, Chromium asynchronously asks all child processes to flush any + * pending trace data. + * + * Trace data will be written into `resultFilePath`. If `resultFilePath` is empty + * or not provided, trace data will be written to a temporary file, and the path + * will be returned in the promise. + */ + stopRecording(resultFilePath?: string): Promise; + } + + interface ContextBridge { + + // Docs: https://electronjs.org/docs/api/context-bridge + + exposeInMainWorld(apiKey: string, api: any): void; + } + + interface Cookie { + + // Docs: https://electronjs.org/docs/api/structures/cookie + + /** + * The domain of the cookie; this will be normalized with a preceding dot so that + * it's also valid for subdomains. + */ + domain?: string; + /** + * The expiration date of the cookie as the number of seconds since the UNIX epoch. + * Not provided for session cookies. + */ + expirationDate?: number; + /** + * Whether the cookie is a host-only cookie; this will only be `true` if no domain + * was passed. + */ + hostOnly?: boolean; + /** + * Whether the cookie is marked as HTTP only. + */ + httpOnly?: boolean; + /** + * The name of the cookie. + */ + name: string; + /** + * The path of the cookie. + */ + path?: string; + /** + * The Same Site policy applied to this cookie. Can be `unspecified`, + * `no_restriction`, `lax` or `strict`. + */ + sameSite: ('unspecified' | 'no_restriction' | 'lax' | 'strict'); + /** + * Whether the cookie is marked as secure. + */ + secure?: boolean; + /** + * Whether the cookie is a session cookie or a persistent cookie with an expiration + * date. + */ + session?: boolean; + /** + * The value of the cookie. + */ + value: string; + } + + class Cookies extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/cookies + + /** + * Emitted when a cookie is changed because it was added, edited, removed, or + * expired. + */ + on(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + once(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + addListener(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + removeListener(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + /** + * A promise which resolves when the cookie store has been flushed + * + * Writes any unwritten cookies data to disk. + */ + flushStore(): Promise; + /** + * A promise which resolves an array of cookie objects. + * + * Sends a request to get all cookies matching `filter`, and resolves a promise + * with the response. + */ + get(filter: CookiesGetFilter): Promise; + /** + * A promise which resolves when the cookie has been removed + * + * Removes the cookies matching `url` and `name` + */ + remove(url: string, name: string): Promise; + /** + * A promise which resolves when the cookie has been set + * + * Sets a cookie with `details`. + */ + set(details: CookiesSetDetails): Promise; + } + + interface CPUUsage { + + // Docs: https://electronjs.org/docs/api/structures/cpu-usage + + /** + * The number of average idle CPU wakeups per second since the last call to + * getCPUUsage. First call returns 0. Will always return 0 on Windows. + */ + idleWakeupsPerSecond: number; + /** + * Percentage of CPU used since the last call to getCPUUsage. First call returns 0. + */ + percentCPUUsage: number; + } + + interface CrashReport { + + // Docs: https://electronjs.org/docs/api/structures/crash-report + + date: Date; + id: string; + } + + interface CrashReporter { + + // Docs: https://electronjs.org/docs/api/crash-reporter + + /** + * Set an extra parameter to be sent with the crash report. The values specified + * here will be sent in addition to any values set via the `extra` option when + * `start` was called. + * + * Parameters added in this fashion (or via the `extra` parameter to + * `crashReporter.start`) are specific to the calling process. Adding extra + * parameters in the main process will not cause those parameters to be sent along + * with crashes from renderer or other child processes. Similarly, adding extra + * parameters in a renderer process will not result in those parameters being sent + * with crashes that occur in other renderer processes or in the main process. + * + * **Note:** Parameters have limits on the length of the keys and values. Key names + * must be no longer than 39 bytes, and values must be no longer than 20320 bytes. + * Keys with names longer than the maximum will be silently ignored. Key values + * longer than the maximum length will be truncated. + */ + addExtraParameter(key: string, value: string): void; + /** + * The date and ID of the last crash report. Only crash reports that have been + * uploaded will be returned; even if a crash report is present on disk it will not + * be returned until it is uploaded. In the case that there are no uploaded + * reports, `null` is returned. + * + * **Note:** This method is only available in the main process. + */ + getLastCrashReport(): CrashReport; + /** + * The current 'extra' parameters of the crash reporter. + */ + getParameters(): Record; + /** + * Returns all uploaded crash reports. Each report contains the date and uploaded + * ID. + * + * **Note:** This method is only available in the main process. + */ + getUploadedReports(): CrashReport[]; + /** + * Whether reports should be submitted to the server. Set through the `start` + * method or `setUploadToServer`. + * + * **Note:** This method is only available in the main process. + */ + getUploadToServer(): boolean; + /** + * Remove an extra parameter from the current set of parameters. Future crashes + * will not include this parameter. + */ + removeExtraParameter(key: string): void; + /** + * This would normally be controlled by user preferences. This has no effect if + * called before `start` is called. + * + * **Note:** This method is only available in the main process. + */ + setUploadToServer(uploadToServer: boolean): void; + /** + * This method must be called before using any other `crashReporter` APIs. Once + * initialized this way, the crashpad handler collects crashes from all + * subsequently created processes. The crash reporter cannot be disabled once + * started. + * + * This method should be called as early as possible in app startup, preferably + * before `app.on('ready')`. If the crash reporter is not initialized at the time a + * renderer process is created, then that renderer process will not be monitored by + * the crash reporter. + * + * **Note:** You can test out the crash reporter by generating a crash using + * `process.crash()`. + * + * **Note:** If you need to send additional/updated `extra` parameters after your + * first call `start` you can call `addExtraParameter`. + * + * **Note:** Parameters passed in `extra`, `globalExtra` or set with + * `addExtraParameter` have limits on the length of the keys and values. Key names + * must be at most 39 bytes long, and values must be no longer than 127 bytes. Keys + * with names longer than the maximum will be silently ignored. Key values longer + * than the maximum length will be truncated. + * + * **Note:** This method is only available in the main process. + */ + start(options: CrashReporterStartOptions): void; + } + + interface CustomScheme { + + // Docs: https://electronjs.org/docs/api/structures/custom-scheme + + privileges?: Privileges; + /** + * Custom schemes to be registered with options. + */ + scheme: string; + } + + class Debugger extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/debugger + + /** + * Emitted when the debugging session is terminated. This happens either when + * `webContents` is closed or devtools is invoked for the attached `webContents`. + */ + on(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + once(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + addListener(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + removeListener(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + /** + * Emitted whenever the debugging target issues an instrumentation event. + */ + on(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + once(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + addListener(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + removeListener(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + /** + * Attaches the debugger to the `webContents`. + */ + attach(protocolVersion?: string): void; + /** + * Detaches the debugger from the `webContents`. + */ + detach(): void; + /** + * Whether a debugger is attached to the `webContents`. + */ + isAttached(): boolean; + /** + * A promise that resolves with the response defined by the 'returns' attribute of + * the command description in the remote debugging protocol or is rejected + * indicating the failure of the command. + * + * Send given command to the debugging target. + */ + sendCommand(method: string, commandParams?: any, sessionId?: string): Promise; + } + + interface DesktopCapturer { + + // Docs: https://electronjs.org/docs/api/desktop-capturer + + /** + * Resolves with an array of `DesktopCapturerSource` objects, each + * `DesktopCapturerSource` represents a screen or an individual window that can be + * captured. + * + * **Note** Capturing the screen contents requires user consent on macOS 10.15 + * Catalina or higher, which can detected by + * `systemPreferences.getMediaAccessStatus`. + */ + getSources(options: SourcesOptions): Promise; + } + + interface DesktopCapturerSource { + + // Docs: https://electronjs.org/docs/api/structures/desktop-capturer-source + + /** + * An icon image of the application that owns the window or null if the source has + * a type screen. The size of the icon is not known in advance and depends on what + * the application provides. + */ + appIcon: NativeImage; + /** + * A unique identifier that will correspond to the `id` of the matching Display + * returned by the Screen API. On some platforms, this is equivalent to the `XX` + * portion of the `id` field above and on others it will differ. It will be an + * empty string if not available. + */ + display_id: string; + /** + * The identifier of a window or screen that can be used as a `chromeMediaSourceId` + * constraint when calling [`navigator.webkitGetUserMedia`]. The format of the + * identifier will be `window:XX:YY` or `screen:ZZ:0`. XX is the windowID/handle. + * YY is 1 for the current process, and 0 for all others. ZZ is a sequential number + * that represents the screen, and it does not equal to the index in the source's + * name. + */ + id: string; + /** + * A screen source will be named either `Entire Screen` or `Screen `, while + * the name of a window source will match the window title. + */ + name: string; + /** + * A thumbnail image. **Note:** There is no guarantee that the size of the + * thumbnail is the same as the `thumbnailSize` specified in the `options` passed + * to `desktopCapturer.getSources`. The actual size depends on the scale of the + * screen or window. + */ + thumbnail: NativeImage; + } + + interface Dialog { + + // Docs: https://electronjs.org/docs/api/dialog + + /** + * resolves when the certificate trust dialog is shown. + * + * On macOS, this displays a modal dialog that shows a message and certificate + * information, and gives the user the option of trusting/importing the + * certificate. If you provide a `browserWindow` argument the dialog will be + * attached to the parent window, making it modal. + * + * On Windows the options are more limited, due to the Win32 APIs used: + * + * * The `message` argument is not used, as the OS provides its own confirmation + * dialog. + * * The `browserWindow` argument is ignored since it is not possible to make this + * confirmation dialog modal. + * + * @platform darwin,win32 + */ + showCertificateTrustDialog(browserWindow: BrowserWindow, options: CertificateTrustDialogOptions): Promise; + /** + * resolves when the certificate trust dialog is shown. + * + * On macOS, this displays a modal dialog that shows a message and certificate + * information, and gives the user the option of trusting/importing the + * certificate. If you provide a `browserWindow` argument the dialog will be + * attached to the parent window, making it modal. + * + * On Windows the options are more limited, due to the Win32 APIs used: + * + * * The `message` argument is not used, as the OS provides its own confirmation + * dialog. + * * The `browserWindow` argument is ignored since it is not possible to make this + * confirmation dialog modal. + * + * @platform darwin,win32 + */ + showCertificateTrustDialog(options: CertificateTrustDialogOptions): Promise; + /** + * Displays a modal dialog that shows an error message. + * + * This API can be called safely before the `ready` event the `app` module emits, + * it is usually used to report errors in early stage of startup. If called before + * the app `ready`event on Linux, the message will be emitted to stderr, and no GUI + * dialog will appear. + */ + showErrorBox(title: string, content: string): void; + /** + * resolves with a promise containing the following properties: + * + * * `response` number - The index of the clicked button. + * * `checkboxChecked` boolean - The checked state of the checkbox if + * `checkboxLabel` was set. Otherwise `false`. + * + * Shows a message box. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + */ + showMessageBox(browserWindow: BrowserWindow, options: MessageBoxOptions): Promise; + /** + * resolves with a promise containing the following properties: + * + * * `response` number - The index of the clicked button. + * * `checkboxChecked` boolean - The checked state of the checkbox if + * `checkboxLabel` was set. Otherwise `false`. + * + * Shows a message box. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + */ + showMessageBox(options: MessageBoxOptions): Promise; + /** + * the index of the clicked button. + * + * Shows a message box, it will block the process until the message box is closed. + * It returns the index of the clicked button. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. If `browserWindow` is not shown dialog will not be + * attached to it. In such case it will be displayed as an independent window. + */ + showMessageBoxSync(browserWindow: BrowserWindow, options: MessageBoxSyncOptions): number; + /** + * the index of the clicked button. + * + * Shows a message box, it will block the process until the message box is closed. + * It returns the index of the clicked button. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. If `browserWindow` is not shown dialog will not be + * attached to it. In such case it will be displayed as an independent window. + */ + showMessageBoxSync(options: MessageBoxSyncOptions): number; + /** + * Resolve with an object containing the following: + * + * * `canceled` boolean - whether or not the dialog was canceled. + * * `filePaths` string[] - An array of file paths chosen by the user. If the + * dialog is cancelled this will be an empty array. + * * `bookmarks` string[] (optional) _macOS_ _mas_ - An array matching the + * `filePaths` array of base64 encoded strings which contains security scoped + * bookmark data. `securityScopedBookmarks` must be enabled for this to be + * populated. (For return values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialog(browserWindow: BrowserWindow, options: OpenDialogOptions): Promise; + /** + * Resolve with an object containing the following: + * + * * `canceled` boolean - whether or not the dialog was canceled. + * * `filePaths` string[] - An array of file paths chosen by the user. If the + * dialog is cancelled this will be an empty array. + * * `bookmarks` string[] (optional) _macOS_ _mas_ - An array matching the + * `filePaths` array of base64 encoded strings which contains security scoped + * bookmark data. `securityScopedBookmarks` must be enabled for this to be + * populated. (For return values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialog(options: OpenDialogOptions): Promise; + /** + * the file paths chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialogSync(browserWindow: BrowserWindow, options: OpenDialogSyncOptions): (string[]) | (undefined); + /** + * the file paths chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialogSync(options: OpenDialogSyncOptions): (string[]) | (undefined); + /** + * Resolve with an object containing the following: + * + * * `canceled` boolean - whether or not the dialog was canceled. + * * `filePath` string (optional) - If the dialog is canceled, this will be + * `undefined`. + * * `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which + * contains the security scoped bookmark data for the saved file. + * `securityScopedBookmarks` must be enabled for this to be present. (For return + * values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + * + * **Note:** On macOS, using the asynchronous version is recommended to avoid + * issues when expanding and collapsing the dialog. + */ + showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions): Promise; + /** + * Resolve with an object containing the following: + * + * * `canceled` boolean - whether or not the dialog was canceled. + * * `filePath` string (optional) - If the dialog is canceled, this will be + * `undefined`. + * * `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which + * contains the security scoped bookmark data for the saved file. + * `securityScopedBookmarks` must be enabled for this to be present. (For return + * values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + * + * **Note:** On macOS, using the asynchronous version is recommended to avoid + * issues when expanding and collapsing the dialog. + */ + showSaveDialog(options: SaveDialogOptions): Promise; + /** + * the path of the file chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + */ + showSaveDialogSync(browserWindow: BrowserWindow, options: SaveDialogSyncOptions): (string) | (undefined); + /** + * the path of the file chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + */ + showSaveDialogSync(options: SaveDialogSyncOptions): (string) | (undefined); + } + + interface Display { + + // Docs: https://electronjs.org/docs/api/structures/display + + /** + * Can be `available`, `unavailable`, `unknown`. + */ + accelerometerSupport: ('available' | 'unavailable' | 'unknown'); + /** + * the bounds of the display in DIP points. + */ + bounds: Rectangle; + /** + * The number of bits per pixel. + */ + colorDepth: number; + /** + * represent a color space (three-dimensional object which contains all realizable + * color combinations) for the purpose of color conversions + */ + colorSpace: string; + /** + * The number of bits per color component. + */ + depthPerComponent: number; + /** + * The display refresh rate. + */ + displayFrequency: number; + /** + * Unique identifier associated with the display. + */ + id: number; + /** + * `true` for an internal display and `false` for an external display + */ + internal: boolean; + /** + * Whether or not the display is a monochrome display. + */ + monochrome: boolean; + /** + * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. + */ + rotation: number; + /** + * Output device's pixel scale factor. + */ + scaleFactor: number; + size: Size; + /** + * Can be `available`, `unavailable`, `unknown`. + */ + touchSupport: ('available' | 'unavailable' | 'unknown'); + /** + * the work area of the display in DIP points. + */ + workArea: Rectangle; + workAreaSize: Size; + } + + class Dock { + + // Docs: https://electronjs.org/docs/api/dock + + /** + * an ID representing the request. + * + * When `critical` is passed, the dock icon will bounce until either the + * application becomes active or the request is canceled. + * + * 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. + * + * **Note:** This method can only be used while the app is not focused; when the + * app is focused it will return -1. + * + * @platform darwin + */ + bounce(type?: 'critical' | 'informational'): number; + /** + * Cancel the bounce of `id`. + * + * @platform darwin + */ + cancelBounce(id: number): void; + /** + * Bounces the Downloads stack if the filePath is inside the Downloads folder. + * + * @platform darwin + */ + downloadFinished(filePath: string): void; + /** + * The badge string of the dock. + * + * @platform darwin + */ + getBadge(): string; + /** + * The application's [dock menu][dock-menu]. + * + * @platform darwin + */ + getMenu(): (Menu) | (null); + /** + * Hides the dock icon. + * + * @platform darwin + */ + hide(): void; + /** + * Whether the dock icon is visible. + * + * @platform darwin + */ + isVisible(): boolean; + /** + * Sets the string to be displayed in the dock’s badging area. + * + * @platform darwin + */ + setBadge(text: string): void; + /** + * Sets the `image` associated with this dock icon. + * + * @platform darwin + */ + setIcon(image: (NativeImage) | (string)): void; + /** + * Sets the application's [dock menu][dock-menu]. + * + * @platform darwin + */ + setMenu(menu: Menu): void; + /** + * Resolves when the dock icon is shown. + * + * @platform darwin + */ + show(): Promise; + } + + class DownloadItem extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/download-item + + /** + * Emitted when the download is in a terminal state. This includes a completed + * download, a cancelled download (via `downloadItem.cancel()`), and interrupted + * download that can't be resumed. + * + * The `state` can be one of following: + * + * * `completed` - The download completed successfully. + * * `cancelled` - The download has been cancelled. + * * `interrupted` - The download has interrupted and can not resume. + */ + on(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + once(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + addListener(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + removeListener(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + /** + * Emitted when the download has been updated and is not done. + * + * The `state` can be one of following: + * + * * `progressing` - The download is in-progress. + * * `interrupted` - The download has interrupted and can be resumed. + */ + on(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + once(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + addListener(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + removeListener(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + /** + * Cancels the download operation. + */ + cancel(): void; + /** + * Whether the download can resume. + */ + canResume(): boolean; + /** + * The Content-Disposition field from the response header. + */ + getContentDisposition(): string; + /** + * ETag header value. + */ + getETag(): string; + /** + * The file name of the download item. + * + * **Note:** The file name is not always the same as the actual one saved in local + * disk. If user changes the file name in a prompted download saving dialog, the + * actual name of saved file will be different. + */ + getFilename(): string; + /** + * Last-Modified header value. + */ + getLastModifiedTime(): string; + /** + * The files mime type. + */ + getMimeType(): string; + /** + * The received bytes of the download item. + */ + getReceivedBytes(): number; + /** + * Returns the object previously set by + * `downloadItem.setSaveDialogOptions(options)`. + */ + getSaveDialogOptions(): SaveDialogOptions; + /** + * The save path of the download item. This will be either the path set via + * `downloadItem.setSavePath(path)` or the path selected from the shown save + * dialog. + */ + getSavePath(): string; + /** + * Number of seconds since the UNIX epoch when the download was started. + */ + getStartTime(): number; + /** + * The current state. Can be `progressing`, `completed`, `cancelled` or + * `interrupted`. + * + * **Note:** The following methods are useful specifically to resume a `cancelled` + * item when session is restarted. + */ + getState(): ('progressing' | 'completed' | 'cancelled' | 'interrupted'); + /** + * The total size in bytes of the download item. + * + * If the size is unknown, it returns 0. + */ + getTotalBytes(): number; + /** + * The origin URL where the item is downloaded from. + */ + getURL(): string; + /** + * The complete URL chain of the item including any redirects. + */ + getURLChain(): string[]; + /** + * Whether the download has user gesture. + */ + hasUserGesture(): boolean; + /** + * Whether the download is paused. + */ + isPaused(): boolean; + /** + * Pauses the download. + */ + pause(): void; + /** + * Resumes the download that has been paused. + * + * **Note:** To enable resumable downloads the server you are downloading from must + * support range requests and provide both `Last-Modified` and `ETag` header + * values. Otherwise `resume()` will dismiss previously received bytes and restart + * the download from the beginning. + */ + resume(): void; + /** + * This API allows the user to set custom options for the save dialog that opens + * for the download item by default. The API is only available in session's + * `will-download` callback function. + */ + setSaveDialogOptions(options: SaveDialogOptions): void; + /** + * The API is only available in session's `will-download` callback function. If + * `path` doesn't exist, Electron will try to make the directory recursively. If + * user doesn't set the save path via the API, Electron will use the original + * routine to determine the save path; this usually prompts a save dialog. + */ + setSavePath(path: string): void; + /** + * A `string` property that determines the save file path of the download item. + * + * The property is only available in session's `will-download` callback function. + * If user doesn't set the save path via the property, Electron will use the + * original routine to determine the save path; this usually prompts a save dialog. + */ + savePath: string; + } + + interface Event extends GlobalEvent { + + // Docs: https://electronjs.org/docs/api/structures/event + + preventDefault: (() => void); + } + + interface Extension { + + // Docs: https://electronjs.org/docs/api/structures/extension + + id: string; + /** + * Copy of the extension's manifest data. + */ + manifest: any; + name: string; + /** + * The extension's file path. + */ + path: string; + /** + * The extension's `chrome-extension://` URL. + */ + url: string; + version: string; + } + + interface ExtensionInfo { + + // Docs: https://electronjs.org/docs/api/structures/extension-info + + name: string; + version: string; + } + + interface FileFilter { + + // Docs: https://electronjs.org/docs/api/structures/file-filter + + extensions: string[]; + name: string; + } + + interface FilePathWithHeaders { + + // Docs: https://electronjs.org/docs/api/structures/file-path-with-headers + + /** + * Additional headers to be sent. + */ + headers?: Record; + /** + * The path to the file to send. + */ + path: string; + } + + interface GlobalShortcut { + + // Docs: https://electronjs.org/docs/api/global-shortcut + + /** + * Whether this application has registered `accelerator`. + * + * When the accelerator is already taken by other applications, this call will + * still return `false`. This behavior is intended by operating systems, since they + * don't want applications to fight for global shortcuts. + */ + isRegistered(accelerator: Accelerator): boolean; + /** + * Whether or not the shortcut was registered successfully. + * + * Registers a global shortcut of `accelerator`. The `callback` is called when the + * registered shortcut is pressed by the user. + * + * When the accelerator is already taken by other applications, this call will + * silently fail. This behavior is intended by operating systems, since they don't + * want applications to fight for global shortcuts. + * + * The following accelerators will not be registered successfully on macOS 10.14 + * Mojave unless the app has been authorized as a trusted accessibility client: + * + * * "Media Play/Pause" + * * "Media Next Track" + * * "Media Previous Track" + * * "Media Stop" + */ + register(accelerator: Accelerator, callback: () => void): boolean; + /** + * Registers a global shortcut of all `accelerator` items in `accelerators`. The + * `callback` is called when any of the registered shortcuts are pressed by the + * user. + * + * When a given accelerator is already taken by other applications, this call will + * silently fail. This behavior is intended by operating systems, since they don't + * want applications to fight for global shortcuts. + * + * The following accelerators will not be registered successfully on macOS 10.14 + * Mojave unless the app has been authorized as a trusted accessibility client: + * + * * "Media Play/Pause" + * * "Media Next Track" + * * "Media Previous Track" + * * "Media Stop" + */ + registerAll(accelerators: string[], callback: () => void): void; + /** + * Unregisters the global shortcut of `accelerator`. + */ + unregister(accelerator: Accelerator): void; + /** + * Unregisters all of the global shortcuts. + */ + unregisterAll(): void; + } + + interface GPUFeatureStatus { + + // Docs: https://electronjs.org/docs/api/structures/gpu-feature-status + + /** + * Canvas. + */ + '2d_canvas': string; + /** + * Flash. + */ + flash_3d: string; + /** + * Flash Stage3D. + */ + flash_stage3d: string; + /** + * Flash Stage3D Baseline profile. + */ + flash_stage3d_baseline: string; + /** + * Compositing. + */ + gpu_compositing: string; + /** + * Multiple Raster Threads. + */ + multiple_raster_threads: string; + /** + * Native GpuMemoryBuffers. + */ + native_gpu_memory_buffers: string; + /** + * Rasterization. + */ + rasterization: string; + /** + * Video Decode. + */ + video_decode: string; + /** + * Video Encode. + */ + video_encode: string; + /** + * VPx Video Decode. + */ + vpx_decode: string; + /** + * WebGL. + */ + webgl: string; + /** + * WebGL2. + */ + webgl2: string; + } + + interface HIDDevice { + + // Docs: https://electronjs.org/docs/api/structures/hid-device + + /** + * Unique identifier for the device. + */ + deviceId: string; + /** + * Unique identifier for the HID interface. A device may have multiple HID + * interfaces. + */ + guid?: string; + /** + * Name of the device. + */ + name: string; + /** + * The USB product ID. + */ + productId: number; + /** + * The USB device serial number. + */ + serialNumber?: string; + /** + * The USB vendor ID. + */ + vendorId: number; + } + + interface InAppPurchase extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/in-app-purchase + + on(event: 'transactions-updated', listener: Function): this; + once(event: 'transactions-updated', listener: Function): this; + addListener(event: 'transactions-updated', listener: Function): this; + removeListener(event: 'transactions-updated', listener: Function): this; + /** + * whether a user can make a payment. + */ + canMakePayments(): boolean; + /** + * Completes all pending transactions. + */ + finishAllTransactions(): void; + /** + * Completes the pending transactions corresponding to the date. + */ + finishTransactionByDate(date: string): void; + /** + * Resolves with an array of `Product` objects. + * + * Retrieves the product descriptions. + */ + getProducts(productIDs: string[]): Promise; + /** + * the path to the receipt. + */ + getReceiptURL(): string; + /** + * Returns `true` if the product is valid and added to the payment queue. + * + * You should listen for the `transactions-updated` event as soon as possible and + * certainly before you call `purchaseProduct`. + */ + purchaseProduct(productID: string, quantity?: number): Promise; + /** + * Restores finished transactions. This method can be called either to install + * purchases on additional devices, or to restore purchases for an application that + * the user deleted and reinstalled. + * + * The payment queue delivers a new transaction for each previously completed + * transaction that can be restored. Each transaction includes a copy of the + * original transaction. + */ + restoreCompletedTransactions(): void; + } + + class IncomingMessage extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/incoming-message + + /** + * Emitted when a request has been canceled during an ongoing HTTP transaction. + */ + on(event: 'aborted', listener: Function): this; + once(event: 'aborted', listener: Function): this; + addListener(event: 'aborted', listener: Function): this; + removeListener(event: 'aborted', listener: Function): this; + /** + * The `data` event is the usual method of transferring response data into + * applicative code. + */ + on(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + once(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + addListener(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + removeListener(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + /** + * Indicates that response body has ended. Must be placed before 'data' event. + */ + on(event: 'end', listener: Function): this; + once(event: 'end', listener: Function): this; + addListener(event: 'end', listener: Function): this; + removeListener(event: 'end', listener: Function): this; + /** + * Returns: + * + * `error` Error - Typically holds an error string identifying failure root cause. + * + * Emitted when an error was encountered while streaming response data events. For + * instance, if the server closes the underlying while the response is still + * streaming, an `error` event will be emitted on the response object and a `close` + * event will subsequently follow on the request object. + */ + on(event: 'error', listener: Function): this; + once(event: 'error', listener: Function): this; + addListener(event: 'error', listener: Function): this; + removeListener(event: 'error', listener: Function): this; + /** + * A `Record` representing the HTTP response headers. + * The `headers` object is formatted as follows: + * + * * All header names are lowercased. + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, + * `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, + * `last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`, + * `retry-after`, `server`, or `user-agent` are discarded. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with '; '. + * * For all other headers, the values are joined together with ', '. + */ + headers: Record; + /** + * A `string` indicating the HTTP protocol version number. Typical values are '1.0' + * or '1.1'. Additionally `httpVersionMajor` and `httpVersionMinor` are two + * Integer-valued readable properties that return respectively the HTTP major and + * minor version numbers. + */ + httpVersion: string; + /** + * An `Integer` indicating the HTTP protocol major version number. + */ + httpVersionMajor: number; + /** + * An `Integer` indicating the HTTP protocol minor version number. + */ + httpVersionMinor: number; + /** + * A `string[]` containing the raw HTTP response headers exactly as they were + * received. The keys and values are in the same list. It is not a list of tuples. + * So, the even-numbered offsets are key values, and the odd-numbered offsets are + * the associated values. Header names are not lowercased, and duplicates are not + * merged. + */ + rawHeaders: string[]; + /** + * An `Integer` indicating the HTTP response status code. + */ + statusCode: number; + /** + * A `string` representing the HTTP status message. + */ + statusMessage: string; + } + + interface InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/input-event + + /** + * An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`, + * `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, + * `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`. + */ + modifiers?: Array<'shift' | 'control' | 'ctrl' | 'alt' | 'meta' | 'command' | 'cmd' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right'>; + } + + interface IOCounters { + + // Docs: https://electronjs.org/docs/api/structures/io-counters + + /** + * Then number of I/O other operations. + */ + otherOperationCount: number; + /** + * Then number of I/O other transfers. + */ + otherTransferCount: number; + /** + * The number of I/O read operations. + */ + readOperationCount: number; + /** + * The number of I/O read transfers. + */ + readTransferCount: number; + /** + * The number of I/O write operations. + */ + writeOperationCount: number; + /** + * The number of I/O write transfers. + */ + writeTransferCount: number; + } + + interface IpcMain extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/ipc-main + + /** + * Adds a handler for an `invoke`able IPC. This handler will be called whenever a + * renderer calls `ipcRenderer.invoke(channel, ...args)`. + * + * If `listener` returns a Promise, the eventual result of the promise will be + * returned as a reply to the remote caller. Otherwise, the return value of the + * listener will be used as the value of the reply. + * + * The `event` that is passed as the first argument to the handler is the same as + * that passed to a regular event listener. It includes information about which + * WebContents is the source of the invoke request. + * + * Errors thrown through `handle` in the main process are not transparent as they + * are serialized and only the `message` property from the original error is + * provided to the renderer process. Please refer to #24427 for details. + */ + handle(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; + /** + * Handles a single `invoke`able IPC message, then removes the listener. See + * `ipcMain.handle(channel, listener)`. + */ + handleOnce(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; + /** + * Listens to `channel`, when a new message arrives `listener` would be called with + * `listener(event, args...)`. + */ + on(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; + /** + * Adds a one time `listener` function for the event. This `listener` is invoked + * only the next time a message is sent to `channel`, after which it is removed. + */ + once(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; + /** + * Removes listeners of the specified `channel`. + */ + removeAllListeners(channel?: string): this; + /** + * Removes any handler for `channel`, if present. + */ + removeHandler(channel: string): void; + /** + * Removes the specified `listener` from the listener array for the specified + * `channel`. + */ + removeListener(channel: string, listener: (...args: any[]) => void): this; + } + + interface IpcMainEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-main-event + + /** + * The ID of the renderer frame that sent this message + */ + frameId: number; + /** + * A list of MessagePorts that were transferred with this message + */ + ports: MessagePortMain[]; + /** + * The internal ID of the renderer process that sent this message + */ + processId: number; + /** + * A function that will send an IPC message to the renderer frame that sent the + * original message that you are currently handling. You should use this method to + * "reply" to the sent message in order to guarantee the reply will go to the + * correct process and frame. + */ + reply: Function; + /** + * Set this to the value to be returned in a synchronous message + */ + returnValue: any; + /** + * Returns the `webContents` that sent the message + */ + sender: WebContents; + /** + * The frame that sent this message + * + */ + readonly senderFrame: WebFrameMain; + } + + interface IpcMainInvokeEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-main-invoke-event + + /** + * The ID of the renderer frame that sent this message + */ + frameId: number; + /** + * The internal ID of the renderer process that sent this message + */ + processId: number; + /** + * Returns the `webContents` that sent the message + */ + sender: WebContents; + /** + * The frame that sent this message + * + */ + readonly senderFrame: WebFrameMain; + } + + interface IpcRenderer extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/ipc-renderer + + /** + * Resolves with the response from the main process. + * + * Send a message to the main process via `channel` and expect a result + * asynchronously. Arguments will be serialized with the Structured Clone + * Algorithm, just like `window.postMessage`, so prototype chains will not be + * included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw + * an exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process should listen for `channel` with `ipcMain.handle()`. + * + * For example: + * + * If you need to transfer a `MessagePort` to the main process, use + * `ipcRenderer.postMessage`. + * + * If you do not need a response to the message, consider using `ipcRenderer.send`. + */ + invoke(channel: string, ...args: any[]): Promise; + /** + * Listens to `channel`, when a new message arrives `listener` would be called with + * `listener(event, args...)`. + */ + on(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; + /** + * Adds a one time `listener` function for the event. This `listener` is invoked + * only the next time a message is sent to `channel`, after which it is removed. + */ + once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; + /** + * Send a message to the main process, optionally transferring ownership of zero or + * more `MessagePort` objects. + * + * The transferred `MessagePort` objects will be available in the main process as + * `MessagePortMain` objects by accessing the `ports` property of the emitted + * event. + * + * For example: + * + * For more information on using `MessagePort` and `MessageChannel`, see the MDN + * documentation. + */ + postMessage(channel: string, message: any, transfer?: MessagePort[]): void; + /** + * Removes all listeners, or those of the specified `channel`. + */ + removeAllListeners(channel: string): this; + /** + * Removes the specified `listener` from the listener array for the specified + * `channel`. + */ + removeListener(channel: string, listener: (...args: any[]) => void): this; + /** + * Send an asynchronous message to the main process via `channel`, along with + * arguments. Arguments will be serialized with the Structured Clone Algorithm, + * just like `window.postMessage`, so prototype chains will not be included. + * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an + * exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process handles it by listening for `channel` with the `ipcMain` + * module. + * + * If you need to transfer a `MessagePort` to the main process, use + * `ipcRenderer.postMessage`. + * + * If you want to receive a single response from the main process, like the result + * of a method call, consider using `ipcRenderer.invoke`. + */ + send(channel: string, ...args: any[]): void; + /** + * The value sent back by the `ipcMain` handler. + * + * Send a message to the main process via `channel` and expect a result + * synchronously. Arguments will be serialized with the Structured Clone Algorithm, + * just like `window.postMessage`, so prototype chains will not be included. + * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an + * exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process handles it by listening for `channel` with `ipcMain` module, + * and replies by setting `event.returnValue`. + * + * > :warning: **WARNING**: Sending a synchronous message will block the whole + * renderer process until the reply is received, so use this method only as a last + * resort. It's much better to use the asynchronous version, `invoke()`. + */ + sendSync(channel: string, ...args: any[]): any; + /** + * Sends a message to a window with `webContentsId` via `channel`. + */ + sendTo(webContentsId: number, channel: string, ...args: any[]): void; + /** + * Like `ipcRenderer.send` but the event will be sent to the `` element in + * the host page instead of the main process. + */ + sendToHost(channel: string, ...args: any[]): void; + } + + interface IpcRendererEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-renderer-event + + /** + * A list of MessagePorts that were transferred with this message + */ + ports: MessagePort[]; + /** + * The `IpcRenderer` instance that emitted the event originally + */ + sender: IpcRenderer; + /** + * The `webContents.id` that sent the message, you can call + * `event.sender.sendTo(event.senderId, ...)` to reply to the message, see + * ipcRenderer.sendTo for more information. This only applies to messages sent from + * a different renderer. Messages sent directly from the main process set + * `event.senderId` to `0`. + */ + senderId: number; + } + + interface JumpListCategory { + + // Docs: https://electronjs.org/docs/api/structures/jump-list-category + + /** + * Array of `JumpListItem` objects if `type` is `tasks` or `custom`, otherwise it + * should be omitted. + */ + items?: JumpListItem[]; + /** + * Must be set if `type` is `custom`, otherwise it should be omitted. + */ + name?: string; + /** + * One of the following: + */ + type?: ('tasks' | 'frequent' | 'recent' | 'custom'); + } + + interface JumpListItem { + + // Docs: https://electronjs.org/docs/api/structures/jump-list-item + + /** + * The command line arguments when `program` is executed. Should only be set if + * `type` is `task`. + */ + args?: string; + /** + * Description of the task (displayed in a tooltip). Should only be set if `type` + * is `task`. Maximum length 260 characters. + */ + description?: string; + /** + * The index of the icon in the resource file. If a resource file contains multiple + * icons this value can be used to specify the zero-based index of the icon that + * should be displayed for this task. If a resource file contains only one icon, + * this property should be set to zero. + */ + iconIndex?: number; + /** + * The absolute path to an icon to be displayed in a Jump List, which can be an + * arbitrary resource file that contains an icon (e.g. `.ico`, `.exe`, `.dll`). You + * can usually specify `process.execPath` to show the program icon. + */ + iconPath?: string; + /** + * Path of the file to open, should only be set if `type` is `file`. + */ + path?: string; + /** + * Path of the program to execute, usually you should specify `process.execPath` + * which opens the current program. Should only be set if `type` is `task`. + */ + program?: string; + /** + * The text to be displayed for the item in the Jump List. Should only be set if + * `type` is `task`. + */ + title?: string; + /** + * One of the following: + */ + type?: ('task' | 'separator' | 'file'); + /** + * The working directory. Default is empty. + */ + workingDirectory?: string; + } + + interface KeyboardEvent { + + // Docs: https://electronjs.org/docs/api/structures/keyboard-event + + /** + * whether an Alt key was used in an accelerator to trigger the Event + */ + altKey?: boolean; + /** + * whether the Control key was used in an accelerator to trigger the Event + */ + ctrlKey?: boolean; + /** + * whether a meta key was used in an accelerator to trigger the Event + */ + metaKey?: boolean; + /** + * whether a Shift key was used in an accelerator to trigger the Event + */ + shiftKey?: boolean; + /** + * whether an accelerator was used to trigger the event as opposed to another user + * gesture like mouse click + */ + triggeredByAccelerator?: boolean; + } + + interface KeyboardInputEvent extends InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/keyboard-input-event + + /** + * The character that will be sent as the keyboard event. Should only use the valid + * key codes in Accelerator. + */ + keyCode: string; + /** + * The type of the event, can be `keyDown`, `keyUp` or `char`. + */ + type: ('keyDown' | 'keyUp' | 'char'); + } + + interface MemoryInfo { + + // Docs: https://electronjs.org/docs/api/structures/memory-info + + /** + * The maximum amount of memory that has ever been pinned to actual physical RAM. + */ + peakWorkingSetSize: number; + /** + * The amount of memory not shared by other processes, such as JS heap or HTML + * content. + * + * @platform win32 + */ + privateBytes?: number; + /** + * The amount of memory currently pinned to actual physical RAM. + */ + workingSetSize: number; + } + + interface MemoryUsageDetails { + + // Docs: https://electronjs.org/docs/api/structures/memory-usage-details + + count: number; + liveSize: number; + size: number; + } + + class Menu { + + // Docs: https://electronjs.org/docs/api/menu + + /** + * Emitted when a popup is closed either manually or with `menu.closePopup()`. + */ + on(event: 'menu-will-close', listener: (event: Event) => void): this; + once(event: 'menu-will-close', listener: (event: Event) => void): this; + addListener(event: 'menu-will-close', listener: (event: Event) => void): this; + removeListener(event: 'menu-will-close', listener: (event: Event) => void): this; + /** + * Emitted when `menu.popup()` is called. + */ + on(event: 'menu-will-show', listener: (event: Event) => void): this; + once(event: 'menu-will-show', listener: (event: Event) => void): this; + addListener(event: 'menu-will-show', listener: (event: Event) => void): this; + removeListener(event: 'menu-will-show', listener: (event: Event) => void): this; + /** + * Menu + */ + constructor(); + /** + * Generally, the `template` is an array of `options` for constructing a MenuItem. + * The usage can be referenced above. + * + * You can also attach other fields to the element of the `template` and they will + * become properties of the constructed menu items. + */ + static buildFromTemplate(template: Array<(MenuItemConstructorOptions) | (MenuItem)>): Menu; + /** + * The application menu, if set, or `null`, if not set. + * + * **Note:** The returned `Menu` instance doesn't support dynamic addition or + * removal of menu items. Instance properties can still be dynamically modified. + */ + static getApplicationMenu(): (Menu) | (null); + /** + * Sends the `action` to the first responder of application. This is used for + * emulating default macOS menu behaviors. Usually you would use the `role` + * property of a `MenuItem`. + * + * See the macOS Cocoa Event Handling Guide for more information on macOS' native + * actions. + * + * @platform darwin + */ + static sendActionToFirstResponder(action: string): void; + /** + * Sets `menu` as the application menu on macOS. On Windows and Linux, the `menu` + * will be set as each window's top menu. + * + * Also on Windows and Linux, you can use a `&` in the top-level item name to + * indicate which letter should get a generated accelerator. For example, using + * `&File` for the file menu would result in a generated `Alt-F` accelerator that + * opens the associated menu. The indicated character in the button label then gets + * an underline, and the `&` character is not displayed on the button label. + * + * In order to escape the `&` character in an item name, add a proceeding `&`. For + * example, `&&File` would result in `&File` displayed on the button label. + * + * Passing `null` will suppress the default menu. On Windows and Linux, this has + * the additional effect of removing the menu bar from the window. + * + * **Note:** The default menu will be created automatically if the app does not set + * one. It contains standard items such as `File`, `Edit`, `View`, `Window` and + * `Help`. + */ + static setApplicationMenu(menu: (Menu) | (null)): void; + /** + * Appends the `menuItem` to the menu. + */ + append(menuItem: MenuItem): void; + /** + * Closes the context menu in the `browserWindow`. + */ + closePopup(browserWindow?: BrowserWindow): void; + /** + * the item with the specified `id` + */ + getMenuItemById(id: string): (MenuItem) | (null); + /** + * Inserts the `menuItem` to the `pos` position of the menu. + */ + insert(pos: number, menuItem: MenuItem): void; + /** + * Pops up this menu as a context menu in the `BrowserWindow`. + */ + popup(options?: PopupOptions): void; + /** + * A `MenuItem[]` array containing the menu's items. + * + * Each `Menu` consists of multiple `MenuItem`s and each `MenuItem` can have a + * submenu. + */ + items: MenuItem[]; + } + + class MenuItem { + + // Docs: https://electronjs.org/docs/api/menu-item + + /** + * MenuItem + */ + constructor(options: MenuItemConstructorOptions); + /** + * An `Accelerator` (optional) indicating the item's accelerator, if set. + */ + accelerator?: Accelerator; + /** + * A `boolean` indicating whether the item is checked, this property can be + * dynamically changed. + * + * A `checkbox` menu item will toggle the `checked` property on and off when + * selected. + * + * A `radio` menu item will turn on its `checked` property when clicked, and will + * turn off that property for all adjacent items in the same menu. + * + * You can add a `click` function for additional behavior. + */ + checked: boolean; + /** + * A `Function` that is fired when the MenuItem receives a click event. It can be + * called with `menuItem.click(event, focusedWindow, focusedWebContents)`. + * + * * `event` KeyboardEvent + * * `focusedWindow` BrowserWindow + * * `focusedWebContents` WebContents + */ + click: Function; + /** + * A `number` indicating an item's sequential unique id. + */ + commandId: number; + /** + * A `boolean` indicating whether the item is enabled, this property can be + * dynamically changed. + */ + enabled: boolean; + /** + * A `NativeImage | string` (optional) indicating the item's icon, if set. + */ + icon?: (NativeImage) | (string); + /** + * A `string` indicating the item's unique id, this property can be dynamically + * changed. + */ + id: string; + /** + * A `string` indicating the item's visible label. + */ + label: string; + /** + * A `Menu` that the item is a part of. + */ + menu: Menu; + /** + * A `boolean` indicating if the accelerator should be registered with the system + * or just displayed. + * + * This property can be dynamically changed. + */ + registerAccelerator: boolean; + /** + * A `string` (optional) indicating the item's role, if set. 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` + */ + role?: ('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' | 'windowMenu'); + /** + * A `SharingItem` indicating the item to share when the `role` is `shareMenu`. + * + * This property can be dynamically changed. + * + * @platform darwin + */ + sharingItem: SharingItem; + /** + * A `string` indicating the item's sublabel. + */ + sublabel: string; + /** + * A `Menu` (optional) containing the menu item's submenu, if present. + */ + submenu?: Menu; + /** + * A `string` indicating the item's hover text. + * + * @platform darwin + */ + toolTip: string; + /** + * A `string` indicating the type of the item. Can be `normal`, `separator`, + * `submenu`, `checkbox` or `radio`. + */ + type: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'); + /** + * An `Accelerator | null` indicating the item's user-assigned accelerator for the + * menu item. + * + * **Note:** This property is only initialized after the `MenuItem` has been added + * to a `Menu`. Either via `Menu.buildFromTemplate` or via + * `Menu.append()/insert()`. Accessing before initialization will just return + * `null`. + * + * @platform darwin + */ + readonly userAccelerator: (Accelerator) | (null); + /** + * A `boolean` indicating whether the item is visible, this property can be + * dynamically changed. + */ + visible: boolean; + } + + class MessageChannelMain extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/message-channel-main + + /** + * A `MessagePortMain` property. + */ + port1: MessagePortMain; + /** + * A `MessagePortMain` property. + */ + port2: MessagePortMain; + } + + class MessagePortMain extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/message-port-main + + /** + * Emitted when the remote end of a MessagePortMain object becomes disconnected. + */ + on(event: 'close', listener: Function): this; + once(event: 'close', listener: Function): this; + addListener(event: 'close', listener: Function): this; + removeListener(event: 'close', listener: Function): this; + /** + * Emitted when a MessagePortMain object receives a message. + */ + on(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + once(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + addListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + removeListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + /** + * Disconnects the port, so it is no longer active. + */ + close(): void; + /** + * Sends a message from the port, and optionally, transfers ownership of objects to + * other browsing contexts. + */ + postMessage(message: any, transfer?: MessagePortMain[]): void; + /** + * Starts the sending of messages queued on the port. Messages will be queued until + * this method is called. + */ + start(): void; + } + + interface MimeTypedBuffer { + + // Docs: https://electronjs.org/docs/api/structures/mime-typed-buffer + + /** + * Charset of the buffer. + */ + charset?: string; + /** + * The actual Buffer content. + */ + data: Buffer; + /** + * MIME type of the buffer. + */ + mimeType?: string; + } + + interface MouseInputEvent extends InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/mouse-input-event + + /** + * The button pressed, can be `left`, `middle`, `right`. + */ + button?: ('left' | 'middle' | 'right'); + clickCount?: number; + globalX?: number; + globalY?: number; + movementX?: number; + movementY?: number; + /** + * The type of the event, can be `mouseDown`, `mouseUp`, `mouseEnter`, + * `mouseLeave`, `contextMenu`, `mouseWheel` or `mouseMove`. + */ + type: ('mouseDown' | 'mouseUp' | 'mouseEnter' | 'mouseLeave' | 'contextMenu' | 'mouseWheel' | 'mouseMove'); + x: number; + y: number; + } + + interface MouseWheelInputEvent extends MouseInputEvent { + + // Docs: https://electronjs.org/docs/api/structures/mouse-wheel-input-event + + accelerationRatioX?: number; + accelerationRatioY?: number; + canScroll?: boolean; + deltaX?: number; + deltaY?: number; + hasPreciseScrollingDeltas?: boolean; + /** + * The type of the event, can be `mouseWheel`. + */ + type: ('mouseWheel'); + wheelTicksX?: number; + wheelTicksY?: number; + } + + class NativeImage { + + // Docs: https://electronjs.org/docs/api/native-image + + /** + * Creates an empty `NativeImage` instance. + */ + static createEmpty(): NativeImage; + /** + * Creates a new `NativeImage` instance from `buffer` that contains the raw bitmap + * pixel data returned by `toBitmap()`. The specific format is platform-dependent. + */ + static createFromBitmap(buffer: Buffer, options: CreateFromBitmapOptions): NativeImage; + /** + * Creates a new `NativeImage` instance from `buffer`. Tries to decode as PNG or + * JPEG first. + */ + static createFromBuffer(buffer: Buffer, options?: CreateFromBufferOptions): NativeImage; + /** + * Creates a new `NativeImage` instance from `dataURL`. + */ + static createFromDataURL(dataURL: string): NativeImage; + /** + * Creates a new `NativeImage` instance from the NSImage that maps to the given + * image name. See `System Icons` for a list of possible values. + * + * The `hslShift` is applied to the image with the following rules: + * + * * `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map to 0 + * and 360 on the hue color wheel (red). + * * `hsl_shift[1]` (saturation): A saturation shift for the image, with the + * following key values: 0 = remove all color. 0.5 = leave unchanged. 1 = fully + * saturate the image. + * * `hsl_shift[2]` (lightness): A lightness shift for the image, with the + * following key values: 0 = remove all lightness (make all pixels black). 0.5 = + * leave unchanged. 1 = full lightness (make all pixels white). + * + * This means that `[-1, 0, 1]` will make the image completely white and `[-1, 1, + * 0]` will make the image completely black. + * + * In some cases, the `NSImageName` doesn't match its string representation; one + * example of this is `NSFolderImageName`, whose string representation would + * actually be `NSFolder`. Therefore, you'll need to determine the correct string + * representation for your image before passing it in. This can be done with the + * following: + * + * `echo -e '#import \nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); + * }' | clang -otest -x objective-c -framework Cocoa - && ./test` + * + * where `SYSTEM_IMAGE_NAME` should be replaced with any value from this list. + * + * @platform darwin + */ + static createFromNamedImage(imageName: string, hslShift?: number[]): NativeImage; + /** + * Creates a new `NativeImage` instance from a file located at `path`. This method + * returns an empty image if the `path` does not exist, cannot be read, or is not a + * valid image. + */ + static createFromPath(path: string): NativeImage; + /** + * fulfilled with the file's thumbnail preview image, which is a NativeImage. + * + * @platform darwin,win32 + */ + static createThumbnailFromPath(path: string, maxSize: Size): Promise; + /** + * Add an image representation for a specific scale factor. This can be used to + * explicitly add different scale factor representations to an image. This can be + * called on empty images. + */ + addRepresentation(options: AddRepresentationOptions): void; + /** + * The cropped image. + */ + crop(rect: Rectangle): NativeImage; + /** + * The image's aspect ratio. + * + * If `scaleFactor` is passed, this will return the aspect ratio corresponding to + * the image representation most closely matching the passed value. + */ + getAspectRatio(scaleFactor?: number): number; + /** + * A Buffer that contains the image's raw bitmap pixel data. + * + * The difference between `getBitmap()` and `toBitmap()` is that `getBitmap()` does + * not copy the bitmap data, so you have to use the returned Buffer immediately in + * current event loop tick; otherwise the data might be changed or destroyed. + */ + getBitmap(options?: BitmapOptions): Buffer; + /** + * A Buffer that stores C pointer to underlying native handle of the image. On + * macOS, a pointer to `NSImage` instance would be returned. + * + * Notice that the returned pointer is a weak pointer to the underlying native + * image instead of a copy, so you _must_ ensure that the associated `nativeImage` + * instance is kept around. + * + * @platform darwin + */ + getNativeHandle(): Buffer; + /** + * An array of all scale factors corresponding to representations for a given + * nativeImage. + */ + getScaleFactors(): number[]; + /** + * If `scaleFactor` is passed, this will return the size corresponding to the image + * representation most closely matching the passed value. + */ + getSize(scaleFactor?: number): Size; + /** + * Whether the image is empty. + */ + isEmpty(): boolean; + /** + * Whether the image is a template image. + */ + isTemplateImage(): boolean; + /** + * The resized image. + * + * If only the `height` or the `width` are specified then the current aspect ratio + * will be preserved in the resized image. + */ + resize(options: ResizeOptions): NativeImage; + /** + * Marks the image as a template image. + */ + setTemplateImage(option: boolean): void; + /** + * A Buffer that contains a copy of the image's raw bitmap pixel data. + */ + toBitmap(options?: ToBitmapOptions): Buffer; + /** + * The data URL of the image. + */ + toDataURL(options?: ToDataURLOptions): string; + /** + * A Buffer that contains the image's `JPEG` encoded data. + */ + toJPEG(quality: number): Buffer; + /** + * A Buffer that contains the image's `PNG` encoded data. + */ + toPNG(options?: ToPNGOptions): Buffer; + /** + * A `boolean` property that determines whether the image is considered a template + * image. + * + * Please note that this property only has an effect on macOS. + * + * @platform darwin + */ + isMacTemplateImage: boolean; + } + + interface NativeTheme extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/native-theme + + /** + * Emitted when something in the underlying NativeTheme has changed. This normally + * means that either the value of `shouldUseDarkColors`, + * `shouldUseHighContrastColors` or `shouldUseInvertedColorScheme` has changed. You + * will have to check them to determine which one has changed. + */ + on(event: 'updated', listener: Function): this; + once(event: 'updated', listener: Function): this; + addListener(event: 'updated', listener: Function): this; + removeListener(event: 'updated', listener: Function): this; + /** + * 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. + * + * @platform win32 + */ + readonly inForcedColorsMode: boolean; + /** + * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is + * being instructed to show a dark-style UI. If you want to modify this value you + * should use `themeSource` below. + * + */ + readonly shouldUseDarkColors: boolean; + /** + * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or + * is being instructed to show a high-contrast UI. + * + * @platform darwin,win32 + */ + readonly shouldUseHighContrastColors: boolean; + /** + * A `boolean` for if the OS / Chromium currently has an inverted color scheme or + * is being instructed to use an inverted color scheme. + * + * @platform darwin,win32 + */ + readonly shouldUseInvertedColorScheme: boolean; + /** + * A `string` property that can be `system`, `light` or `dark`. It is used to + * override and supersede the value that Chromium has chosen to use internally. + * + * Setting this property to `system` will remove the override and everything will + * be reset to the OS default. By default `themeSource` is `system`. + * + * Settings this property to `dark` will have the following effects: + * + * * `nativeTheme.shouldUseDarkColors` will be `true` when accessed + * * Any UI Electron renders on Linux and Windows including context menus, + * devtools, etc. will use the dark UI. + * * Any UI the OS renders on macOS including menus, window frames, etc. will use + * the dark UI. + * * The `prefers-color-scheme` CSS query will match `dark` mode. + * * The `updated` event will be emitted + * + * Settings this property to `light` will have the following effects: + * + * * `nativeTheme.shouldUseDarkColors` will be `false` when accessed + * * Any UI Electron renders on Linux and Windows including context menus, + * devtools, etc. will use the light UI. + * * Any UI the OS renders on macOS including menus, window frames, etc. will use + * the light UI. + * * The `prefers-color-scheme` CSS query will match `light` mode. + * * The `updated` event will be emitted + * + * The usage of this property should align with a classic "dark mode" state machine + * in your application where the user has three options. + * + * * `Follow OS` --> `themeSource = 'system'` + * * `Dark Mode` --> `themeSource = 'dark'` + * * `Light Mode` --> `themeSource = 'light'` + * + * Your application should then always use `shouldUseDarkColors` to determine what + * CSS to apply. + */ + themeSource: ('system' | 'light' | 'dark'); + } + + interface Net { + + // Docs: https://electronjs.org/docs/api/net + + /** + * Whether there is currently internet connection. + * + * A return value of `false` is a pretty strong indicator that the user won't be + * able to connect to remote sites. However, a return value of `true` is + * inconclusive; even if some link is up, it is uncertain whether a particular + * connection attempt to a particular remote site will be successful. + */ + isOnline(): boolean; + /** + * Creates a `ClientRequest` instance using the provided `options` which are + * directly forwarded to the `ClientRequest` constructor. The `net.request` method + * would be used to issue both secure and insecure HTTP requests according to the + * specified protocol scheme in the `options` object. + */ + request(options: (ClientRequestConstructorOptions) | (string)): ClientRequest; + /** + * A `boolean` property. Whether there is currently internet connection. + * + * A return value of `false` is a pretty strong indicator that the user won't be + * able to connect to remote sites. However, a return value of `true` is + * inconclusive; even if some link is up, it is uncertain whether a particular + * connection attempt to a particular remote site will be successful. + * + */ + readonly online: boolean; + } + + interface NetLog { + + // Docs: https://electronjs.org/docs/api/net-log + + /** + * resolves when the net log has begun recording. + * + * Starts recording network events to `path`. + */ + startLogging(path: string, options?: StartLoggingOptions): Promise; + /** + * resolves when the net log has been flushed to disk. + * + * Stops recording network events. If not called, net logging will automatically + * end when app quits. + */ + stopLogging(): Promise; + /** + * A `boolean` property that indicates whether network logs are currently being + * recorded. + * + */ + readonly currentlyLogging: boolean; + } + + interface NewWindowWebContentsEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/new-window-web-contents-event + + newGuest?: BrowserWindow; + } + + class Notification extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/notification + + on(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + once(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + addListener(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + removeListener(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + /** + * Emitted when the notification is clicked by the user. + */ + on(event: 'click', listener: (event: Event) => void): this; + once(event: 'click', listener: (event: Event) => void): this; + addListener(event: 'click', listener: (event: Event) => void): this; + removeListener(event: 'click', listener: (event: Event) => void): this; + /** + * Emitted when the notification is closed by manual intervention from the user. + * + * This event is not guaranteed to be emitted in all cases where the notification + * is closed. + */ + on(event: 'close', listener: (event: Event) => void): this; + once(event: 'close', listener: (event: Event) => void): this; + addListener(event: 'close', listener: (event: Event) => void): this; + removeListener(event: 'close', listener: (event: Event) => void): this; + /** + * Emitted when an error is encountered while creating and showing the native + * notification. + * + * @platform win32 + */ + on(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + once(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + addListener(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + removeListener(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + /** + * Emitted when the user clicks the "Reply" button on a notification with + * `hasReply: true`. + * + * @platform darwin + */ + on(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + once(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + addListener(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + removeListener(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + /** + * Emitted when the notification is shown to the user, note this could be fired + * multiple times as a notification can be shown multiple times through the + * `show()` method. + */ + on(event: 'show', listener: (event: Event) => void): this; + once(event: 'show', listener: (event: Event) => void): this; + addListener(event: 'show', listener: (event: Event) => void): this; + removeListener(event: 'show', listener: (event: Event) => void): this; + /** + * Notification + */ + constructor(options?: NotificationConstructorOptions); + /** + * Whether or not desktop notifications are supported on the current system + */ + static isSupported(): boolean; + /** + * Dismisses the notification. + */ + close(): void; + /** + * Immediately shows the notification to the user, please note this means unlike + * the HTML5 Notification implementation, instantiating a `new Notification` does + * not immediately show it to the user, you need to call this method before the OS + * will display it. + * + * If the notification has been shown before, this method will dismiss the + * previously shown notification and create a new one with identical properties. + */ + show(): void; + /** + * A `NotificationAction[]` property representing the actions of the notification. + */ + actions: NotificationAction[]; + /** + * A `string` property representing the body of the notification. + */ + body: string; + /** + * A `string` property representing the close button text of the notification. + */ + closeButtonText: string; + /** + * A `boolean` property representing whether the notification has a reply action. + */ + hasReply: boolean; + /** + * A `string` property representing the reply placeholder of the notification. + */ + replyPlaceholder: string; + /** + * A `boolean` property representing whether the notification is silent. + */ + silent: boolean; + /** + * A `string` property representing the sound of the notification. + */ + sound: string; + /** + * A `string` property representing the subtitle of the notification. + */ + subtitle: string; + /** + * A `string` property representing the type of timeout duration for the + * notification. Can be 'default' or 'never'. + * + * If `timeoutType` is set to 'never', the notification never expires. It stays + * open until closed by the calling API or the user. + * + * @platform linux,win32 + */ + timeoutType: ('default' | 'never'); + /** + * A `string` property representing the title of the notification. + */ + title: string; + /** + * A `string` property representing the custom Toast XML of the notification. + * + * @platform win32 + */ + toastXml: string; + /** + * A `string` property representing the urgency level of the notification. Can be + * 'normal', 'critical', or 'low'. + * + * Default is 'low' - see NotifyUrgency for more information. + * + * @platform linux + */ + urgency: ('normal' | 'critical' | 'low'); + } + + interface NotificationAction { + + // Docs: https://electronjs.org/docs/api/structures/notification-action + + /** + * The label for the given action. + */ + text?: string; + /** + * The type of action, can be `button`. + */ + type: ('button'); + } + + interface NotificationResponse { + + // Docs: https://electronjs.org/docs/api/structures/notification-response + + /** + * The identifier string of the action that the user selected. + */ + actionIdentifier: string; + /** + * The delivery date of the notification. + */ + date: number; + /** + * The unique identifier for this notification request. + */ + identifier: string; + /** + * A dictionary of custom information associated with the notification. + */ + userInfo: Record; + /** + * The text entered or chosen by the user. + */ + userText?: string; + } + + interface PaymentDiscount { + + // Docs: https://electronjs.org/docs/api/structures/payment-discount + + /** + * A string used to uniquely identify a discount offer for a product. + */ + identifier: string; + /** + * A string that identifies the key used to generate the signature. + */ + keyIdentifier: string; + /** + * A universally unique ID (UUID) value that you define. + */ + nonce: string; + /** + * A UTF-8 string representing the properties of a specific discount offer, + * cryptographically signed. + */ + signature: string; + /** + * The date and time of the signature's creation in milliseconds, formatted in Unix + * epoch time. + */ + timestamp: number; + } + + interface Point { + + // Docs: https://electronjs.org/docs/api/structures/point + + x: number; + y: number; + } + + interface PostBody { + + // Docs: https://electronjs.org/docs/api/structures/post-body + + /** + * The boundary used to separate multiple parts of the message. Only valid when + * `contentType` is `multipart/form-data`. + */ + boundary?: string; + /** + * The `content-type` header used for the data. One of + * `application/x-www-form-urlencoded` or `multipart/form-data`. Corresponds to the + * `enctype` attribute of the submitted HTML form. + */ + contentType: string; + /** + * The post data to be sent to the new window. + */ + data: Array<(UploadRawData) | (UploadFile)>; + } + + interface PowerMonitor extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/power-monitor + + /** + * Emitted when the system is about to lock the screen. + * + * @platform darwin,win32 + */ + on(event: 'lock-screen', listener: Function): this; + once(event: 'lock-screen', listener: Function): this; + addListener(event: 'lock-screen', listener: Function): this; + removeListener(event: 'lock-screen', listener: Function): this; + /** + * Emitted when the system changes to AC power. + * + * @platform darwin,win32 + */ + on(event: 'on-ac', listener: Function): this; + once(event: 'on-ac', listener: Function): this; + addListener(event: 'on-ac', listener: Function): this; + removeListener(event: 'on-ac', listener: Function): this; + /** + * Emitted when system changes to battery power. + * + * @platform darwin + */ + on(event: 'on-battery', listener: Function): this; + once(event: 'on-battery', listener: Function): this; + addListener(event: 'on-battery', listener: Function): this; + removeListener(event: 'on-battery', listener: Function): this; + /** + * Emitted when system is resuming. + */ + on(event: 'resume', listener: Function): this; + once(event: 'resume', listener: Function): this; + addListener(event: 'resume', listener: Function): this; + removeListener(event: 'resume', listener: Function): this; + /** + * Emitted when the system is about to reboot or shut down. If the event handler + * invokes `e.preventDefault()`, Electron will attempt to delay system shutdown in + * order for the app to exit cleanly. If `e.preventDefault()` is called, the app + * should exit as soon as possible by calling something like `app.quit()`. + * + * @platform linux,darwin + */ + on(event: 'shutdown', listener: Function): this; + once(event: 'shutdown', listener: Function): this; + addListener(event: 'shutdown', listener: Function): this; + removeListener(event: 'shutdown', listener: Function): this; + /** + * Emitted when the system is suspending. + */ + on(event: 'suspend', listener: Function): this; + once(event: 'suspend', listener: Function): this; + addListener(event: 'suspend', listener: Function): this; + removeListener(event: 'suspend', listener: Function): this; + /** + * Emitted as soon as the systems screen is unlocked. + * + * @platform darwin,win32 + */ + on(event: 'unlock-screen', listener: Function): this; + once(event: 'unlock-screen', listener: Function): this; + addListener(event: 'unlock-screen', listener: Function): this; + removeListener(event: 'unlock-screen', listener: Function): this; + /** + * Emitted when a login session is activated. See documentation for more + * information. + * + * @platform darwin + */ + on(event: 'user-did-become-active', listener: Function): this; + once(event: 'user-did-become-active', listener: Function): this; + addListener(event: 'user-did-become-active', listener: Function): this; + removeListener(event: 'user-did-become-active', listener: Function): this; + /** + * Emitted when a login session is deactivated. See documentation for more + * information. + * + * @platform darwin + */ + on(event: 'user-did-resign-active', listener: Function): this; + once(event: 'user-did-resign-active', listener: Function): this; + addListener(event: 'user-did-resign-active', listener: Function): this; + removeListener(event: 'user-did-resign-active', listener: Function): this; + /** + * The system's current state. Can be `active`, `idle`, `locked` or `unknown`. + * + * Calculate the system idle state. `idleThreshold` is the amount of time (in + * seconds) before considered idle. `locked` is available on supported systems + * only. + */ + getSystemIdleState(idleThreshold: number): ('active' | 'idle' | 'locked' | 'unknown'); + /** + * Idle time in seconds + * + * Calculate system idle time in seconds. + */ + getSystemIdleTime(): number; + /** + * Whether the system is on battery power. + * + * To monitor for changes in this property, use the `on-battery` and `on-ac` + * events. + */ + isOnBatteryPower(): boolean; + /** + * A `boolean` property. True if the system is on battery power. + * + * See `powerMonitor.isOnBatteryPower()`. + */ + onBatteryPower: boolean; + } + + interface PowerSaveBlocker { + + // Docs: https://electronjs.org/docs/api/power-save-blocker + + /** + * Whether the corresponding `powerSaveBlocker` has started. + */ + isStarted(id: number): boolean; + /** + * The blocker ID that is assigned to this power blocker. + * + * Starts preventing the system from entering lower-power mode. Returns an integer + * identifying the power save blocker. + * + * **Note:** `prevent-display-sleep` has higher precedence over + * `prevent-app-suspension`. Only the highest precedence type takes effect. In + * other words, `prevent-display-sleep` always takes precedence over + * `prevent-app-suspension`. + * + * For example, an API calling A requests for `prevent-app-suspension`, and another + * calling B requests for `prevent-display-sleep`. `prevent-display-sleep` will be + * used until B stops its request. After that, `prevent-app-suspension` is used. + */ + start(type: 'prevent-app-suspension' | 'prevent-display-sleep'): number; + /** + * Stops the specified power save blocker. + */ + stop(id: number): void; + } + + interface PrinterInfo { + + // Docs: https://electronjs.org/docs/api/structures/printer-info + + /** + * a longer description of the printer's type. + */ + description: string; + /** + * the name of the printer as shown in Print Preview. + */ + displayName: string; + /** + * whether or not a given printer is set as the default printer on the OS. + */ + isDefault: boolean; + /** + * the name of the printer as understood by the OS. + */ + name: string; + /** + * an object containing a variable number of platform-specific printer information. + */ + options: Options; + /** + * the current status of the printer. + */ + status: number; + } + + interface ProcessMemoryInfo { + + // Docs: https://electronjs.org/docs/api/structures/process-memory-info + + /** + * The amount of memory not shared by other processes, such as JS heap or HTML + * content in Kilobytes. + */ + private: number; + /** + * The amount of memory currently pinned to actual physical RAM in Kilobytes. + * + * @platform linux,win32 + */ + residentSet: number; + /** + * The amount of memory shared between processes, typically memory consumed by the + * Electron code itself in Kilobytes. + */ + shared: number; + } + + interface ProcessMetric { + + // Docs: https://electronjs.org/docs/api/structures/process-metric + + /** + * CPU usage of the process. + */ + cpu: CPUUsage; + /** + * Creation time for this process. The time is represented as number of + * milliseconds since epoch. Since the `pid` can be reused after a process dies, it + * is useful to use both the `pid` and the `creationTime` to uniquely identify a + * process. + */ + creationTime: number; + /** + * One of the following values: + * + * @platform win32 + */ + integrityLevel?: ('untrusted' | 'low' | 'medium' | 'high' | 'unknown'); + /** + * Memory information for the process. + */ + memory: MemoryInfo; + /** + * The name of the process. Examples for utility: `Audio Service`, `Content + * Decryption Module Service`, `Network Service`, `Video Capture`, etc. + */ + name?: string; + /** + * Process id of the process. + */ + pid: number; + /** + * Whether the process is sandboxed on OS level. + * + * @platform darwin,win32 + */ + sandboxed?: boolean; + /** + * The non-localized name of the process. + */ + serviceName?: string; + /** + * Process type. One of the following values: + */ + type: ('Browser' | 'Tab' | 'Utility' | 'Zygote' | 'Sandbox helper' | 'GPU' | 'Pepper Plugin' | 'Pepper Plugin Broker' | 'Unknown'); + } + + interface Product { + + // Docs: https://electronjs.org/docs/api/structures/product + + /** + * The total size of the content, in bytes. + */ + contentLengths: number[]; + /** + * A string that identifies the version of the content. + */ + contentVersion: string; + /** + * 3 character code presenting a product's currency based on the ISO 4217 standard. + */ + currencyCode: string; + /** + * An array of discount offers + */ + discounts: ProductDiscount[]; + /** + * The total size of the content, in bytes. + */ + downloadContentLengths: number[]; + /** + * A string that identifies the version of the content. + */ + downloadContentVersion: string; + /** + * The locale formatted price of the product. + */ + formattedPrice: string; + /** + * The object containing introductory price information for the product. available + * for the product. + */ + introductoryPrice?: ProductDiscount; + /** + * A boolean value that indicates whether the App Store has downloadable content + * for this product. `true` if at least one file has been associated with the + * product. + */ + isDownloadable: boolean; + /** + * A description of the product. + */ + localizedDescription: string; + /** + * The name of the product. + */ + localizedTitle: string; + /** + * The cost of the product in the local currency. + */ + price: number; + /** + * The string that identifies the product to the Apple App Store. + */ + productIdentifier: string; + /** + * The identifier of the subscription group to which the subscription belongs. + */ + subscriptionGroupIdentifier: string; + /** + * The period details for products that are subscriptions. + */ + subscriptionPeriod?: ProductSubscriptionPeriod; + } + + interface ProductDiscount { + + // Docs: https://electronjs.org/docs/api/structures/product-discount + + /** + * A string used to uniquely identify a discount offer for a product. + */ + identifier: string; + /** + * An integer that indicates the number of periods the product discount is + * available. + */ + numberOfPeriods: number; + /** + * The payment mode for this product discount. Can be `payAsYouGo`, `payUpFront`, + * or `freeTrial`. + */ + paymentMode: ('payAsYouGo' | 'payUpFront' | 'freeTrial'); + /** + * The discount price of the product in the local currency. + */ + price: number; + /** + * The locale used to format the discount price of the product. + */ + priceLocale: string; + /** + * An object that defines the period for the product discount. + */ + subscriptionPeriod?: ProductSubscriptionPeriod; + /** + * The type of discount offer. + */ + type: number; + } + + interface ProductSubscriptionPeriod { + + // Docs: https://electronjs.org/docs/api/structures/product-subscription-period + + /** + * The number of units per subscription period. + */ + numberOfUnits: number; + /** + * The increment of time that a subscription period is specified in. Can be `day`, + * `week`, `month`, `year`. + */ + unit: ('day' | 'week' | 'month' | 'year'); + } + + interface Protocol { + + // Docs: https://electronjs.org/docs/api/protocol + + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a `Buffer` as a response. + */ + interceptBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a file as a response. + */ + interceptFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a new HTTP request as a response. + */ + interceptHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Same as `protocol.registerStreamProtocol`, except that it replaces an existing + * protocol handler. + */ + interceptStreamProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (NodeJS.ReadableStream) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a `string` as a response. + */ + interceptStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether `scheme` is already intercepted. + */ + isProtocolIntercepted(scheme: string): boolean; + /** + * Whether `scheme` is already registered. + */ + isProtocolRegistered(scheme: string): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send a `Buffer` as a response. + * + * The usage is the same with `registerFileProtocol`, except that the `callback` + * should be called with either a `Buffer` object or an object that has the `data` + * property. + * + * Example: + */ + registerBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send a file as the response. The + * `handler` will be called with `request` and `callback` where `request` is an + * incoming request for the `scheme`. + * + * To handle the `request`, the `callback` should be called with either the file's + * path or an object that has a `path` property, e.g. `callback(filePath)` or + * `callback({ path: filePath })`. The `filePath` must be an absolute path. + * + * By default the `scheme` is treated like `http:`, which is parsed differently + * from protocols that follow the "generic URI syntax" like `file:`. + */ + registerFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send an HTTP request as a response. + * + * The usage is the same with `registerFileProtocol`, except that the `callback` + * should be called with an object that has the `url` property. + */ + registerHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; + /** + * **Note:** This method can only be used before the `ready` event of the `app` + * module gets emitted and can be called only once. + * + * Registers the `scheme` as standard, secure, bypasses content security policy for + * resources, allows registering ServiceWorker, supports fetch API, and streaming + * video/audio. Specify a privilege with the value of `true` to enable the + * capability. + * + * An example of registering a privileged scheme, that bypasses Content Security + * Policy: + * + * A standard scheme adheres to what RFC 3986 calls generic URI syntax. For example + * `http` and `https` are standard schemes, while `file` is not. + * + * Registering a scheme as standard allows relative and absolute resources to be + * resolved correctly when served. Otherwise the scheme will behave like the `file` + * protocol, but without the ability to resolve relative URLs. + * + * For example when you load following page with custom protocol without + * registering it as standard scheme, the image will not be loaded because + * non-standard schemes can not recognize relative URLs: + * + * Registering a scheme as standard will allow access to files through the + * FileSystem API. Otherwise the renderer will throw a security error for the + * scheme. + * + * By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, + * cookies) are disabled for non standard schemes. So in general if you want to + * register a custom protocol to replace the `http` protocol, you have to register + * it as a standard scheme. + * + * Protocols that use streams (http and stream protocols) should set `stream: + * true`. The `

0n-L--g}wsNok0XS0H&e&f6o+)lWgLf9_Sid>5 z;SCP`;YOR7e!~}AsLiI1q-w-Pz_@Bx zT>!{C40xZJmn zI=)sl7-Y;{ha`ADgV3WgLXIPj(?X8na^#;na1Z_1B1xz_1(Nm1xS5R-5$EDW?F6wN z)O|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